cpukit/aarch64: Add explanation of exception flow

This commit is contained in:
Kinsey Moore
2020-12-10 11:37:50 -06:00
committed by Joel Sherrill
parent f046af5804
commit d188e6e882
2 changed files with 18 additions and 3 deletions
@@ -54,7 +54,22 @@
/*
* This is the exception vector table and the pointers to the default
* exceptions handlers.
* exceptions handlers. Each vector in the table has space for up to 32
* instructions. The space of the last two instructions in each vector is used
* for the exception handler pointer.
*
* The operation of all exceptions is as follows:
* * An exception occurs
* * A vector is chosen based on the exception type and machine state
* * Execution begins at the chosen vector
* * X0 and LR are pushed onto the current stack
* * An unconditional branch and link is taken to the next instruction to get
* the PC
* * The exception handler pointer (EHP) is retrieved from the current vector using
* the PC
* * Branch and link to the EHP
* * X0 and LR are popped from the current stack after returning from the EHP
* * The exception returns to the previous execution state
*/
/*
@@ -255,7 +255,7 @@ _AArch64_Exception_interrupt_nest:
Save volatile regs on interrupt stack
Execute irq handler
Restore volatile regs from interrupt stack
Exception return
Return to embedded exception vector code
*/
/* Push interrupt context */
@@ -281,7 +281,7 @@ Execute interrupt handler
Switch to thread stack
Call thread dispatch
Restore volatile registers from thread stack
Return to dispatch
Return to embedded exception vector code
*/