QEMU's integrated OpenSBI supports writing to console, but the one I compiled doesn't
Posted: Sat Nov 02, 2024 3:13 pm
I built OpenSBI (main branch) on macOS arm64 using the following command:
The following two files it generates are of interest:
It outputs "Test payload running" and then goes into a low-power infinite loop.
However, I can't get it to work with the OpenSBI binary I just built. I tried the following command for that purpose:
I confirmed with lldb that it does work—in that all expected breakpoints are hit and it eventually ends up in the infinite loop—but it doesn't generate the output string.
In both cases, I can see OpenSBI's output printed.
What could the problem be?
Code: Select all
make LLVM=1 PLATFORM=GENERIC
- build/platform/generic/firmware/payloads/test.bin
- build/platform/generic/firmware/fw_jump.bin
Code: Select all
qemu-system-riscv64 -nographic -M virt -smp 1 -m 512M -kernel ./build/platform/generic/firmware/payloads/test.elf
However, I can't get it to work with the OpenSBI binary I just built. I tried the following command for that purpose:
Code: Select all
qemu-system-riscv64 -nographic -M virt -smp 1 -m 512M -bios ./build/platform/generic/firmware/fw_jump.bin -kernel ./build/platform/generic/firmware/payloads/test.bin
In both cases, I can see OpenSBI's output printed.
What could the problem be?