Expand description
Physical memory management.
Macros§
- pa
- Alias for
PhysAddr::from_usize
. - va
- Alias for
VirtAddr::from_usize
.
Structs§
- MemRegion
Flags - The flags of a physical memory region.
- Phys
Addr - A physical memory address.
- Phys
MemRegion - A physical memory region.
- Virt
Addr - 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§
- Phys
Addr Range - A range of physical addresses
PhysAddr
. - Virt
Addr Range - A range of virtual addresses
VirtAddr
.