summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README3
-rw-r--r--common/init/board_init.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/README b/README
index e98c49b6b7..32c5ea6653 100644
--- a/README
+++ b/README
@@ -3577,6 +3577,9 @@ FIT uImage format:
CONFIG_SYS_SPL_MALLOC_START
Starting address of the malloc pool used in SPL.
+ When this option is set the full malloc is used in SPL and
+ it is set up by spl_init() and before that, the simple malloc()
+ can be used if CONFIG_SYS_MALLOC_F is defined.
CONFIG_SYS_SPL_MALLOC_SIZE
The size of the malloc pool used in SPL.
diff --git a/common/init/board_init.c b/common/init/board_init.c
index e74b63b8a8..1c6126d8ce 100644
--- a/common/init/board_init.c
+++ b/common/init/board_init.c
@@ -50,8 +50,7 @@ ulong board_init_f_mem(ulong top)
#endif
arch_setup_gd(gd_ptr);
-#if defined(CONFIG_SYS_MALLOC_F) && \
- (!defined(CONFIG_SPL_BUILD) || !defined(CONFIG_SYS_SPL_MALLOC_START))
+#if defined(CONFIG_SYS_MALLOC_F)
top -= CONFIG_SYS_MALLOC_F_LEN;
gd->malloc_base = top;
#endif
OpenPOWER on IntegriCloud