diff options
Diffstat (limited to 'utils/hwstub/stmp/crt0.S')
-rw-r--r-- | utils/hwstub/stmp/crt0.S | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/utils/hwstub/stmp/crt0.S b/utils/hwstub/stmp/crt0.S new file mode 100644 index 0000000000..e2d4742d36 --- /dev/null +++ b/utils/hwstub/stmp/crt0.S | |||
@@ -0,0 +1,17 @@ | |||
1 | .section .text,"ax",%progbits | ||
2 | .code 32 | ||
3 | .align 0x04 | ||
4 | .global start | ||
5 | start: | ||
6 | msr cpsr_c, #0xd3 /* enter supervisor mode, disable IRQ/FIQ */ | ||
7 | ldr sp, =oc_stackend | ||
8 | /* clear bss */ | ||
9 | ldr r2, =bss_start | ||
10 | ldr r3, =bss_end | ||
11 | mov r4, #0 | ||
12 | 1: | ||
13 | cmp r3, r2 | ||
14 | strhi r4, [r2], #4 | ||
15 | bhi 1b | ||
16 | /* jump to C code */ | ||
17 | b main | ||