pub enum MemoryRegionType {
BadMemory = 0,
Unknown = 1,
NonVolatileSleep = 2,
Reserved = 3,
Kernel = 4,
Module = 5,
Framebuffer = 6,
Reclaimable = 7,
Usable = 8,
}Expand description
The type of initial memory regions that are needed for the kernel.
Variants§
BadMemory = 0
Maybe points to an unplugged DIMM module. It’s bad anyway.
Unknown = 1
Some holes not specified by the bootloader/firmware. It may be used for I/O memory but we don’t know for sure.
NonVolatileSleep = 2
In ACPI spec, this area needs to be preserved when sleeping.
Reserved = 3
Reserved by BIOS or bootloader, do not use.
Kernel = 4
The place where kernel sections are loaded.
Module = 5
The place where kernel modules (e.g. initrd) are loaded, could be reused.
Framebuffer = 6
The memory region provided as the framebuffer.
Reclaimable = 7
Once used in the boot phase. Kernel can reclaim it after initialization.
Usable = 8
Directly usable by the frame allocator.
Implementations§
Source§impl MemoryRegionType
impl MemoryRegionType
Sourcepub open spec fn to_int(self) -> int
pub open spec fn to_int(self) -> int
{
match self {
MemoryRegionType::BadMemory => 0,
MemoryRegionType::Unknown => 1,
MemoryRegionType::NonVolatileSleep => 2,
MemoryRegionType::Reserved => 3,
MemoryRegionType::Kernel => 4,
MemoryRegionType::Module => 5,
MemoryRegionType::Framebuffer => 6,
MemoryRegionType::Reclaimable => 7,
MemoryRegionType::Usable => 8,
}
}Trait Implementations§
Source§impl Clone for MemoryRegionType
impl Clone for MemoryRegionType
Source§fn clone(&self) -> MemoryRegionType
fn clone(&self) -> MemoryRegionType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MemoryRegionType
impl Debug for MemoryRegionType
Source§impl Ord for MemoryRegionType
impl Ord for MemoryRegionType
Source§fn cmp(&self, other: &MemoryRegionType) -> Ordering
fn cmp(&self, other: &MemoryRegionType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for MemoryRegionType
impl PartialEq for MemoryRegionType
Source§impl PartialOrd for MemoryRegionType
impl PartialOrd for MemoryRegionType
impl Copy for MemoryRegionType
impl Eq for MemoryRegionType
impl StructuralPartialEq for MemoryRegionType
Auto Trait Implementations§
impl Freeze for MemoryRegionType
impl RefUnwindSafe for MemoryRegionType
impl Send for MemoryRegionType
impl Sync for MemoryRegionType
impl Unpin for MemoryRegionType
impl UnwindSafe for MemoryRegionType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more