summaryrefslogtreecommitdiff
path: root/arch/sandbox/cpu/start.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-07-10 22:23:31 -0600
committerSimon Glass <sjg@chromium.org>2014-07-23 14:06:13 +0100
commit29afe9e6edc7a817a055de27e98e8d33aad683a2 (patch)
tree2a3d950b6e5768d505322727fc6c73ab7a53ea6b /arch/sandbox/cpu/start.c
parentd59476b6446799c21e64147d86483140154c1886 (diff)
downloadu-boot-imx-29afe9e6edc7a817a055de27e98e8d33aad683a2.zip
u-boot-imx-29afe9e6edc7a817a055de27e98e8d33aad683a2.tar.gz
u-boot-imx-29afe9e6edc7a817a055de27e98e8d33aad683a2.tar.bz2
sandbox: Support pre-relocation malloc()
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>
Diffstat (limited to 'arch/sandbox/cpu/start.c')
-rw-r--r--arch/sandbox/cpu/start.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c
index 5289291..b3d7051 100644
--- a/arch/sandbox/cpu/start.c
+++ b/arch/sandbox/cpu/start.c
@@ -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);