aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--encoding.h9
-rwxr-xr-xparse_opcodes2
2 files changed, 11 insertions, 0 deletions
diff --git a/encoding.h b/encoding.h
index 1bbc31f..98b4023 100644
--- a/encoding.h
+++ b/encoding.h
@@ -41,6 +41,9 @@
#define SSTATUS_UXL 0x0000000300000000
#define SSTATUS64_SD 0x8000000000000000
+#define USTATUS_UIE 0x00000001
+#define USTATUS_UPIE 0x00000010
+
#define DCSR_XDEBUGVER (3U<<30)
#define DCSR_NDRESET (1<<29)
#define DCSR_FULLRESET (1<<28)
@@ -96,12 +99,15 @@
#define MCONTROL_MATCH_MASK_LOW 4
#define MCONTROL_MATCH_MASK_HIGH 5
+#define MIP_USIP (1 << IRQ_U_SOFT)
#define MIP_SSIP (1 << IRQ_S_SOFT)
#define MIP_HSIP (1 << IRQ_H_SOFT)
#define MIP_MSIP (1 << IRQ_M_SOFT)
+#define MIP_UTIP (1 << IRQ_U_TIMER)
#define MIP_STIP (1 << IRQ_S_TIMER)
#define MIP_HTIP (1 << IRQ_H_TIMER)
#define MIP_MTIP (1 << IRQ_M_TIMER)
+#define MIP_UEIP (1 << IRQ_U_EXT)
#define MIP_SEIP (1 << IRQ_S_EXT)
#define MIP_HEIP (1 << IRQ_H_EXT)
#define MIP_MEIP (1 << IRQ_M_EXT)
@@ -139,12 +145,15 @@
#define PMP_NA4 0x10
#define PMP_NAPOT 0x18
+#define IRQ_U_SOFT 0
#define IRQ_S_SOFT 1
#define IRQ_H_SOFT 2
#define IRQ_M_SOFT 3
+#define IRQ_U_TIMER 4
#define IRQ_S_TIMER 5
#define IRQ_H_TIMER 6
#define IRQ_M_TIMER 7
+#define IRQ_U_EXT 8
#define IRQ_S_EXT 9
#define IRQ_H_EXT 10
#define IRQ_M_EXT 11
diff --git a/parse_opcodes b/parse_opcodes
index 883b953..6ee7a5c 100755
--- a/parse_opcodes
+++ b/parse_opcodes
@@ -122,6 +122,8 @@ csrs = [
# Standard Supervisor R/W
(0x100, 'sstatus'),
+ (0x102, 'sedeleg'),
+ (0x103, 'sideleg'),
(0x104, 'sie'),
(0x105, 'stvec'),
(0x106, 'scounteren'),