mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:28:13 +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:
parent
d29981e4a1
commit
05fc75f994
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