]> git.sur5r.net Git - u-boot/commitdiff
armv7: fix relocation skip
authorAndreas Bießmann <andreas.devel@googlemail.com>
Tue, 30 Nov 2010 23:58:36 +0000 (00:58 +0100)
committerWolfgang Denk <wd@denx.de>
Thu, 9 Dec 2010 10:01:16 +0000 (11:01 +0100)
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 <andreas.devel@googlemail.com>
arch/arm/cpu/armv7/start.S

index 02fdfc7976f3be3041bcd1b3b692a51880211bd5..c71ef6cf92732228ca97f9aad038b4b2c0a53592 100644 (file)
@@ -166,9 +166,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