Skip to content

Commit c05f8f9

Browse files
Ard BiesheuvelIngo Molnar
authored andcommitted
efivar/ssdt: Don't iterate over EFI vars if no SSDT override was specified
The kernel command line option efivar_ssdt= allows the name to be specified of an EFI variable containing an ACPI SSDT table that should be loaded into memory by the OS, and treated as if it was provided by the firmware. Currently, that code will always iterate over the EFI variables and compare each name with the provided name, even if the command line option wasn't set to begin with. So bail early when no variable name was provided. This works around a boot regression on the 2012 Mac Pro, as reported by Scott. Tested-by: Scott Talbert <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]> Cc: <[email protected]> # v4.9+ Cc: Ben Dooks <[email protected]> Cc: Dave Young <[email protected]> Cc: Jarkko Sakkinen <[email protected]> Cc: Jerry Snitselaar <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Lukas Wunner <[email protected]> Cc: Lyude Paul <[email protected]> Cc: Matthew Garrett <[email protected]> Cc: Octavian Purdila <[email protected]> Cc: Peter Jones <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Cc: [email protected] Fixes: 475fb4e ("efi / ACPI: load SSTDs from EFI variables") Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 6fb9367 commit c05f8f9

File tree

1 file changed

+3
-0
lines changed
  • drivers/firmware/efi

1 file changed

+3
-0
lines changed

drivers/firmware/efi/efi.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,9 @@ static __init int efivar_ssdt_load(void)
267267
void *data;
268268
int ret;
269269

270+
if (!efivar_ssdt[0])
271+
return 0;
272+
270273
ret = efivar_init(efivar_ssdt_iter, &entries, true, &entries);
271274

272275
list_for_each_entry_safe(entry, aux, &entries, list) {

0 commit comments

Comments
 (0)