mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-03 13:27:24 +08:00
cpukit/aarch64: Add explanation of exception flow
This commit is contained in:
committed by
Joel Sherrill
parent
f046af5804
commit
d188e6e882
@@ -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
|
||||
*/
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user