diff options
author | Andrew F. Davis <afd@ti.com> | 2017-01-27 10:39:19 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-01-28 14:04:34 -0500 |
commit | b3d2861eb20a795b99292b823c923935df26dfc6 (patch) | |
tree | 6a78113cd00a0301b3c72e973fbc397ccbf3e12a /common/spl | |
parent | 1923d54bfc2261948448a821d284f10566fde7fe (diff) | |
download | u-boot-b3d2861eb20a795b99292b823c923935df26dfc6.tar.gz |
spl: Remove overwrite of relocated malloc limit
spl_init on some boards is called after stack and heap relocation, on
some platforms spl_relocate_stack_gd is called to handle setting the
limit to its value CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN when simple
SPL malloc is enabled during relocation. spl_init should then not
re-assign the old pre-relocation limit when this is defined.
Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'common/spl')
-rw-r--r-- | common/spl/spl.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c index 462c3a2b97..a3808a988b 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -183,7 +183,12 @@ int spl_init(void) int ret; debug("spl_init()\n"); -#if defined(CONFIG_SYS_MALLOC_F_LEN) +/* + * with CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN we set malloc_base and + * malloc_limit in spl_relocate_stack_gd + */ +#if defined(CONFIG_SYS_MALLOC_F_LEN) && \ + !defined(CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN) #ifdef CONFIG_MALLOC_F_ADDR gd->malloc_base = CONFIG_MALLOC_F_ADDR; #endif |