SVC: Difference between revisions
| Line 994: | Line 994: | ||
| Exception address | | Exception address | ||
|- | |- | ||
| u32 | | u32[4] | ||
| | | Type-specific data, see below | ||
|} | |} | ||
The register storage layout for CPU exceptions is as follows (referring to user-mode registers): r0-r12, sp, <event-signaling exception handler>, lr_svc, lr, pc (misadjusted for Thumb instructions), cpsr. (????) | |||
Exception types: | Exception types: | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
! | ! Exception type | ||
! Id | ! Id | ||
|- | |- | ||
| UNDEFINED INSTRUCTION | | UNDEFINED INSTRUCTION | ||
| 0 | | 0 | ||
|- | |- | ||
| PREFETCH ABORT | | PREFETCH ABORT | ||
| 1 | | 1 | ||
|- | |- | ||
| DATA ABORT | | DATA ABORT | ||
| 2 | | 2 | ||
|- | |- | ||
| UNALIGNED DATA ACCESS | | UNALIGNED DATA ACCESS | ||
| 3 | | 3 | ||
|- | |- | ||
| ATTACH BREAK | | ATTACH BREAK | ||
| 4 | | 4 | ||
|- | |- | ||
| | | STOP POINT | ||
| 5 | | 5 | ||
|- | |- | ||
| USER BREAK | | USER BREAK | ||
| 6 | | 6 | ||
|- | |- | ||
| DEBUGGER BREAK | | DEBUGGER BREAK | ||
| 7 | | 7 | ||
|- | |- | ||
| UNDEFINED SYSCALL | | UNDEFINED SYSCALL | ||
| 8 | | 8 | ||
|} | |} | ||
"SVC | For UNDEFINED INSTRUCTION/PREFETCH ABORT/DATA ABORT/UNALIGNED DATA ACCESS/UNDEFINED SYSCALL: | ||
{| class="wikitable" border="1" | |||
! Type | |||
! Field | |||
|- | |||
| u32 | |||
| Fault information: Fault Address Register (for DATA ABORT and UNALIGNED DATA ACCESS), | |||
attempted SVC ID (for UNDEFINED SYSCALL), otherwise 0 | |||
|} | |||
For STOP POINT: | |||
{| class="wikitable" border="1" | |||
! Type | |||
! Field | |||
|- | |||
| u32 | |||
| Stop point type that caused the event: 0 = svc 0xFF, 1 = breakpoint, 2 = watchpoint | |||
|- | |||
| u32 | |||
| Fault information: always zero in this case | |||
|} | |||
For USER BREAK: | |||
{| class="wikitable" border="1" | |||
! Type | |||
! Field | |||
|- | |||
| u32 | |||
| Break reason | |||
|- | |||
| u32[2] | |||
| User-provided parameters for debug reasons, or 0 | |||
|} | |||
For DEBUGGER BREAK: | |||
{| class="wikitable" border="1" | |||
! Type | |||
! Field | |||
|- | |||
| [[KThread]]*[nbCores] | |||
| Pointers to the current threads at the time svcBreakDebugProcess was called | |||
|} | |||
User break types: | User break types: | ||
| Line 1,059: | Line 1,089: | ||
| USER | | USER | ||
| 2 | | 2 | ||
|- | |||
| DEBUG_ASSERT | |||
| 3 | |||
|- | |||
| DEBUG_USER | |||
| 4 | |||
|} | |} | ||