From: Demi Marie Obenour Date: Thu, 19 Jan 2023 19:03:59 +0000 (-0500) Subject: efi: Actually enable the ESRT under Xen X-Git-Tag: microblaze-v6.6~1075^2~16 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=01de145dc7fbb5e6aba98655c062908a74fa511c;p=linux-2.6-microblaze.git efi: Actually enable the ESRT under Xen The ESRT can be parsed if EFI_PARAVIRT is enabled, even if EFI_MEMMAP is not. Also allow the ESRT to be in reclaimable memory, as that is where future Xen versions will put it. Reported-by: Marek Marczykowski-Górecki Signed-off-by: Demi Marie Obenour Tested-by: Marek Marczykowski-Górecki Signed-off-by: Ard Biesheuvel --- diff --git a/drivers/firmware/efi/esrt.c b/drivers/firmware/efi/esrt.c index fb9fb70e1004..87729c365be1 100644 --- a/drivers/firmware/efi/esrt.c +++ b/drivers/firmware/efi/esrt.c @@ -247,7 +247,7 @@ void __init efi_esrt_init(void) int rc; phys_addr_t end; - if (!efi_enabled(EFI_MEMMAP)) + if (!efi_enabled(EFI_MEMMAP) && !efi_enabled(EFI_PARAVIRT)) return; pr_debug("esrt-init: loading.\n"); @@ -258,7 +258,9 @@ void __init efi_esrt_init(void) if (rc < 0 || (!(md.attribute & EFI_MEMORY_RUNTIME) && md.type != EFI_BOOT_SERVICES_DATA && - md.type != EFI_RUNTIME_SERVICES_DATA)) { + md.type != EFI_RUNTIME_SERVICES_DATA && + md.type != EFI_ACPI_RECLAIM_MEMORY && + md.type != EFI_ACPI_MEMORY_NVS)) { pr_warn("ESRT header is not in the memory map.\n"); return; }