From patchwork Mon Jul 2 23:46:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: seedshope X-Patchwork-Id: 168659 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 9C3582C00A1 for ; Tue, 3 Jul 2012 09:47:03 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 767CB280A6; Tue, 3 Jul 2012 01:46:55 +0200 (CEST) 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 F872rnVz5I2J; Tue, 3 Jul 2012 01:46:55 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3665428091; Tue, 3 Jul 2012 01:46:54 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 31E8C28091 for ; Tue, 3 Jul 2012 01:46:52 +0200 (CEST) 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 eqf5Iw8tgnAw for ; Tue, 3 Jul 2012 01:46:51 +0200 (CEST) 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 mail-pb0-f44.google.com (mail-pb0-f44.google.com [209.85.160.44]) by theia.denx.de (Postfix) with ESMTPS id 359D928086 for ; Tue, 3 Jul 2012 01:46:49 +0200 (CEST) Received: by pbcwy7 with SMTP id wy7so7814032pbc.3 for ; Mon, 02 Jul 2012 16:46:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=5CVdMWFiCSGPwaEUQL1Ovr+/poGUME3hFdJd9DFwIok=; b=oELhxO/8HGEqntkR21trAvoWGjdjM8pgbdymwaml2qaapArNi359bs7+VYAJK14eOZ dqtZ+c5st6V86vLhavkVZmBXhI8Pu+skDwyga3MEzLlB5pI7P/Mn6FUnoktu8gsqNLuO gu+A6l16PuoCve10pUITs9UeC/W8PBKHbeSDmzsCtARQgeXO3ilnCFtDD+cFRdNrrmJ7 rFZhJPSRNZEGjCtCeYimdskZbRCaKTymU1iPCYp4DdAvOL/P3917SEQSCLK7xi2B+rI4 XxpxzSewy6pbnT1fKO56Lml8bGKhkvM7CrNifOT3aslYEC8AcLM8XgvfgJMeCx/mEcRa mfog== Received: by 10.68.238.166 with SMTP id vl6mr2203327pbc.96.1341272808257; Mon, 02 Jul 2012 16:46:48 -0700 (PDT) Received: from localhost.localdomain ([221.221.21.90]) by mx.google.com with ESMTPS id se9sm14077795pbc.25.2012.07.02.16.46.44 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 02 Jul 2012 16:46:47 -0700 (PDT) From: Zhong Hongbo To: Albert ARIBAUD Date: Tue, 3 Jul 2012 07:46:38 +0800 Message-Id: <1341272798-3460-1-git-send-email-bocui107@gmail.com> X-Mailer: git-send-email 1.7.5.4 Cc: u-boot@lists.denx.de, Zhong Hongbo Subject: [U-Boot] [PATCH] armv7: Fix infinite loop for the spl boot 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: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Zhong Hongbo In the spl booting step, When __bss_start is equal to __bss_end__, The loop will clear all the things in CPU space. If there are have the same address for this symbol, To skip the clear bss section. Signed-off-by: Hongbo Zhong --- arch/arm/cpu/armv7/start.S | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S index 76ccef1..c72f337 100644 --- a/arch/arm/cpu/armv7/start.S +++ b/arch/arm/cpu/armv7/start.S @@ -258,6 +258,8 @@ clear_bss: /* No relocation for SPL */ ldr r0, =__bss_start ldr r1, =__bss_end__ + cmp r0, r1 + beq skip_clbss #else ldr r0, _bss_start_ofs ldr r1, _bss_end_ofs @@ -271,6 +273,7 @@ clbss_l:str r2, [r0] /* clear loop... */ add r0, r0, #4 cmp r0, r1 bne clbss_l +skip_clbss: /* * We are done. Do not return, instead branch to second part of board