cleanup .s files
This commit is contained in:
parent
1047706197
commit
2b2dba7316
39
at91_init0.s
39
at91_init0.s
@ -60,9 +60,8 @@ fiqvec: ldr pc, [pc, #24] /* 0x1c FIQ */
|
||||
|
||||
.global InitReset
|
||||
.func InitReset
|
||||
|
||||
InitReset:
|
||||
.extern at91_init1
|
||||
InitReset:
|
||||
/* Call Low level init function */
|
||||
ldr sp, =__stack_top__
|
||||
ldr r0, =at91_init1
|
||||
@ -184,61 +183,59 @@ FIQ_Handler_Entry:
|
||||
|
||||
/* restore PC using the LR_fiq directly */
|
||||
subs pc, lr, #4
|
||||
|
||||
.endfunc
|
||||
|
||||
|
||||
.global IRQ_Handler_Entry
|
||||
.func IRQ_Handler_Entry
|
||||
IRQ_Handler_Entry:
|
||||
/*- Manage Exception Entry */
|
||||
/*- Adjust and save LR_irq in IRQ stack */
|
||||
/* Manage Exception Entry */
|
||||
/* Adjust and save LR_irq in IRQ stack */
|
||||
sub lr, lr, #4
|
||||
stmfd sp!, { lr }
|
||||
|
||||
/*- Save SPSR need to be saved for nested interrupt */
|
||||
/* Save SPSR need to be saved for nested interrupt */
|
||||
mrs r14, SPSR
|
||||
stmfd sp!, { r14 }
|
||||
|
||||
/*- Save and r0 in IRQ stack */
|
||||
/* Save and r0 in IRQ stack */
|
||||
stmfd sp!, { r0 }
|
||||
|
||||
/*- Write in the IVR to support Protect Mode */
|
||||
/*- No effect in Normal Mode */
|
||||
/*- De-assert the NIRQ and clear the source in Protect Mode */
|
||||
/* Write in the IVR to support Protect Mode */
|
||||
/* No effect in Normal Mode */
|
||||
/* De-assert the NIRQ and clear the source in Protect Mode */
|
||||
ldr r14, =AT91C_BASE_AIC
|
||||
ldr r0, [r14, #AIC_IVR]
|
||||
str r14, [r14, #AIC_IVR]
|
||||
|
||||
/*- Enable Interrupt and Switch in Supervisor Mode */
|
||||
/* Enable Interrupt and Switch in Supervisor Mode */
|
||||
msr CPSR_c, #ARM_MODE_SVC
|
||||
|
||||
/*- Save scratch/used registers and LR in User Stack */
|
||||
/* Save scratch/used registers and LR in User Stack */
|
||||
stmfd sp!, { r1-r3, r12, r14 }
|
||||
|
||||
/*- Branch to the routine pointed by the AIC_IVR */
|
||||
/* Branch to the routine pointed by the AIC_IVR */
|
||||
mov r14, pc
|
||||
bx r0
|
||||
/*- Restore scratch/used registers and LR from User Stack*/
|
||||
|
||||
/* Restore scratch/used registers and LR from User Stack */
|
||||
ldmia sp!, { r1-r3, r12, r14 }
|
||||
|
||||
/*- Disable Interrupt and switch back in IRQ mode */
|
||||
/* Disable Interrupt and switch back in IRQ mode */
|
||||
msr CPSR_c, #ARM_MODE_IRQ | I_BIT
|
||||
|
||||
/*- Mark the End of Interrupt on the AIC */
|
||||
/* Mark the End of Interrupt on the AIC */
|
||||
ldr r14, =AT91C_BASE_AIC
|
||||
str r14, [r14, #AIC_EOICR]
|
||||
|
||||
/*- Restore SPSR_irq and r0 from IRQ stack */
|
||||
/* Restore SPSR_irq and r0 from IRQ stack */
|
||||
ldmia sp!, { r0 }
|
||||
|
||||
/*- Restore SPSR_irq and r0 from IRQ stack */
|
||||
/* Restore SPSR_irq and r0 from IRQ stack */
|
||||
ldmia sp!, { r14 }
|
||||
msr SPSR_cxsf, r14
|
||||
|
||||
/*- Restore adjusted LR_irq from IRQ stack directly in the PC */
|
||||
/* Restore adjusted LR_irq from IRQ stack directly in the PC */
|
||||
ldmia sp!, { pc }^
|
||||
|
||||
.endfunc
|
||||
|
||||
.end
|
||||
|
Loading…
Reference in New Issue
Block a user