summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/arm1136
diff options
context:
space:
mode:
authorZhong Hongbo <bocui107@gmail.com>2012-07-07 03:24:33 +0000
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2012-07-20 14:24:08 +0200
commit448217d4b2e11b11ae5addd1d1f752ce194d6af0 (patch)
tree0bac7b2fb11a99bf7d8c256a484188b2ca11e66c /arch/arm/cpu/arm1136
parent3ec81d758c09d6887a77a1b1259d044a2905bc8e (diff)
downloadu-boot-imx-448217d4b2e11b11ae5addd1d1f752ce194d6af0.zip
u-boot-imx-448217d4b2e11b11ae5addd1d1f752ce194d6af0.tar.gz
u-boot-imx-448217d4b2e11b11ae5addd1d1f752ce194d6af0.tar.bz2
arm: Fix to mistake clean the memory space
In currently, when __bss_start is equal to __bss_end__, The bss loop will clear all the things in memory space. But just only when __bss_end__ greater than __bss_start__, we do the clear bss section operation. Signed-off-by: Zhong Hongbo <bocui107@gmail.com> Acked-by: Andreas Bießmann <andreas.devel@googlemail.com>
Diffstat (limited to 'arch/arm/cpu/arm1136')
-rw-r--r--arch/arm/cpu/arm1136/start.S8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/arm/cpu/arm1136/start.S b/arch/arm/cpu/arm1136/start.S
index c0db96c..2483c63 100644
--- a/arch/arm/cpu/arm1136/start.S
+++ b/arch/arm/cpu/arm1136/start.S
@@ -251,10 +251,12 @@ clear_bss:
add r1, r1, r4
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:
#endif /* #ifndef CONFIG_SPL_BUILD */
/*