Trait MemIf

Source
pub trait MemIf {
    // Required methods
    fn phys_ram_ranges() -> &'static [RawRange];
    fn reserved_phys_ram_ranges() -> &'static [RawRange];
    fn mmio_ranges() -> &'static [RawRange];
}
Expand description

Physical memory interface.

Required Methods§

Source

fn phys_ram_ranges() -> &'static [RawRange]

Returns all physical memory (RAM) ranges on the platform.

All memory ranges except reserved ranges (including the kernel loaded range) are free for allocation.

Source

fn reserved_phys_ram_ranges() -> &'static [RawRange]

Returns all reserved physical memory ranges on the platform.

Reserved memory can be contained in phys_ram_ranges, they are not allocatable but should be mapped to kernel’s address space.

Note that the ranges returned should not include the range where the kernel is loaded.

Source

fn mmio_ranges() -> &'static [RawRange]

Returns all device memory (MMIO) ranges on the platform.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§