diff options
author | Gunnar Beutner <gbeutner@serenityos.org> | 2021-07-20 12:14:37 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-20 15:12:19 +0200 |
commit | 05fc75f9942462d76b4f9bbaa5e004ed36091f2e (patch) | |
tree | d0caa80029fe530741de2f30340c66338f54ffc4 /Kernel | |
parent | d29981e4a1c824581ce19e34fc58eb754c0bb62c (diff) | |
download | serenity-05fc75f9942462d76b4f9bbaa5e004ed36091f2e.zip |
Prekernel: Don't wrap around the PTE index improperly
The boot_pd0_pts variable contains more than 512 PTEs so we shouldn't
wrap the index here.
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/Prekernel/init.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Prekernel/init.cpp b/Kernel/Prekernel/init.cpp index 310beea1ba..d079b2c661 100644 --- a/Kernel/Prekernel/init.cpp +++ b/Kernel/Prekernel/init.cpp @@ -177,7 +177,7 @@ extern "C" [[noreturn]] void init() // unmap the end_of_prekernel_image - MAX_KERNEL_SIZE region for (FlatPtr vaddr = (FlatPtr)end_of_prekernel_image; vaddr < MAX_KERNEL_SIZE; vaddr += PAGE_SIZE) - boot_pd0_pts[vaddr >> 12 & 0x1ff] = 0; + boot_pd0_pts[vaddr >> 12] = 0; void (*entry)(BootInfo const&) = (void (*)(BootInfo const&))kernel_elf_header.e_entry; entry(*adjust_by_load_base(&info)); |