summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-11-14 11:34:54 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-11-18 07:30:33 +0100
commitc539a865f4ffc36dcc8395a4c9b9c798e45f3eb2 (patch)
tree1231e35ac22dbbe5c163f787fb90948fe2042c7b
parentsparc: Rename CPU_Minimum_stack_frame (diff)
downloadrtems-c539a865f4ffc36dcc8395a4c9b9c798e45f3eb2.tar.bz2
sparc: Move CPU_Interrupt_frame related defines
Move CPU_Interrupt_frame related defines to <rtems/score/cpuimpl.h>. Update #2809.
-rw-r--r--c/src/lib/libbsp/sparc/shared/irq_asm.S2
-rw-r--r--cpukit/score/cpu/sparc/cpu.c7
-rw-r--r--cpukit/score/cpu/sparc/rtems/score/cpu.h50
-rw-r--r--cpukit/score/cpu/sparc/rtems/score/cpuimpl.h51
-rw-r--r--cpukit/score/cpu/sparc/sparc-context-validate.S2
-rw-r--r--cpukit/score/cpu/sparc/sparc-context-volatile-clobber.S2
6 files changed, 59 insertions, 55 deletions
diff --git a/c/src/lib/libbsp/sparc/shared/irq_asm.S b/c/src/lib/libbsp/sparc/shared/irq_asm.S
index 3143b109cb..7a595d1711 100644
--- a/c/src/lib/libbsp/sparc/shared/irq_asm.S
+++ b/c/src/lib/libbsp/sparc/shared/irq_asm.S
@@ -393,7 +393,7 @@ dont_do_the_window:
* REGISTERS SAME AS AT _ISR_Handler
*/
- sub %fp, CONTEXT_CONTROL_INTERRUPT_FRAME_SIZE, %sp
+ sub %fp, CPU_INTERRUPT_FRAME_SIZE, %sp
! make space for ISF
std %l0, [%sp + ISF_PSR_OFFSET] ! save psr, PC
diff --git a/cpukit/score/cpu/sparc/cpu.c b/cpukit/score/cpu/sparc/cpu.c
index 5afad17344..92d1c66d45 100644
--- a/cpukit/score/cpu/sparc/cpu.c
+++ b/cpukit/score/cpu/sparc/cpu.c
@@ -106,7 +106,12 @@ SPARC_ASSERT_ISF_OFFSET(y, Y);
SPARC_ASSERT_ISF_OFFSET(tpc, TPC);
RTEMS_STATIC_ASSERT(
- sizeof(CPU_Interrupt_frame) == CONTEXT_CONTROL_INTERRUPT_FRAME_SIZE,
+ sizeof(SPARC_Minimum_stack_frame) == SPARC_MINIMUM_STACK_FRAME_SIZE,
+ SPARC_MINIMUM_STACK_FRAME_SIZE
+);
+
+RTEMS_STATIC_ASSERT(
+ sizeof(CPU_Interrupt_frame) == CPU_INTERRUPT_FRAME_SIZE,
CPU_Interrupt_frame_size
);
diff --git a/cpukit/score/cpu/sparc/rtems/score/cpu.h b/cpukit/score/cpu/sparc/rtems/score/cpu.h
index f0f8110d2f..27393b796e 100644
--- a/cpukit/score/cpu/sparc/rtems/score/cpu.h
+++ b/cpukit/score/cpu/sparc/rtems/score/cpu.h
@@ -344,9 +344,6 @@ typedef struct {
/** This macro defines an offset into the stack frame for use in assembly. */
#define CPU_STACK_FRAME_PAD0_OFFSET 0x5c
-/** This defines the size of the minimum stack frame. */
-#define SPARC_MINIMUM_STACK_FRAME_SIZE 0x60
-
#define CPU_MAXIMUM_PROCESSORS 32
/**
@@ -683,53 +680,6 @@ typedef struct {
#endif /* ASM */
-/*
- * Offsets of fields with CPU_Interrupt_frame for assembly routines.
- */
-
-/** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_PSR_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x00
-/** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_PC_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x04
-/** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_NPC_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x08
-/** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_G1_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x0c
-/** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_G2_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x10
-/** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_G3_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x14
-/** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_G4_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x18
-/** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_G5_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x1c
-/** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_G7_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x24
-/** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_I0_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x28
-/** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_I1_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x2c
-/** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_I2_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x30
-/** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_I3_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x34
-/** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_I4_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x38
-/** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_I5_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x3c
-/** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_I6_FP_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x40
-/** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_I7_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x44
-/** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_Y_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x48
-/** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_TPC_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x4c
-
-/** This defines the size of the ISF area for use in assembly. */
-#define CONTEXT_CONTROL_INTERRUPT_FRAME_SIZE \
- SPARC_MINIMUM_STACK_FRAME_SIZE + 0x50
-
#ifndef ASM
/**
* This variable is contains the initialize context for the FP unit.
diff --git a/cpukit/score/cpu/sparc/rtems/score/cpuimpl.h b/cpukit/score/cpu/sparc/rtems/score/cpuimpl.h
index 27a8d776b8..51071ab267 100644
--- a/cpukit/score/cpu/sparc/rtems/score/cpuimpl.h
+++ b/cpukit/score/cpu/sparc/rtems/score/cpuimpl.h
@@ -5,7 +5,7 @@
*/
/*
- * Copyright (c) 2007 On-Line Applications Research Corporation (OAR)
+ * Copyright (c) 1989, 2007 On-Line Applications Research Corporation (OAR)
* Copyright (c) 2013, 2016 embedded brains GmbH
*
* The license and distribution terms for this file may be
@@ -18,6 +18,55 @@
#include <rtems/score/cpu.h>
+/** This defines the size of the minimum stack frame. */
+#define SPARC_MINIMUM_STACK_FRAME_SIZE 0x60
+
+/*
+ * Offsets of fields with CPU_Interrupt_frame for assembly routines.
+ */
+
+/** This macro defines an offset into the ISF for use in assembly. */
+#define ISF_PSR_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x00
+/** This macro defines an offset into the ISF for use in assembly. */
+#define ISF_PC_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x04
+/** This macro defines an offset into the ISF for use in assembly. */
+#define ISF_NPC_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x08
+/** This macro defines an offset into the ISF for use in assembly. */
+#define ISF_G1_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x0c
+/** This macro defines an offset into the ISF for use in assembly. */
+#define ISF_G2_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x10
+/** This macro defines an offset into the ISF for use in assembly. */
+#define ISF_G3_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x14
+/** This macro defines an offset into the ISF for use in assembly. */
+#define ISF_G4_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x18
+/** This macro defines an offset into the ISF for use in assembly. */
+#define ISF_G5_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x1c
+/** This macro defines an offset into the ISF for use in assembly. */
+#define ISF_G7_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x24
+/** This macro defines an offset into the ISF for use in assembly. */
+#define ISF_I0_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x28
+/** This macro defines an offset into the ISF for use in assembly. */
+#define ISF_I1_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x2c
+/** This macro defines an offset into the ISF for use in assembly. */
+#define ISF_I2_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x30
+/** This macro defines an offset into the ISF for use in assembly. */
+#define ISF_I3_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x34
+/** This macro defines an offset into the ISF for use in assembly. */
+#define ISF_I4_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x38
+/** This macro defines an offset into the ISF for use in assembly. */
+#define ISF_I5_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x3c
+/** This macro defines an offset into the ISF for use in assembly. */
+#define ISF_I6_FP_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x40
+/** This macro defines an offset into the ISF for use in assembly. */
+#define ISF_I7_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x44
+/** This macro defines an offset into the ISF for use in assembly. */
+#define ISF_Y_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x48
+/** This macro defines an offset into the ISF for use in assembly. */
+#define ISF_TPC_OFFSET SPARC_MINIMUM_STACK_FRAME_SIZE + 0x4c
+
+/** This defines the size of the ISF area for use in assembly. */
+#define CPU_INTERRUPT_FRAME_SIZE SPARC_MINIMUM_STACK_FRAME_SIZE + 0x50
+
#if ( SPARC_HAS_FPU == 1 )
#define CPU_PER_CPU_CONTROL_SIZE 8
#else
diff --git a/cpukit/score/cpu/sparc/sparc-context-validate.S b/cpukit/score/cpu/sparc/sparc-context-validate.S
index af77721e47..e0724e0e94 100644
--- a/cpukit/score/cpu/sparc/sparc-context-validate.S
+++ b/cpukit/score/cpu/sparc/sparc-context-validate.S
@@ -17,7 +17,7 @@
#endif
#include <rtems/asm.h>
-#include <rtems/score/cpu.h>
+#include <rtems/score/cpuimpl.h>
#define FRAME_OFFSET_BUFFER_0 (SPARC_MINIMUM_STACK_FRAME_SIZE)
#define FRAME_OFFSET_BUFFER_1 (FRAME_OFFSET_BUFFER_0 + 0x04)
diff --git a/cpukit/score/cpu/sparc/sparc-context-volatile-clobber.S b/cpukit/score/cpu/sparc/sparc-context-volatile-clobber.S
index feed22bac6..d221c44061 100644
--- a/cpukit/score/cpu/sparc/sparc-context-volatile-clobber.S
+++ b/cpukit/score/cpu/sparc/sparc-context-volatile-clobber.S
@@ -17,7 +17,7 @@
#endif
#include <rtems/asm.h>
-#include <rtems/score/cpu.h>
+#include <rtems/score/cpuimpl.h>
#define SCRATCH_0 (SPARC_MINIMUM_STACK_FRAME_SIZE)
#define SCRATCH_1 (SCRATCH_0 + 0x04)