Kernel: Reboot will now always succeed
If acpi reset fails, we forcefully trigger a triple fault to restart the system.
This commit is contained in:
@@ -424,4 +424,14 @@ namespace IDT
|
||||
flush_idt();
|
||||
}
|
||||
|
||||
[[noreturn]] void force_triple_fault()
|
||||
{
|
||||
// load 0 sized IDT and trigger an interrupt to force triple fault
|
||||
asm volatile("cli");
|
||||
s_idtr.size = 0;
|
||||
flush_idt();
|
||||
asm volatile("int $0x00");
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user