mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
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.
This commit is contained in:
parent
d29981e4a1
commit
05fc75f994
Notes:
sideshowbarker
2024-07-18 08:41:22 +09:00
Author: https://github.com/gunnarbeutner
Commit: 05fc75f994
Pull-request: https://github.com/SerenityOS/serenity/pull/8891
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/dascandy
1 changed files with 1 additions and 1 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue