summaryrefslogtreecommitdiff
path: root/bsp/env/coreplexip-e31-arty/platform.h
diff options
context:
space:
mode:
Diffstat (limited to 'bsp/env/coreplexip-e31-arty/platform.h')
-rw-r--r--bsp/env/coreplexip-e31-arty/platform.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/bsp/env/coreplexip-e31-arty/platform.h b/bsp/env/coreplexip-e31-arty/platform.h
index 307a0c6..6fa79ea 100644
--- a/bsp/env/coreplexip-e31-arty/platform.h
+++ b/bsp/env/coreplexip-e31-arty/platform.h
@@ -7,10 +7,10 @@
#if __riscv_xlen == 32
#define MCAUSE_INT 0x80000000UL
-#define MCAUSE_CAUSE 0x7FFFFFFFUL
+#define MCAUSE_CAUSE 0x000003FFUL
#else
#define MCAUSE_INT 0x8000000000000000UL
-#define MCAUSE_CAUSE 0x7FFFFFFFFFFFFFFFUL
+#define MCAUSE_CAUSE 0x00000000000003FFUL
#endif
#ifdef VECT_IRQ
@@ -18,6 +18,7 @@
#else
#define MTVEC_VECTORED 0x00
#endif
+#define MTVEC_CLIC 0x02
#define IRQ_M_LOCAL 16
#define MIP_MLIP(x) (1 << (IRQ_M_LOCAL + x))
@@ -92,4 +93,8 @@
#include "coreplexip-arty.h"
+unsigned long get_cpu_freq(void);
+unsigned long get_timer_freq(void);
+uint64_t get_timer_value(void);
+
#endif /* _SIFIVE_PLATFORM_H */