blob: bbf10e512fb986781b45581f9cf8857a6a9c42de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
#DPATCHLEVEL=0
2005-12-29 Soeren D. Schulze <soeren.d.schulze@gmx.de>
* i386/i386at/model_dep.c (reboot_on_panic) [!MACH_KBD]: New variable.
(c_boot_entry) [!MACH_KBD]: Set reboot_on_panic to 0 if kernel_cmdline
contains '-H'.
* kern/debug.c (panic): Call halt_all_cpus with reboot_on_panic as
argument.
Index: i386/i386at/model_dep.c
===================================================================
--- i386/i386at/model_dep.c.orig 2006-08-26 20:19:10.000000000 +0300
+++ i386/i386at/model_dep.c 2006-08-26 20:22:57.000000000 +0300
@@ -94,6 +94,10 @@
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;
@@ -352,6 +356,11 @@
cninit(); /* need console for debugger */
Debugger();
}
+#else
+ if (strstr (kernel_cmdline, "-H "))
+ {
+ reboot_on_panic = 0;
+ }
#endif /* MACH_KDB */
machine_slot[0].is_cpu = TRUE;
Index: kern/debug.c
===================================================================
--- kern/debug.c.orig 2006-08-26 20:19:10.000000000 +0300
+++ kern/debug.c 2006-08-26 20:22:57.000000000 +0300
@@ -120,6 +120,10 @@
}
}
+#if ! MACH_KBD
+extern boolean_t reboot_on_panic;
+#endif
+
/*VARARGS1*/
void
panic(const char *s, ...)
@@ -161,7 +165,7 @@
#if MACH_KDB
Debugger("panic");
#else
- halt_all_cpus (1);
+ halt_all_cpus (reboot_on_panic);
#endif
}
|