Re: EFI_STUB fails to boot non-EFI on arm64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 23, 2014 at 02:16:56PM +0100, Leif Lindholm wrote:
> Subject: [PATCH] arm64: efi: only attempt efi map setup if booting via 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@xxxxxxxxxx>
> ---
>  arch/arm64/kernel/efi.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> 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;
> +

That's a first (possibly temporary) step and I think it's fine:

Acked-by: Catalin Marinas <catalin.marinas@xxxxxxx>

But we need some further tweaking to the way we call efi_init().
Currently it doesn't matter whether Linux booted as an EFI application
or not and efi_init() is always called, causing some pr_err() in
fdt_find_uefi_params(). It's not really an error as we support the same
image booting non-EFI as well.

Can we add another of detecting whether it's an EFI application and
avoid calling efi_init()? I can see x86 sets some efi_loader_signature
string in exit_boot() and checks against it later when calling
efi_init().

-- 
Catalin
--
To unsubscribe from this list: send the line "unsubscribe linux-efi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux