17 #ifndef OPENOCD_TARGET_ARM_H
18 #define OPENOCD_TARGET_ARM_H
166 #define ARM_COMMON_MAGIC 0x0A450A45U
231 uint32_t op1, uint32_t op2,
232 uint32_t crn, uint32_t crm,
237 uint32_t
op, uint32_t crm,
242 uint32_t op1, uint32_t op2,
243 uint32_t crn, uint32_t crm,
248 uint32_t
op, uint32_t crm,
299 struct reg **reg_list[],
int *reg_list_size,
303 struct reg **reg_list[],
int *reg_list_size,
310 int num_mem_params,
struct mem_param *mem_params,
311 int num_reg_params,
struct reg_param *reg_params,
313 unsigned int timeout_ms,
void *arch_info);
315 int num_mem_params,
struct mem_param *mem_params,
316 int num_reg_params,
struct reg_param *reg_params,
317 uint32_t entry_point, uint32_t exit_point,
318 unsigned int timeout_ms,
void *arch_info,
319 int (*run_it)(
struct target *
target, uint32_t exit_point,
320 unsigned 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 char * armv8_get_gdb_arch(const struct target *target)
const struct command_registration arm_all_profiles_command_handlers[]
struct reg * arm_reg_current(struct arm *arm, unsigned int regnum)
Returns handle to the register currently mapped to a given number.
arm_implementer
Known ARM implementer IDs.
@ ARM_IMPLEMENTER_ARM_CHINA
@ ARM_IMPLEMENTER_INFINEON
@ ARM_IMPLEMENTER_REALTEK
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, unsigned int timeout_ms, void *arch_info, int(*run_it)(struct target *target, uint32_t exit_point, unsigned int timeout_ms, void *arch_info))
int arm_arch_state(struct target *target)
bool is_arm_mode(unsigned int psr_mode)
Return true iff the parameter denotes a valid ARM processor mode.
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 int regnum)
int armv8_get_gdb_reg_list(struct target *target, struct reg **reg_list[], int *reg_list_size, enum target_register_class reg_class)
const char * arm_get_gdb_arch(const struct target *target)
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.
void arm_free_reg_cache(struct arm *arm)
static struct arm * target_to_arm(const struct target *target)
Convert target handle to generic ARM target state handle.
arm_state
The PSR "T" and "J" bits define the mode of "classic ARM" cores.
const struct command_registration arm_command_handlers[]
struct reg_cache * armv8_build_reg_cache(struct target *target)
Builds cache of architecturally defined registers.
int arm_init_arch_info(struct target *target, struct arm *arm)
const char * arm_mode_name(unsigned int psr_mode)
Map PSR mode bits to the name of an ARM processor operating mode.
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(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, unsigned int timeout_ms, void *arch_info)
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.
int(* mrrc)(struct target *target, int cpnum, uint32_t op, uint32_t crm, uint64_t *value)
Read coprocessor to two registers.
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(* mcrr)(struct target *target, int cpnum, uint32_t op, uint32_t crm, uint64_t value)
Write coprocessor from two registers.
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.