summaryrefslogtreecommitdiffstats
path: root/utils/hwstub/stub/crt0.S
blob: e2d4742d3654d625e0c4d1a09372c8c681500389 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
.section    .text,"ax",%progbits
.code       32
.align      0x04
.global     start
start:
    msr     cpsr_c, #0xd3 /* enter supervisor mode, disable IRQ/FIQ */
    ldr     sp, =oc_stackend
    /* clear bss */
    ldr     r2, =bss_start
    ldr     r3, =bss_end
    mov     r4, #0
1:
    cmp     r3, r2
    strhi   r4, [r2], #4
    bhi     1b
    /* jump to C code */
    b       main