[U-Boot] [PATCH] ARM: fix stack pointer adjustment in board_init_f()

Eric Cooper ecc at cmu.edu
Fri Apr 15 00:32:37 CEST 2011


Since addr_sp is a byte address, it should be adjusted by 12 here.

Signed-off-by: Eric Cooper <ecc at cmu.edu>
Cc: Albert ARIBAUD <albert.u.boot at aribaud.net>
---
 arch/arm/lib/board.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index dc46e21..d5b34ad 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -399,7 +399,7 @@ void board_init_f (ulong bootflag)
 		CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ, addr_sp);
 #endif
 	/* leave 3 words for abort-stack    */
-	addr_sp -= 3;
+	addr_sp -= 12;
 
 	/* 8-byte alignment for ABI compliance */
 	addr_sp &= ~0x07;
-- 
1.7.4.1



More information about the U-Boot mailing list