aboutsummaryrefslogtreecommitdiff
path: root/encoding.h
diff options
context:
space:
mode:
authorAndrew Waterman <andrew@sifive.com>2017-03-23 13:25:50 -0700
committerAndrew Waterman <andrew@sifive.com>2017-03-23 13:25:50 -0700
commit771cd8afc10b438c1e7e8109287d40cb6bd3eddb (patch)
treee3bebc40340e0c4192577d01f39f1f1949266baf /encoding.h
parentec5a82204dd924cb1e941064056262e6137355ea (diff)
downloadriscv-opcodes-771cd8afc10b438c1e7e8109287d40cb6bd3eddb.zip
riscv-opcodes-771cd8afc10b438c1e7e8109287d40cb6bd3eddb.tar.gz
riscv-opcodes-771cd8afc10b438c1e7e8109287d40cb6bd3eddb.tar.bz2
Add PMP
Diffstat (limited to 'encoding.h')
-rw-r--r--encoding.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/encoding.h b/encoding.h
index 08065eb..99a75ea 100644
--- a/encoding.h
+++ b/encoding.h
@@ -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