uefi_raw/protocol/
loaded_image.rs1use crate::protocol::device_path::DevicePathProtocol;
4use crate::table::boot::MemoryType;
5use crate::table::system::SystemTable;
6use crate::{guid, Guid, Handle, Status};
7use core::ffi::c_void;
8
9#[derive(Clone, Copy, Debug)]
10#[repr(C)]
11pub struct LoadedImageProtocol {
12 pub revision: u32,
13 pub parent_handle: Handle,
14 pub system_table: *const SystemTable,
15
16 pub device_handle: Handle,
18 pub file_path: *const DevicePathProtocol,
19
20 pub reserved: *const c_void,
21
22 pub load_options_size: u32,
24 pub load_options: *const c_void,
25
26 pub image_base: *const c_void,
28 pub image_size: u64,
29 pub image_code_type: MemoryType,
30 pub image_data_type: MemoryType,
31 pub unload: Option<unsafe extern "efiapi" fn(image_handle: Handle) -> Status>,
32}
33
34impl LoadedImageProtocol {
35 pub const GUID: Guid = guid!("5b1b31a1-9562-11d2-8e3f-00a0c969723b");
36}