EFI_STUB fails to boot non-EFI on arm64

Ard Biesheuvel ard.biesheuvel at linaro.org
Fri May 23 12:43:46 PDT 2014


On 23 May 2014 17:45, Leif Lindholm <leif.lindholm at linaro.org> wrote:
>
> On Fri, May 23, 2014 at 05:17:39PM +0200, Ard Biesheuvel wrote:
> > >> 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().
> > >
> > > Well, I agree that we shouldn't be spewing error messages for expected
> > > operation, but efi_init() is the function we call to determine
> > > whether we _are_ booting via UEFI - and it sets flags accordingly for
> > > the efi_enabled() macro.
> > >
> >
> > Considering that
> >
> > a) the raw Image loader and the stub enter the kernel through
> > different entry points (i.e., offset #0 and whatever entry point is
> > specified in the PE/COFF header, respectively), and
> > b) there is no decompressor etc involved so we jump straight into the
> > kernel startup code
> > c) head.S already deals with a similar problem, i.e., storing the CPU boot mode
> >
> > I would assume it shouldn't be so difficult to set a bit somewhere
> > indicating which case we are dealing with?
>
> That would certainly be possible, but what would be the benefit of
> having two separate mechanisms for determining whether we are booting
> via UEFI - which could potentially end up disagreeing?
>

Yeah, you're right. Also, the ARM requirements are sufficiently
different (as Roy points out) that the presence of the FDT nodes is
the most reliable indicator of whether you can proceed booting in EFI
mode.

-- 
Ard.



More information about the linux-arm-kernel mailing list