tugouxp wrote on Monday, December 02, 2019:
in the CA9 port, portSAVE_CONTEXT was call after the actual irq handler has returned,
is this has some potential issue if the interrupt happend during the vfp process has been working ,
and ,just right the irq_handler also do some vfp process and the interrupted task`s vfp registes spot has been broken?
thanks for your kindly help.
IRQ_Handler:
…
call irq_handler
…
switch_before_exit:
/* A context swtich is to be performed. Clear the context switch pending
flag. */
MOV r0, #0
STR r0, [r1]
/* Restore used registers, LR-irq and SPSR before saving the context
to the task stack. */
POP {r0-r4, r12}
CPS #IRQ_MODE
POP {LR}
MSR SPSR_cxsf, LR
POP {LR}
portSAVE_CONTEXT
/* Call the function that selects the new task to execute.
vTaskSwitchContext() if vTaskSwitchContext() uses LDRD or STRD
instructions, or 8 byte aligned stack allocated data. LR does not need
saving as a new LR will be loaded by portRESTORE_CONTEXT anyway. */
LDR R0, vTaskSwitchContextConst
BLX R0
/* Restore the context of, and branch to, the task selected to execute
next. */
portRESTORE_CONTEXT