Map all physical memory into the higher half instead of using recursive mapping #23

Merged
apio merged 6 commits from map-physical-world into main 2023-02-27 11:59:51 +00:00
Showing only changes of commit 837d483e0b - Show all commits

View File

@ -288,7 +288,8 @@ namespace MMU
constexpr auto HALF_PAGE = ARCH_PAGE_SIZE / 2;
// Copy the upper part of the page directory (higher half)
memcpy(offset_ptr(directory, HALF_PAGE), offset_ptr(g_kernel_directory, HALF_PAGE), HALF_PAGE);
memcpy(offset_ptr(directory, HALF_PAGE), offset_ptr((PageDirectory*)g_kernel_directory_virt, HALF_PAGE),
HALF_PAGE);
kdbgln("MMU init page directory (ring3): virt %p, phys %#.16lx", directory, directory_phys);