aboutsummaryrefslogtreecommitdiff
path: root/arch/mips/cpu
diff options
context:
space:
mode:
authorWeijie Gao <weijie.gao@mediatek.com>2020-04-21 09:28:33 +0200
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2020-04-27 20:29:33 +0200
commitc95c3ec025f46b6d65f87bc1010eae76c4152334 (patch)
tree4405fad1e19ae4c8f743a9e8cd89e39ff737a870 /arch/mips/cpu
parent2434f58c784e3216b7925fe00ce49c113c6a511e (diff)
downloadu-boot-c95c3ec025f46b6d65f87bc1010eae76c4152334.zip
u-boot-c95c3ec025f46b6d65f87bc1010eae76c4152334.tar.gz
u-boot-c95c3ec025f46b6d65f87bc1010eae76c4152334.tar.bz2
mips: add a option to support not reserving malloc space on initial stack
The initial stack on some platforms is too small to hold a large malloc space. This patch adds a option to allow these platforms not reserving the malloc space on initial stack. These platforms should set the malloc base after DRAM is usable. Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Diffstat (limited to 'arch/mips/cpu')
-rw-r--r--arch/mips/cpu/start.S6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/mips/cpu/start.S b/arch/mips/cpu/start.S
index dd93df9..6de9a2f 100644
--- a/arch/mips/cpu/start.S
+++ b/arch/mips/cpu/start.S
@@ -59,7 +59,8 @@
sp, sp, GD_SIZE # reserve space for gd
and sp, sp, t0 # force 16 byte alignment
move k0, sp # save gd pointer
-#if CONFIG_VAL(SYS_MALLOC_F_LEN)
+#if CONFIG_VAL(SYS_MALLOC_F_LEN) && \
+ !CONFIG_IS_ENABLED(INIT_STACK_WITHOUT_MALLOC_F)
li t2, CONFIG_VAL(SYS_MALLOC_F_LEN)
PTR_SUBU \
sp, sp, t2 # reserve space for early malloc
@@ -75,7 +76,8 @@
blt t0, t1, 1b
nop
-#if CONFIG_VAL(SYS_MALLOC_F_LEN)
+#if CONFIG_VAL(SYS_MALLOC_F_LEN) && \
+ !CONFIG_IS_ENABLED(INIT_STACK_WITHOUT_MALLOC_F)
PTR_S sp, GD_MALLOC_BASE(k0) # gd->malloc_base offset
#endif
.endm