Skip to content

Commit bbde7f2

Browse files
committed
efi: Add dummy vendor configuration table
Older Linux kernels give up on an EFI boot if there are zero configuration tables. Add one configuration table of our own. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
1 parent 23bdee6 commit bbde7f2

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/efi/mod.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -821,9 +821,18 @@ pub fn efi_exec(
821821
reserved: core::ptr::null_mut(),
822822
};
823823

824+
let vendor_data = 0u32;
825+
824826
let mut ct = efi::ConfigurationTable {
825-
vendor_guid: Guid::from_fields(0, 0, 0, 0, 0, &[0; 6]), // TODO
826-
vendor_table: core::ptr::null_mut(),
827+
vendor_guid: Guid::from_fields(
828+
0x678a_9665,
829+
0x9957,
830+
0x4e7c,
831+
0xa6,
832+
0x27,
833+
&[0x34, 0xc9, 0x46, 0x3d, 0xd2, 0xac],
834+
),
835+
vendor_table: &vendor_data as *const _ as *mut _,
827836
};
828837

829838
let mut st = efi::SystemTable {
@@ -844,7 +853,7 @@ pub fn efi_exec(
844853
std_err: &mut console::STDOUT,
845854
runtime_services: &mut rs,
846855
boot_services: &mut bs,
847-
number_of_table_entries: 0,
856+
number_of_table_entries: 1,
848857
configuration_table: &mut ct,
849858
};
850859

0 commit comments

Comments
 (0)