diff options
author | Andrew Waterman <andrew@sifive.com> | 2017-03-23 13:25:50 -0700 |
---|---|---|
committer | Andrew Waterman <andrew@sifive.com> | 2017-03-23 13:25:50 -0700 |
commit | 771cd8afc10b438c1e7e8109287d40cb6bd3eddb (patch) | |
tree | e3bebc40340e0c4192577d01f39f1f1949266baf | |
parent | ec5a82204dd924cb1e941064056262e6137355ea (diff) | |
download | riscv-opcodes-771cd8afc10b438c1e7e8109287d40cb6bd3eddb.zip riscv-opcodes-771cd8afc10b438c1e7e8109287d40cb6bd3eddb.tar.gz riscv-opcodes-771cd8afc10b438c1e7e8109287d40cb6bd3eddb.tar.bz2 |
Add PMP
-rw-r--r-- | encoding.h | 13 | ||||
-rwxr-xr-x | parse-opcodes | 20 |
2 files changed, 32 insertions, 1 deletions
@@ -32,7 +32,8 @@ #define SSTATUS_SPP 0x00000100 #define SSTATUS_FS 0x00006000 #define SSTATUS_XS 0x00018000 -#define SSTATUS_PUM 0x00040000 +#define SSTATUS_SUM 0x00040000 +#define SSTATUS_MXR 0x00080000 #define SSTATUS32_SD 0x80000000 #define SSTATUS64_SD 0x8000000000000000 @@ -123,6 +124,16 @@ #define SPTBR_MODE_SV57 10 #define SPTBR_MODE_SV64 11 +#define PMP_R 0x01 +#define PMP_W 0x02 +#define PMP_X 0x04 +#define PMP_M 0x08 +#define PMP_NAPOT 0x10 +#define PMP_TOR 0x20 +#define PMP_EN 0x40 +#define PMP_LOCK 0x80 +#define PMP_SHIFT 2 + #define IRQ_S_SOFT 1 #define IRQ_H_SOFT 2 #define IRQ_M_SOFT 3 diff --git a/parse-opcodes b/parse-opcodes index be88241..0b375b3 100755 --- a/parse-opcodes +++ b/parse-opcodes @@ -111,6 +111,26 @@ csrs = [ (0x342, 'mcause'), (0x343, 'mbadaddr'), (0x344, 'mip'), + (0x3a0, 'pmpcfg0'), + (0x3a1, 'pmpcfg1'), + (0x3a2, 'pmpcfg2'), + (0x3a3, 'pmpcfg3'), + (0x3b0, 'pmpaddr0'), + (0x3b1, 'pmpaddr1'), + (0x3b2, 'pmpaddr2'), + (0x3b3, 'pmpaddr3'), + (0x3b4, 'pmpaddr4'), + (0x3b5, 'pmpaddr5'), + (0x3b6, 'pmpaddr6'), + (0x3b7, 'pmpaddr7'), + (0x3b8, 'pmpaddr8'), + (0x3b9, 'pmpaddr9'), + (0x3ba, 'pmpaddr10'), + (0x3bb, 'pmpaddr11'), + (0x3bc, 'pmpaddr12'), + (0x3bd, 'pmpaddr13'), + (0x3be, 'pmpaddr14'), + (0x3bf, 'pmpaddr15'), (0x7a0, 'tselect'), (0x7a1, 'tdata1'), (0x7a2, 'tdata2'), |