From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Herring Date: Fri, 17 Aug 2012 10:41:00 -0500 Subject: [U-Boot] [PATCH 2/2] ARM: increase lmb stack space reservation to 4KB In-Reply-To: <1340891651-17618-2-git-send-email-robherring2@gmail.com> References: <1340891651-17618-2-git-send-email-robherring2@gmail.com> Message-ID: <502E660C.9020801@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Albert, On 06/28/2012 08:54 AM, Rob Herring wrote: > From: Rob Herring > > 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 > Signed-off-by: Rob Herring > --- 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 > arch/arm/lib/bootm.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c > index 599547d..999f201 100644 > --- a/arch/arm/lib/bootm.c > +++ b/arch/arm/lib/bootm.c > @@ -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); > } >