Skip to contentSkip to conversation

aarch64 edk2 + linux kernel crash with gicv4

RESOLVED Richard Henderson 3 participants 3 messages Jun 21, 2022 – Jun 22, 2022

lore
Share & tools
lore
#0 lore raw

Hi Luis,

Cc'ing qemu-devel just in case someone else runs into this problem:

The symptom is an early-ish crash booting the linux kernel -- without earlycon there is no output at all. Reproducing it requires both -bios QEMU_EFI.fd and -kernel Image.gz. Using only one of the two options works.

I tracked the crash to the qemu commit that enabled GICv4. So I tried using -M gic-version=3, and that works.

I wondered if the problem is that the edk2 image from Ubuntu 20.04 is too old and can't properly handle GICv4, leaving the device in an inconsistent state for the kernel. So I tried an image from https://retrage.github.io/edk2-nightly/ with gic-version=max, and that works.

So... solved.

r~

#1 lore raw
Quoted 8 lines · Richard Henderson

Hi Luis,

Cc'ing qemu-devel just in case someone else runs into this problem:

The symptom is an early-ish crash booting the linux kernel -- without earlycon there is no output at all. Reproducing it requires both -bios QEMU_EFI.fd and -kernel Image.gz. Using only one of the two options works.

What should the combination of the two options mean? Usually the firmware loads the kernel and -kernel is a shortcut hack to avoid the firmware setup. If you specify both does the firmware still run but somehow find the kernel mapped in memory?

Quoted 14 lines

I tracked the crash to the qemu commit that enabled GICv4. So I tried using -M gic-version=3, and that works.

I wondered if the problem is that the edk2 image from Ubuntu 20.04 is too old and can't properly handle GICv4, leaving the device in an inconsistent state for the kernel. So I tried an image from
https://retrage.github.io/edk2-nightly/ with gic-version=max, and that works.

So... solved.

r~

Signature · 1 line
Alex Bennée
#2 lore raw
Quoted 10 lines · Alex Bennée
Quoted 4 lines · Richard Henderson

The symptom is an early-ish crash booting the linux kernel -- without earlycon there is no output at all. Reproducing it requires both -bios QEMU_EFI.fd and -kernel Image.gz. Using only one of the two options works.

What should the combination of the two options mean? Usually the firmware loads the kernel and -kernel is a shortcut hack to avoid the firmware setup. If you specify both does the firmware still run but somehow find the kernel mapped in memory?

It's like x86 -- it means "load the BIOS image, and provide the kernel/initrd via the fw_cfg device, so that a QEMU-aware BIOS can read the supplied kernel/initrd from fw_cfg and boot them".

thanks
-- PMM