summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/m68k/efi332/misc
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1997-03-11 15:42:59 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1997-03-11 15:42:59 +0000
commit6335022e2062931771857bf84711dedcc32bc247 (patch)
tree827e6fa0ec49427cc4bb6a9110698669b8588666 /c/src/lib/libbsp/m68k/efi332/misc
parentmodified _Chain_Insert_unprotected to have the form required to be used (diff)
downloadrtems-6335022e2062931771857bf84711dedcc32bc247.tar.bz2
updates from John Gwynne
Diffstat (limited to 'c/src/lib/libbsp/m68k/efi332/misc')
-rw-r--r--c/src/lib/libbsp/m68k/efi332/misc/dotests15
-rw-r--r--c/src/lib/libbsp/m68k/efi332/misc/gdbinit6813
-rw-r--r--c/src/lib/libbsp/m68k/efi332/misc/interr.c95
3 files changed, 123 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/m68k/efi332/misc/dotests b/c/src/lib/libbsp/m68k/efi332/misc/dotests
new file mode 100644
index 0000000000..b9449bffc3
--- /dev/null
+++ b/c/src/lib/libbsp/m68k/efi332/misc/dotests
@@ -0,0 +1,15 @@
+#! /bin/bash
+#
+# $Id$
+#
+
+/bin/rm sp* &>/dev/null
+(cd ..; for f in sp*; do cp ${f}/o-efi332/${f}.nxe hold; done)
+
+stty 5:0:800008bf:0:0:0:0:0:0:1:1:0:0:0:0:0:0:0:0:0:0:0:0 </dev/cua0
+/bin/cp /dev/cua0 screen &
+
+for f in sp*; do m68k-bdm-coff-gdb ${f} </dev/null; done
+
+kill -9 `ps -efax | grep "/bin/cp /dev/cua0" | sed "/grep/D; s/ .*$//"`
+/bin/rm sp* &>/dev/null
diff --git a/c/src/lib/libbsp/m68k/efi332/misc/gdbinit68 b/c/src/lib/libbsp/m68k/efi332/misc/gdbinit68
new file mode 100644
index 0000000000..984af7d3eb
--- /dev/null
+++ b/c/src/lib/libbsp/m68k/efi332/misc/gdbinit68
@@ -0,0 +1,13 @@
+echo Setting up the environment for efi332 debuging.\n
+
+target bdm /dev/pdbdm0
+bdm_setdelay 405
+bdm_autoreset on
+set remotecache off
+bdm_timetocomeup 0
+bdm_init
+bdm_reset
+set $sfc=5
+set $dfc=5
+r
+q
diff --git a/c/src/lib/libbsp/m68k/efi332/misc/interr.c b/c/src/lib/libbsp/m68k/efi332/misc/interr.c
new file mode 100644
index 0000000000..0a82581314
--- /dev/null
+++ b/c/src/lib/libbsp/m68k/efi332/misc/interr.c
@@ -0,0 +1,95 @@
+/*
+ * Internal Error Handler
+ *
+ * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
+ * On-Line Applications Research Corporation (OAR).
+ * All rights assigned to U.S. Government, 1994.
+ *
+ * This material may be reproduced by or for the U.S. Government pursuant
+ * to the copyright license under the clause at DFARS 252.227-7013. This
+ * notice must appear in all copies of this file and its derivatives.
+ *
+ * $Id$
+ */
+
+#include <rtems/system.h>
+#include <rtems/score/interr.h>
+#include <rtems/score/sysstate.h>
+#include <rtems/score/userext.h>
+
+/*PAGE
+ *
+ * _Internal_error_Occurred
+ *
+ * This routine will invoke the fatal error handler supplied by the user
+ * followed by the the default one provided by the executive. The default
+ * error handler assumes no hardware is present to help inform the user
+ * of the problem. Halt stores the error code in a known register,
+ * disables interrupts, and halts the CPU. If the CPU does not have a
+ * halt instruction, it will loop to itself.
+ *
+ * Input parameters:
+ * the_source - what subsystem the error originated in
+ * is_internal - if the error was internally generated
+ * the_error - fatal error status code
+ *
+ * Output parameters:
+ * As much information as possible is stored in a CPU dependent fashion.
+ * See the CPU dependent code for more information.
+ *
+ * NOTE: The the_error is not necessarily a directive status code.
+ */
+
+/*
+ * Ugly hack.... _CPU_Fatal_halt() disonnects the bdm. Without this
+ * change, the_error is only known only to the cpu :).
+ *
+ * From "bsp.h" which is not yet available in the arch tree during
+ * this phase of install. jsg
+ */
+void outbyte(char);
+void bsp_cleanup( void );
+
+#define RAW_PUTS(str) \
+ { register char *ptr = str; \
+ while (*ptr) outbyte(*ptr++); \
+ }
+
+#define RAW_PUTI(n) { \
+ register int i, j; \
+ \
+ RAW_PUTS("0x"); \
+ for (i=28;i>=0;i -= 4) { \
+ j = (n>>i) & 0xf; \
+ outbyte( (j>9 ? j-10+'a' : j+'0') ); \
+ } \
+ }
+
+void volatile _Internal_error_Occurred(
+ Internal_errors_Source the_source,
+ boolean is_internal,
+ unsigned32 the_error
+)
+{
+
+ Internal_errors_What_happened.the_source = the_source;
+ Internal_errors_What_happened.is_internal = is_internal;
+ Internal_errors_What_happened.the_error = the_error;
+
+ _User_extensions_Fatal( the_source, is_internal, the_error );
+
+ _System_state_Set( SYSTEM_STATE_FAILED );
+
+ /* try to print error message to outbyte */
+ RAW_PUTS("\r\nRTEMS: A fatal error has occured.\r\n");
+ RAW_PUTS("RTEMS: fatal error ");
+ RAW_PUTI( the_error );
+ RAW_PUTS(".\r\n");
+
+ /* configure peripherals for a safe exit */
+ bsp_cleanup();
+
+ _CPU_Fatal_halt( the_error );
+
+ /* will not return from this routine */
+}