arm struct
Represents a generic ARM core, with standard application registers. There are sixteen application registers (including PC, SP, LR) and a PSR. Cortex-M series cores do not support as many core states or shadowed registers as traditional ARM cores, and only support Thumb2 instructions.
Syntax
struct arm
{
unsigned int common_magic;
struct reg_cache *core_cache;
struct reg *pc;
struct reg *cpsr;
struct reg *spsr;
const int *map;
enum arm_core_type core_type;
enum arm_mode core_mode;
enum arm_state core_state;
enum arm_arch arch;
int arm_vfp_version;
int (*setup_semihosting)(struct target *target, int enable);
struct target *target;
struct arm_dpm *dpm;
struct etm_context *etm;
int (*full_context)(struct target *target);
int (*read_core_reg)(struct target *target, struct reg *reg,
int num, enum arm_mode mode);
int (*write_core_reg)(struct target *target, struct reg *reg,
int num, enum arm_mode mode, uint8_t *value);
int (*mrc)(struct target *target, int cpnum,
uint32_t op1, uint32_t op2,
uint32_t crn, uint32_t crm,
uint32_t *value);
int (*mrrc)(struct target *target, int cpnum,
uint32_t op, uint32_t crm,
uint64_t *value);
int (*mcr)(struct target *target, int cpnum,
uint32_t op1, uint32_t op2,
uint32_t crn, uint32_t crm,
uint32_t value);
int (*mcrr)(struct target *target, int cpnum,
uint32_t op, uint32_t crm,
uint64_t value);
void *arch_info;
struct adiv5_dap *dap;
};
Fields
Handle to the PC; valid in all core modes.
Handle to the CPSR/xPSR; valid in all core modes.
Handle to the SPSR; valid only in core modes with an SPSR.
Support for arm_reg_current().
Indicates what registers are in the ARM state core register set.
Record the current core mode: SVC, USR, or some other mode.
Record the current core state: ARM, Thumb, or otherwise.
ARM architecture version.
Floating point or VFP version, 0 if disabled.
int (*)(struct target *target, int enable) Backpointer to the target.
Handle for the debug module, if one is present.
Handle for the Embedded Trace Module, if one is present.
int (*)(struct target *target) Retrieve all core registers, for display.
Retrieve a single core register.
int (*)(struct target *target, struct reg *reg,
int num, enum arm_mode mode, uint8_t *value)
int (*)(struct target *target, int cpnum,
uint32_t op1, uint32_t op2,
uint32_t crn, uint32_t crm,
uint32_t *value)
Read coprocessor register.
int (*)(struct target *target, int cpnum,
uint32_t op, uint32_t crm,
uint64_t *value)
Read coprocessor to two registers.
int (*)(struct target *target, int cpnum,
uint32_t op1, uint32_t op2,
uint32_t crn, uint32_t crm,
uint32_t value)
Write coprocessor register.
int (*)(struct target *target, int cpnum,
uint32_t op, uint32_t crm,
uint64_t value)
Write coprocessor from two registers.
For targets conforming to ARM Debug Interface v5, this handle references the Debug Access Port (DAP) used to make requests to the target.