Patrick Georgi (pgeorgi@google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8767
-gerrit
commit 6968c0091c0e27c2d2b1680181244ef578e73c83 Author: Vadim Bendebury vbendeb@chromium.org Date: Wed Sep 17 16:29:15 2014 -0700
mips: fix bootblock stack definitions
Bootblock stack on Danube should be SRAM and defined separately from the rest of the coreboot stack. The actual coreboot stack will be defined later.
The top of the stack should be above the bottom, as the stack grows towards lower addresses.
BUG=chrome-os-partner:31438 TEST=ran bootblock on simulator under codescape, observed stack properly initialized.
Change-Id: I43d2bae5f85a09a95ca0103b253399bd92555aef Signed-off-by: Patrick Georgi pgeorgi@chromium.org Original-Commit-Id: e02724cb4b30990ebaa631dabb45917af29d6437 Original-Change-Id: I3c37c8b5a1c0e7fd19411558a8f6d899fc283191 Original-Signed-off-by: Vadim Bendebury vbendeb@chromium.org Original-Reviewed-on: https://chromium-review.googlesource.com/218732 Original-Reviewed-by: Aaron Durbin adurbin@chromium.org --- src/arch/mips/bootblock.inc | 6 +++--- src/soc/imgtec/danube/Kconfig | 16 +++++++++------- 2 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/src/arch/mips/bootblock.inc b/src/arch/mips/bootblock.inc index 76a10cf..dbde803 100644 --- a/src/arch/mips/bootblock.inc +++ b/src/arch/mips/bootblock.inc @@ -23,18 +23,18 @@ .globl _start _start: /* Set the stack pointer */ - li $sp, CONFIG_STACK_TOP + li $sp, CONFIG_BOOTBLOCK_STACK_TOP
/* * Initialise the stack to a known value, used later to check for * overflow. */ - li $t0, CONFIG_STACK_BOTTOM + li $t0, CONFIG_BOOTBLOCK_STACK_BOTTOM addi $t1, $sp, -4 li $t2, 0xdeadbeef 1: sw $t2, 0($t0) bne $t0, $t1, 1b - addi $t0, $t0, 4 + addi $t0, $t0, 4
/* Run main */ b main diff --git a/src/soc/imgtec/danube/Kconfig b/src/soc/imgtec/danube/Kconfig index ba04146..b2e7a5d 100644 --- a/src/soc/imgtec/danube/Kconfig +++ b/src/soc/imgtec/danube/Kconfig @@ -57,15 +57,17 @@ config CBMEM_CONSOLE_PRERAM_BASE Allocate 4KB to the pre-ram console buffer, we should be able to use GRAM eventually and have a much larger buffer.
-config STACK_TOP +config BOOTBLOCK_STACK_BOTTOM hex - default CBMEM_CONSOLE_PRERAM_BASE + default 0x9b00e000 + help + This allocates 6KB of stack space. One needs to verify that this is + sufficient.
-config STACK_BOTTOM +config BOOTBLOCK_STACK_TOP hex - default 0x9b00f000 + default CBMEM_CONSOLE_PRERAM_BASE help - Allocating 12KB for the stack, should be able to have more once GRAM - is available. - + Bootblock stack starts immediately under the CBMEM console buffer, + stack location might be changed by ro stage. endif