From 32f02edcc848003bb557429ebeef1d1563c2542d Mon Sep 17 00:00:00 2001 From: Matheus Date: Wed, 27 Aug 2025 21:52:13 -0300 Subject: [PATCH] panic: halt other cpus --- kernel-src/lib/panic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel-src/lib/panic.c b/kernel-src/lib/panic.c index 4f70af50..c7ceeaf1 100644 --- a/kernel-src/lib/panic.c +++ b/kernel-src/lib/panic.c @@ -1,9 +1,11 @@ #include #include +#include #include #include __attribute__((noreturn)) void _panic(char *msg, context_t *ctx) { + interrupt_set(false); printf("cpu%lu: Oops.\n", current_cpu_id()); if (msg) @@ -12,6 +14,6 @@ __attribute__((noreturn)) void _panic(char *msg, context_t *ctx) { if (ctx) PRINT_CTX(ctx); - interrupt_set(false); + arch_smp_haltallothers(); for (;;); }