Merge branch 'post-09' into post-10

This commit is contained in:
Philipp Oppermann
2019-09-14 19:06:30 +02:00
2 changed files with 9 additions and 14 deletions

View File

@@ -20,7 +20,8 @@ fn kernel_main(boot_info: &'static BootInfo) -> ! {
println!("Hello World{}", "!");
blog_os::init();
let mut mapper = unsafe { memory::init(boot_info.physical_memory_offset) };
let phys_mem_offset = VirtAddr::new(boot_info.physical_memory_offset);
let mut mapper = unsafe { memory::init(phys_mem_offset) };
let mut frame_allocator = unsafe { BootInfoFrameAllocator::init(&boot_info.memory_map) };
allocator::init_heap(&mut mapper, &mut frame_allocator).expect("heap initialization failed");