Prekernel: Make sure to reload CR3 after modifying the page tables

This commit is contained in:
Gunnar Beutner 2021-07-20 12:48:14 +02:00 committed by Andreas Kling
parent 05fc75f994
commit 4fdee56ba3
Notes: sideshowbarker 2024-07-18 08:41:18 +09:00

View file

@ -179,6 +179,8 @@ extern "C" [[noreturn]] void init()
for (FlatPtr vaddr = (FlatPtr)end_of_prekernel_image; vaddr < MAX_KERNEL_SIZE; vaddr += PAGE_SIZE)
boot_pd0_pts[vaddr >> 12] = 0;
reload_cr3();
void (*entry)(BootInfo const&) = (void (*)(BootInfo const&))kernel_elf_header.e_entry;
entry(*adjust_by_load_base(&info));