summaryrefslogtreecommitdiff
path: root/firmware/target/arm
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm')
-rw-r--r--firmware/target/arm/crt0.S49
1 files changed, 37 insertions, 12 deletions
diff --git a/firmware/target/arm/crt0.S b/firmware/target/arm/crt0.S
index 3bd061a17a..829004193f 100644
--- a/firmware/target/arm/crt0.S
+++ b/firmware/target/arm/crt0.S
@@ -26,20 +26,48 @@
26 .global start 26 .global start
27start: 27start:
28 /* Exception vectors */ 28 /* Exception vectors */
29 b newstart 29 ldr pc, [pc, #28]
30 b undef_instr_handler 30 ldr pc, [pc, #28]
31 b software_int_handler 31 ldr pc, [pc, #28]
32 b prefetch_abort_handler 32 ldr pc, [pc, #28]
33 b data_abort_handler 33 ldr pc, [pc, #28]
34 b reserved_handler 34 ldr pc, [pc, #28]
35 b irq_handler 35 ldr pc, [pc, #28]
36 b fiq_handler 36 ldr pc, [pc, #28]
37
37#if CONFIG_CPU==S5L8700 38#if CONFIG_CPU==S5L8700
38 .word 0x43554644 /* DFUC */ 39 .word 0x43554644 /* DFUC */
40#else
41 .word 0xdeadbeef /* to keep the same PC offsets */
39#endif 42#endif
43
44.word newstart
45.word undef_instr_handler
46.word software_int_handler
47.word prefetch_abort_handler
48.word data_abort_handler
49.word reserved_handler
50.word irq_handler
51.word fiq_handler
52
53vectors_end:
54
55 .text
56
40newstart: 57newstart:
41 msr cpsr_c, #0xd3 /* enter supervisor mode, disable IRQ/FIQ */ 58 msr cpsr_c, #0xd3 /* enter supervisor mode, disable IRQ/FIQ */
42 59
60#if CONFIG_CPU==AS3525 && !defined(BOOTLOADER) /* relocate vectors */
61 mov r1, #0 @ destination
62 ldr r2, =start @ source
63 ldr r3, =vectors_end @ end
64
651: ldr r0, [r2], #4
66 str r0, [r1], #4
67 cmp r3, r2
68 bne 1b
69#endif
70
43 /* Initialise bss section to zero */ 71 /* Initialise bss section to zero */
44 ldr r2, =_edata 72 ldr r2, =_edata
45 ldr r3, =_end 73 ldr r3, =_end
@@ -77,9 +105,6 @@ newstart:
77 bl main 105 bl main
78 106
79 107
80 .text
81/* .global UIE*/
82
83/* All illegal exceptions call into UIE with exception address as first 108/* All illegal exceptions call into UIE with exception address as first
84 * parameter. This is calculated differently depending on which exception 109 * parameter. This is calculated differently depending on which exception
85 * we're in. Second parameter is exception number, used for a string lookup 110 * we're in. Second parameter is exception number, used for a string lookup