Kernel: kernel panic is now sent to all processors

This commit is contained in:
Bananymous 2024-03-15 13:45:01 +02:00
parent e65bc040af
commit 42469b83fe
1 changed files with 8 additions and 1 deletions

View File

@ -145,8 +145,8 @@ namespace Kernel
{
if (g_paniced)
{
// FIXME: tell other processors kernel panic has occured
dprintln("Processor {} halted", Processor::current_id());
InterruptController::get().broadcast_ipi();
asm volatile("cli; 1: hlt; jmp 1b");
}
@ -299,6 +299,13 @@ done:
extern "C" void cpp_irq_handler(uint64_t irq, InterruptStack& interrupt_stack)
{
if (g_paniced)
{
dprintln("Processor {} halted", Processor::current_id());
InterruptController::get().broadcast_ipi();
asm volatile("cli; 1: hlt; jmp 1b");
}
if (Scheduler::current_tid())
{
Thread::current().set_return_rsp(interrupt_stack.rsp);