id = 1555 title = "virt platform mrom" state = "closed" created_at = "2023-03-24T03:47:07.313Z" closed_at = "2023-05-17T05:00:04.128Z" labels = ["accel: TCG", "target: riscv"] url = "https://gitlab.com/qemu-project/qemu/-/issues/1555" host-os = "ubuntu22.04" host-arch = "x86" qemu-version = "7.2.0" guest-os = "n/a" guest-arch = "n/a" description = """qemu-system-riscv32 to emulated the lowrisc ibex simple system hello, when debug with riscv32-unknown-elf-gdb, there kept logging "Invalid read at addr 0x0, size 2, region '(null)', reason: rejected". I saw qemu virt platform codes related to this error, it load reset_vec to 0x1000 called VIRT_MROM. I still not understand why this error happens.""" reproduce = """1.git clone https://github.com/lowRISC/ibex.git 2.cd ibex 3.make -C examples/sw/simple_system/hello_test 4.using the qemu command line above 5.`riscv32-unknown-elf-gdb -ex target remote localhost:1234 examples/sw/simple_system/hello_test` in another terminal, type bt, the error happens.""" additional = """```gdb (gdb) x/16i $pc => 0x1000:\tauipc\tt0,0x0 0x1004:\taddi\ta2,t0,40 0x1008:\tcsrr\ta0,mhartid 0x100c:\tlw\ta1,32(t0) 0x1010:\tlw\tt0,24(t0) 0x1014:\tjr\tt0 0x1018:\tunimp 0x101a:\t.2byte\t0x8000 0x101c:\tunimp 0x101e:\tunimp 0x1020:\tunimp 0x1022:\t.2byte\t0x7fe0 0x1024:\tunimp 0x1026:\tunimp 0x1028:\t.4byte\t0x4942534f 0x102c:\tc.slli64\tzero (gdb) bt #0 0x00001000 in ?? () ```"""