[U-Boot] [Patch] bss section initialization on s3c44b0

Ming-Dien Chang mingdien.chang at gmail.com
Thu May 21 07:55:04 CEST 2009


Clear the .BSS section for S3C44B0 to get a zero-filled .BSS section.

Signed-off-by : Ming-Dien Chang <mingdien.chang at gmail.com>


diff --git a/cpu/s3c44b0/start.S b/cpu/s3c44b0/start.S
index f5a3d3a..a6d27aa 100644
--- a/cpu/s3c44b0/start.S
+++ b/cpu/s3c44b0/start.S
@@ -154,6 +154,25 @@ vector_copy_loop:
        ble     vector_copy_loop
 #endif /* CONFIG_SKIP_RELOCATE_UBOOT */

+       /*
+        * Initialize .bss section.
+        */
+       mov     r2, #0
+       mov     r3, #0
+       mov     r4, #0
+       mov     r5, #0
+       mov     r6, #0
+       mov     r7, #0
+       mov     r8, #0
+       mov     r9, #0
+       mov     r10, #0
+       ldr     r0, _bss_start
+       ldr     r1, _bss_end
+zerolize:
+       stmia   r0!, {r2-r10}
+       cmp     r0, r1
+       blt     zerolize
+
        /* Set up the stack                                                 */
 stack_setup:
        ldr     r0, _TEXT_BASE          /* upper 128 KiB: relocated uboot   */


More information about the U-Boot mailing list