mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
Hardware Interrupts: Don't replace panic in double fault handler (#690)
This commit is contained in:
committed by
GitHub
parent
537a070238
commit
555b5aece1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user