Map the page bitmap to virtual memory
This commit is contained in:
parent
1ebd892c16
commit
dad95a8160
@ -99,6 +99,17 @@ namespace MemoryManager
|
||||
init_physical_frame_allocator();
|
||||
KernelVM::init();
|
||||
MMU::setup_initial_page_directory();
|
||||
|
||||
// NOTE: We force these operations to succeed, because if we can't map the frame bitmap to virtual memory
|
||||
// there's no point in continuing.
|
||||
auto bitmap_pages = g_frame_bitmap.size_in_bytes() / ARCH_PAGE_SIZE;
|
||||
|
||||
auto virtual_bitmap_base = KernelVM::alloc_several_pages(bitmap_pages).release_value();
|
||||
map_frames_at(virtual_bitmap_base, (u64)g_frame_bitmap.location(), bitmap_pages,
|
||||
MMU::ReadWrite | MMU::NoExecute)
|
||||
.release_value();
|
||||
|
||||
g_frame_bitmap.initialize((void*)virtual_bitmap_base, g_frame_bitmap.size_in_bytes());
|
||||
}
|
||||
|
||||
void lock_frame(u64 frame)
|
||||
|
Loading…
Reference in New Issue
Block a user