CTSRD-CHERI / qemu

QEMU with support for CHERI
Other
54 stars 28 forks source link

(bsd-user MTTCG branch) Linux build fixes for system mode #239

Open tmarkettos opened 1 year ago

tmarkettos commented 1 year ago

Fix the build for the bsd-user branch to build riscv64cheri-softmmu system-mode on Linux. Currently the codebase throws an assertion failure in early BBL/CheriBSD boot (even without -accel tcg,thread=multi):

$ ~/cheri/output/sdk/bin/qemu-system-riscv64cheri -M virt -m 2048 -nographic -bios bbl-riscv64cheri-virt-fw_jump.bin -kernel ~/cheri/output/rootfs-riscv64-purecap/boot/kernel/kernel -drive if=none,file=~/cheri/output/cheribsd-riscv64-purecap.img,id=drv,format=raw -device virtio-blk-device,drive=drv -smp 2 -s -serial mon:stdio -serial pty -monitor tcp:127.0.0.1:5555,server,nowait -device virtio-net-device,netdev=net0 -netdev tap,id=net0,ifname=tap0,script=no,downscript=no -D trace.log -append -v
char device redirected to /dev/pts/10 (label serial1)
bbl loader
SoC version: unknown
Hart 0 version: unknown
Hart 1 version: unknown
qemu-system-riscv64cheri: ../../qemu/target/cheri-common/cheri_tagmem.c:851: void invalidate_from_locktag(lock_tag *): Assertion `lock != TAG_LOCK_ERROR' failed.
qemu-system-riscv64cheri: ../../qemu/target/cheri-common/cheri_tagmem.c:851: void invalidate_from_locktag(lock_tag *): Assertion `lock != TAG_LOCK_ERROR' failed.