|
@@ -229,19 +229,21 @@ static int __init arm64_enable_runtime_services(void)
|
|
|
return -1;
|
|
return -1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- mapsize = memmap.map_end - memmap.map;
|
|
|
|
|
-
|
|
|
|
|
if (efi_runtime_disabled()) {
|
|
if (efi_runtime_disabled()) {
|
|
|
pr_info("EFI runtime services will be disabled.\n");
|
|
pr_info("EFI runtime services will be disabled.\n");
|
|
|
return -1;
|
|
return -1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
pr_info("Remapping and enabling EFI services.\n");
|
|
pr_info("Remapping and enabling EFI services.\n");
|
|
|
- /* replace early memmap mapping with permanent mapping */
|
|
|
|
|
|
|
+
|
|
|
|
|
+ mapsize = memmap.map_end - memmap.map;
|
|
|
memmap.map = (__force void *)ioremap_cache((phys_addr_t)memmap.phys_map,
|
|
memmap.map = (__force void *)ioremap_cache((phys_addr_t)memmap.phys_map,
|
|
|
mapsize);
|
|
mapsize);
|
|
|
|
|
+ if (!memmap.map) {
|
|
|
|
|
+ pr_err("Failed to remap EFI memory map\n");
|
|
|
|
|
+ return -1;
|
|
|
|
|
+ }
|
|
|
memmap.map_end = memmap.map + mapsize;
|
|
memmap.map_end = memmap.map + mapsize;
|
|
|
-
|
|
|
|
|
efi.memmap = &memmap;
|
|
efi.memmap = &memmap;
|
|
|
|
|
|
|
|
efi.systab = (__force void *)ioremap_cache(efi_system_table,
|
|
efi.systab = (__force void *)ioremap_cache(efi_system_table,
|