From patchwork Tue Nov 29 10:58:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Riesch X-Patchwork-Id: 128276 X-Patchwork-Delegate: albert.aribaud@free.fr Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 68C7CB6EE8 for ; Tue, 29 Nov 2011 21:58:01 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 28755282E5; Tue, 29 Nov 2011 11:58:00 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mT3GFAFaZDYw; Tue, 29 Nov 2011 11:57:59 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 40D95282DD; Tue, 29 Nov 2011 11:57:59 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 35308282DD for ; Tue, 29 Nov 2011 11:57:58 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Hp-BpqgX0-pS for ; Tue, 29 Nov 2011 11:57:56 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from ns.omicron.at (ns.omicron.at [212.183.10.25]) by theia.denx.de (Postfix) with ESMTPS id 7E1DB282D9 for ; Tue, 29 Nov 2011 11:57:54 +0100 (CET) Received: from counter.omicron.at ([212.183.10.29]) by ns.omicron.at (8.13.1/8.13.1) with ESMTP id pATAvh0T005676; Tue, 29 Nov 2011 11:57:48 +0100 Received: from mary.at.omicron.at (mary.at.omicron.at [172.22.100.48]) by counter.omicron.at (8.14.4/8.14.4) with ESMTP id pATAvhx7018660; Tue, 29 Nov 2011 11:57:43 +0100 Received: from localhost.localdomain (172.22.1.62) by mary-special.at.omicron.at (172.22.100.48) with Microsoft SMTP Server id 8.3.192.1; Tue, 29 Nov 2011 11:57:42 +0100 From: Christian Riesch To: Date: Tue, 29 Nov 2011 11:58:05 +0100 Message-ID: <1322564285-6911-1-git-send-email-christian.riesch@omicron.at> X-Mailer: git-send-email 1.7.0.4 MIME-Version: 1.0 Cc: Christian Riesch Subject: [U-Boot] [PATCH v5] arm: Fix clear bss loop for zero length bss X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 --- Hi, this is v5 of a patch out of my recent patchset [PATCH v3 00/15] Add an SPL to boot the da850evm from SPI http://lists.denx.de/pipermail/u-boot/2011-November/111182.html Changes for v5: - correct subject line Changes for v4: - split the patchset since it is getting quite big Regards, Christian arch/arm/cpu/arm926ejs/start.S | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/start.S b/arch/arm/cpu/arm926ejs/start.S index 8b5355b..772793c 100644 --- a/arch/arm/cpu/arm926ejs/start.S +++ b/arch/arm/cpu/arm926ejs/start.S @@ -299,10 +299,12 @@ clear_bss: #endif mov r2, #0x00000000 /* clear */ -clbss_l:str r2, [r0] /* clear loop... */ +clbss_l:cmp r0, r1 /* clear loop... */ + beq clbss_e + str r2, [r0] add r0, r0, #4 - cmp r0, r1 - bne clbss_l + b clbss_l +clbss_e: #ifndef CONFIG_SPL_BUILD bl coloured_LED_init