]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
powerpc/mpc85xx: modify the functionality clear_bss and aligning the end address...
authorYing Zhang <b40530@freescale.com>
Fri, 7 Jun 2013 09:25:16 +0000 (17:25 +0800)
committerAndy Fleming <afleming@freescale.com>
Thu, 20 Jun 2013 22:08:50 +0000 (17:08 -0500)
There will clear the BSS in the function clear_bss(), the reset address of
the BSS started from the __bss_start, and increased by four-byte increments,
finally stoped depending on the address is equal to the _bss_end. If the end
address __bss_end is not alignment to 4byte, it will be an infinite loop.

1. The reset action stoped depending on the reset address is greater
than or equal the end address of the BSS.
2. The end address of the BSS should be 4byte aligned. Because the reset unit
is 4 Bytes.

This patch is on top of the patch "powerpc/mpc85xx: support application
without resetvec segment in the linker script".

Signed-off-by: Ying Zhang <b40530@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
arch/powerpc/cpu/mpc85xx/start.S
arch/powerpc/cpu/mpc85xx/u-boot-spl.lds

index 4f0480b768960e9d0913bd1ae6fba8d36e920476..2657982a45b9917a32adcc2a87fb8516a3464000 100644 (file)
@@ -1795,7 +1795,7 @@ clear_bss:
        stw     r0,0(r3)
        addi    r3,r3,4
        cmplw   0,r3,r4
-       bne     5b
+       blt     5b
 6:
 
        mr      r3,r9           /* Init Data pointer            */
index 4591760e2d50e43276879c17f62845ced611e484..20284ed5a59569789242eee37759e02ede6281d5 100644 (file)
@@ -92,10 +92,12 @@ SECTIONS
         */
        . |= 0x10;
 
+       . = ALIGN(4);
        __bss_start = .;
        .bss : {
                *(.sbss*)
                *(.bss*)
        }
+       . = ALIGN(4);
        __bss_end = .;
 }