summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLokesh Vutla <lokeshvutla@ti.com>2015-09-19 15:00:17 +0530
committerTom Rini <trini@konsulko.com>2015-10-22 14:19:50 -0400
commitaaf461f9ad66fe193ea7ef5533446fe925dd4928 (patch)
tree94377984e0bae29e7cc3339143c2418f78b05dda /include
parent8c80b1937b1b2a06acae5786e8e7c005fe28fd71 (diff)
downloadtalos-obmc-uboot-aaf461f9ad66fe193ea7ef5533446fe925dd4928.tar.gz
talos-obmc-uboot-aaf461f9ad66fe193ea7ef5533446fe925dd4928.zip
ARM: keystone2: spl: Fix stack allocation with CONFIG_SYS_MALLOC_F_LEN
If CONFIG_SYS_MALLOC_F_LEN is enabled, the stack is moved down to the specified size to make the malloc function available before relocation. But on keystone platforms SYS_SPL_MALLOC is immediately preceding stack, which is causing an overlap with this config enabled. So leave a gap between malloc space and stack space. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Diffstat (limited to 'include')
-rw-r--r--include/configs/ti_armv7_keystone2.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h
index 58c98ce660..acc686c033 100644
--- a/include/configs/ti_armv7_keystone2.h
+++ b/include/configs/ti_armv7_keystone2.h
@@ -32,6 +32,12 @@
#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SPL_TEXT_BASE - \
GENERATED_GBL_DATA_SIZE)
+#ifdef CONFIG_SYS_MALLOC_F_LEN
+#define SPL_MALLOC_F_SIZE CONFIG_SYS_MALLOC_F_LEN
+#else
+#define SPL_MALLOC_F_SIZE 0
+#endif
+
/* SPL SPI Loader Configuration */
#define CONFIG_SPL_PAD_TO 65536
#define CONFIG_SPL_MAX_SIZE (CONFIG_SPL_PAD_TO - 8)
@@ -44,6 +50,7 @@
#define CONFIG_SPL_STACK_SIZE (8 * 1024)
#define CONFIG_SPL_STACK (CONFIG_SYS_SPL_MALLOC_START + \
CONFIG_SYS_SPL_MALLOC_SIZE + \
+ SPL_MALLOC_F_SIZE + \
CONFIG_SPL_STACK_SIZE - 4)
#define CONFIG_SPL_SPI_FLASH_SUPPORT
#define CONFIG_SPL_SPI_SUPPORT
OpenPOWER on IntegriCloud