From bbde7f2345b5ca82453d46ddee352a9a2d326b58 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Fri, 26 Jul 2019 17:24:04 +0100 Subject: [PATCH] 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 --- src/efi/mod.rs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/efi/mod.rs b/src/efi/mod.rs index ea664bc7..f33fe8df 100644 --- a/src/efi/mod.rs +++ b/src/efi/mod.rs @@ -821,9 +821,18 @@ pub fn efi_exec( reserved: core::ptr::null_mut(), }; + let vendor_data = 0u32; + let mut ct = efi::ConfigurationTable { - vendor_guid: Guid::from_fields(0, 0, 0, 0, 0, &[0; 6]), // TODO - vendor_table: core::ptr::null_mut(), + vendor_guid: Guid::from_fields( + 0x678a_9665, + 0x9957, + 0x4e7c, + 0xa6, + 0x27, + &[0x34, 0xc9, 0x46, 0x3d, 0xd2, 0xac], + ), + vendor_table: &vendor_data as *const _ as *mut _, }; let mut st = efi::SystemTable { @@ -844,7 +853,7 @@ pub fn efi_exec( std_err: &mut console::STDOUT, runtime_services: &mut rs, boot_services: &mut bs, - number_of_table_entries: 0, + number_of_table_entries: 1, configuration_table: &mut ct, };