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§
- Buddy
Frame Allocator - 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.