Skip to content

Commit dbee6e3

Browse files
committed
dts:fix sbi dts
Signed-off-by: xiaoming <2014500726@smail.xtu.edu.cn>
1 parent f77bd78 commit dbee6e3

5 files changed

Lines changed: 34 additions & 7 deletions

File tree

.github/workflows/main_ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ jobs:
167167
- name: Install prerequisites
168168
run: |
169169
brew install libffi gettext glib pkg-config autoconf automake pixman ninja
170-
170+
171171
- name: Build all
172172
run: |
173173
./build.sh qemu_macos

dts/quard_star.dtsi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,9 @@
169169
core6 {
170170
cpu = <&cpu6>;
171171
};
172+
};
172173

174+
cluster1 {
173175
core7 {
174176
cpu = <&cpu7>;
175177
};

dts/quard_star_sbi.dts

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,30 @@
1212
opensbi-domains {
1313
compatible = "opensbi,domain,config";
1414

15+
tmem0: tmem0 {
16+
compatible = "opensbi,domain,memregion";
17+
base = <0x0 0xBF800000>;
18+
order = <22>;
19+
};
20+
21+
tmem1: tmem1 {
22+
compatible = "opensbi,domain,memregion";
23+
base = <0x0 0xBFC00000>;
24+
order = <21>;
25+
};
26+
27+
tmem2: tmem2 {
28+
compatible = "opensbi,domain,memregion";
29+
base = <0x0 0xBFE00000>;
30+
order = <20>;
31+
};
32+
33+
tmem3: tmem3 {
34+
compatible = "opensbi,domain,memregion";
35+
base = <0x0 0xBFF00000>;
36+
order = <19>;
37+
};
38+
1539
tuart: tuart {
1640
compatible = "opensbi,domain,memregion";
1741
base = <0x0 0x10002000>;
@@ -29,7 +53,7 @@
2953
tdomain: trusted-domain {
3054
compatible = "opensbi,domain,instance";
3155
possible-harts = <&cpu7>;
32-
regions = <&tuart 0x7>, <&allmem 0x7>;
56+
regions = <&tmem0 0x7>, <&tmem1 0x7>, <&tmem2 0x7>, <&tmem3 0x7>, <&tuart 0x7>, <&allmem 0x7>;
3357
boot-hart = <&cpu7>;
3458
next-arg1 = <0x0 0x00000000>;
3559
next-addr = <0x0 0xBF800000>;
@@ -40,7 +64,7 @@
4064
udomain: untrusted-domain {
4165
compatible = "opensbi,domain,instance";
4266
possible-harts = <&cpu0 &cpu1 &cpu2 &cpu3 &cpu4 &cpu5 &cpu6>;
43-
regions = <&tuart 0x0>, <&allmem 0x7>;
67+
regions = <&tmem0 0x0>, <&tmem1 0x0>, <&tmem2 0x0>, <&tmem3 0x0>, <&tuart 0x0>, <&allmem 0x7>;
4468
boot-hart = <&cpu0>;
4569
next-arg1 = <0x0 0xB0000000>;
4670
next-addr = <0x0 0xB0200000>;
@@ -119,4 +143,3 @@
119143
&test {
120144
status = "okay";
121145
};
122-

qemu-7.0.0/hw/riscv/quard_star.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
#include "hw/riscv/boot.h"
3232
#include "hw/riscv/numa.h"
3333
#include "hw/intc/riscv_aclint.h"
34+
#include "hw/intc/riscv_aplic.h"
35+
#include "hw/intc/riscv_imsic.h"
3436
#include "hw/intc/sifive_plic.h"
3537
#include "hw/misc/quard_star_syscon.h"
3638
#include "hw/audio/wm8750.h"
@@ -42,7 +44,7 @@ static const MemMapEntry quard_star_memmap[] = {
4244
[QUARD_STAR_MROM] = { 0x00000000, 0x20000 },
4345
[QUARD_STAR_SRAM] = { 0x00020000, 0xe0000 },
4446

45-
[QUARD_STAR_TEST] = { 0x00100000, 0x1000 },
47+
[QUARD_STAR_SYSCTL] = { 0x00100000, 0x1000 },
4648
[QUARD_STAR_CLINT] = { 0x02000000, 0x10000 },
4749
[QUARD_STAR_PLIC] = { 0x0c000000, 0x4000000 },
4850

@@ -256,7 +258,7 @@ static void quard_star_serial_create(MachineState *machine)
256258

257259
static void quard_star_system_control_create(MachineState *machine)
258260
{
259-
quard_star_syscon_create(quard_star_memmap[QUARD_STAR_TEST].base);
261+
quard_star_syscon_create(quard_star_memmap[QUARD_STAR_SYSCTL].base);
260262
}
261263

262264
static void quard_star_rtc_create(MachineState *machine)

qemu-7.0.0/include/hw/riscv/quard_star.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ enum {
8585
QUARD_STAR_GPIO,
8686
QUARD_STAR_SDIO,
8787
QUARD_STAR_I2S,
88-
QUARD_STAR_TEST,
88+
QUARD_STAR_SYSCTL,
8989
QUARD_STAR_VIRTIO0,
9090
QUARD_STAR_VIRTIO1,
9191
QUARD_STAR_VIRTIO2,

0 commit comments

Comments
 (0)