riscv-software-src / opensbi

RISC-V Open Source Supervisor Binary Interface
Other
1.03k stars 511 forks source link

Some ROM regions are overlapping #372

Open ddwolf opened 2 months ago

ddwolf commented 2 months ago

here is the error log using master.c4940a9 branch, after revert the opensbi code to v1.2, the error disappeared

qemu-system-riscv64: Some ROM regions are overlapping
These ROM regions might have been loaded by direct user request or by default.
They could be BIOS/firmware images, a guest kernel, initrd or some other file loaded into guest memory.
Check whether you intended to load all this guest code, and whether it has been built to load to the correct addresses.
The following two regions overlap (in the memory address space):
fw_jump.elf ELF program header segment 1 (addresses 0x0000000000000000 - 0x0000000000023940)
mrom.reset (addresses 0x0000000000001000 - 0x0000000000001028)
SiFiveHolland commented 2 months ago

Two possible fixes: 1) Use -bios fw_dynamic.bin instead of -bios fw_dynamic.elf. 2) Build OpenSBI with FW_TEXT_START=0x80000000 (or apply this QEMU patch and choose any valid DRAM address).

alistair23 commented 2 months ago

Can you include the QEMU command line you are using?

ddwolf commented 2 months ago

Can you include the QEMU command line you are using?

qemu-system-riscv64 -m 2G -smp 16 -nographic -machine xxx-machine -bios none -drive if=...img -drive file=... -device pcie-root-port,port=0x10,chassis=1,id=root_port1