summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2019-03-15 07:32:28 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2019-03-15 07:34:07 +0100
commit9e4895805af7023c23ba0cedf8f48934e3be5acc (patch)
tree9017672a629bb3414072dd2eb15b96b7d353212b
parent31e8f1b7829947e9f335a19ae42177a7e6c10e88 (diff)
downloadrtems-9e4895805af7023c23ba0cedf8f48934e3be5acc.tar.bz2
bsps/powerpc: Initialize stack earlier
The __eabi() call may use the stack. Update #3459.
-rw-r--r--bsps/powerpc/shared/start/start.S18
1 files changed, 9 insertions, 9 deletions
diff --git a/bsps/powerpc/shared/start/start.S b/bsps/powerpc/shared/start/start.S
index faffaf9f31..76d4fc3e2a 100644
--- a/bsps/powerpc/shared/start/start.S
+++ b/bsps/powerpc/shared/start/start.S
@@ -120,6 +120,15 @@ __rtems_entry_point:
*/
enter_C_code:
+ /*
+ * Initialize start stack. The stacks are statically allocated and
+ * properly aligned.
+ */
+ LA r1, _ISR_Stack_area_end
+ subi r1, r1, PPC_DEFAULT_CACHE_LINE_SIZE
+ li r0, 0
+ stw r0, 0(r1)
+
bl MMUon
bl __eabi /* setup EABI and SYSV environment */
bl zero_bss
@@ -134,15 +143,6 @@ enter_C_code:
bl save_boot_params
/*
- * Initialize start stack. The stacks are statically allocated and
- * properly aligned.
- */
- 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.
*/