From 555b5aece131ae4bc6936ef301e325b21a068bd9 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Fri, 22 Nov 2019 16:13:01 +0100 Subject: [PATCH] Hardware Interrupts: Don't replace panic in double fault handler (#690) --- .../posts/07-hardware-interrupts/index.md | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/blog/content/second-edition/posts/07-hardware-interrupts/index.md b/blog/content/second-edition/posts/07-hardware-interrupts/index.md index bf8d164c..886c38b8 100644 --- a/blog/content/second-edition/posts/07-hardware-interrupts/index.md +++ b/blog/content/second-edition/posts/07-hardware-interrupts/index.md @@ -502,22 +502,6 @@ pub fn test_panic_handler(info: &PanicInfo) -> ! { } ``` -We can also use `hlt_loop` in our double fault exception handler: - -```rust -// in src/interrupts.rs - -use crate::hlt_loop; // new - -extern "x86-interrupt" fn double_fault_handler( - stack_frame: &mut InterruptStackFrame, - _error_code: u64, -) { - println!("EXCEPTION: DOUBLE FAULT\n{:#?}", stack_frame); - hlt_loop(); // new -} -``` - When we run our kernel now in QEMU, we see a much lower CPU usage. ## Keyboard Input