From 448217d4b2e11b11ae5addd1d1f752ce194d6af0 Mon Sep 17 00:00:00 2001 From: Zhong Hongbo Date: Sat, 7 Jul 2012 03:24:33 +0000 Subject: arm: Fix to mistake clean the memory space MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Acked-by: Andreas Bießmann --- arch/arm/cpu/s3c44b0/start.S | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'arch/arm/cpu/s3c44b0/start.S') diff --git a/arch/arm/cpu/s3c44b0/start.S b/arch/arm/cpu/s3c44b0/start.S index a29d5b4964..8daf26c4f0 100644 --- a/arch/arm/cpu/s3c44b0/start.S +++ b/arch/arm/cpu/s3c44b0/start.S @@ -217,10 +217,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: bl coloured_LED_init bl red_led_on -- cgit v1.2.1