aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeif Lindholm <leif.lindholm@linaro.org>2014-05-23 14:16:56 +0100
committerMark Brown <broonie@linaro.org>2014-07-24 22:58:43 +0100
commit2edcb9f57bdaef4d4dc3f0f13c3a2b320b07fdf7 (patch)
treed2105f54879f7500a697f80999e622ce120b666c
parent9d805241d70c4491ce031fb6fda0b3875e3f1c7e (diff)
downloadlinux-linaro-stable-v3.10/topic/arm64-efi.tar.gz
arm64: efi: only attempt efi map setup if booting via EFIv3.10/topic/arm64-efi
Booting a kernel with CONFIG_EFI enabled on a non-EFI system caused an oops with the current UEFI support code. Add the required test to prevent this. Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com> (cherry picked from commit 74bcc2499291d38b6253f9dbd6af33a195222208) Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r--arch/arm64/kernel/efi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c
index 7bfd650..14db1f6 100644
--- a/arch/arm64/kernel/efi.c
+++ b/arch/arm64/kernel/efi.c
@@ -333,6 +333,9 @@ void __init efi_init(void)
void __init efi_idmap_init(void)
{
+ if (!efi_enabled(EFI_BOOT))
+ return;
+
/* boot time idmap_pg_dir is incomplete, so fill in missing parts */
efi_setup_idmap();
}