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 the buddy allocator implementing the x86_64 crate’s
FrameAllocatortrait.
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_
hhdm_ range_ mapped_ now - Returns whether the current page tables map the HHDM view of the whole range.
- 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.
- map_
page_ kernel - Map a page into the kernel’s canonical page tables (not the active CR3).
- translate
- Translate a virtual address to its mapped physical address.
- unmap_
page - Unmap a page from the active CR3, returning the physical frame.
- unmap_
page_ kernel - Unmap a page from the kernel’s canonical page tables.