diff options
author | Megan Wachs <megan@sifive.com> | 2017-05-05 15:45:51 -0700 |
---|---|---|
committer | Megan Wachs <megan@sifive.com> | 2017-05-05 15:45:51 -0700 |
commit | 45b9bb2f66584aaa1caa43a688038f9b8d990480 (patch) | |
tree | 805e1499d681e4b50f9a51389dc63730fe349ba3 /bsp/env | |
parent | 5746b5840284339e02de22ce6e14e1a2ad1606d7 (diff) |
coreplexip-e51-arty: MCAUSE is XLEN-bits wide.
Diffstat (limited to 'bsp/env')
-rw-r--r-- | bsp/env/coreplexip-e31-arty/platform.h | 10 |
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..2c9794c 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 0x80000000000000000UL +#define MCAUSE_CAUSE 0x7FFFFFFFFFFFFFFFFUL +#endif #define IRQ_M_LOCAL 16 #define MIP_MLIP(x) (1 << (IRQ_M_LOCAL + x)) |