Module mem

Source
Expand description

Physical memory management.

Macros§

pa
Alias for PhysAddr::from_usize.
va
Alias for VirtAddr::from_usize.

Structs§

MemRegionFlags
The flags of a physical memory region.
PhysAddr
A physical memory address.
PhysMemRegion
A physical memory region.
VirtAddr
A virtual memory address.

Constants§

PAGE_SIZE_4K
The size of a 4K page (4096 bytes).

Functions§

clear_bss
Fills the .bss section with zeros.
init
Initializes physical memory regions.
memory_regions
Returns an iterator over all physical memory regions.
mmio_ranges
Returns all device memory (MMIO) ranges on the platform.
phys_ram_ranges
Returns all physical memory (RAM) ranges on the platform.
phys_to_virt
Translates a physical address to a virtual address.
reserved_phys_ram_ranges
Returns all reserved physical memory ranges on the platform.
total_ram_size
Returns the total size of physical memory (RAM) on the platform.
virt_to_phys
Translates a virtual address to a physical address.

Type Aliases§

PhysAddrRange
A range of physical addresses PhysAddr.
VirtAddrRange
A range of virtual addresses VirtAddr.