mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-07-05 05:42:51 +00:00
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>
This commit is contained in:
parent
4b42c9059e
commit
3882d7a5a5
1 changed files with 2 additions and 2 deletions
|
@ -163,8 +163,8 @@ void arch_lmb_reserve(struct lmb *lmb)
|
||||||
sp = get_sp();
|
sp = get_sp();
|
||||||
debug ("## Current stack ends at 0x%08lx\n", sp);
|
debug ("## Current stack ends at 0x%08lx\n", sp);
|
||||||
|
|
||||||
/* adjust sp by 1K to be safe */
|
/* adjust sp by 4K to be safe */
|
||||||
sp -= 1024;
|
sp -= 4096;
|
||||||
lmb_reserve(lmb, sp, (CONFIG_SYS_SDRAM_BASE + get_effective_memsize() - sp));
|
lmb_reserve(lmb, sp, (CONFIG_SYS_SDRAM_BASE + get_effective_memsize() - sp));
|
||||||
|
|
||||||
return ;
|
return ;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue