diff options
Diffstat (limited to 'firmware/target/arm/tcc780x/crt0.S')
-rw-r--r-- | firmware/target/arm/tcc780x/crt0.S | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/firmware/target/arm/tcc780x/crt0.S b/firmware/target/arm/tcc780x/crt0.S index 1612973866..1dbccf9828 100644 --- a/firmware/target/arm/tcc780x/crt0.S +++ b/firmware/target/arm/tcc780x/crt0.S | |||
@@ -120,17 +120,16 @@ copied_start: | |||
120 | ldr r11, =dma_play_data | 120 | ldr r11, =dma_play_data |
121 | #endif | 121 | #endif |
122 | 122 | ||
123 | /* Let abort and undefined modes use IRQ stack */ | 123 | /* Let svc, abort and undefined modes use irq stack */ |
124 | mov r0,#0xd7 | 124 | msr cpsr, #0xd3 |
125 | msr cpsr, r0 | ||
126 | ldr sp, =irq_stack | 125 | ldr sp, =irq_stack |
127 | mov r0,#0xdb | 126 | msr cpsr, #0xd7 |
128 | msr cpsr, r0 | 127 | ldr sp, =irq_stack |
128 | msr cpsr, #0xdb | ||
129 | ldr sp, =irq_stack | 129 | ldr sp, =irq_stack |
130 | 130 | ||
131 | /* Switch to supervisor mode */ | 131 | /* Switch to sys mode */ |
132 | mov r0,#0xd3 | 132 | msr cpsr, #0xdf |
133 | msr cpsr, r0 | ||
134 | ldr sp, =stackend | 133 | ldr sp, =stackend |
135 | 134 | ||
136 | /* Enable MMU & caches. At present this is just doing what the OF does. | 135 | /* Enable MMU & caches. At present this is just doing what the OF does. |
@@ -293,12 +292,14 @@ undef_instr_handler: | |||
293 | mov r1, #0 | 292 | mov r1, #0 |
294 | b UIE | 293 | b UIE |
295 | 294 | ||
296 | /* We run supervisor mode most of the time, and should never see a software | 295 | /* We run sys mode most of the time, and should never see a software |
297 | exception being thrown. Perhaps make it illegal and call UIE? | 296 | exception being thrown. Make it illegal and call UIE. |
298 | */ | 297 | */ |
299 | software_int_handler: | 298 | software_int_handler: |
300 | reserved_handler: | 299 | reserved_handler: |
301 | movs pc, lr | 300 | sub r0, lr, #4 |
301 | mov r1, #4 | ||
302 | b UIE | ||
302 | 303 | ||
303 | prefetch_abort_handler: | 304 | prefetch_abort_handler: |
304 | sub r0, lr, #4 | 305 | sub r0, lr, #4 |