diff options
-rw-r--r-- | sys/arch/amd64/conf/GENERIC | 1 | ||||
-rw-r--r-- | sys/kern/kern_panic.c | 10 |
2 files changed, 10 insertions, 1 deletions
diff --git a/sys/arch/amd64/conf/GENERIC b/sys/arch/amd64/conf/GENERIC index 44ab8b5..95fe2e0 100644 --- a/sys/arch/amd64/conf/GENERIC +++ b/sys/arch/amd64/conf/GENERIC @@ -9,6 +9,7 @@ option SPECTRE_IBRS no // Enable the IBRS CPU feature option SERIAL_DEBUG yes // Enable kmsg serial logging option USER_KMSG no // Show kmsg in user consoles option CPU_SMEP yes // Supervisor Memory Exec Protection +option PANIC_SCR no // Clear screen on panic // Kernel constants setval SCHED_NQUEUE 4 // Number of scheduler queues (for MLFQ) diff --git a/sys/kern/kern_panic.c b/sys/kern/kern_panic.c index 099f620..2df4537 100644 --- a/sys/kern/kern_panic.c +++ b/sys/kern/kern_panic.c @@ -35,6 +35,12 @@ #include <machine/cdefs.h> #include <machine/cpu.h> +#if defined(__PANIC_SCR) +#define PANIC_SCR __PANIC_SCR +#else +#define PANIC_SCR 0 +#endif + /* * Burn and sizzle - the core logic that really ends * things ::) @@ -101,7 +107,9 @@ panic(const char *fmt, ...) md_intoff(); cpu_halt_others(); - panic_screen(); + if (PANIC_SCR) { + panic_screen(); + } va_start(ap, fmt); do_panic(fmt, &ap); __builtin_unreachable(); |