summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu/riscv/include/rtems/score/cpu.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-06-27 08:54:13 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-06-29 10:04:37 +0200
commitb706b4a3c09184b2f8ebf5290dc2b1d4a4db6684 (patch)
tree70654e29a9a7af7995aa6325e42ce36de176bccf /cpukit/score/cpu/riscv/include/rtems/score/cpu.h
parentriscv: Remove x8 initialization (diff)
downloadrtems-b706b4a3c09184b2f8ebf5290dc2b1d4a4db6684.tar.bz2
riscv: Remove mstatus from thread context
The mstatus register contains no thread-specific state which must be saved/restored during a context switch. Machine interrupts (MIE) must be enabled during a context switch. Create separate CPU_Interrupt_frame structure. Update #3433.
Diffstat (limited to 'cpukit/score/cpu/riscv/include/rtems/score/cpu.h')
-rw-r--r--cpukit/score/cpu/riscv/include/rtems/score/cpu.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/cpukit/score/cpu/riscv/include/rtems/score/cpu.h b/cpukit/score/cpu/riscv/include/rtems/score/cpu.h
index 9a628c04ca..8821c0e4ec 100644
--- a/cpukit/score/cpu/riscv/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/riscv/include/rtems/score/cpu.h
@@ -47,7 +47,9 @@ extern "C" {
#define CPU_INLINE_ENABLE_DISPATCH FALSE
#define CPU_UNROLL_ENQUEUE_PRIORITY TRUE
-#define CPU_ISR_PASSES_FRAME_POINTER 1
+
+#define CPU_ISR_PASSES_FRAME_POINTER FALSE
+
#define CPU_HARDWARE_FP FALSE
#define CPU_SOFTWARE_FP FALSE
#define CPU_ALL_TASKS_ARE_FP FALSE
@@ -72,10 +74,6 @@ typedef struct {
/* riscv has 32 xlen-bit (where xlen can be 32 or 64) general purpose registers (x0-x31)*/
unsigned long x[32];
- /* Special purpose registers */
- unsigned long mstatus;
- unsigned long mcause;
- unsigned long mepc;
uint32_t isr_dispatch_disable;
#ifdef RTEMS_SMP
volatile bool is_executing;
@@ -90,8 +88,6 @@ typedef struct {
double some_float_register;
} Context_Control_fp;
-typedef Context_Control CPU_Interrupt_frame;
-
#define CPU_CONTEXT_FP_SIZE 0
Context_Control_fp _CPU_Null_fp_context;