1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
virt platform mrom
Description of problem:
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.
Steps to 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 information:
```gdb
(gdb) x/16i $pc
=> 0x1000: auipc t0,0x0
0x1004: addi a2,t0,40
0x1008: csrr a0,mhartid
0x100c: lw a1,32(t0)
0x1010: lw t0,24(t0)
0x1014: jr t0
0x1018: unimp
0x101a: .2byte 0x8000
0x101c: unimp
0x101e: unimp
0x1020: unimp
0x1022: .2byte 0x7fe0
0x1024: unimp
0x1026: unimp
0x1028: .4byte 0x4942534f
0x102c: c.slli64 zero
(gdb) bt
#0 0x00001000 in ?? ()
```
|