Use OffsetPageTable instead of MappedPageTable

This commit is contained in:
Philipp Oppermann
2019-09-11 13:40:26 +02:00
parent 2227fa434f
commit 211ec3898b
2 changed files with 8 additions and 13 deletions

View File

@@ -17,7 +17,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) };
// map a previously unmapped page