Skip to content

Commit 1845f1f

Browse files
committed
spmp: add CSRs and related field masks
reference: https://github.com/riscv/riscv-spmp/releases/tag/v0.8.18 riscv/riscv-spmp#74 (comment) Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
1 parent 8730672 commit 1845f1f

3 files changed

Lines changed: 5 additions & 0 deletions

File tree

csrs.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
0x15F, "sctrdepth"
7373
0x180, "satp"
7474
0x181, "srmcfg"
75+
0x183, "spmpen"
7576
0x5A8, "scontext"
7677
0x200, "vsstatus"
7778
0x204, "vsie"
@@ -129,6 +130,7 @@
129130
0x148, "sscratchcsw"
130131
0x149, "sscratchcswl"
131132
0x307, "mtvt"
133+
0x316, "mpmpdeleg"
132134
0x345, "mnxti"
133135
0x346, "mintstatus"
134136
0x348, "mscratchcsw"

csrs32.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
0x114, "sieh"
22
0x154, "siph"
33
0x15D, "stimecmph"
4+
0x193, "spmpenh"
45
0x214, "vsieh"
56
0x254, "vsiph"
67
0x25D, "vstimecmph"

encoding.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,8 @@
382382
#define PMP_NA4 _RISCV_UL(0x10)
383383
#define PMP_NAPOT _RISCV_UL(0x18)
384384

385+
#define MPMPDELEG_PMPNUM _RISCV_UL(0x7F)
386+
385387
#define SPMP_U _RISCV_UL(0x100)
386388
#define SPMP_SHARED _RISCV_UL(0x200)
387389

0 commit comments

Comments
 (0)