From f2787448e16258f8d19d452b8483fba2fdde9ec2 Mon Sep 17 00:00:00 2001 From: Koen Zandberg Date: Wed, 17 Feb 2021 13:52:35 +0100 Subject: [PATCH] cpu/riscv_common: Move MCAUSE defines to riscv_common --- cpu/fe310/include/vendor/platform.h | 4 ---- cpu/riscv_common/include/vendor/riscv_csr.h | 4 ++++ cpu/riscv_common/thread_arch.c | 2 -- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/cpu/fe310/include/vendor/platform.h b/cpu/fe310/include/vendor/platform.h index d440727d89..e5a4be2954 100644 --- a/cpu/fe310/include/vendor/platform.h +++ b/cpu/fe310/include/vendor/platform.h @@ -3,10 +3,6 @@ #ifndef _SIFIVE_PLATFORM_H #define _SIFIVE_PLATFORM_H -// Some things missing from the official encoding.h -#define MCAUSE_INT 0x80000000 -#define MCAUSE_CAUSE 0x7FFFFFFF - #include "vendor/aon.h" diff --git a/cpu/riscv_common/include/vendor/riscv_csr.h b/cpu/riscv_common/include/vendor/riscv_csr.h index 6648c452af..16c0bf4b73 100644 --- a/cpu/riscv_common/include/vendor/riscv_csr.h +++ b/cpu/riscv_common/include/vendor/riscv_csr.h @@ -22,6 +22,10 @@ #ifndef RISCV_CSR_H #define RISCV_CSR_H +/* Some things missing from the official encoding.h */ +#define MCAUSE_INT 0x80000000 +#define MCAUSE_CAUSE 0x7FFFFFFF + #define MSTATUS_UIE 0x00000001 #define MSTATUS_SIE 0x00000002 #define MSTATUS_HIE 0x00000004 diff --git a/cpu/riscv_common/thread_arch.c b/cpu/riscv_common/thread_arch.c index 4cbe115fa7..a9127a21ed 100644 --- a/cpu/riscv_common/thread_arch.c +++ b/cpu/riscv_common/thread_arch.c @@ -26,8 +26,6 @@ #include "sched.h" #include "context_frame.h" -#include "vendor/platform.h" - /** * @brief Noticeable marker marking the beginning of a stack segment *