From 29afe9e6edc7a817a055de27e98e8d33aad683a2 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 10 Jul 2014 22:23:31 -0600 Subject: 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 --- arch/sandbox/cpu/start.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/sandbox') diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c index 5289291bc8..b3d70515dc 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); -- cgit v1.2.1