diff mbox series

efi: libstub: reinstate efi_get_virtmap() call even for efi_novamap

Message ID 20220925162223.2067277-1-ardb@kernel.org
State New
Headers show
Series efi: libstub: reinstate efi_get_virtmap() call even for efi_novamap | expand

Commit Message

Ard Biesheuvel Sept. 25, 2022, 4:22 p.m. UTC
Omitting the call to efi_get_virtmap() results in a memory map with
missing virtual addresses for the runtime regions, and this results in
the core EFI kernel code deciding that runtime regions cannot be mapped.
So add back the call to efi_get_virtmap().

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
 drivers/firmware/efi/libstub/fdt.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/firmware/efi/libstub/fdt.c b/drivers/firmware/efi/libstub/fdt.c
index dbea887b9956..82b8c286ddfe 100644
--- a/drivers/firmware/efi/libstub/fdt.c
+++ b/drivers/firmware/efi/libstub/fdt.c
@@ -199,9 +199,8 @@  static efi_status_t exit_boot_func(struct efi_boot_memmap *map, void *priv)
 	 * populate @runtime_map with copies of just the EFI_MEMORY_RUNTIME
 	 * entries so that we can pass it straight to SetVirtualAddressMap()
 	 */
-	if (!efi_novamap)
-		efi_get_virtmap(map->map, map->map_size, map->desc_size,
-				p->runtime_map, &p->runtime_entry_count);
+	efi_get_virtmap(map->map, map->map_size, map->desc_size,
+			p->runtime_map, &p->runtime_entry_count);
 
 	return update_fdt_memmap(p->new_fdt_addr, map);
 }