mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-19 13:41:31 +00:00
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>
This commit is contained in:
parent
1923d54bfc
commit
b3d2861eb2
1 changed files with 6 additions and 1 deletions
|
@ -183,7 +183,12 @@ int spl_init(void)
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
debug("spl_init()\n");
|
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
|
#ifdef CONFIG_MALLOC_F_ADDR
|
||||||
gd->malloc_base = CONFIG_MALLOC_F_ADDR;
|
gd->malloc_base = CONFIG_MALLOC_F_ADDR;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue