Skip to main content

Module setup_kernel_paging

Module setup_kernel_paging 

Source
Expand description

VMM Paging (x86_64): setup_kernel_paging

Authors: MarioS271

Functions§

create_zeroed_pdpts 🔒
Prepopulate the higher half with empty PDPTs so that if the kernel PML4 higher half ever gets cloned (like when creating processes), no stale higher halfs exist that aren’t synced with the kernel’s (which could cause page faults when switching into the kernel with user pages)
setup_kernel_paging
Build the kernels page tables and switch to them
verify_against_bootloader 🔒
Verify whether the newly constructed page tables match what the bootloader gave us in critical sections, and panic if they don’t to avoid a page fault/triple fault