David Hendricks (dhendrix@chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2421
-gerrit
commit 4868c8839cc1be368bc774f91ae5803d5a219304 Author: David Hendricks dhendrix@chromium.org Date: Fri Feb 15 17:50:20 2013 -0800
armv7: init stack to 0xdeadbeef
This adds a simple loop which initializes the stack to 0xdeadbeef which is used by checkstack().
Change-Id: I8aecf7bfb1067de68c4080c1fcb7eefa28fd04a7 Signed-off-by: David Hendricks dhendrix@chromium.org --- src/arch/armv7/bootblock.inc | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
diff --git a/src/arch/armv7/bootblock.inc b/src/arch/armv7/bootblock.inc index c8cfe5e..e9de16a 100644 --- a/src/arch/armv7/bootblock.inc +++ b/src/arch/armv7/bootblock.inc @@ -71,6 +71,18 @@ reset: cmp r1, #0 bne wait_for_interrupt @ If this is not core0, wait
+ /* init the stack */ + ldr r0, .Stack + ldr r1, .Stack_size + sub r0, r0, r1 + ldr r1, .Stack + ldr r2, =0xdeadbeef +init_stack_loop: + cmp r0, r1 + str r2, [r0] + add r0, #4 + bne init_stack_loop + /* Set stackpointer in internal RAM to call board_init_f */ call_bootblock: ldr sp, .Stack /* Set up stack pointer */ @@ -95,3 +107,6 @@ wait_for_interrupt: .align 2 .Stack: .word CONFIG_STACK_TOP +.align 2 +.Stack_size: + .word CONFIG_STACK_SIZE