#[repr(C)]pub struct MemoryMapRequest { /* private fields */ }
Expand description
Request limine’s memory map. This may or may not be the same as the one given by the BIOS/UEFI firmware. Entries are guaranteed to be in order of their base address. Usable and bootloader-reclaimable memory regions will never overlap, and will always be 4096-byte aligned. Other region types have no such guarantees. Some holes may exist. Memory between 0x0-0x1000 is never marked as usable.
§Usage
static BASE_REVISION: BaseRevision = BaseRevision::new();
// Request a memory map
static MEMORY_MAP_REQUEST: MemoryMapRequest = MemoryMapRequest::new();
// ...later, in our code
MEMORY_MAP_REQUEST.get_response() // ...
Implementations§
Source§impl MemoryMapRequest
impl MemoryMapRequest
Sourcepub const fn with_revision(revision: u64) -> Self
pub const fn with_revision(revision: u64) -> Self
Create a new request with the given revision.
Sourcepub fn id(&self) -> &[u64; 4]
pub fn id(&self) -> &[u64; 4]
Get the ID of this request. This includes the magic number and the request-specific ID.
Sourcepub fn get_response(&self) -> Option<&MemoryMapResponse>
pub fn get_response(&self) -> Option<&MemoryMapResponse>
Get the response to this request, if it has been set.
Sourcepub fn get_response_mut(&mut self) -> Option<&mut MemoryMapResponse>
pub fn get_response_mut(&mut self) -> Option<&mut MemoryMapResponse>
Get a mutable reference to the response to this request, if it has been set.
Note that this method takes a mutable reference, so the request will have to be wrapped in a mutex or similar in order to use it.