17 #ifndef OPENOCD_TARGET_ARM_H
18 #define OPENOCD_TARGET_ARM_H
158 #define ARM_COMMON_MAGIC 0x0A450A45U
223 uint32_t op1, uint32_t op2,
224 uint32_t crn, uint32_t crm,
229 uint32_t op1, uint32_t op2,
230 uint32_t crn, uint32_t crm,
281 struct reg **reg_list[],
int *reg_list_size,
285 struct reg **reg_list[],
int *reg_list_size,
292 int num_mem_params,
struct mem_param *mem_params,
293 int num_reg_params,
struct reg_param *reg_params,
295 int timeout_ms,
void *arch_info);
297 int num_mem_params,
struct mem_param *mem_params,
298 int num_reg_params,
struct reg_param *reg_params,
299 uint32_t entry_point, uint32_t exit_point,
300 int timeout_ms,
void *arch_info,
301 int (*run_it)(
struct target *
target, uint32_t exit_point,
302 int timeout_ms,
void *arch_info));
int arm_blank_check_memory(struct target *target, struct target_memory_check_block *blocks, int num_blocks, uint8_t erased_value)
Runs ARM code in the target to check whether a memory block holds all ones.
const struct command_registration arm_all_profiles_command_handlers[]
int arm_arch_state(struct target *target)
arm_vfp_version
ARM vector floating point enabled, if yes which version.
int arm_checksum_memory(struct target *target, target_addr_t address, uint32_t count, uint32_t *checksum)
Runs ARM code in the target to calculate a CRC32 checksum.
arm_arch
ARM Architecture specifying the version and the profile.
struct reg_cache * arm_build_reg_cache(struct target *target, struct arm *arm)
struct reg * armv8_reg_current(struct arm *arm, unsigned regnum)
const char * armv8_get_gdb_arch(struct target *target)
int armv8_get_gdb_reg_list(struct target *target, struct reg **reg_list[], int *reg_list_size, enum target_register_class reg_class)
int arm_get_gdb_reg_list(struct target *target, struct reg **reg_list[], int *reg_list_size, enum target_register_class reg_class)
static bool is_arm(struct arm *arm)
arm_mode
Represent state of an ARM core.
int armv4_5_run_algorithm(struct target *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, struct reg_param *reg_params, target_addr_t entry_point, target_addr_t exit_point, int timeout_ms, void *arch_info)
void arm_free_reg_cache(struct arm *arm)
const char * arm_get_gdb_arch(struct target *target)
arm_state
The PSR "T" and "J" bits define the mode of "classic ARM" cores.
bool is_arm_mode(unsigned psr_mode)
Return true iff the parameter denotes a valid ARM processor mode.
const struct command_registration arm_command_handlers[]
struct reg_cache * armv8_build_reg_cache(struct target *target)
Builds cache of architecturally defined registers.
const char * arm_mode_name(unsigned psr_mode)
Map PSR mode bits to the name of an ARM processor operating mode.
static struct arm * target_to_arm(struct target *target)
Convert target handle to generic ARM target state handle.
int arm_init_arch_info(struct target *target, struct arm *arm)
void arm_set_cpsr(struct arm *arm, uint32_t cpsr)
Configures host-side ARM records to reflect the specified CPSR.
int armv4_5_run_algorithm_inner(struct target *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, struct reg_param *reg_params, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info, int(*run_it)(struct target *target, uint32_t exit_point, int timeout_ms, void *arch_info))
struct reg * arm_reg_current(struct arm *arm, unsigned regnum)
Returns handle to the register currently mapped to a given number.
arm_core_type
Indicates what registers are in the ARM state core register set.
@ ARM_CORE_TYPE_M_PROFILE
This represents an ARM Debug Interface (v5) Debug Access Port (DAP).
unsigned int common_magic
enum arm_state core_state
This wraps an implementation of DPM primitives.
Represents a generic ARM core, with standard application registers.
int(* full_context)(struct target *target)
Retrieve all core registers, for display.
enum arm_arch arch
ARM architecture version.
struct etm_context * etm
Handle for the Embedded Trace Module, if one is present.
enum arm_core_type core_type
Indicates what registers are in the ARM state core register set.
int(* mrc)(struct target *target, int cpnum, uint32_t op1, uint32_t op2, uint32_t crn, uint32_t crm, uint32_t *value)
Read coprocessor register.
enum arm_mode core_mode
Record the current core mode: SVC, USR, or some other mode.
struct reg * cpsr
Handle to the CPSR/xPSR; valid in all core modes.
struct adiv5_dap * dap
For targets conforming to ARM Debug Interface v5, this handle references the Debug Access Port (DAP) ...
struct reg * pc
Handle to the PC; valid in all core modes.
int(* write_core_reg)(struct target *target, struct reg *reg, int num, enum arm_mode mode, uint8_t *value)
int(* setup_semihosting)(struct target *target, int enable)
const int * map
Support for arm_reg_current()
int(* read_core_reg)(struct target *target, struct reg *reg, int num, enum arm_mode mode)
Retrieve a single core register.
struct reg_cache * core_cache
struct arm_dpm * dpm
Handle for the debug module, if one is present.
int(* mcr)(struct target *target, int cpnum, uint32_t op1, uint32_t op2, uint32_t crn, uint32_t crm, uint32_t value)
Write coprocessor register.
struct reg * spsr
Handle to the SPSR; valid only in core modes with an SPSR.
unsigned int common_magic
int arm_vfp_version
Floating point or VFP version, 0 if disabled.
struct target * target
Backpointer to the target.
enum arm_state core_state
Record the current core state: ARM, Thumb, or otherwise.