mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00: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:
committed by
Andreas Kling
parent
d29981e4a1
commit
05fc75f994
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user