summaryrefslogtreecommitdiff
path: root/firmware/target/arm/tcc77x
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/tcc77x')
-rw-r--r--firmware/target/arm/tcc77x/crt0.S23
1 files changed, 12 insertions, 11 deletions
diff --git a/firmware/target/arm/tcc77x/crt0.S b/firmware/target/arm/tcc77x/crt0.S
index 251fd0c903..d0873102d4 100644
--- a/firmware/target/arm/tcc77x/crt0.S
+++ b/firmware/target/arm/tcc77x/crt0.S
@@ -141,16 +141,16 @@ copied_start:
141 ldr r11, =dma_play_data 141 ldr r11, =dma_play_data
142#endif 142#endif
143 143
144 /* Let abort and undefined modes use IRQ stack */ 144 /* Let svc, abort and undefined modes use irq stack */
145 mov r0,#0xd7 145 msr cpsr, #0xd3
146 msr cpsr, r0
147 ldr sp, =irq_stack 146 ldr sp, =irq_stack
148 mov r0,#0xdb 147 msr cpsr, #0xd7
149 msr cpsr, r0 148 ldr sp, =irq_stack
149 msr cpsr, #0xdb
150 ldr sp, =irq_stack 150 ldr sp, =irq_stack
151 151
152 /* Switch to supervisor mode */ 152 /* Switch to sys mode */
153 mov r0,#0xd3 153 mov r0,#0xdf
154 msr cpsr, r0 154 msr cpsr, r0
155 ldr sp, =stackend 155 ldr sp, =stackend
156 156
@@ -222,12 +222,14 @@ undef_instr_handler:
222 mov r1, #0 222 mov r1, #0
223 b UIE 223 b UIE
224 224
225/* We run supervisor mode most of the time, and should never see a software 225/* We run sys mode most of the time, and should never see a software
226 exception being thrown. Perhaps make it illegal and call UIE? 226 exception being thrown. Make it illegal and call UIE.
227 */ 227 */
228software_int_handler: 228software_int_handler:
229reserved_handler: 229reserved_handler:
230 movs pc, lr 230 sub r0, lr, #4
231 mov r1, #4
232 b UIE
231 233
232prefetch_abort_handler: 234prefetch_abort_handler:
233 sub r0, lr, #4 235 sub r0, lr, #4
@@ -255,4 +257,3 @@ irq_stack:
255/* 256 words of FIQ stack */ 257/* 256 words of FIQ stack */
256 .space 256*4 258 .space 256*4
257fiq_stack: 259fiq_stack:
258