]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
arm: Support pre-relocation malloc()
authorSimon Glass <sjg@chromium.org>
Fri, 11 Jul 2014 04:23:29 +0000 (22:23 -0600)
committerSimon Glass <sjg@chromium.org>
Mon, 4 Aug 2014 11:24:35 +0000 (05:24 -0600)
Add support for re-relocation malloc() in arm's start-up code.

Signed-off-by: Simon Glass <sjg@chromium.org>
README
arch/arm/lib/crt0.S

diff --git a/README b/README
index f704eb3780082d76a93fe8a5d6a348f49ae7693f..31e08fc748d06201a99d5875cfc27b0d3b89bad5 100644 (file)
--- a/README
+++ b/README
@@ -3752,6 +3752,9 @@ Configuration Settings:
                Pre-relocation malloc() is only supported on sandbox
                at present but is fairly easy to enable for other archs.
 
+               Pre-relocation malloc() is only supported on ARM 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 43aa2123be53482359409c4a9b5b755f38ca7c5b..29cdad0f70716a85e260a124b73f63746b484b80 100644 (file)
@@ -78,7 +78,10 @@ clr_gd:
        strlo   r0, [r1]                /* clear 32-bit GD word */
        addlo   r1, r1, #4              /* move to next */
        blo     clr_gd
-
+#if defined(CONFIG_SYS_MALLOC_F_LEN) && !defined(CONFIG_SPL_BUILD)
+       sub     sp, sp, #CONFIG_SYS_MALLOC_F_LEN
+       str     sp, [r9, #GD_MALLOC_BASE]
+#endif
        /* mov r0, #0 not needed due to above code */
        bl      board_init_f