Expand description
Memory management abstraction layer
Provides safe abstractions for memory operations including:
- Physical and virtual address types
- Memory mapping abstractions (MappedPages)
- Page table management
Inspired by OSes Theseus MappedPages and Asterinas VM modules.
Structs§
- Allocated
Pages - Allocated pages that can be mapped
- MapFlags
- Memory mapping flags
- Mapped
Pages - A safely mapped memory region
- Phys
Addr - Physical address type
- Virt
Addr - Virtual address type
- Vmar
- Virtual Memory Address Region (VMAR)
Enums§
Constants§
- PAGE_
SIZE - Page size constant (4KB)
Functions§
- phys_
to_ virt - Converts a physical address to a virtual address using HHDM offset
- tlb_
flush_ all - Flushes the entire TLB on the current CPU
- tlb_
flush_ virt_ addr - TLB flush operation for SMP systems
- virt_
to_ phys - Converts a virtual address to a physical address