[U-Boot] [PATCH] spl: Allow settings malloc_f base address

Marek Vasut marex at denx.de
Wed May 25 02:14:56 CEST 2016


Allow configuring the begining of the malloc_f area in SPL.
This patch uses the same CONFIG_MALLOC_F_ADDR established by
the sandbox.

Signed-off-by: Marek Vasut <marex at denx.de>
Cc: Tom Rini <trini at konsulko.com>
Cc: Simon Glass <sjg at chromium.org>
---
 common/spl/spl.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/common/spl/spl.c b/common/spl/spl.c
index 93f9bd1..56c64d1 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -160,6 +160,9 @@ int spl_init(void)
 
 	debug("spl_init()\n");
 #if defined(CONFIG_SYS_MALLOC_F_LEN)
+#ifdef CONFIG_MALLOC_F_ADDR
+	gd->malloc_base = CONFIG_MALLOC_F_ADDR;
+#endif
 	gd->malloc_limit = CONFIG_SYS_MALLOC_F_LEN;
 	gd->malloc_ptr = 0;
 #endif
-- 
2.7.0



More information about the U-Boot mailing list