mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-20 05:21:59 -04:00
Update IRQ handler code.
This commit is contained in:
parent
151e000be0
commit
46d4beaba8
|
@ -127,37 +127,6 @@ irqHandler:
|
||||||
|
|
||||||
portRESTORE_CONTEXT
|
portRESTORE_CONTEXT
|
||||||
|
|
||||||
/* Won't progress to here. */
|
|
||||||
|
|
||||||
/* Save interrupt context on the stack to allow nesting */
|
|
||||||
SUB lr, lr, #4
|
|
||||||
STMFD sp!, {lr}
|
|
||||||
MRS lr, SPSR
|
|
||||||
STMFD sp!, {r0, lr}
|
|
||||||
|
|
||||||
/* Write in the IVR to support Protect Mode */
|
|
||||||
LDR lr, =AT91C_BASE_AIC
|
|
||||||
LDR r0, [r14, #AIC_IVR]
|
|
||||||
STR lr, [r14, #AIC_IVR]
|
|
||||||
|
|
||||||
/* Branch to interrupt handler in Supervisor mode */
|
|
||||||
MSR CPSR_c, #ARM_MODE_SVC
|
|
||||||
STMFD sp!, {r1-r3, r12, lr}
|
|
||||||
MOV lr, pc
|
|
||||||
BX r0
|
|
||||||
LDMIA sp!, {r1-r3, r12, lr}
|
|
||||||
MSR CPSR_c, #ARM_MODE_IRQ | I_BIT
|
|
||||||
|
|
||||||
/* Acknowledge interrupt */
|
|
||||||
LDR lr, =AT91C_BASE_AIC
|
|
||||||
STR lr, [r14, #AIC_EOICR]
|
|
||||||
|
|
||||||
/* Restore interrupt context and branch back to calling code */
|
|
||||||
LDMIA sp!, {r0, lr}
|
|
||||||
MSR SPSR_cxsf, lr
|
|
||||||
LDMIA sp!, {pc}^
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
After a reset, execution starts here, the mode is ARM, supervisor
|
After a reset, execution starts here, the mode is ARM, supervisor
|
||||||
with interrupts disabled.
|
with interrupts disabled.
|
||||||
|
|
Loading…
Reference in a new issue