]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
sandbox: Support pre-relocation malloc()
authorSimon Glass <sjg@chromium.org>
Fri, 11 Jul 2014 04:23:31 +0000 (22:23 -0600)
committerSimon Glass <sjg@chromium.org>
Wed, 23 Jul 2014 13:06:13 +0000 (14:06 +0100)
Set up and zero global data before board_init_f() is called so that we can
remove the need for CONFIG_SYS_GENERIC_GLOBAL_DATA.

Signed-off-by: Simon Glass <sjg@chromium.org>
README
arch/sandbox/cpu/start.c

diff --git a/README b/README
index 11e9d31285377121394f1239fa7b9931016c3dfe..f704eb3780082d76a93fe8a5d6a348f49ae7693f 100644 (file)
--- a/README
+++ b/README
@@ -3749,6 +3749,9 @@ Configuration Settings:
                The memory will be freed (or in fact just forgotton) when
                U-Boot relocates itself.
 
+               Pre-relocation malloc() is only supported on sandbox
+               at present but is fairly easy to enable for other archs.
+
 - CONFIG_SYS_BOOTM_LEN:
                Normally compressed uImages are limited to an
                uncompressed size of 8 MBytes. If this is not enough,
index 5289291bc82f41f44a5813ad60cf530d0a8e653b..b3d70515dc8da0f28ade44c218a45d0fd77dd0df 100644 (file)
@@ -240,6 +240,9 @@ int main(int argc, char *argv[])
 
        memset(&data, '\0', sizeof(data));
        gd = &data;
+#ifdef CONFIG_SYS_MALLOC_F_LEN
+       gd->malloc_base = CONFIG_MALLOC_F_ADDR;
+#endif
 
        /* Do pre- and post-relocation init */
        board_init_f(0);