Commit 76a1e584e10d14f1981f65376636ecff80bdc19b
1 parent
aae2aef9c8
Exists in
v2017.01-smarct4x
and in
37 other branches
arm: Support pre-relocation malloc()
Add support for re-relocation malloc() in arm's start-up code. Signed-off-by: Simon Glass <sjg@chromium.org>
Showing 2 changed files with 7 additions and 1 deletions Side-by-side Diff
README
... | ... | @@ -3752,6 +3752,9 @@ |
3752 | 3752 | Pre-relocation malloc() is only supported on sandbox |
3753 | 3753 | at present but is fairly easy to enable for other archs. |
3754 | 3754 | |
3755 | + Pre-relocation malloc() is only supported on ARM at present | |
3756 | + but is fairly easy to enable for other archs. | |
3757 | + | |
3755 | 3758 | - CONFIG_SYS_BOOTM_LEN: |
3756 | 3759 | Normally compressed uImages are limited to an |
3757 | 3760 | uncompressed size of 8 MBytes. If this is not enough, |
arch/arm/lib/crt0.S
... | ... | @@ -78,7 +78,10 @@ |
78 | 78 | strlo r0, [r1] /* clear 32-bit GD word */ |
79 | 79 | addlo r1, r1, #4 /* move to next */ |
80 | 80 | blo clr_gd |
81 | - | |
81 | +#if defined(CONFIG_SYS_MALLOC_F_LEN) && !defined(CONFIG_SPL_BUILD) | |
82 | + sub sp, sp, #CONFIG_SYS_MALLOC_F_LEN | |
83 | + str sp, [r9, #GD_MALLOC_BASE] | |
84 | +#endif | |
82 | 85 | /* mov r0, #0 not needed due to above code */ |
83 | 86 | bl board_init_f |
84 | 87 |