@@ -191,8 +191,6 @@ static __init void reserve_regions(void)
if (efi_enabled(EFI_DBG))
pr_cont("\n");
}
-
- set_bit(EFI_MEMMAP, &efi.flags);
}
void __init efi_init(void)
@@ -291,13 +289,6 @@ static int __init arm64_enable_runtime_services(void)
return -1;
}
- if (efi_runtime_disabled()) {
- pr_info("EFI runtime services will be disabled.\n");
- return -1;
- }
-
- pr_info("Remapping and enabling EFI services.\n");
-
mapsize = memmap.map_end - memmap.map;
memmap.map = (__force void *)ioremap_cache((phys_addr_t)memmap.phys_map,
mapsize);
@@ -307,6 +298,14 @@ static int __init arm64_enable_runtime_services(void)
}
memmap.map_end = memmap.map + mapsize;
efi.memmap = &memmap;
+ set_bit(EFI_MEMMAP, &efi.flags);
+
+ if (efi_runtime_disabled()) {
+ pr_info("EFI runtime services will be disabled.\n");
+ return -1;
+ }
+
+ pr_info("Remapping and enabling EFI services.\n");
efi.systab = (__force void *)ioremap_cache(efi_system_table,
sizeof(efi_system_table_t));
In an upcoming patch, we will wire up page_is_ram() to the UEFI memory map, so make sure the EFI_MEMMAP bit accurately reflects whether the UEFI memory map is available via its permanent mapping. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- arch/arm64/kernel/efi.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) -- 2.1.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel