summaryrefslogtreecommitdiff
path: root/arch/powerpc/lib/bootm.c
diff options
context:
space:
mode:
authorNorbert van Bolhuis <nvbolhuis@aimvalley.nl>2010-03-19 15:34:25 +0100
committerWolfgang Denk <wd@denx.de>2010-05-05 23:55:02 +0200
commit3882d7a5a57eb8d1f41570522445bab61c628e6f (patch)
tree6b75e053e162e4728c3395158014342c80f72e35 /arch/powerpc/lib/bootm.c
parent4b42c9059e165500353174601a8e97b2cf81d3f4 (diff)
downloadu-boot-imx-3882d7a5a57eb8d1f41570522445bab61c628e6f.zip
u-boot-imx-3882d7a5a57eb8d1f41570522445bab61c628e6f.tar.gz
u-boot-imx-3882d7a5a57eb8d1f41570522445bab61c628e6f.tar.bz2
ppc: unused memory region too close to current stack pointer
This avoids a possible overwrite of the (end of) ramdisk by u-boot. The unused memory region for ppc boot currently starts 1k below the do_bootm->bootm_start->arch_lmb_reserve stack ptr. This isn't enough since do_bootm->do_bootm_linux->boot_relocate_fdt calls printf which may very well use more than 1k stack space. Signed-off-by: Norbert van Bolhuis <nvbolhuis@aimvalley.nl>
Diffstat (limited to 'arch/powerpc/lib/bootm.c')
-rw-r--r--arch/powerpc/lib/bootm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c
index 0685a93..6702df5 100644
--- a/arch/powerpc/lib/bootm.c
+++ b/arch/powerpc/lib/bootm.c
@@ -163,8 +163,8 @@ void arch_lmb_reserve(struct lmb *lmb)
sp = get_sp();
debug ("## Current stack ends at 0x%08lx\n", sp);
- /* adjust sp by 1K to be safe */
- sp -= 1024;
+ /* adjust sp by 4K to be safe */
+ sp -= 4096;
lmb_reserve(lmb, sp, (CONFIG_SYS_SDRAM_BASE + get_effective_memsize() - sp));
return ;