summaryrefslogtreecommitdiff
path: root/memlayout.h
diff options
context:
space:
mode:
Diffstat (limited to 'memlayout.h')
-rw-r--r--memlayout.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/memlayout.h b/memlayout.h
index 9c9cfdb..462986c 100644
--- a/memlayout.h
+++ b/memlayout.h
@@ -28,6 +28,14 @@
// qemu puts programmable interrupt controller here.
#define PLIC 0x0c000000L
+#define PLIC_PRIORITY (PLIC + 0x0)
+#define PLIC_PENDING (PLIC + 0x1000)
+#define PLIC_MENABLE(hart) (PLIC + 0x2000 + (hart)*0x100)
+#define PLIC_SENABLE(hart) (PLIC + 0x2080 + (hart)*0x100)
+#define PLIC_MPRIORITY(hart) (PLIC + 0x200000 + (hart)*0x2000)
+#define PLIC_SPRIORITY(hart) (PLIC + 0x201000 + (hart)*0x2000)
+#define PLIC_MCLAIM(hart) (PLIC + 0x200004 + (hart)*0x2000)
+#define PLIC_SCLAIM(hart) (PLIC + 0x201004 + (hart)*0x2000)
#define RAMDISK 0x88000000L