#[repr(C)]
pub enum MemoryType {
Show 15 variants RESERVED, LOADER_CODE, LOADER_DATA, BOOT_SERVICES_CODE, BOOT_SERVICES_DATA, RUNTIME_SERVICES_CODE, RUNTIME_SERVICES_DATA, CONVENTIONAL, UNUSABLE, ACPI_RECLAIM, ACPI_NON_VOLATILE, MMIO, MMIO_PORT_SPACE, PAL_CODE, PERSISTENT_MEMORY,
}
Expand description

The type of a memory range.

UEFI allows firmwares and operating systems to introduce new memory types in the 0x70000000..0xFFFFFFFF 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.

Variants

RESERVED

This enum variant is not used.

LOADER_CODE

The code portions of a loaded UEFI application.

LOADER_DATA

The data portions of a loaded UEFI applications, as well as any memory allocated by it.

BOOT_SERVICES_CODE

Code of the boot drivers.

Can be reused after OS is loaded.

BOOT_SERVICES_DATA

Memory used to store boot drivers’ data.

Can be reused after OS is loaded.

RUNTIME_SERVICES_CODE

Runtime drivers’ code.

RUNTIME_SERVICES_DATA

Runtime services’ code.

CONVENTIONAL

Free usable memory.

UNUSABLE

Memory in which errors have been detected.

ACPI_RECLAIM

Memory that holds ACPI tables. Can be reclaimed after they are parsed.

ACPI_NON_VOLATILE

Firmware-reserved addresses.

MMIO

A region used for memory-mapped I/O.

MMIO_PORT_SPACE

Address space used for memory-mapped port I/O.

PAL_CODE

Address space which is part of the processor.

PERSISTENT_MEMORY

Memory region which is usable and is also non-volatile.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.