27 LOG_ERROR(
"%s: there is no Thumb state on FA526", __func__);
31 uint32_t
mask, uint32_t *core_regs[16])
49 for (i = 0; i <= 15; i++) {
63 uint32_t *buf_u32 =
buffer;
64 uint16_t *buf_u16 =
buffer;
79 for (i = 0; i <= 15; i++) {
126 LOG_DEBUG(
"xpsr: %8.8" PRIx32
", spsr: %i", xpsr, spsr);
158 uint8_t xpsr_im,
int rot,
int spsr)
163 LOG_DEBUG(
"xpsr_im: %2.2x, rot: %i, spsr: %i", xpsr_im, rot, spsr);
184 uint32_t
mask, uint32_t core_regs[16])
202 for (i = 0; i <= 15; i++) {
238 LOG_ERROR(
"%s: there is no Thumb state on FA526", __func__);
int arm7_9_write_memory_opt(struct target *target, target_addr_t address, uint32_t size, uint32_t count, const uint8_t *buffer)
int arm7_9_examine(struct target *target)
Perform per-target setup that requires JTAG access.
void arm7_9_deinit(struct target *target)
int arm7_9_read_memory(struct target *target, target_addr_t address, uint32_t size, uint32_t count, uint8_t *buffer)
int arm7_9_add_breakpoint(struct target *target, struct breakpoint *breakpoint)
Add a breakpoint to an ARM7/9 target.
int arm7_9_assert_reset(struct target *target)
Asserts the reset (SRST) on an ARM7/9 target.
int arm7_9_poll(struct target *target)
Polls an ARM7/9 target for its current status.
int arm7_9_halt(struct target *target)
Halt an ARM7/9 target.
int arm7_9_remove_breakpoint(struct target *target, struct breakpoint *breakpoint)
Removes a breakpoint from an ARM7/9 target.
int arm7_9_remove_watchpoint(struct target *target, struct watchpoint *watchpoint)
Remove a watchpoint from an ARM7/9 target.
int arm7_9_deassert_reset(struct target *target)
Deassert the reset (SRST) signal on an ARM7/9 target.
int arm7_9_write_memory(struct target *target, target_addr_t address, uint32_t size, uint32_t count, const uint8_t *buffer)
int arm7_9_bulk_write_memory(struct target *target, target_addr_t address, uint32_t count, const uint8_t *buffer)
int arm7_9_step(struct target *target, int current, target_addr_t address, int handle_breakpoints)
int arm7_9_target_request_data(struct target *target, uint32_t size, uint8_t *buffer)
Get some data from the ARM7/9 target.
int arm7_9_add_watchpoint(struct target *target, struct watchpoint *watchpoint)
Add a watchpoint to an ARM7/9 target.
int arm7_9_check_reset(struct target *target)
int arm7_9_init_arch_info(struct target *target, struct arm7_9_common *arm7_9)
int arm7_9_resume(struct target *target, int current, target_addr_t address, int handle_breakpoints, int debug_execution)
static struct arm7_9_common * target_to_arm7_9(struct target *target)
int arm920t_post_debug_entry(struct target *target)
const struct command_registration arm920t_command_handlers[]
int arm920t_write_memory(struct target *target, target_addr_t address, uint32_t size, uint32_t count, const uint8_t *buffer)
Writes a buffer, in the specified word size, with current MMU settings.
int arm920t_disable_mmu_caches(struct target *target, int mmu, int d_u_cache, int i_cache)
int arm920t_read_memory(struct target *target, target_addr_t address, uint32_t size, uint32_t count, uint8_t *buffer)
Reads a buffer, in the specified word size, with current MMU settings.
int arm920t_soft_reset_halt(struct target *target)
int arm920t_get_ttb(struct target *target, uint32_t *result)
void arm920t_pre_restore_context(struct target *target)
int arm920t_enable_mmu_caches(struct target *target, int mmu, int d_u_cache, int i_cache)
int arm920t_arch_state(struct target *target)
Logs summary of ARM920 state for a halted target.
#define ARM920T_COMMON_MAGIC
static struct arm920t_common * target_to_arm920(struct target *target)
void arm9tdmi_load_hword_reg(struct target *target, int num)
void arm9tdmi_load_byte_reg(struct target *target, int num)
void arm9tdmi_store_byte_reg(struct target *target, int num)
void arm9tdmi_store_hword_reg(struct target *target, int num)
int arm9tdmi_init_target(struct command_context *cmd_ctx, struct target *target)
int arm9tdmi_clock_data_in_endianness(struct arm_jtag *jtag_info, void *in, int size, int be)
void arm9tdmi_enable_single_step(struct target *target, uint32_t next_pc)
int arm9tdmi_clock_data_in(struct arm_jtag *jtag_info, uint32_t *in)
int arm9tdmi_examine_debug_reason(struct target *target)
void arm9tdmi_load_word_regs(struct target *target, uint32_t mask)
void arm9tdmi_store_word_regs(struct target *target, uint32_t mask)
void arm9tdmi_branch_resume(struct target *target)
void arm9tdmi_disable_single_step(struct target *target)
int arm9tdmi_clock_out(struct arm_jtag *jtag_info, uint32_t instr, uint32_t out, uint32_t *in, int sysspeed)
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.
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.
int arm_get_gdb_reg_list(struct target *target, struct reg **reg_list[], int *reg_list_size, enum target_register_class reg_class)
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)
static struct arm * target_to_arm(struct target *target)
Convert target handle to generic ARM target state handle.
Macros used to generate various ARM or Thumb opcodes.
#define ARMV4_5_LDMIA(rn, list, s, w)
#define ARMV4_5_MRS(rn, r)
#define ARMV4_5_STR(rd, rn)
#define ARMV4_5_STMIA(rn, list, s, w)
#define ARMV4_5_MSR_IM(im, rotate, field, r)
static void fa526_write_xpsr(struct target *target, uint32_t xpsr, int spsr)
static void fa526_read_xpsr(struct target *target, uint32_t *xpsr, int spsr)
static void fa526_write_pc(struct target *target, uint32_t pc)
static void fa526_branch_resume_thumb(struct target *target)
static void fa526_change_to_arm(struct target *target, uint32_t *r0, uint32_t *pc)
static void fa526_deinit_target(struct target *target)
static void fa526_read_core_regs(struct target *target, uint32_t mask, uint32_t *core_regs[16])
static int fa526_init_arch_info(struct target *target, struct arm920t_common *arm920t, struct jtag_tap *tap)
static int fa526_init_arch_info_2(struct target *target, struct arm7_9_common *arm7_9, struct jtag_tap *tap)
static void fa526_read_core_regs_target_buffer(struct target *target, uint32_t mask, void *buffer, int size)
static void fa526_write_core_regs(struct target *target, uint32_t mask, uint32_t core_regs[16])
static void fa526_write_xpsr_im8(struct target *target, uint8_t xpsr_im, int rot, int spsr)
static int fa526_target_create(struct target *target, Jim_Interp *interp)
struct target_type fa526_target
Holds methods for FA526 targets.
#define LOG_ERROR(expr ...)
#define LOG_DEBUG(expr ...)
size_t size
Size of the control block search area.
Structure for items that are common between both ARM7 and ARM9 targets.
void(* enable_single_step)(struct target *target, uint32_t next_pc)
bool has_vector_catch
Specifies if the target has a reset vector catch.
void(* read_xpsr)(struct target *target, uint32_t *xpsr, int spsr)
Function for reading CPSR or SPSR.
void(* store_hword_reg)(struct target *target, int num)
void(* write_xpsr_im8)(struct target *target, uint8_t xpsr_im, int rot, int spsr)
Function for writing an immediate value to CPSR or SPSR.
void(* write_core_regs)(struct target *target, uint32_t mask, uint32_t core_regs[16])
uint32_t arm_bkpt
ARM breakpoint instruction.
bool use_dbgrq
Specifies if DBGRQ should be used to halt the target.
int(* bulk_write_memory)(struct target *target, target_addr_t address, uint32_t count, const uint8_t *buffer)
Write target memory in multiples of 4 bytes, optimized for writing large quantities of data.
void(* branch_resume)(struct target *target)
int(* write_memory)(struct target *target, target_addr_t address, uint32_t size, uint32_t count, const uint8_t *buffer)
Variant specific memory write function that does not dispatch to bulk_write_memory.
struct arm_jtag jtag_info
JTAG information for target.
void(* read_core_regs_target_buffer)(struct target *target, uint32_t mask, void *buffer, int size)
void(* store_byte_reg)(struct target *target, int num)
int(* post_debug_entry)(struct target *target)
Callback function called after entering debug mode.
void(* load_word_regs)(struct target *target, uint32_t mask)
void(* load_byte_reg)(struct target *target, int num)
void(* read_core_regs)(struct target *target, uint32_t mask, uint32_t *core_regs[16])
Function for reading the core registers.
void(* load_hword_reg)(struct target *target, int num)
void(* disable_single_step)(struct target *target)
void(* write_pc)(struct target *target, uint32_t pc)
Function for writing to the program counter.
uint16_t thumb_bkpt
Thumb breakpoint instruction.
void(* store_word_regs)(struct target *target, uint32_t mask)
void(* pre_restore_context)(struct target *target)
Callback function called before restoring the processor context.
int dbgreq_adjust_pc
Amount of PC adjustment caused by a DBGREQ.
int(* examine_debug_reason)(struct target *target)
Function for determining why debug state was entered.
void(* branch_resume_thumb)(struct target *target)
void(* change_to_arm)(struct target *target, uint32_t *r0, uint32_t *pc)
Function for changing from Thumb to ARM mode.
void(* write_xpsr)(struct target *target, uint32_t xpsr, int spsr)
Function for writing to CPSR or SPSR.
unsigned int common_magic
struct arm7_9_common arm7_9_common
struct armv4_5_mmu_common armv4_5_mmu
Represents a generic ARM core, with standard application registers.
int(* write_memory)(struct target *target, target_addr_t address, uint32_t size, uint32_t count, const uint8_t *buffer)
int(* read_memory)(struct target *target, target_addr_t address, uint32_t size, uint32_t count, uint8_t *buffer)
int(* get_ttb)(struct target *target, uint32_t *result)
int(* enable_mmu_caches)(struct target *target, int mmu, int d_u_cache, int i_cache)
int(* disable_mmu_caches)(struct target *target, int mmu, int d_u_cache, int i_cache)
struct armv4_5_cache_common armv4_5_cache
This holds methods shared between all instances of a given target type.
const char * name
Name of this type of target.
enum target_endianness endianness