summaryrefslogtreecommitdiff
path: root/bsp/env/coreplexip-e31-arty
diff options
context:
space:
mode:
authorDrew Barbier <drew@sifive.com>2017-05-07 14:40:43 -0500
committerDrew Barbier <drew@sifive.com>2017-05-07 14:40:43 -0500
commite4572d7aa8dbd870b81c6fa1c9cc89db17cd25c5 (patch)
treebf3c04a578fe191c5d356d2f7193471c559cd651 /bsp/env/coreplexip-e31-arty
parent22517f8fc4b5480f41365cf5ea149a8cd2d53fcf (diff)
parent0357ba87797afa49b5d5ddebb988458d80df91c5 (diff)
Merge remote-tracking branch 'origin/master' into freedom-studio
Diffstat (limited to 'bsp/env/coreplexip-e31-arty')
-rw-r--r--bsp/env/coreplexip-e31-arty/platform.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/bsp/env/coreplexip-e31-arty/platform.h b/bsp/env/coreplexip-e31-arty/platform.h
index 02a0a62..42c8887 100644
--- a/bsp/env/coreplexip-e31-arty/platform.h
+++ b/bsp/env/coreplexip-e31-arty/platform.h
@@ -4,8 +4,14 @@
#define _SIFIVE_PLATFORM_H
// Some things missing from the official encoding.h
-#define MCAUSE_INT 0x80000000
-#define MCAUSE_CAUSE 0x7FFFFFFF
+
+#if __riscv_xlen == 32
+#define MCAUSE_INT 0x80000000UL
+#define MCAUSE_CAUSE 0x7FFFFFFFUL
+#else
+#define MCAUSE_INT 0x8000000000000000UL
+#define MCAUSE_CAUSE 0x7FFFFFFFFFFFFFFFUL
+#endif
#define IRQ_M_LOCAL 16
#define MIP_MLIP(x) (1 << (IRQ_M_LOCAL + x))