summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/tcc77x
diff options
context:
space:
mode:
authorMarcin Bukat <marcin.bukat@gmail.com>2011-10-11 16:06:03 +0000
committerMarcin Bukat <marcin.bukat@gmail.com>2011-10-11 16:06:03 +0000
commitbf056d5372b6375b088836dd57339d7a499fe0d6 (patch)
tree0e8b2d2f9782b3267b289f8c9715e6a6cb42660d /firmware/target/arm/tcc77x
parent90559156450082628ab1b3aed3d2db862de377c1 (diff)
downloadrockbox-bf056d5372b6375b088836dd57339d7a499fe0d6.tar.gz
rockbox-bf056d5372b6375b088836dd57339d7a499fe0d6.tar.bz2
rockbox-bf056d5372b6375b088836dd57339d7a499fe0d6.zip
Switch to SYS mode on arm FS#12322 by me
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30741 a1c6a512-1295-4272-9138-f99709370657
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:
ldr r11, =dma_play_data
#endif
- /* Let abort and undefined modes use IRQ stack */
- mov r0,#0xd7
- msr cpsr, r0
+ /* Let svc, abort and undefined modes use irq stack */
+ msr cpsr, #0xd3
ldr sp, =irq_stack
- mov r0,#0xdb
- msr cpsr, r0
+ msr cpsr, #0xd7
+ ldr sp, =irq_stack
+ msr cpsr, #0xdb
ldr sp, =irq_stack
- /* Switch to supervisor mode */
- mov r0,#0xd3
+ /* Switch to sys mode */
+ mov r0,#0xdf
msr cpsr, r0
ldr sp, =stackend
@@ -222,12 +222,14 @@ undef_instr_handler:
mov r1, #0
b UIE
-/* We run supervisor mode most of the time, and should never see a software
- exception being thrown. Perhaps make it illegal and call UIE?
+/* We run sys mode most of the time, and should never see a software
+ exception being thrown. Make it illegal and call UIE.
*/
software_int_handler:
reserved_handler:
- movs pc, lr
+ sub r0, lr, #4
+ mov r1, #4
+ b UIE
prefetch_abort_handler:
sub r0, lr, #4
@@ -255,4 +257,3 @@ irq_stack:
/* 256 words of FIQ stack */
.space 256*4
fiq_stack:
-