diff options
Diffstat (limited to 'arch/arm64/kernel/efi.c')
-rw-r--r-- | arch/arm64/kernel/efi.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c index 6ed0362dd579..8f5db4a3c9d9 100644 --- a/arch/arm64/kernel/efi.c +++ b/arch/arm64/kernel/efi.c | |||
@@ -392,11 +392,16 @@ static int __init arm64_enter_virtual_mode(void) | |||
392 | return -1; | 392 | return -1; |
393 | } | 393 | } |
394 | 394 | ||
395 | pr_info("Remapping and enabling EFI services.\n"); | ||
396 | |||
397 | /* replace early memmap mapping with permanent mapping */ | ||
398 | mapsize = memmap.map_end - memmap.map; | 395 | mapsize = memmap.map_end - memmap.map; |
399 | early_memunmap(memmap.map, mapsize); | 396 | early_memunmap(memmap.map, mapsize); |
397 | |||
398 | if (efi_runtime_disabled()) { | ||
399 | pr_info("EFI runtime services will be disabled.\n"); | ||
400 | return -1; | ||
401 | } | ||
402 | |||
403 | pr_info("Remapping and enabling EFI services.\n"); | ||
404 | /* replace early memmap mapping with permanent mapping */ | ||
400 | memmap.map = (__force void *)ioremap_cache((phys_addr_t)memmap.phys_map, | 405 | memmap.map = (__force void *)ioremap_cache((phys_addr_t)memmap.phys_map, |
401 | mapsize); | 406 | mapsize); |
402 | memmap.map_end = memmap.map + mapsize; | 407 | memmap.map_end = memmap.map + mapsize; |