summaryrefslogtreecommitdiffstats
path: root/bsps/powerpc/shared
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-11-15 20:47:22 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-11-19 07:15:47 +0100
commit84e59b7c04e47c3ec7aa95f53509fd812eee725e (patch)
tree8dd2b9325e2a8d897085593ea52dc123d18f2ead /bsps/powerpc/shared
parentbsps/m68k: Use interrupt stack for init stack (diff)
downloadrtems-84e59b7c04e47c3ec7aa95f53509fd812eee725e.tar.bz2
bsps/powerpc: Use interrupt stack for init stack
Move start.o to separate file. Update #3459.
Diffstat (limited to 'bsps/powerpc/shared')
-rw-r--r--bsps/powerpc/shared/start/linkcmds.share3
-rw-r--r--bsps/powerpc/shared/start/start.S27
2 files changed, 9 insertions, 21 deletions
diff --git a/bsps/powerpc/shared/start/linkcmds.share b/bsps/powerpc/shared/start/linkcmds.share
index e2a3a16fbe..2fc66015cb 100644
--- a/bsps/powerpc/shared/start/linkcmds.share
+++ b/bsps/powerpc/shared/start/linkcmds.share
@@ -3,7 +3,6 @@ OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc",
OUTPUT_ARCH(powerpc)
/* Do we need any of these for elf?
__DYNAMIC = 0; */
-PROVIDE (__stack = 0);
MEMORY {
VECTORS : ORIGIN = 0x0 , LENGTH = 0x3000
CODE : ORIGIN = 0x3000 , LENGTH = 32M - 0x3000
@@ -247,8 +246,6 @@ SECTIONS
PROVIDE (__bss_end = .);
} > CODE
. = ALIGN(16);
- . += 0x1000;
- __stack = .;
_end = . ;
__rtems_end = . ;
PROVIDE (end = .);
diff --git a/bsps/powerpc/shared/start/start.S b/bsps/powerpc/shared/start/start.S
index 354b9a967e..faffaf9f31 100644
--- a/bsps/powerpc/shared/start/start.S
+++ b/bsps/powerpc/shared/start/start.S
@@ -10,8 +10,7 @@
*/
#include <rtems/asm.h>
-#include <rtems/score/cpu.h>
-#include <rtems/powerpc/powerpc.h>
+#include <libcpu/powerpc-utility.h>
#include <libcpu/io.h>
#include <libcpu/bat.h>
@@ -133,24 +132,16 @@ enter_C_code:
mr r6,r28
mr r7,r27
bl save_boot_params
+
/*
- * stack = &__rtems_end + 4096
- */
- addis r9,r0, __stack-PPC_MINIMUM_STACK_FRAME_SIZE@ha
- addi r9,r9, __stack-PPC_MINIMUM_STACK_FRAME_SIZE@l
- /*
- * align initial stack
- * (we hope that the bootloader stack was 16-byte aligned
- * or we haven't used altivec yet...)
- */
- li r0, (CPU_STACK_ALIGNMENT-1)
- andc r1, r9, r0
- /*
- * Tag TOS with a NULL (terminator for stack dump)
+ * Initialize start stack. The stacks are statically allocated and
+ * properly aligned.
*/
- li r0, 0
- stw r0, 0(r1)
-
+ LA r1, _ISR_Stack_area_end
+ subi r1, r1, PPC_DEFAULT_CACHE_LINE_SIZE
+ li r0, 0
+ stw r0, 0(r1)
+
/*
* We are now in a environment that is totally independent from
* bootloader setup.