summaryrefslogtreecommitdiff
path: root/src/kernel/panic.c
diff options
context:
space:
mode:
authorBrett Weiland <brett_weiland@bpcspace.com>2021-08-29 02:52:48 -0500
committerBrett Weiland <brett_weiland@bpcspace.com>2021-08-29 02:52:48 -0500
commit1f71b9576db536af84155363e14fc49e92de2eef (patch)
tree23f65a31cc89785befb70517b203625e2296326f /src/kernel/panic.c
parentdc0e84d5779db68e081c667faadc19a20de861ea (diff)
backup 8.29.21
Diffstat (limited to 'src/kernel/panic.c')
-rw-r--r--src/kernel/panic.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/kernel/panic.c b/src/kernel/panic.c
index 82a761f..d17c185 100644
--- a/src/kernel/panic.c
+++ b/src/kernel/panic.c
@@ -1,12 +1,15 @@
#include <panic.h>
#include <stdint.h>
#include <printf.h>
-#include <kernel.h>
-#include <serial.h>
+#include <addr.h>
+#include <klog.h>
#include <isv.h>
+#include <smp_sync.h>
+
+static uint8_t panic_lock = 0;
void panic(int reason, void *eframe_p, struct registers *regs) { // will fill with debugging info latter
-
+ lock(&panic_lock);
#ifdef EASTEREGG_BLOATWARE
printf("\nKernel PANIC!!!!!!!\n");
@@ -49,6 +52,9 @@ void panic(int reason, void *eframe_p, struct registers *regs) { // will fill wi
break;
case KERNEL_PANIC_HPET_REQUIRED:
printf("\nHPET is required. \nIf you get this error, let know;\nif enough people share this issue, I'll impliment PIT usage.\n");
+ case KERNEL_PANIC_SMP_FAILED:
+ printf("\nNot all cores booted successfully (see text before panic).\n");
+ break;
default:
printf("\nUnknown panic code %i\n.", reason);
break;