summaryrefslogtreecommitdiffstats
path: root/rsnix/src/uefi.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rsnix/src/uefi.rs')
-rw-r--r--rsnix/src/uefi.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/rsnix/src/uefi.rs b/rsnix/src/uefi.rs
index c311ad9..234ad65 100644
--- a/rsnix/src/uefi.rs
+++ b/rsnix/src/uefi.rs
@@ -40,6 +40,32 @@ pub const EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID: Guid = Guid {
40 d: [0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, 0x51, 0x6a], 40 d: [0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, 0x51, 0x6a],
41}; 41};
42 42
43pub const EFI_LOADED_IMAGE_PROTOCOL_GUID: Guid = Guid {
44 a: 0x5b1b31a1,
45 b: 0x9562,
46 c: 0x11d2,
47 d: [0x8e, 0x3f, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b],
48};
49
50/// Minimal EFI_LOADED_IMAGE_PROTOCOL — we only need the image base/size
51/// to reserve the kernel's own code/data/bss pages so the heap and page
52/// allocators can never overwrite the running kernel.
53#[repr(C)]
54pub struct LoadedImageProtocol {
55 pub revision: u32,
56 _pad0: u32,
57 pub parent_handle: Handle,
58 pub system_table: *mut core::ffi::c_void,
59 pub device_handle: Handle,
60 pub file_path: *mut core::ffi::c_void,
61 _reserved: *mut core::ffi::c_void,
62 pub load_options_size: u32,
63 _pad1: u32,
64 pub load_options: *mut core::ffi::c_void,
65 pub image_base: *mut core::ffi::c_void,
66 pub image_size: u64,
67}
68
43// --------------------------------------------------------------------------- 69// ---------------------------------------------------------------------------
44// Table header 70// Table header
45// --------------------------------------------------------------------------- 71// ---------------------------------------------------------------------------