summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/lib/board.c
diff options
context:
space:
mode:
authorJoakim Tjernlund <joakim.tjernlund@transmode.se>2012-07-23 10:58:03 +0000
committerAndy Fleming <afleming@freescale.com>2012-08-22 16:07:42 -0500
commit7de8a7169e0e87c960d06c60570bc062416e681f (patch)
tree07c3a054dde7952701357d375080d124477b5120 /arch/powerpc/lib/board.c
parent89f4289958c12e6b64a6073f820255c1f719c5cc (diff)
downloadblackbird-obmc-uboot-7de8a7169e0e87c960d06c60570bc062416e681f.tar.gz
blackbird-obmc-uboot-7de8a7169e0e87c960d06c60570bc062416e681f.zip
powerpc: Stack Pointer not properly aligned
The code first aligns the SP to 16 then subtract 8, making it 8 bytes aligned. Furthermore the initial stack frame not quite correct either. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: Andy Fleming <afleming@freescale.com>
Diffstat (limited to 'arch/powerpc/lib/board.c')
-rw-r--r--arch/powerpc/lib/board.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c
index fea310eedd..435ef10a2e 100644
--- a/arch/powerpc/lib/board.c
+++ b/arch/powerpc/lib/board.c
@@ -521,9 +521,8 @@ void board_init_f(ulong bootflag)
addr_sp -= 16;
addr_sp &= ~0xF;
s = (ulong *) addr_sp;
- *s-- = 0;
- *s-- = 0;
- addr_sp = (ulong) s;
+ *s = 0; /* Terminate back chain */
+ *++s = 0; /* NULL return address */
debug("Stack Pointer at: %08lx\n", addr_sp);
/*
OpenPOWER on IntegriCloud