FORWARD _PROTOTYPE( void ser_debug, (int c));
+PUBLIC void arch_monitor(void)
+{
+ level0(monitor);
+}
+
PUBLIC void arch_shutdown(int how)
{
/* Mask all interrupts, including the clock. */
arch_set_params(mybuffer, strlen(mybuffer)+1);
}
- level0(monitor);
+ arch_monitor();
} else {
/* Reset the system by forcing a processor shutdown. First stop
* the BIOS memory test by setting a soft reset flag.
static int varname = 0; \
int mustunlock = 0; \
if(!intr_disabled()) { lock; mustunlock = 1; } \
+ if(magictest != MAGICTEST) { \
+ minix_panic(#varname " magictest failed", __LINE__); \
+ } \
if(varname) { \
minix_panic(#varname " recursive enter", __LINE__); \
} \
EXTERN char params_buffer[512]; /* boot monitor parameters */
EXTERN int minix_panicing;
EXTERN int locklevel;
+#define MAGICTEST 0xC0FFEE23
+EXTERN u32_t magictest; /* global magic number */
#if DEBUG_TRACE
EXTERN int verboseflags;
/* Architecture-dependent initialization. */
arch_init();
+
+ /* Global value to test segment sanity. */
+ magictest = MAGICTEST;
/* Clear the process table. Anounce each slot as empty and set up mappings
* for proc_addr() and proc_nr() macros. Do the same for the table with
bill_ptr = rp; /* bill for system time */
NOREC_RETURN(pick, );
}
+ minix_panic("no runnable processes", NO_NUM);
}
/*===========================================================================*
_PROTOTYPE( void arch_init, (void) );
_PROTOTYPE( void ser_putc, (char) );
_PROTOTYPE( void arch_shutdown, (int) );
+_PROTOTYPE( void arch_monitor, (void) );
_PROTOTYPE( void arch_get_aout_headers, (int i, struct exec *h) );
_PROTOTYPE( void restart, (void) );
_PROTOTYPE( void read_tsc, (unsigned long *high, unsigned long *low) );
int nr;
{
/* The system has run aground of a fatal kernel error. Terminate execution. */
-if (!minix_panicing++) {
+if (minix_panicing++) {
+ arch_monitor();
+}
if (mess != NULL) {
kprintf("kernel panic: %s", mess);
kprintf("kernel: ");
util_stacktrace();
-}
/* Abort MINIX. */
minix_shutdown(NULL);