diff --git a/src/arch/x86_64/stop.rs b/src/arch/x86_64/stop.rs index ae084f00c47ae3ec7c2d6d80d88de416c0bd2724..ec0b23a665978461da806cef25dee6cf76d3d831 100644 --- a/src/arch/x86_64/stop.rs +++ b/src/arch/x86_64/stop.rs @@ -14,7 +14,10 @@ pub unsafe extern fn kreset() -> ! { port.write(0xFE); } - // TODO: Use triple fault to guarantee reset + // Use triple fault to guarantee reset + asm!("cli" : : : : "intel", "volatile"); + asm!("lidt cs:0" : : : : "intel", "volatile"); + asm!("int $$3" : : : : "intel", "volatile"); unreachable!(); }