Module mm

Source
Expand description

Virtual memory (VM).

Re-exportsยง

pub use self::frame::allocator::FrameAllocOptions;
pub use self::frame::segment::Segment;
pub use self::frame::segment::USegment;
pub use self::frame::unique::UniqueFrame;
pub use self::frame::untyped::AnyUFrameMeta;
pub use self::frame::untyped::UFrame;
pub use self::frame::untyped::UntypedMem;
pub use self::frame::Frame;
pub use self::io::Fallible;
pub use self::io::FallibleVmRead;
pub use self::io::FallibleVmWrite;
pub use self::io::Infallible;
pub use self::io::PodOnce;
pub use self::io::VmIo;
pub use self::io::VmIoOnce;
pub use self::io::VmReader;
pub use self::io::VmWriter;
pub use self::vm_space::VmSpace;

Modulesยง

dma ๐Ÿ”’
frame
Frame (physical memory page) management.
heap
Manages the kernel heap using slab or buddy allocation strategies.
io
Abstractions for reading and writing virtual memory (VM) objects.
kspace ๐Ÿ”’
Kernel memory space management.
page_prop ๐Ÿ”’
Definitions of page mapping properties.
page_table ๐Ÿ”’
tlb
TLB flush operations.
vm_space
Virtual memory space management.

Structsยง

DmaCoherent
A coherent (or consistent) DMA mapping, which guarantees that the device and the CPU can access the data in parallel.
DmaStream
A streaming DMA mapping. Users must synchronize data before reading or after writing to ensure consistency.
DmaStreamSlice
A slice of streaming DMA mapping.
PageFlags
Page protection permissions and access status.
PageProperty
The property of a mapped virtual memory page.

Enumsยง

CachePolicy
A type to control the cacheability of the main memory.
DmaDirection
DmaDirection limits the data flow direction of DmaStream and prevents users from reading and writing to DmaStream unexpectedly.

Constantsยง

KERNEL_VADDR_RANGE
The kernel address space.
MAX_USERSPACE_VADDR
The maximum virtual address of user space (non inclusive).
PAGE_SIZE
The page size

Traitsยง

HasDaddr
A trait for types that have mapped address in the device address space.
HasPaddr
Gets physical address trait
PagingConstsTrait ๐Ÿ”’
A minimal set of constants that determines the paging system. This provides an abstraction over most paging modes in common architectures.

Functionsยง

is_page_aligned
Checks if the given address is page-aligned.
nr_base_per_page ๐Ÿ”’
The number of base pages in a huge page at a given level.
nr_subpage_per_huge ๐Ÿ”’
The number of sub pages in a huge page.
page_size ๐Ÿ”’
The page size at a given level.

Type Aliasesยง

Daddr
The device address.
Paddr
Physical addresses.
PagingLevel
The level of a page table node or a frame.
Vaddr
Virtual addresses.