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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
debug: 0.981
virtual: 0.952
device: 0.879
ppc: 0.860
graphic: 0.833
VMM: 0.783
architecture: 0.695
semantic: 0.674
vnc: 0.624
performance: 0.576
register: 0.548
peripherals: 0.497
user-level: 0.488
PID: 0.448
risc-v: 0.439
socket: 0.405
network: 0.380
permissions: 0.369
x86: 0.329
arm: 0.328
mistranslation: 0.328
hypervisor: 0.276
files: 0.246
TCG: 0.221
boot: 0.193
assembly: 0.157
i386: 0.150
kernel: 0.144
KVM: 0.019
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 ?? ()
```
|