I am trying to write an FIQ handler for arm64(AArch64) in assembly. I already have written an IRQ handler which works well so far. I was just wondering if my FIQ handler should be different from what my IRQ looks like.
My FIQ handler does the following:
- Push Registers onto stack
- Read GIC Interrupt Ack Register to identify the interrupt no.
- Check if it is not spurious interrupt. If it is spurious branch to end of irq handler.
- branch to corresponding high level C ISR for interrupt servicing.
- write GIC EOIR to mark the completion of interrupt
- pop registers from stack.
- return to the main code.
In AArh32 FIQ used to have banked registers R8-R12,LR,SP; which were not required to push onto stack. So this was one difference from IRQ in AArch32 where all registers(except LR,SP) were required to push onto stack.
But I couldn't find what registers are banked in arm64 (except LR & SP). Could someone please tell me what should go into my FIQ for arm64. Better if someone could direct me towards an example FIQ handler for arm64.