#973578 qemu-system-arm: -machine sbsa-ref does not boot UEFI

Package:
qemu-system-arm
Source:
qemu
Description:
QEMU full system emulation binaries (arm)
Submitter:
Ryutaroh Matsumoto
Date:
2022-06-01 16:57:06 UTC
Severity:
minor
#973578#5
Date:
2020-11-02 04:00:20 UTC
From:
To:
Dear Maintainer,

# cp /usr/share/AAVMF/AAVMF_VARS.fd /var/tmp/efivars.fd; qemu-system-aarch64 \
 -machine sbsa-ref -cpu cortex-a57  -nographic -net nic,model=virtio \
 -net user -object rng-random,filename=/dev/urandom,id=rng0 \
 -device virtio-rng-pci,rng=rng0,id=rng-device0 \
 -drive file=/var/lib/debci/qemu/sid-arm64.img,if=virtio,index=0,format=qcow2 \
 -drive if=pflash,format=raw,read-only,file=/usr/share/AAVMF/AAVMF_CODE.fd \
 -drive if=pflash,format=raw,file=/var/tmp/efivars.fd -m 1024

gives the error
qemu-system-aarch64: device requires 268435456 bytes, block backend provides 67108864 bytes

On the other hand, if I change -machine sbsa-ref to -machine virt,
it works fine as

BdsDxe: failed to load Boot0001 "UEFI Misc Device" from VenHw(93E34C7E-B50E-11DF-9223-2443DFD72085,00): Not Found
BdsDxe: loading Boot0002 "UEFI Misc Device 2" from PciRoot(0x0)/Pci(0x3,0x0)
BdsDxe: starting Boot0002 "UEFI Misc Device 2" from PciRoot(0x0)/Pci(0x3,0x0)
Welcome to GRUB!

error: serial port `com0' isn't found.
error: terminal `serial' isn't found.
error: terminal `serial' isn't found.
  Booting `Debian GNU/Linux'

Loading Linux 5.9.0-1-arm64 ...
Loading initial ramdisk ...
EFI stub: Booting Linux Kernel...
EFI stub: Using DTB from configuration table
EFI stub: Exiting boot services and installing virtual address map...
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x411fd070]
[    0.000000] Linux version 5.9.0-1-arm64 (debian-kernel@lists.debian.org) (gcc-10 (Debian 10.2.0-15) 10.2.0, GNU ld (GNU Binutils for Debian) 2.35.1) #1 SMP Debian 5.9.1-1 (2020-10-17)
[    0.000000] efi: EFI v2.70 by EDK II


Best regards, Ryutaroh Matsumoto

#973578#10
Date:
2022-06-01 16:56:34 UTC
From:
To:
W dniu 02.11.2020 o 05:00, Ryutaroh Matsumoto pisze:

SBSA Reference Platform requires both UEFI firmware and UEFI variables
file to be 256MB in size.

Virt machine uses 64MB files.

So it is not a bug in qemu.