ARM: increase lmb stack space reservation to 4KB
PATCH 2/2 ARM: increase lmb stack space reservation to 4KB
From: Rob Herring <[email protected]>
The bootm initrd image copy to ram can collide with the stack in cases where the print buffer size is large (i.e. 1K). The result is intermittent initrd decompression errors depending on the initrd size MOD 4KB since the initrd start address is 4KB aligned.
--- arch/arm/lib/bootm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/lib/bootm.c +2 -2
@@ -69,8 +69,8 @@ void arch_lmb_reserve(struct lmb *lmb) sp =get_sp ();debug ("## Current stack ends at 0x%08lx " , sp); -/* adjust sp by 1K to be safe */ - sp -=1024 ; +/* adjust sp by 4K to be safe */ + sp -=4096 ;lmb_reserve (lmb, sp, gd->bd->bi_dram[0 ].start + gd->bd->bi_dram[0 ].size - sp); }
Signature · 1 line
1.7.9.5
PATCH 2/2 ARM: increase lmb stack space reservation to 4KB
Albert,
Quoted 10 lines · Rob Herring
From: Rob Herring <[email protected]>
The bootm initrd image copy to ram can collide with the stack in cases where the print buffer size is large (i.e. 1K). The result is intermittent initrd decompression errors depending on the initrd size MOD 4KB since the initrd start address is 4KB aligned.
Cc Albert ARIBAUD <[email protected]>Signed-off-by Rob Herring <[email protected]>---
Can you please apply this fix. I've seen other issues posted that appear to be the same cause and this same issue was fixed on PPC ~2 years ago.
Rob
Quoted 19 lines
arch/arm/lib/bootm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm/lib/bootm.c +2
-2@@ -69,8 +69,8 @@ void arch_lmb_reserve(struct lmb *lmb) sp =get_sp ();debug ("## Current stack ends at 0x%08lx " , sp); -/* adjust sp by 1K to be safe */ - sp -=1024 ; +/* adjust sp by 4K to be safe */ + sp -=4096 ;lmb_reserve (lmb, sp, gd->bd->bi_dram[0 ].start + gd->bd->bi_dram[0 ].size - sp); }
PATCH 2/2 ARM: increase lmb stack space reservation to 4KB
In reply to Rob HerringHi Rob,
Quoted 18 lines · Rob Herring
From: Rob Herring <[email protected]>
The bootm initrd image copy to ram can collide with the stack in cases where the print buffer size is large (i.e. 1K). The result is intermittent initrd decompression errors depending on the initrd size MOD 4KB since the initrd start address is 4KB aligned.
Cc Albert ARIBAUD <[email protected]>Signed-off-by Rob Herring <[email protected]>--- arch/arm/lib/bootm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm/lib/bootm.c +0
-0
arch/arm/lib/bootm.c void arch_lmb_reserve(struct lmb *lmb) · line 76
Quoted 10 lines
arch/arm/lib/bootm.c +2
-2@@ -69,8 +69,8 @@ void arch_lmb_reserve(struct lmb *lmb) sp =get_sp ();debug ("## Current stack ends at 0x%08lx " , sp); -/* adjust sp by 1K to be safe */ - sp -=1024 ; +/* adjust sp by 4K to be safe */ + sp -=4096 ;lmb_reserve (lmb, sp, gd->bd->bi_dram[0 ].start + gd->bd->bi_dram[0 ].size - sp); }
Applied to u-boot-arm/master, thanks!
Amicalement,
Signature · 1 line
Albert.