aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/efi.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm64/kernel/efi.c')
-rw-r--r--arch/arm64/kernel/efi.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c
index a98415b5979c..c9cb0fbe7aa4 100644
--- a/arch/arm64/kernel/efi.c
+++ b/arch/arm64/kernel/efi.c
@@ -229,19 +229,21 @@ static int __init arm64_enable_runtime_services(void)
229 return -1; 229 return -1;
230 } 230 }
231 231
232 mapsize = memmap.map_end - memmap.map;
233
234 if (efi_runtime_disabled()) { 232 if (efi_runtime_disabled()) {
235 pr_info("EFI runtime services will be disabled.\n"); 233 pr_info("EFI runtime services will be disabled.\n");
236 return -1; 234 return -1;
237 } 235 }
238 236
239 pr_info("Remapping and enabling EFI services.\n"); 237 pr_info("Remapping and enabling EFI services.\n");
240 /* replace early memmap mapping with permanent mapping */ 238
239 mapsize = memmap.map_end - memmap.map;
241 memmap.map = (__force void *)ioremap_cache((phys_addr_t)memmap.phys_map, 240 memmap.map = (__force void *)ioremap_cache((phys_addr_t)memmap.phys_map,
242 mapsize); 241 mapsize);
242 if (!memmap.map) {
243 pr_err("Failed to remap EFI memory map\n");
244 return -1;
245 }
243 memmap.map_end = memmap.map + mapsize; 246 memmap.map_end = memmap.map + mapsize;
244
245 efi.memmap = &memmap; 247 efi.memmap = &memmap;
246 248
247 efi.systab = (__force void *)ioremap_cache(efi_system_table, 249 efi.systab = (__force void *)ioremap_cache(efi_system_table,