[U-Boot] RISC-V: Crashes with OpenSBI+U-Boot on the qemu "virt" machine

Björn Töpel bjorn.topel at gmail.com
Mon May 20 17:25:24 UTC 2019


Waking this thread up, because I'm seeing similar behavior as Karsten
-- i.e. the system hangs when launching init.

Software:
QEMU emulator version 4.0.50 (v4.0.0-576-g6d8e75d41c58)
Linux kernel v5.2-rc1, defconfig
OpenSBI commit 392749f6338a ("docs: Add documentation about dynamic firmware")

Toolchain-wise: Ubuntu/Debian:
  riscv64-linux-gnu-gcc (Ubuntu 8.3.0-6ubuntu1) 8.3.0

Launching the VM with:
~/pkg/qemu/bin/qemu-system-riscv64 \
  -nographic      \
XXXX
  -machine virt      \
  -smp 2      \
  -m 8G      \
  -object rng-random,filename=/dev/urandom,id=rng0      \
  -device virtio-rng-device,rng=rng0      \
  -append "console=ttyS0 selinux=0 apparmor=0 loglevel=7 rw
root=/dev/vda2"      \
  -device virtio-blk-device,drive=hd0      \
  -drive file=~/rv/play/debian-sid-sda.raw,format=raw,id=hd0      \
  -device virtio-net,mac=36:8c:88:13:10:d2,netdev=network0      \
  -netdev tap,id=network0,fd=3 3<>/dev/tap5

Where XXXX:
  -kernel ~/src/rv/opensbi/build/platform/qemu/virt/firmware/fw_jump.elf \
  -device loader,file=/home/btopel/build/rv/arch/riscv/boot/Image,addr=0x80200000
\

or
  -kernel bbl \ # riscv-pk HEAD

* When riscv-pk carries the payload, the kernel boots and succeeds to
  launch init.
* Using OpenSBI commit 392749f6338a ("docs: Add documentation about
  dynamic firmware"), the kernel boots, but hangs/spins ("info
  registers" says it's "rdcycle").

Bisecting OpenSBI, it looks like commit 90cb4917b584 ("lib: Implement
sfence.vma correctly.") broke something. At least prior that, the VM
launches correctly.

I haven't looked further -- any ideas?


Thanks,
Björn


More information about the U-Boot mailing list