#[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§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§impl PartialEq for MemoryType
impl PartialEq for MemoryType
Source§impl PartialOrd for MemoryType
impl PartialOrd for MemoryType
Source§fn partial_cmp(&self, other: &MemoryType) -> Option<Ordering>
fn partial_cmp(&self, other: &MemoryType) -> Option<Ordering>
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§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dst: *mut u8)
unsafe fn clone_to_uninit(&self, dst: *mut u8)
clone_to_uninit
)