Kernel: kernel panic is now sent to all processors
This commit is contained in:
parent
e65bc040af
commit
42469b83fe
|
@ -145,8 +145,8 @@ namespace Kernel
|
||||||
{
|
{
|
||||||
if (g_paniced)
|
if (g_paniced)
|
||||||
{
|
{
|
||||||
// FIXME: tell other processors kernel panic has occured
|
|
||||||
dprintln("Processor {} halted", Processor::current_id());
|
dprintln("Processor {} halted", Processor::current_id());
|
||||||
|
InterruptController::get().broadcast_ipi();
|
||||||
asm volatile("cli; 1: hlt; jmp 1b");
|
asm volatile("cli; 1: hlt; jmp 1b");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -299,6 +299,13 @@ done:
|
||||||
|
|
||||||
extern "C" void cpp_irq_handler(uint64_t irq, InterruptStack& interrupt_stack)
|
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())
|
if (Scheduler::current_tid())
|
||||||
{
|
{
|
||||||
Thread::current().set_return_rsp(interrupt_stack.rsp);
|
Thread::current().set_return_rsp(interrupt_stack.rsp);
|
||||||
|
|
Loading…
Reference in New Issue