OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | arm9tdmi_vector |
Enumerations | |
enum | arm9tdmi_vector_bit { ARM9TDMI_RESET_VECTOR = 0x01 , ARM9TDMI_UNDEF_VECTOR = 0x02 , ARM9TDMI_SWI_VECTOR = 0x04 , ARM9TDMI_PABT_VECTOR = 0x08 , ARM9TDMI_DABT_VECTOR = 0x10 , ARM9TDMI_IRQ_VECTOR = 0x40 , ARM9TDMI_FIQ_VECTOR = 0x80 } |
Functions | |
void | arm9tdmi_branch_resume (struct target *target) |
static void | arm9tdmi_branch_resume_thumb (struct target *target) |
static void | arm9tdmi_build_reg_cache (struct target *target) |
static void | arm9tdmi_change_to_arm (struct target *target, uint32_t *r0, uint32_t *pc) |
int | arm9tdmi_clock_data_in (struct arm_jtag *jtag_info, uint32_t *in) |
int | arm9tdmi_clock_data_in_endianness (struct arm_jtag *jtag_info, void *in, int size, int be) |
int | arm9tdmi_clock_out (struct arm_jtag *jtag_info, uint32_t instr, uint32_t out, uint32_t *in, int sysspeed) |
void | arm9tdmi_deinit_target (struct target *target) |
void | arm9tdmi_disable_single_step (struct target *target) |
void | arm9tdmi_enable_single_step (struct target *target, uint32_t next_pc) |
int | arm9tdmi_examine_debug_reason (struct target *target) |
int | arm9tdmi_init_arch_info (struct target *target, struct arm7_9_common *arm7_9, struct jtag_tap *tap) |
int | arm9tdmi_init_target (struct command_context *cmd_ctx, struct target *target) |
void | arm9tdmi_load_byte_reg (struct target *target, int num) |
void | arm9tdmi_load_hword_reg (struct target *target, int num) |
void | arm9tdmi_load_word_regs (struct target *target, uint32_t mask) |
void | arm9tdmi_read_core_regs (struct target *target, uint32_t mask, uint32_t *core_regs[16]) |
static void | arm9tdmi_read_core_regs_target_buffer (struct target *target, uint32_t mask, void *buffer, int size) |
static void | arm9tdmi_read_xpsr (struct target *target, uint32_t *xpsr, int spsr) |
void | arm9tdmi_store_byte_reg (struct target *target, int num) |
void | arm9tdmi_store_hword_reg (struct target *target, int num) |
void | arm9tdmi_store_word_regs (struct target *target, uint32_t mask) |
static int | arm9tdmi_target_create (struct target *target, Jim_Interp *interp) |
void | arm9tdmi_write_core_regs (struct target *target, uint32_t mask, uint32_t core_regs[16]) |
static void | arm9tdmi_write_pc (struct target *target, uint32_t pc) |
static void | arm9tdmi_write_xpsr (struct target *target, uint32_t xpsr, int spsr) |
static void | arm9tdmi_write_xpsr_im8 (struct target *target, uint8_t xpsr_im, int rot, int spsr) |
COMMAND_HANDLER (handle_arm9tdmi_catch_vectors_command) | |
Variables | |
const struct command_registration | arm9tdmi_command_handlers [] |
static const struct command_registration | arm9tdmi_exec_command_handlers [] |
struct target_type | arm9tdmi_target |
Holds methods for ARM9TDMI targets. More... | |
static const struct arm9tdmi_vector | arm9tdmi_vectors [] |
enum arm9tdmi_vector_bit |
Enumerator | |
---|---|
ARM9TDMI_RESET_VECTOR | |
ARM9TDMI_UNDEF_VECTOR | |
ARM9TDMI_SWI_VECTOR | |
ARM9TDMI_PABT_VECTOR | |
ARM9TDMI_DABT_VECTOR | |
ARM9TDMI_IRQ_VECTOR | |
ARM9TDMI_FIQ_VECTOR |
Definition at line 38 of file arm9tdmi.c.
void arm9tdmi_branch_resume | ( | struct target * | target | ) |
Definition at line 603 of file arm9tdmi.c.
References arm9tdmi_clock_out(), ARMV4_5_B, ARMV4_5_NOP, arm7_9_common::jtag_info, NULL, and target_to_arm7_9().
Referenced by arm9tdmi_init_arch_info(), and fa526_init_arch_info_2().
|
static |
Definition at line 612 of file arm9tdmi.c.
References arm7_9_common::arm, arm9tdmi_clock_out(), ARMV4_5_BX, ARMV4_5_LDMIA, ARMV4_5_NOP, ARMV4_5_T_B, ARMV4_5_T_LDR_PCREL, ARMV4_5_T_NOP, buf_get_u32(), arm::core_cache, arm7_9_common::eice_cache, EICE_DBG_STAT, embeddedice_read_reg(), arm7_9_common::jtag_info, LOG_DEBUG, NULL, arm::pc, reg_cache::reg_list, target_to_arm7_9(), and reg::value.
Referenced by arm9tdmi_init_arch_info().
|
static |
Definition at line 695 of file arm9tdmi.c.
References arm_build_reg_cache(), target::reg_cache, register_get_last_cache_p(), and target_to_arm().
Referenced by arm9tdmi_init_target().
|
static |
Definition at line 299 of file arm9tdmi.c.
References arm9tdmi_clock_out(), ARMV4_5_T_BX, ARMV4_5_T_LDR_PCREL, ARMV4_5_T_MOV, ARMV4_5_T_NOP, ARMV4_5_T_STR, ERROR_OK, jtag_execute_queue(), arm7_9_common::jtag_info, NULL, and target_to_arm7_9().
Referenced by arm9tdmi_init_arch_info().
int arm9tdmi_clock_data_in | ( | struct arm_jtag * | jtag_info, |
uint32_t * | in | ||
) |
Definition at line 188 of file arm9tdmi.c.
References arm_jtag_scann(), arm_jtag_set_instr(), arm_le_to_h_u32(), ERROR_OK, scan_field::in_value, arm_jtag::intest_instr, jtag_add_callback(), jtag_add_dr_scan(), jtag_add_runtest(), jtag_execute_queue(), LOG_DEBUG, LOG_ERROR, NULL, scan_field::num_bits, scan_field::out_value, arm_jtag::tap, and TAP_DRPAUSE.
Referenced by arm9tdmi_read_core_regs(), fa526_read_core_regs(), and feroceon_read_core_regs().
int arm9tdmi_clock_data_in_endianness | ( | struct arm_jtag * | jtag_info, |
void * | in, | ||
int | size, | ||
int | be | ||
) |
Definition at line 239 of file arm9tdmi.c.
References arm7_9_endianness_callback(), arm_jtag_scann(), arm_jtag_set_instr(), ERROR_OK, scan_field::in_value, arm_jtag::intest_instr, jtag_add_callback4(), jtag_add_dr_scan(), jtag_add_runtest(), jtag_execute_queue(), LOG_DEBUG, LOG_ERROR, NULL, scan_field::num_bits, scan_field::out_value, size, arm_jtag::tap, and TAP_DRPAUSE.
Referenced by arm9tdmi_read_core_regs_target_buffer(), fa526_read_core_regs_target_buffer(), and feroceon_read_core_regs_target_buffer().
int arm9tdmi_clock_out | ( | struct arm_jtag * | jtag_info, |
uint32_t | instr, | ||
uint32_t | out, | ||
uint32_t * | in, | ||
int | sysspeed | ||
) |
Definition at line 124 of file arm9tdmi.c.
References arm_jtag_scann(), arm_jtag_set_instr(), arm_le_to_h_u32(), buf_set_u32(), ERROR_OK, flip_u32(), scan_field::in_value, arm_jtag::intest_instr, jtag_add_callback(), jtag_add_dr_scan(), jtag_add_runtest(), jtag_execute_queue(), LOG_DEBUG, NULL, scan_field::num_bits, scan_field::out_value, arm_jtag::tap, and TAP_DRPAUSE.
Referenced by arm920t_execute_cp15(), arm9tdmi_branch_resume(), arm9tdmi_branch_resume_thumb(), arm9tdmi_change_to_arm(), arm9tdmi_load_byte_reg(), arm9tdmi_load_hword_reg(), arm9tdmi_load_word_regs(), arm9tdmi_read_core_regs(), arm9tdmi_read_core_regs_target_buffer(), arm9tdmi_read_xpsr(), arm9tdmi_store_byte_reg(), arm9tdmi_store_hword_reg(), arm9tdmi_store_word_regs(), arm9tdmi_write_core_regs(), arm9tdmi_write_pc(), arm9tdmi_write_xpsr(), arm9tdmi_write_xpsr_im8(), fa526_read_core_regs(), fa526_read_core_regs_target_buffer(), fa526_read_xpsr(), fa526_write_core_regs(), fa526_write_pc(), fa526_write_xpsr(), fa526_write_xpsr_im8(), feroceon_branch_resume(), feroceon_branch_resume_thumb(), feroceon_change_to_arm(), feroceon_read_core_regs(), feroceon_read_core_regs_target_buffer(), feroceon_read_cp15(), feroceon_read_xpsr(), feroceon_write_core_regs(), feroceon_write_cp15(), feroceon_write_xpsr(), and feroceon_write_xpsr_im8().
void arm9tdmi_deinit_target | ( | struct target * | target | ) |
Definition at line 778 of file arm9tdmi.c.
References arm7_9_deinit(), arm_free_reg_cache(), target_to_arm(), and target_to_arm7_9().
Referenced by feroceon_deinit_target().
void arm9tdmi_disable_single_step | ( | struct target * | target | ) |
Definition at line 684 of file arm9tdmi.c.
References arm7_9_disable_eice_step(), buf_set_u32(), arm7_9_common::eice_cache, EICE_DBG_CTRL, embeddedice_store_reg(), arm7_9_common::has_single_step, reg_cache::reg_list, target_to_arm7_9(), and reg::value.
Referenced by arm9tdmi_init_arch_info(), and fa526_init_arch_info_2().
void arm9tdmi_enable_single_step | ( | struct target * | target, |
uint32_t | next_pc | ||
) |
Definition at line 673 of file arm9tdmi.c.
References arm7_9_enable_eice_step(), buf_set_u32(), arm7_9_common::eice_cache, EICE_DBG_CTRL, embeddedice_store_reg(), arm7_9_common::has_single_step, reg_cache::reg_list, target_to_arm7_9(), and reg::value.
Referenced by arm9tdmi_init_arch_info(), and fa526_init_arch_info_2().
int arm9tdmi_examine_debug_reason | ( | struct target * | target | ) |
Definition at line 63 of file arm9tdmi.c.
References arm_jtag_scann(), arm_jtag_set_instr(), DBG_REASON_BREAKPOINT, DBG_REASON_DBGRQ, DBG_REASON_SINGLESTEP, DBG_REASON_WATCHPOINT, DBG_REASON_WPTANDBKPT, target::debug_reason, ERROR_OK, scan_field::in_value, arm_jtag::intest_instr, jtag_add_dr_scan(), jtag_execute_queue(), arm7_9_common::jtag_info, NULL, scan_field::num_bits, scan_field::out_value, arm_jtag::tap, TAP_DRPAUSE, and target_to_arm7_9().
Referenced by arm9tdmi_init_arch_info(), and fa526_init_arch_info_2().
int arm9tdmi_init_arch_info | ( | struct target * | target, |
struct arm7_9_common * | arm7_9, | ||
struct jtag_tap * | tap | ||
) |
Definition at line 711 of file arm9tdmi.c.
References arm7_9_bulk_write_memory(), arm7_9_init_arch_info(), arm7_9_write_memory(), arm9tdmi_branch_resume(), arm9tdmi_branch_resume_thumb(), arm9tdmi_change_to_arm(), arm9tdmi_disable_single_step(), arm9tdmi_enable_single_step(), arm9tdmi_examine_debug_reason(), arm9tdmi_load_byte_reg(), arm9tdmi_load_hword_reg(), arm9tdmi_load_word_regs(), arm9tdmi_read_core_regs(), arm9tdmi_read_core_regs_target_buffer(), arm9tdmi_read_xpsr(), arm9tdmi_store_byte_reg(), arm9tdmi_store_hword_reg(), arm9tdmi_store_word_regs(), arm9tdmi_write_core_regs(), arm9tdmi_write_pc(), arm9tdmi_write_xpsr(), arm9tdmi_write_xpsr_im8(), arm7_9_common::arm_bkpt, arm7_9_common::branch_resume, arm7_9_common::branch_resume_thumb, arm7_9_common::bulk_write_memory, arm7_9_common::change_to_arm, arm7_9_common::dbgreq_adjust_pc, arm7_9_common::disable_single_step, arm7_9_common::enable_single_step, ERROR_OK, arm7_9_common::examine_debug_reason, arm7_9_common::has_vector_catch, arm7_9_common::jtag_info, arm7_9_common::load_byte_reg, arm7_9_common::load_hword_reg, arm7_9_common::load_word_regs, NULL, arm7_9_common::post_debug_entry, arm7_9_common::pre_restore_context, arm7_9_common::read_core_regs, arm7_9_common::read_core_regs_target_buffer, arm7_9_common::read_xpsr, arm_jtag::scann_size, arm7_9_common::store_byte_reg, arm7_9_common::store_hword_reg, arm7_9_common::store_word_regs, arm_jtag::tap, arm7_9_common::thumb_bkpt, arm7_9_common::use_dbgrq, arm7_9_common::write_core_regs, arm7_9_common::write_memory, arm7_9_common::write_pc, arm7_9_common::write_xpsr, and arm7_9_common::write_xpsr_im8.
Referenced by arm920t_init_arch_info(), arm926ejs_init_arch_info(), arm946e_init_arch_info(), arm966e_init_arch_info(), and arm9tdmi_target_create().
int arm9tdmi_init_target | ( | struct command_context * | cmd_ctx, |
struct target * | target | ||
) |
Definition at line 703 of file arm9tdmi.c.
References arm9tdmi_build_reg_cache(), arm_semihosting_init(), and ERROR_OK.
Referenced by feroceon_init_target().
void arm9tdmi_load_byte_reg | ( | struct target * | target, |
int | num | ||
) |
Definition at line 539 of file arm9tdmi.c.
References arm9tdmi_clock_out(), ARMV4_5_LDRB_IP, ARMV4_5_NOP, arm7_9_common::jtag_info, NULL, and target_to_arm7_9().
Referenced by arm9tdmi_init_arch_info(), and fa526_init_arch_info_2().
void arm9tdmi_load_hword_reg | ( | struct target * | target, |
int | num | ||
) |
Definition at line 529 of file arm9tdmi.c.
References arm9tdmi_clock_out(), ARMV4_5_LDRH_IP, ARMV4_5_NOP, arm7_9_common::jtag_info, NULL, and target_to_arm7_9().
Referenced by arm9tdmi_init_arch_info(), and fa526_init_arch_info_2().
void arm9tdmi_load_word_regs | ( | struct target * | target, |
uint32_t | mask | ||
) |
Definition at line 519 of file arm9tdmi.c.
References arm9tdmi_clock_out(), ARMV4_5_LDMIA, ARMV4_5_NOP, arm7_9_common::jtag_info, mask, NULL, and target_to_arm7_9().
Referenced by arm9tdmi_init_arch_info(), and fa526_init_arch_info_2().
void arm9tdmi_read_core_regs | ( | struct target * | target, |
uint32_t | mask, | ||
uint32_t * | core_regs[16] | ||
) |
Definition at line 352 of file arm9tdmi.c.
References arm9tdmi_clock_data_in(), arm9tdmi_clock_out(), ARMV4_5_NOP, ARMV4_5_STMIA, arm7_9_common::jtag_info, mask, NULL, and target_to_arm7_9().
Referenced by arm920t_read_cp15_interpreted(), arm9tdmi_init_arch_info(), and COMMAND_HANDLER().
|
static |
Definition at line 376 of file arm9tdmi.c.
References arm9tdmi_clock_data_in_endianness(), arm9tdmi_clock_out(), ARMV4_5_NOP, ARMV4_5_STMIA, buffer, target::endianness, arm7_9_common::jtag_info, mask, NULL, size, TARGET_BIG_ENDIAN, and target_to_arm7_9().
Referenced by arm9tdmi_init_arch_info().
|
static |
Definition at line 414 of file arm9tdmi.c.
References arm9tdmi_clock_out(), ARMV4_5_MRS, ARMV4_5_NOP, ARMV4_5_STR, arm7_9_common::jtag_info, NULL, and target_to_arm7_9().
Referenced by arm9tdmi_init_arch_info().
void arm9tdmi_store_byte_reg | ( | struct target * | target, |
int | num | ||
) |
Definition at line 569 of file arm9tdmi.c.
References arm9tdmi_clock_out(), ARMV4_5_NOP, ARMV4_5_STRB_IP, arm7_9_common::jtag_info, NULL, and target_to_arm7_9().
Referenced by arm9tdmi_init_arch_info(), and fa526_init_arch_info_2().
void arm9tdmi_store_hword_reg | ( | struct target * | target, |
int | num | ||
) |
Definition at line 559 of file arm9tdmi.c.
References arm9tdmi_clock_out(), ARMV4_5_NOP, ARMV4_5_STRH_IP, arm7_9_common::jtag_info, NULL, and target_to_arm7_9().
Referenced by arm9tdmi_init_arch_info(), and fa526_init_arch_info_2().
void arm9tdmi_store_word_regs | ( | struct target * | target, |
uint32_t | mask | ||
) |
Definition at line 549 of file arm9tdmi.c.
References arm9tdmi_clock_out(), ARMV4_5_NOP, ARMV4_5_STMIA, arm7_9_common::jtag_info, mask, NULL, and target_to_arm7_9().
Referenced by arm9tdmi_init_arch_info(), and fa526_init_arch_info_2().
|
static |
Definition at line 768 of file arm9tdmi.c.
References arm::arch, arm7_9_common::arm, arm9tdmi_init_arch_info(), ARM_ARCH_V4, ERROR_OK, and target::tap.
void arm9tdmi_write_core_regs | ( | struct target * | target, |
uint32_t | mask, | ||
uint32_t | core_regs[16] | ||
) |
Definition at line 494 of file arm9tdmi.c.
References arm9tdmi_clock_out(), ARMV4_5_LDMIA, ARMV4_5_NOP, arm7_9_common::jtag_info, mask, NULL, and target_to_arm7_9().
Referenced by arm920t_read_cp15_interpreted(), arm920t_write_cp15_interpreted(), arm9tdmi_init_arch_info(), and COMMAND_HANDLER().
|
static |
Definition at line 579 of file arm9tdmi.c.
References arm9tdmi_clock_out(), ARMV4_5_LDMIA, ARMV4_5_NOP, arm7_9_common::jtag_info, NULL, and target_to_arm7_9().
Referenced by arm9tdmi_init_arch_info().
|
static |
Definition at line 436 of file arm9tdmi.c.
References arm9tdmi_clock_out(), ARMV4_5_MSR_IM, ARMV4_5_NOP, arm7_9_common::jtag_info, LOG_DEBUG, NULL, and target_to_arm7_9().
Referenced by arm9tdmi_init_arch_info().
|
static |
Definition at line 470 of file arm9tdmi.c.
References arm9tdmi_clock_out(), ARMV4_5_MSR_IM, ARMV4_5_NOP, arm7_9_common::jtag_info, LOG_DEBUG, NULL, and target_to_arm7_9().
Referenced by arm9tdmi_init_arch_info().
COMMAND_HANDLER | ( | handle_arm9tdmi_catch_vectors_command | ) |
Definition at line 788 of file arm9tdmi.c.
const struct command_registration arm9tdmi_command_handlers[] |
Definition at line 788 of file arm9tdmi.c.
|
static |
Definition at line 788 of file arm9tdmi.c.
struct target_type arm9tdmi_target |
Holds methods for ARM9TDMI targets.
Definition at line 788 of file arm9tdmi.c.
|
static |