Pass the memory controller to interrupts::init and use it to create a double fault stack

This commit is contained in:
Philipp Oppermann
2017-04-18 18:20:15 +02:00
parent f1459a552c
commit 00bbd6fbc6
2 changed files with 7 additions and 3 deletions

View File

@@ -42,14 +42,14 @@ pub extern "C" fn rust_main(multiboot_information_address: usize) {
enable_write_protect_bit();
// set up guard page and map the heap pages
memory::init(boot_info);
let mut memory_controller = memory::init(boot_info);
unsafe {
HEAP_ALLOCATOR.lock().init(HEAP_START, HEAP_START + HEAP_SIZE);
}
// initialize our IDT
interrupts::init();
interrupts::init(&mut memory_controller);
for i in 0..10000 {
format!("Some String");