diff options
Diffstat (limited to 'firmware/crt0.S')
-rw-r--r-- | firmware/crt0.S | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/firmware/crt0.S b/firmware/crt0.S index ba478f804c..5946276604 100644 --- a/firmware/crt0.S +++ b/firmware/crt0.S | |||
@@ -93,6 +93,7 @@ remap_end: | |||
93 | strhi r5, [r2], #4 | 93 | strhi r5, [r2], #4 |
94 | bhi 1b | 94 | bhi 1b |
95 | 95 | ||
96 | #ifndef STUB | ||
96 | /* Zero out IBSS */ | 97 | /* Zero out IBSS */ |
97 | ldr r2, =_iedata | 98 | ldr r2, =_iedata |
98 | ldr r3, =_iend | 99 | ldr r3, =_iend |
@@ -111,6 +112,7 @@ remap_end: | |||
111 | ldrhi r5, [r2], #4 | 112 | ldrhi r5, [r2], #4 |
112 | strhi r5, [r3], #4 | 113 | strhi r5, [r3], #4 |
113 | bhi 1b | 114 | bhi 1b |
115 | #endif /* !STUB */ | ||
114 | #endif /* !BOOTLOADER */ | 116 | #endif /* !BOOTLOADER */ |
115 | 117 | ||
116 | /* Initialise bss section to zero */ | 118 | /* Initialise bss section to zero */ |
@@ -283,8 +285,10 @@ vectors: | |||
283 | 285 | ||
284 | .text | 286 | .text |
285 | 287 | ||
288 | #ifndef STUB | ||
286 | .global irq | 289 | .global irq |
287 | .global UIE | 290 | .global UIE |
291 | #endif | ||
288 | 292 | ||
289 | /* All illegal exceptions call into UIE with exception address as first | 293 | /* All illegal exceptions call into UIE with exception address as first |
290 | parameter. This is calculated differently depending on which exception | 294 | parameter. This is calculated differently depending on which exception |
@@ -317,11 +321,18 @@ data_abort_handler: | |||
317 | b UIE | 321 | b UIE |
318 | 322 | ||
319 | irq_handler: | 323 | irq_handler: |
324 | #ifndef STUB | ||
320 | stmfd sp!, {r0-r3, r12, lr} | 325 | stmfd sp!, {r0-r3, r12, lr} |
321 | bl irq | 326 | bl irq |
322 | ldmfd sp!, {r0-r3, r12, lr} | 327 | ldmfd sp!, {r0-r3, r12, lr} |
328 | #endif | ||
323 | subs pc, lr, #4 | 329 | subs pc, lr, #4 |
324 | 330 | ||
331 | #ifdef STUB | ||
332 | UIE: | ||
333 | b UIE | ||
334 | #endif | ||
335 | |||
325 | /* 256 words of IRQ stack */ | 336 | /* 256 words of IRQ stack */ |
326 | .space 256*4 | 337 | .space 256*4 |
327 | irq_stack: | 338 | irq_stack: |