Add a double fault handler and test it

This commit is contained in:
Philipp Oppermann
2019-01-25 13:54:44 +01:00
parent b96636984c
commit 218cb9399e
2 changed files with 13 additions and 2 deletions

View File

@@ -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 {}