ppc: unused memory region too close to current stack pointer
PATCH 1/1 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.
lib_ppc/bootm.c +2 -2
@@ -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 ;
Signature · 3 lines
1.5.2.2 Signed-off-by: Norbert van Bolhuis <[email protected]>
PATCH 1/1 ppc: unused memory region too close to current stack pointer
Dear Norbert van Bolhuis,
Quoted 26 lines · In message <[email protected]> you wrote:
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_reservestack ptr. This isn't enough sincedo_bootm->do_bootm_linux->boot_relocate_fdtcalls printf which may very well use more than 1k stack space.lib_ppc/bootm.c +2
-2@@ -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 ;Signature · 3 lines
1.5.2.2 Signed-off-by: Norbert van Bolhuis <[email protected]>
Applied - but could you please use "git format-patch" next time? For example, the Signed-off-by line must be part of the commit message, and not come below the signature separator.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de The high cost of living hasn't affected its popularity.