Skip to contentSkip to conversation

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

PATCH New Ard Biesheuvel 1 participant 1 message Sep 25, 2022 EFI

lore
Share & tools
lore

Ard Biesheuvel

author maintainer
#0 lore raw

PATCH 1/1 efi: libstub: reinstate efi_get_virtmap() call even for efi_novamap

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().

---
 drivers/firmware/efi/libstub/fdt.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/firmware/efi/libstub/fdt.c +2 -3
index dbea887b9956..82b8c286ddfe 100644
@@ -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);
 }
Signature · 1 line
2.35.1