Skip to content

Commit

Permalink
Move direct map creation after vmm_init instead of inside.
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamos82 committed Jul 30, 2023
1 parent 1ed4b1c commit e283e15
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/kernel/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ void kernel_start(unsigned long addr, unsigned long magic){
init_apic();
_mmap_setup();
vmm_init(VMM_LEVEL_SUPERVISOR);
vmm_direct_map_physical_memory();
initialize_kheap();
kernel_settings.kernel_uptime = 0;
kernel_settings.paging.page_root_address = p4_table;
Expand Down
3 changes: 1 addition & 2 deletions src/kernel/mem/vmm.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ void vmm_init(vmm_level_t vmm_level) {
}

// Mapping the phyiscal address for the vmm structures
map_phys_to_virt_addr(vmm_root_phys, vmm_container_root, VMM_FLAGS_PRESENT | VMM_FLAGS_WRITE_ENABLE);
vmm_direct_map_physical_memory();
map_phys_to_virt_addr(vmm_root_phys, vmm_container_root, VMM_FLAGS_PRESENT | VMM_FLAGS_WRITE_ENABLE);
vmm_container_root->next = NULL;
vmm_cur_container = vmm_container_root;
}
Expand Down

0 comments on commit e283e15

Please sign in to comment.