pub struct MemoryImage {
pub data: Vec<u8>,
pub load_address: u64,
pub original_image_base: u64,
pub relocation_delta: i64,
}Expand description
Captured memory image of running bootloader
This struct holds a captured PE image along with metadata needed to reverse relocations and create a bootable disk image.
Fields§
§data: Vec<u8>Raw image data (as loaded by UEFI)
load_address: u64Base address where image is loaded
original_image_base: u64Original ImageBase from PE header (before UEFI modified it)
relocation_delta: i64Relocation delta (load_address - original_image_base)
Implementations§
Source§impl MemoryImage
impl MemoryImage
Sourcepub fn capture_from_memory(
_image_base: *const u8,
_image_size: usize,
) -> Result<Self, PeError>
pub fn capture_from_memory( _image_base: *const u8, _image_size: usize, ) -> Result<Self, PeError>
Capture running bootloader from UEFI LoadedImage protocol
§Arguments
image_base- Pointer to loaded image (from LoadedImageProtocol.image_base)image_size- Size of loaded image (from LoadedImageProtocol.image_size)
§Returns
Captured image with relocation information
§Note
Not yet implemented. See bootloader/src/installer/operations.rs for
the current working implementation.
Auto Trait Implementations§
impl Freeze for MemoryImage
impl RefUnwindSafe for MemoryImage
impl Send for MemoryImage
impl Sync for MemoryImage
impl Unpin for MemoryImage
impl UnwindSafe for MemoryImage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more