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, 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.

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