RISC-V u-boot unable to boot QEMU using '-cpu max'

Daniel Henrique Barboza dbarboza at ventanamicro.com
Mon Apr 22 21:43:59 CEST 2024


Hi,

In QEMU we have a 'max' type CPU that implements (almost) all extensions that QEMU
is able to emulate. Recently, in QEMU commit 249e0905d05, we bumped the extensions
for this CPU.

And after this commit this CPU is now unable to boot a guest using upstream
u-boot. Here's the error being thrown:

qemu-system-riscv64 \
         -machine virt -nographic -m 8G -smp 8 \
         -cpu max -kernel uboot.elf (...)
(...)

initcall sequence 000000008027c3e8 failed at call 000000008021259e (err=-28)
### ERROR ### Please RESET the board ###


I can get the guest to boot if I disable the following extensions from the 'max' CPU:

  -cpu max,zfbfmin=false,zvfbfmin=false,zvfbfwma=false

Due to QEMU extension dependencies I'm not able to disable these individually. What I can
say is that u-boot isn't playing ball to at least one of them.

Is this an u-boot bug? Up to this point I was assuming that u-boot would silently ignore
hart extensions that it doesn't support.


Thanks,


Daniel


More information about the U-Boot mailing list