Skip to content

Commit 01de145

Browse files
DemiMarieardbiesheuvel
authored andcommitted
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 <[email protected]> Signed-off-by: Demi Marie Obenour <[email protected]> Tested-by: Marek Marczykowski-Górecki <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]>
1 parent c0fecaa commit 01de145

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/firmware/efi/esrt.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ void __init efi_esrt_init(void)
247247
int rc;
248248
phys_addr_t end;
249249

250-
if (!efi_enabled(EFI_MEMMAP))
250+
if (!efi_enabled(EFI_MEMMAP) && !efi_enabled(EFI_PARAVIRT))
251251
return;
252252

253253
pr_debug("esrt-init: loading.\n");
@@ -258,7 +258,9 @@ void __init efi_esrt_init(void)
258258
if (rc < 0 ||
259259
(!(md.attribute & EFI_MEMORY_RUNTIME) &&
260260
md.type != EFI_BOOT_SERVICES_DATA &&
261-
md.type != EFI_RUNTIME_SERVICES_DATA)) {
261+
md.type != EFI_RUNTIME_SERVICES_DATA &&
262+
md.type != EFI_ACPI_RECLAIM_MEMORY &&
263+
md.type != EFI_ACPI_MEMORY_NVS)) {
262264
pr_warn("ESRT header is not in the memory map.\n");
263265
return;
264266
}

0 commit comments

Comments
 (0)