-
-
Notifications
You must be signed in to change notification settings - Fork 181
Closed
Description
In case the status is Status::BUFFER_TOO_SMALL, map_size should be available. Perhaps through the Error's optional ErrData? Also, memory_map_size is internal, so, the only way seems to be directly using the raw methods in the boot table.
let memory_map = loop {
let mut memory_map = uefi::boot::memory_map(MemoryType::LOADER_DATA);
log::info!("memory_map: {:?}", memory_map);
match memory_map {
Ok(e) => break e,
Err(e) => {
if e.status() == Status::BUFFER_TOO_SMALL {
log::info!("Buffer too small. Allocating more memory...");
let memory_map_size = ???;
memory_map = uefi::boot::allocate_pool(MemoryType::LOADER_DATA, ???);
}
}
}
};
Metadata
Metadata
Assignees
Labels
No labels