From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= Date: Wed, 1 Dec 2010 00:58:36 +0100 Subject: [U-Boot] [PATCH 4/4] armv7: fix relocation skip In-Reply-To: <1291161516-21861-1-git-send-email-andreas.devel@googlemail.com> References: <1291161516-21861-1-git-send-email-andreas.devel@googlemail.com> Message-ID: <1291161516-21861-5-git-send-email-andreas.devel@googlemail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de I doubt the stack_setup() was defective before: we load the current location of _start and compare against destination of relocate_code(). If we are already there we shoud skip the relocation and jump over to clear_bss. Before the clear_bss was also skipped. Signed-off-by: Andreas Bie?mann --- Dear Albert, (or whoever works with armv7 currently) However I doubt there is another issue when CONFIG_PRELOADER is not set! Then the bss will never be setup, is that correct? arch/arm/cpu/armv7/start.S | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S index 5d79f34..7e31cc2 100644 --- a/arch/arm/cpu/armv7/start.S +++ b/arch/arm/cpu/armv7/start.S @@ -165,9 +165,9 @@ stack_setup: mov sp, r4 adr r0, _start - cmp r0, r6 #ifndef CONFIG_PRELOADER - beq jump_2_ram + cmp r0, r6 + beq clear_bss /* skip relocation */ #endif mov r1, r6 /* r1 <- scratch for copy_loop */ ldr r2, _TEXT_BASE -- 1.7.3.2