From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?QW5kcmVhcyBCaWXDn21hbm4=?= Date: Fri, 06 Jul 2012 13:49:49 +0200 Subject: [U-Boot] [PATCH] armv7: Fix infinite loop for the spl boot In-Reply-To: <4FF6CF0A.7010300@gmail.com> References: <1341272798-3460-1-git-send-email-bocui107@gmail.com> <4FF5804A.8040701@gmail.com> <20120705193535.1cfe8b32@lilith> <4FF6CF0A.7010300@gmail.com> Message-ID: <4FF6D0DD.9040109@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 Dear Zhong Hongbo, On 06.07.2012 13:42, Zhong Hongbo wrote: > On 07/06/2012 01:35 AM, Albert ARIBAUD (by > way of Albert ARIBAUD wrote: >> Hi Zhong Hongbo, >> >> On Thu, 05 Jul 2012 19:53:46 +0800, Zhong Hongbo >> wrote: > > Ok, I just found the issue have found in other arm platfor 2011 yeas, > the detail information as following: > > commit 8f1da53508c78789ebeea98a92a3f55c3f84dc5d > Author: Christian Riesch > Date: Wed Nov 30 22:27:37 2011 +0000 > > arm, arm926ejs: Fix clear bss loop for zero length bss > > This patch fixes the clear bss loop for bss sections that have > zero length, i.e., where __bss_start == __bss_end__. > > Signed-off-by: Christian Riesch > Cc: Albert Aribaud > > diff --git a/arch/arm/cpu/arm926ejs/start.S b/arch/arm/cpu/arm926ejs/start.S > index 339c5ed..bb4d00b 100644 > --- a/arch/arm/cpu/arm926ejs/start.S > +++ b/arch/arm/cpu/arm926ejs/start.S > @@ -301,10 +301,12 @@ clear_bss: > #endif > mov r2, #0x00000000 /* clear > */ > > -clbss_l:str r2, [r0] /* clear loop... > */ > +clbss_l:cmp r0, r1 /* clear loop... */ > + bhs clbss_e /* if reached end of bss, exit */ > + str r2, [r0] > add r0, r0, #4 > - cmp r0, r1 > - bne clbss_l > + b clbss_l > +clbss_e: >>> clbss_l:str r2, [r0] /* clear loop...*/ >>> add r0, r0, #4 >>> cmp r0, r1 >>> bne clbss_l >> >> Into something like >> >>> clbss_l:cmp r0, r1 >>> blo clbss_d >>> str r2, [r0] /* clear loop...*/ >>> add r0, r0, #4 >>> b clbss_l >>> clbss_d: >> >> Also, as Andreas points out, make sure the same fix is applied to all ARM start.S files which need it. > > Ok? I think this is the thread we will proceed. So as I understand we had missed in 2011 to update the other start.S with a fix found by Christian Riesch for arm926ejs. So please do update _all_ start.S (of arm;) now. I think they do have all the same error cause we copied it over from one to the other when implementing the 'new relocation' stuff. Best regards Andreas Bie?mann