#[repr(C)]pub struct EFIMemoryDesc {
pub ty: MemoryType,
pub phys_start: u64,
pub virt_start: u64,
pub page_count: u64,
pub att: MemoryAttribute,
}
Expand description
A structure describing a region of memory. This type corresponds to version of this struct in the UEFI spec and is always bound to a corresponding UEFI memory map.
§UEFI pitfalls
As of May 2024:
The memory descriptor struct might be extended in the future by a new UEFI
spec revision, which will be reflected in another version
of that
descriptor. The version is reported when using get_memory_map
of
BootServices
.
Also note that you must never work with size_of::<MemoryDescriptor>
but always with desc_size
, which is reported when using get_memory_map
as well [0]. For example, although the actual size is of version 1
descriptors is 40
, the reported desc_size
is 48
.
Fields§
§ty: MemoryType
Type of memory occupying this range.
phys_start: u64
Starting physical address.
virt_start: u64
Starting virtual address.
page_count: u64
Number of 4 KiB pages contained in this range.
att: MemoryAttribute
The capability attributes of this memory range.
Implementations§
Trait Implementations§
Source§impl Clone for MemoryDescriptor
impl Clone for MemoryDescriptor
Source§fn clone(&self) -> MemoryDescriptor
fn clone(&self) -> MemoryDescriptor
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more