Initialize the IDT and provoke a page fault

This commit is contained in:
Philipp Oppermann
2016-05-28 15:29:11 +02:00
parent 2d15a7bdb1
commit c1df1d3354

View File

@@ -46,15 +46,13 @@ pub extern "C" fn rust_main(multiboot_information_address: usize) {
// set up guard page and map the heap pages
memory::init(boot_info);
use alloc::boxed::Box;
let heap_test = Box::new(42);
// initialize our IDT
interrupts::init();
for i in 0..10000 {
format!("Some String");
}
// provoke a page fault by writing to some random address
unsafe{ *(0xdeadbeaf as *mut u64) = 42 };
println!("It did not crash!");
loop {}
}