lkml.org 
[lkml]   [2020]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 03/33] efi/libstub: Unify EFI call wrappers for non-x86
On Sun, 3 May 2020 at 18:09, Arvind Sankar <nivedita@alum.mit.edu> wrote:
>
> On Sun, May 03, 2020 at 08:09:06AM -0700, Guenter Roeck wrote:
> > Hi,
> >
> > On Fri, Apr 24, 2020 at 03:05:01PM +0200, Ard Biesheuvel wrote:
> > > We have wrappers around EFI calls so that x86 can define special
> > > versions for mixed mode, while all other architectures can use the
> > > same simple definition that just issues the call directly.
> > > In preparation for the arrival of yet another architecture that doesn't
> > > need anything special here (RISC-V), let's move the default definition
> > > into a shared header.
> > >
> > > Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
> >
> > This patch causes an immediate reboot in linux-next when booting
> > in qemu with an efi32 bios. Bisect log attached.
> >
> > Qemu command line:
> >
> > qemu-system-x86_64 -kernel arch/x86/boot/bzImage -m 1G \
> > -no-reboot -snapshot \
> > -bios OVMF-pure-efi-32.fd \
> > -drive file=rootfs.ext2,format=raw \
> > --append 'earlycon=uart8250,io,0x3f8,9600n8 panic=-1 root=/dev/sda console=ttyS0' \
> > -nographic
> >
> > The same command succeeds with OVMF-pure-efi-64.fd.
> >
> > Bisect log attached.
> >
> > File locations:
> > https://github.com/groeck/linux-build-test/blob/master/rootfs/firmware/OVMF-pure-efi-32.fd
> > https://github.com/groeck/linux-build-test/blob/master/rootfs/x86_64/rootfs.ext2.gz
> >
> > Guenter
> >
>
> The issue is that efi_is_native is an inline function on x86, not a
> macro, so the #ifndef efi_is_native is broken.
>
> We can either turn it into a macro, or add
> #define efi_is_native efi_is_native
> in arch/x86/include/asm/efi.h.

Indeed. Fix here:

https://lore.kernel.org/linux-efi/20200503154507.82880-1-ardb@kernel.org/T/#u

\
 
 \ /
  Last update: 2020-05-03 18:12    [W:0.051 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site