119 return (ctx->
psr & 0x10) == 0;
129 return (ctx->
pstate & 0x10) == 0;
Thread context structure (register dump)
Definition: thread_context.h:49
u32 fpcr
Floating-point control register.
Definition: thread_context.h:58
u32 psr
PSTATE or cpsr.
Definition: thread_context.h:55
CpuRegister pc
Program counter.
Definition: thread_context.h:54
u32 fpsr
Floating-point status register.
Definition: thread_context.h:59
u64 tpidr
EL0 Read/Write Software Thread ID Register.
Definition: thread_context.h:61
u64 fp
Frame pointer (x29) (AArch64). For AArch32, check r11.
Definition: thread_context.h:51
u64 sp
Stack pointer (AArch64). For AArch32, check r13.
Definition: thread_context.h:53
u64 lr
Link register (x30) (AArch64). For AArch32, check r14.
Definition: thread_context.h:52
Thread exception dump structure.
Definition: thread_context.h:65
u32 error_desc
See ThreadExceptionDesc.
Definition: thread_context.h:66
CpuRegister pc
Program counter (elr_el1).
Definition: thread_context.h:73
u32 pstate
pstate & 0xFF0FFE20
Definition: thread_context.h:79
CpuRegister lr
Link register.
Definition: thread_context.h:71
CpuRegister fp
Frame pointer.
Definition: thread_context.h:70
CpuRegister far
Fault Address Register.
Definition: thread_context.h:84
CpuRegister sp
Stack pointer.
Definition: thread_context.h:72
Definition: thread_context.h:99
u32 tpidr_el0
tpidr_el0 = 1
Definition: thread_context.h:104
u32 cpsr
cpsr & 0xFF0FFE20
Definition: thread_context.h:105
Definition: thread_context.h:87
u32 pstate
pstate & 0xFF0FFE20
Definition: thread_context.h:92
RegisterGroup
Armv8 register group. svcGetThreadContext3 uses RegisterGroup_All.
Definition: thread_context.h:26
@ RegisterGroup_CpuGprs
General-purpose CPU registers (x0..x28 or r0..r10,r12).
Definition: thread_context.h:27
@ RegisterGroup_FpuSprs
Special-purpose NEON registers.
Definition: thread_context.h:30
@ RegisterGroup_CpuAll
All CPU registers.
Definition: thread_context.h:32
@ RegisterGroup_FpuAll
All NEON registers.
Definition: thread_context.h:33
@ RegisterGroup_FpuGprs
General-purpose NEON registers.
Definition: thread_context.h:29
@ RegisterGroup_All
All registers.
Definition: thread_context.h:34
@ RegisterGroup_CpuSprs
Special-purpose CPU registers (fp, lr, sp, pc, PSTATE or cpsr, TPIDR_EL0).
Definition: thread_context.h:28
ThreadExceptionDesc
This is for ThreadExceptionDump error_desc.
Definition: thread_context.h:38
@ ThreadExceptionDesc_Trap
Uncategorized, CP15RTTrap, CP15RRTTrap, CP14RTTrap, CP14RRTTrap, IllegalState, SystemRegisterTrap.
Definition: thread_context.h:44
@ ThreadExceptionDesc_MisalignedPC
Misaligned PC.
Definition: thread_context.h:40
@ ThreadExceptionDesc_InstructionAbort
Instruction abort.
Definition: thread_context.h:39
@ ThreadExceptionDesc_BadSVC
Bad SVC.
Definition: thread_context.h:43
@ ThreadExceptionDesc_MisalignedSP
Misaligned SP.
Definition: thread_context.h:41
@ ThreadExceptionDesc_SError
SError [not in 1.0.0?].
Definition: thread_context.h:42
@ ThreadExceptionDesc_Other
None of the above, EC <= 0x34 and not a breakpoint.
Definition: thread_context.h:45
static bool threadContextIsAArch64(const ThreadContext *ctx)
Determines whether a thread context belong to an AArch64 process based on the PSR.
Definition: thread_context.h:117
static bool threadExceptionIsAArch64(const ThreadExceptionDump *ctx)
Determines whether a ThreadExceptionDump belongs to an AArch64 process based on the PSTATE.
Definition: thread_context.h:127
#define BIT(n)
Creates a bitmask from a bit number.
Definition: types.h:54
uint64_t u64
64-bit unsigned integer.
Definition: types.h:22
__uint128_t u128
128-bit unsigned integer.
Definition: types.h:23
uint32_t u32
32-bit unsigned integer.
Definition: types.h:21
Armv8 CPU register.
Definition: thread_context.h:12
u64 x
64-bit AArch64 register view.
Definition: thread_context.h:13
u32 r
AArch32 register view.
Definition: thread_context.h:15
u32 w
32-bit AArch64 register view.
Definition: thread_context.h:14
Armv8 NEON register.
Definition: thread_context.h:19
double d
64-bit double-precision view.
Definition: thread_context.h:21
u128 v
128-bit vector view.
Definition: thread_context.h:20
float s
32-bit single-precision view.
Definition: thread_context.h:22