Skip to content

Commit

Permalink
arm64: efi: only attempt efi map setup if booting via EFI
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Leif Lindholm authored and Matt Fleming committed May 23, 2014
1 parent 345c736 commit 74bcc24
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/arm64/kernel/efi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 74bcc24

Please sign in to comment.