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

Atish Patra atish.patra at wdc.com
Mon May 20 20:01:27 UTC 2019


On 5/20/19 10:26 AM, Björn Töpel wrote:
> 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
> 
> _______________________________________________
> opensbi mailing list
> opensbi at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/opensbi
> 

Try this patch. This should solve this issue.

http://lists.infradead.org/pipermail/opensbi/2019-May/000118.html


-- 
Regards,
Atish


More information about the U-Boot mailing list