Skip to main content

Module mm

Module mm 

Source
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§

AllocatedPages
Allocated pages that can be mapped
MapFlags
Memory mapping flags
MappedPages
A safely mapped memory region
PhysAddr
Physical address type
VirtAddr
Virtual address type
Vmar
Virtual Memory Address Region (VMAR)

Enums§

MapError

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