From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: EFI_STUB fails to boot non-EFI on arm64
Date: Fri, 23 May 2014 14:47:20 +0100 [thread overview]
Message-ID: <20140523134720.GA9256@arm.com> (raw)
In-Reply-To: <20140523131656.GR4179@bivouac.eciton.net>
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@linaro.org>
> ---
> 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@arm.com>
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
next prev parent reply other threads:[~2014-05-23 13:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-23 9:45 EFI_STUB fails to boot non-EFI on arm64 Catalin Marinas
2014-05-23 13:16 ` Leif Lindholm
2014-05-23 13:24 ` Matt Fleming
2014-05-23 13:47 ` Catalin Marinas [this message]
2014-05-23 15:03 ` Leif Lindholm
2014-05-23 15:17 ` Ard Biesheuvel
2014-05-23 15:45 ` Leif Lindholm
2014-05-23 18:03 ` Roy Franz
2014-05-23 19:43 ` Ard Biesheuvel
2014-05-28 15:59 ` Will Deacon
2014-05-28 18:05 ` Leif Lindholm
2014-05-28 18:40 ` Will Deacon
2014-05-28 20:42 ` Leif Lindholm
2014-07-08 9:21 ` Catalin Marinas
2014-07-08 11:09 ` Leif Lindholm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140523134720.GA9256@arm.com \
--to=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).