diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2012-07-22 18:09:44 +0800 |
---|---|---|
committer | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2012-08-03 18:09:15 +0800 |
commit | 8d29296240863ce5962a3e8127f7854fdfbbd73f (patch) | |
tree | 3d818e9d1f83dd04cfc1d62bed222c4ee8782926 /arch/arm/cpu/start-pbl.c | |
parent | a2e3601d12b577a6cb57719a9c9ab968af26a40f (diff) | |
download | barebox-8d29296240863ce5962a3e8127f7854fdfbbd73f.tar.gz barebox-8d29296240863ce5962a3e8127f7854fdfbbd73f.tar.xz |
ARM: add early malloc support needed by the decompressor
This is not needed by lzo but by gunzip, xz and others.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'arch/arm/cpu/start-pbl.c')
-rw-r--r-- | arch/arm/cpu/start-pbl.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/cpu/start-pbl.c b/arch/arm/cpu/start-pbl.c index 17e0829da3..dd5c483f81 100644 --- a/arch/arm/cpu/start-pbl.c +++ b/arch/arm/cpu/start-pbl.c @@ -23,11 +23,15 @@ #include <common.h> #include <init.h> +#include <sizes.h> #include <asm/barebox-arm.h> #include <asm/barebox-arm-head.h> #include <asm-generic/memory_layout.h> #include <asm/sections.h> +unsigned long free_mem_ptr; +unsigned long free_mem_end_ptr; + void __naked __section(.text_head_entry) pbl_start(void) { barebox_arm_head(); @@ -46,6 +50,10 @@ static void barebox_uncompress(void *compressed_start, unsigned int len) { void (*barebox)(void); + /* set 128 KiB at the end of the MALLOC_BASE for early malloc */ + free_mem_ptr = MALLOC_BASE + MALLOC_SIZE - SZ_128K; + free_mem_end_ptr = free_mem_ptr + SZ_128K; + if (IS_ENABLED(CONFIG_THUMB2_BAREBOX)) barebox = (void *)(TEXT_BASE + 1); else |