[rtems commit] bsp/qoriq: Fix start stack setup

Sebastian Huber sebh at rtems.org
Thu Jul 28 10:06:55 UTC 2016


Module:    rtems
Branch:    master
Commit:    cecc1097ffc0a3c39f6a25301d05e3ee965b16de
Changeset: http://git.rtems.org/rtems/commit/?id=cecc1097ffc0a3c39f6a25301d05e3ee965b16de

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Jul 28 10:48:02 2016 +0200

bsp/qoriq: Fix start stack setup

---

 c/src/lib/libbsp/powerpc/qoriq/start/start.S | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/c/src/lib/libbsp/powerpc/qoriq/start/start.S b/c/src/lib/libbsp/powerpc/qoriq/start/start.S
index 6d6cd94..ba82bbc 100644
--- a/c/src/lib/libbsp/powerpc/qoriq/start/start.S
+++ b/c/src/lib/libbsp/powerpc/qoriq/start/start.S
@@ -210,9 +210,13 @@ _start:
 	mtmsr	r0
 	isync
 
-	/* Initialize start stack */
-	subi	r1, START_STACK, PPC_MINIMUM_STACK_FRAME_SIZE
-	clrrwi	r1, r1, PPC_STACK_ALIGN_POWER
+	/*
+	 * Initialize start stack.  Make sure that we do not share a cache line
+	 * with the heap block management, since initial stacks for the
+	 * secondary processors are allocated from the workspace.
+	 */
+	subi	r1, START_STACK, 2 * PPC_DEFAULT_CACHE_LINE_SIZE
+	clrrwi	r1, r1, PPC_DEFAULT_CACHE_LINE_POWER
 	li	r0, 0
 	stw	r0, 0(r1)
 




More information about the vc mailing list