Skip to main content

Module paging

Module paging 

Source
Expand description

Virtual Memory Management (Paging) for Strat9-OS

Uses the x86_64 crate’s OffsetPageTable which is designed for the HHDM (Higher Half Direct Map) pattern — exactly what Limine provides.

Provides map/unmap/translate operations on the active page table.

Structs§

BuddyFrameAllocator
Wrapper around our buddy allocator implementing the x86_64 crate’s FrameAllocator trait.

Functions§

active_page_table
Read the current CR3 value (physical address of the active level-4 page table).
ensure_identity_map
Ensure a physical address is identity-mapped in the HHDM region.
ensure_identity_map_range
Ensure a physical range is mapped in the HHDM region.
init
Initialize the paging subsystem.
is_initialized
Returns whether initialized.
kernel_l4_phys
Return the physical address of the kernel’s level-4 page table.
map_all_ram
Map all RAM regions from the memory map into the HHDM.
map_page
Map a virtual page to a physical frame with the given flags.
translate
Translate a virtual address to its mapped physical address.
unmap_page
Unmap a virtual page, returning the physical frame it was mapped to.