summaryrefslogtreecommitdiffstats
path: root/bsps/sh/shsim
diff options
context:
space:
mode:
Diffstat (limited to 'bsps/sh/shsim')
-rw-r--r--bsps/sh/shsim/include/bsp.h6
-rw-r--r--bsps/sh/shsim/start/cpu_asm.c10
-rw-r--r--bsps/sh/shsim/start/linkcmds14
-rw-r--r--bsps/sh/shsim/start/start.S12
4 files changed, 2 insertions, 40 deletions
diff --git a/bsps/sh/shsim/include/bsp.h b/bsps/sh/shsim/include/bsp.h
index 7b8236b09a..ff63b3849b 100644
--- a/bsps/sh/shsim/include/bsp.h
+++ b/bsps/sh/shsim/include/bsp.h
@@ -46,12 +46,6 @@ void *clock_driver_sim_idle_body(uintptr_t);
#define BSP_IDLE_TASK_BODY clock_driver_sim_idle_body
/*
- * Defined in the linker script 'linkcmds'
- */
-extern void *CPU_Interrupt_stack_low;
-extern void *CPU_Interrupt_stack_high;
-
-/*
* BSP methods that cross file boundaries.
*/
int _sys_exit (int n);
diff --git a/bsps/sh/shsim/start/cpu_asm.c b/bsps/sh/shsim/start/cpu_asm.c
index 2ca8926a24..1b8135ee0a 100644
--- a/bsps/sh/shsim/start/cpu_asm.c
+++ b/bsps/sh/shsim/start/cpu_asm.c
@@ -18,9 +18,7 @@
#include <rtems/score/threaddispatch.h>
#include <rtems/score/sh.h>
-#if (CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE)
- unsigned long *_old_stack_ptr;
-#endif
+unsigned long *_old_stack_ptr;
register unsigned long *stack_ptr __asm__ ("r15");
@@ -37,7 +35,6 @@ void __ISR_Handler( uint32_t vector)
_Thread_Dispatch_disable();
-#if (CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE)
if ( _ISR_Nest_level == 0 )
{
/* Install irq stack */
@@ -45,8 +42,6 @@ void __ISR_Handler( uint32_t vector)
stack_ptr = _CPU_Interrupt_stack_high;
}
-#endif
-
_ISR_Nest_level++;
_ISR_Local_enable( level );
@@ -61,12 +56,9 @@ void __ISR_Handler( uint32_t vector)
_ISR_Nest_level--;
-#if (CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE)
-
if ( _ISR_Nest_level == 0 )
/* restore old stack pointer */
stack_ptr = _old_stack_ptr;
-#endif
_ISR_Local_enable( level );
diff --git a/bsps/sh/shsim/start/linkcmds b/bsps/sh/shsim/start/linkcmds
index 932d94161f..c0381c0b14 100644
--- a/bsps/sh/shsim/start/linkcmds
+++ b/bsps/sh/shsim/start/linkcmds
@@ -202,22 +202,12 @@ SECTIONS
_end = . ;
PROVIDE (end = .);
- .stack : {
- . += 0x1000;
- *(.stack)
- _stack = .;
- } > ram
- _stack = .;
-
.rtemsstack (NOLOAD) : {
*(SORT(.rtemsstack.*))
} > ram
_WorkAreaBase = . ;
- _CPU_Interrupt_stack_low = 0x00080000 ;
- _CPU_Interrupt_stack_high = _CPU_Interrupt_stack_low + 4096 ;
-
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
@@ -251,9 +241,5 @@ SECTIONS
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
-
-/*
- .stack 0x00081ff0 : { _stack = .; *(.stack) } > onchip_ram
-*/
/* These must appear regardless of . */
}
diff --git a/bsps/sh/shsim/start/start.S b/bsps/sh/shsim/start/start.S
index cc4727b9ff..e116704370 100644
--- a/bsps/sh/shsim/start/start.S
+++ b/bsps/sh/shsim/start/start.S
@@ -68,7 +68,7 @@ SYM (start):
.align 2
stack_k:
- .long SYM(stack)
+ .long SYM(_Configuration_Interrupt_stack_area_end)
edata_k:
.long SYM(edata)
end_k:
@@ -82,13 +82,3 @@ vects_k:
.long SYM(vectab)
vects_size:
.word 255
-
-#ifdef __ELF__
- .section .stack,"aw"
-#else
- .section .stack
-#endif
-SYM(stack):
- .long 0xdeaddead
-monvects_k:
- .long SYM(monvects)