forked from len0rd/rockbox
AS3525v1/2: Enable nested handling of interrupts
Mostly for the sake of reducing latency for audio servicing where other service routines can take a long time to complete, leading to occasional drops of a few samples, especially in recording, where they are fairly frequent. One mystery that remains is GPIOA IRQ being interrupted causes strange undefined instruction exceptions, most easily produced on my Fuze V2 with a scrollwheel. Making GPIOA the top ISR for now, thus not interruptible, cures it. SVC mode is used during the actual calls. Hopefully the SVC stack size is sufficient. Prologue and epilogue code only uses the IRQ stack and is large enough. Any routine code that should not be interrupted should disable IRQ itself from here on in. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31642 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
5e21bbf575
commit
307cb04948
8 changed files with 105 additions and 48 deletions
|
|
@ -100,17 +100,23 @@ newstart:
|
|||
strhi r4, [r2], #4
|
||||
bhi 1b
|
||||
|
||||
/* Set up stack for IRQ mode */
|
||||
/* Set up stack for IRQ mode */
|
||||
msr cpsr_c, #0xd2
|
||||
ldr sp, =irq_stack
|
||||
|
||||
/* Set up stack for FIQ mode */
|
||||
msr cpsr_c, #0xd3
|
||||
#if CONFIG_CPU == AS3525 || CONFIG_CPU == AS3525v2
|
||||
/* Let abort and undefined modes use irq stack */
|
||||
/* svc stack is for interrupt processing */
|
||||
ldr sp, =svc_stack
|
||||
#else
|
||||
/* Let svc, abort and undefined modes use irq stack */
|
||||
ldr sp, =irq_stack
|
||||
|
||||
/* Set up stack for FIQ mode */
|
||||
msr cpsr_c, #0xd1
|
||||
ldr sp, =fiq_stack
|
||||
|
||||
/* Let svc, abort and undefined modes use irq stack */
|
||||
msr cpsr_c, #0xd3
|
||||
ldr sp, =irq_stack
|
||||
#endif
|
||||
msr cpsr_c, #0xd7
|
||||
ldr sp, =irq_stack
|
||||
msr cpsr_c, #0xdb
|
||||
|
|
@ -159,15 +165,20 @@ prefetch_abort_handler:
|
|||
b UIE
|
||||
|
||||
data_abort_handler:
|
||||
sub r0, lr, #8
|
||||
sub r0, lr, #8
|
||||
mov r1, #2
|
||||
b UIE
|
||||
|
||||
/* Cache-align interrupt stacks */
|
||||
.balign 32
|
||||
|
||||
/* 256 words of IRQ stack */
|
||||
.space 256*4
|
||||
irq_stack:
|
||||
|
||||
/* 256 words of FIQ stack */
|
||||
/* 256 words of FIQ/SVC stack */
|
||||
.space 256*4
|
||||
fiq_stack:
|
||||
end:
|
||||
svc_stack:
|
||||
|
||||
end:
|
||||
Loading…
Add table
Add a link
Reference in a new issue