diff mbox

[U-Boot,v2,01/12] TI:armv7: Change CONFIG_SPL_STACK to not be CONFIG_SYS_INIT_SP_ADDR

Message ID 1386612538-11186-2-git-send-email-trini@ti.com
State Changes Requested
Delegated to: Tom Rini
Headers show

Commit Message

Tom Rini Dec. 9, 2013, 6:08 p.m. UTC
There are times where we may need more than a few kilobytes of stack
space.  We also will not be using CONFIG_SPL_STACK location prior to DDR
being initialized (CONFIG_SYS_INIT_SP_ADDR is still used there) so pick
a good location within DDR for this to be.  Tested on
OMAP4/AM335x/OMAP5/DRA7xx.

Signed-off-by: Tom Rini <trini@ti.com>
---
 include/configs/ti_armv7_common.h |   17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

Comments

Tom Rini Dec. 16, 2013, 4:56 p.m. UTC | #1
On Mon, Dec 09, 2013 at 01:08:47PM -0500, Tom Rini wrote:

> There are times where we may need more than a few kilobytes of stack
> space.  We also will not be using CONFIG_SPL_STACK location prior to DDR
> being initialized (CONFIG_SYS_INIT_SP_ADDR is still used there) so pick
> a good location within DDR for this to be.  Tested on
> OMAP4/AM335x/OMAP5/DRA7xx.
> 
> Signed-off-by: Tom Rini <trini@ti.com>

After getting this tested on AM43xx, there's something to be changed /
solved here as those boards do not like this change.  So, some sort of
change is requested, but I'm not sure just what yet.
diff mbox

Patch

diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
index 99b60fc..4d09ad9 100644
--- a/include/configs/ti_armv7_common.h
+++ b/include/configs/ti_armv7_common.h
@@ -176,14 +176,17 @@ 
 
 /*
  * Place the image at the start of the ROM defined image space.
- * We limit our size to the ROM-defined downloaded image area, and use the
- * rest of the space for stack.  We load U-Boot itself into memory at
- * 0x80800000 for legacy reasons (to not conflict with older SPLs).  We
- * have our BSS be placed 1MiB after this, to allow for the default
- * Linux kernel address of 0x80008000 to work, in the Falcon Mode case.
- * We have the SPL malloc pool at the end of the BSS area.
+ * We limit our size to the ROM-defined downloaded image area, and use
+ * the rest of the space for a temporary stack space.  We reserve 4MiB
+ * between the malloc space at device tree space (for Falcon Mode) for
+ * SPL stack as some operations may use a large amount of spsce.  We
+ * load U-Boot itself into memory at 0x80800000 for legacy reasons (to
+ * not conflict with older SPLs).  We have our BSS be placed 2MiB after
+ * this, to allow for the default Linux kernel address of 0x80008000 to
+ * work, in the Falcon Mode case.  We have the SPL malloc pool at the
+ * end of the BSS area.
  */
-#define CONFIG_SPL_STACK		CONFIG_SYS_INIT_SP_ADDR
+#define CONFIG_SPL_STACK		0x80e80000
 #define CONFIG_SYS_TEXT_BASE		0x80800000
 #define CONFIG_SPL_BSS_START_ADDR	0x80a00000
 #define CONFIG_SPL_BSS_MAX_SIZE		0x80000		/* 512 KB */