summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--i386/i386at/model_dep.c9
-rw-r--r--kern/debug.c6
2 files changed, 14 insertions, 1 deletions
diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c
index 573ca6d..3ebe2e6 100644
--- a/i386/i386at/model_dep.c
+++ b/i386/i386at/model_dep.c
@@ -107,6 +107,10 @@ void inittodr(); /* forward */
int rebootflag = 0; /* exported to kdintr */
+#if ! MACH_KBD
+boolean_t reboot_on_panic = 1;
+#endif
+
/* XX interrupt stack pointer and highwater mark, for locore.S. */
vm_offset_t int_stack_top, int_stack_high;
@@ -428,6 +432,11 @@ void c_boot_entry(vm_offset_t bi)
cninit(); /* need console for debugger */
Debugger("init");
}
+#else
+ if (strstr (kernel_cmdline, "-H "))
+ {
+ reboot_on_panic = 0;
+ }
#endif /* MACH_KDB */
machine_slot[0].is_cpu = TRUE;
diff --git a/kern/debug.c b/kern/debug.c
index 6644340..109d920 100644
--- a/kern/debug.c
+++ b/kern/debug.c
@@ -126,6 +126,10 @@ panic_init(void)
}
}
+#if ! MACH_KBD
+extern boolean_t reboot_on_panic;
+#endif
+
/*VARARGS1*/
void
panic(const char *s, ...)
@@ -167,7 +171,7 @@ panic(const char *s, ...)
delay (1000000); /* microseconds */
}
- halt_all_cpus (1);
+ halt_all_cpus (reboot_on_panic);
#endif
}