#[repr(transparent)]pub struct MemoryType(pub u32);
Expand description
The type of a memory range.
UEFI allows firmwares and operating systems to introduce new memory types
in the 0x7000_0000..=0xFFFF_FFFF
range. Therefore, we don’t know the full set
of memory types at compile time, and it is not safe to model this C enum
as a Rust enum.
Tuple Fields§
§0: u32
Implementations§
source§impl MemoryType
impl MemoryType
sourcepub const RESERVED: MemoryType = _
pub const RESERVED: MemoryType = _
Not usable.
sourcepub const LOADER_CODE: MemoryType = _
pub const LOADER_CODE: MemoryType = _
The code portions of a loaded UEFI application.
sourcepub const LOADER_DATA: MemoryType = _
pub const LOADER_DATA: MemoryType = _
The data portions of a loaded UEFI applications, as well as any memory allocated by it.
sourcepub const BOOT_SERVICES_CODE: MemoryType = _
pub const BOOT_SERVICES_CODE: MemoryType = _
Code of the boot drivers.
Can be reused after OS is loaded.
sourcepub const BOOT_SERVICES_DATA: MemoryType = _
pub const BOOT_SERVICES_DATA: MemoryType = _
Memory used to store boot drivers’ data.
Can be reused after OS is loaded.
sourcepub const RUNTIME_SERVICES_CODE: MemoryType = _
pub const RUNTIME_SERVICES_CODE: MemoryType = _
Runtime drivers’ code.
sourcepub const RUNTIME_SERVICES_DATA: MemoryType = _
pub const RUNTIME_SERVICES_DATA: MemoryType = _
Runtime services’ code.
sourcepub const CONVENTIONAL: MemoryType = _
pub const CONVENTIONAL: MemoryType = _
Free usable memory.
sourcepub const UNUSABLE: MemoryType = _
pub const UNUSABLE: MemoryType = _
Memory in which errors have been detected.
sourcepub const ACPI_RECLAIM: MemoryType = _
pub const ACPI_RECLAIM: MemoryType = _
Memory that holds ACPI tables. Can be reclaimed after they are parsed.
sourcepub const ACPI_NON_VOLATILE: MemoryType = _
pub const ACPI_NON_VOLATILE: MemoryType = _
Firmware-reserved addresses.
sourcepub const MMIO: MemoryType = _
pub const MMIO: MemoryType = _
A region used for memory-mapped I/O.
sourcepub const MMIO_PORT_SPACE: MemoryType = _
pub const MMIO_PORT_SPACE: MemoryType = _
Address space used for memory-mapped port I/O.
sourcepub const PAL_CODE: MemoryType = _
pub const PAL_CODE: MemoryType = _
Address space which is part of the processor.
sourcepub const PERSISTENT_MEMORY: MemoryType = _
pub const PERSISTENT_MEMORY: MemoryType = _
Memory region which is usable and is also non-volatile.
sourcepub const UNACCEPTED: MemoryType = _
pub const UNACCEPTED: MemoryType = _
Memory that must be accepted by the boot target before it can be used.
sourcepub const MAX: MemoryType = _
pub const MAX: MemoryType = _
End of the defined memory types. Higher values are possible though, see
MemoryType::RESERVED_FOR_OEM
and MemoryType::RESERVED_FOR_OS_LOADER
.
source§impl MemoryType
impl MemoryType
sourcepub const RESERVED_FOR_OEM: RangeInclusive<u32> = _
pub const RESERVED_FOR_OEM: RangeInclusive<u32> = _
Range reserved for OEM use.
sourcepub const RESERVED_FOR_OS_LOADER: RangeInclusive<u32> = _
pub const RESERVED_FOR_OS_LOADER: RangeInclusive<u32> = _
Range reserved for OS loaders.
Trait Implementations§
source§impl Clone for MemoryType
impl Clone for MemoryType
source§fn clone(&self) -> MemoryType
fn clone(&self) -> MemoryType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for MemoryType
impl Debug for MemoryType
source§impl Hash for MemoryType
impl Hash for MemoryType
source§impl Ord for MemoryType
impl Ord for MemoryType
source§fn cmp(&self, other: &MemoryType) -> Ordering
fn cmp(&self, other: &MemoryType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for MemoryType
impl PartialEq for MemoryType
source§impl PartialOrd for MemoryType
impl PartialOrd for MemoryType
impl Copy for MemoryType
impl Eq for MemoryType
impl StructuralPartialEq for MemoryType
Auto Trait Implementations§
impl Freeze for MemoryType
impl RefUnwindSafe for MemoryType
impl Send for MemoryType
impl Sync for MemoryType
impl Unpin for MemoryType
impl UnwindSafe for MemoryType
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)