Message ID | 20220112101413.188234-1-ardb@kernel.org |
---|---|
State | Accepted |
Commit | f5390cd0b43c2e54c7cf5506c7da4a37c5cef746 |
Headers | show |
Series | efi: runtime: avoid EFIv2 runtime services on Apple x86 machines | expand |
Hi Ard > drivers/firmware/efi/efi.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c > index ae79c3300129..7de3f5b6e8d0 100644 > --- a/drivers/firmware/efi/efi.c > +++ b/drivers/firmware/efi/efi.c > @@ -722,6 +722,13 @@ void __init efi_systab_report_header(const efi_table_hdr_t *systab_hdr, > systab_hdr->revision >> 16, > systab_hdr->revision & 0xffff, > vendor); > + > + if (IS_ENABLED(CONFIG_X86_64) && > + systab_hdr->revision > EFI_1_10_SYSTEM_TABLE_REVISION && > + !strcmp(vendor, "Apple")) { > + pr_info("Apple Mac detected, using EFI v1.10 runtime services only\n"); > + efi.runtime_version = EFI_1_10_SYSTEM_TABLE_REVISION; > + } > } > > static __initdata char memory_type_name[][13] = { > -- > 2.30.2 > Just a friendly reminder to upstream this patch.
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c index ae79c3300129..7de3f5b6e8d0 100644 --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c @@ -722,6 +722,13 @@ void __init efi_systab_report_header(const efi_table_hdr_t *systab_hdr, systab_hdr->revision >> 16, systab_hdr->revision & 0xffff, vendor); + + if (IS_ENABLED(CONFIG_X86_64) && + systab_hdr->revision > EFI_1_10_SYSTEM_TABLE_REVISION && + !strcmp(vendor, "Apple")) { + pr_info("Apple Mac detected, using EFI v1.10 runtime services only\n"); + efi.runtime_version = EFI_1_10_SYSTEM_TABLE_REVISION; + } } static __initdata char memory_type_name[][13] = {