Skip to content

Commit

Permalink
efi: Add dummy vendor configuration table
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
rbradford committed Jul 29, 2019
1 parent 23bdee6 commit bbde7f2
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/efi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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,
};

Expand Down

0 comments on commit bbde7f2

Please sign in to comment.