diff options
Diffstat (limited to 'arch/arm/lib/crt0.S')
-rw-r--r-- | arch/arm/lib/crt0.S | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/arm/lib/crt0.S b/arch/arm/lib/crt0.S index 7939ced..92d3732 100644 --- a/arch/arm/lib/crt0.S +++ b/arch/arm/lib/crt0.S @@ -122,14 +122,22 @@ here: movne sp, r0 # endif ldr r0, =__bss_start /* this is auto-relocated! */ - ldr r1, =__bss_end /* this is auto-relocated! */ +#ifdef CONFIG_USE_ARCH_MEMSET + ldr r3, =__bss_end /* this is auto-relocated! */ + mov r1, #0x00000000 /* prepare zero to clear BSS */ + + subs r2, r3, r0 /* r2 = memset len */ + bl memset +#else + ldr r1, =__bss_end /* this is auto-relocated! */ mov r2, #0x00000000 /* prepare zero to clear BSS */ clbss_l:cmp r0, r1 /* while not at end of BSS */ strlo r2, [r0] /* clear 32-bit BSS word */ addlo r0, r0, #4 /* move to next */ blo clbss_l +#endif #if ! defined(CONFIG_SPL_BUILD) bl coloured_LED_init |