mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
Add a double fault handler and test it
This commit is contained in:
@@ -12,8 +12,10 @@ pub extern "C" fn _start() -> ! {
|
||||
|
||||
blog_os::interrupts::init_idt();
|
||||
|
||||
// invoke a breakpoint exception
|
||||
x86_64::instructions::int3();
|
||||
// trigger a page fault
|
||||
unsafe {
|
||||
*(0xdeadbeef as *mut u64) = 42;
|
||||
};
|
||||
|
||||
println!("It did not crash!");
|
||||
loop {}
|
||||
|
||||
Reference in New Issue
Block a user