OpenOCD
|
Go to the source code of this file.
Macros | |
#define | ARM11_BOOL_WRAPPER(name, print_name) |
Functions | |
static int | arm11_add_breakpoint (struct target *target, struct breakpoint *breakpoint) |
static int | arm11_arch_state (struct target *target) |
static int | arm11_assert_reset (struct target *target) |
static int | arm11_check_init (struct arm11_common *arm11) |
Check and if necessary take control of the system. More... | |
static int | arm11_deassert_reset (struct target *target) |
static int | arm11_debug_entry (struct arm11_common *arm11) |
Save processor state. More... | |
static void | arm11_deinit_target (struct target *target) |
static int | arm11_examine (struct target *target) |
static int | arm11_halt (struct target *target) |
static int | arm11_init_target (struct command_context *cmd_ctx, struct target *target) |
static int | arm11_leave_debug_state (struct arm11_common *arm11, bool bpwp) |
Restore processor state. More... | |
static uint32_t | arm11_nextpc (struct arm11_common *arm11, int current, uint32_t address) |
static int | arm11_poll (struct target *target) |
static int | arm11_read_memory (struct target *target, target_addr_t address, uint32_t size, uint32_t count, uint8_t *buffer) |
static int | arm11_read_memory_inner (struct target *target, uint32_t address, uint32_t size, uint32_t count, uint8_t *buffer, bool arm11_config_memrw_no_increment) |
static int | arm11_remove_breakpoint (struct target *target, struct breakpoint *breakpoint) |
static int | arm11_resume (struct target *target, int current, target_addr_t address, int handle_breakpoints, int debug_execution) |
static int | arm11_step (struct target *target, int current, target_addr_t address, int handle_breakpoints) |
static int | arm11_target_create (struct target *target, Jim_Interp *interp) |
static int | arm11_write_memory (struct target *target, target_addr_t address, uint32_t size, uint32_t count, const uint8_t *buffer) |
static int | arm11_write_memory_inner (struct target *target, uint32_t address, uint32_t size, uint32_t count, const uint8_t *buffer, bool no_increment) |
COMMAND_HANDLER (arm11_handle_vcr) | |
Variables | |
static const struct command_registration | arm11_any_command_handlers [] |
static const struct command_registration | arm11_command_handlers [] |
static const struct command_registration | arm11_mw_command_handlers [] |
struct target_type | arm11_target |
Holds methods for ARM11xx targets. More... | |
#define ARM11_BOOL_WRAPPER | ( | name, | |
print_name | |||
) |
|
static |
Definition at line 1047 of file arm11.c.
References BKPT_SOFT, ERROR_OK, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, arm11_common::free_brps, breakpoint::length, LOG_DEBUG, LOG_INFO, target_to_arm11(), and breakpoint::type.
|
static |
Definition at line 337 of file arm11.c.
References arm_arch_state(), DBG_REASON_WATCHPOINT, target::debug_reason, arm11_common::dpm, LOG_USER, TARGET_ADDR_FMT, target_to_arm11(), and arm_dpm::wp_addr.
|
static |
Definition at line 701 of file arm11.c.
References arm11_common::arm, arm11_sc7_set_vcr(), CHECK_RETVAL, arm::core_cache, ERROR_FAIL, ERROR_OK, ERROR_TARGET_NOT_EXAMINED, jtag_add_reset(), jtag_get_reset_config(), LOG_ERROR, LOG_WARNING, register_cache_invalidate(), target::reset_halt, RESET_HAS_SRST, target::state, TARGET_EVENT_RESET_ASSERT, target_handle_event(), target_has_event_action(), target_name(), TARGET_RESET, target_to_arm11(), target_was_examined(), and arm11_common::vcr.
|
static |
Check and if necessary take control of the system.
arm11 | Target state variable. |
Definition at line 41 of file arm11.c.
References arm11_common::arm, arm11_read_dscr(), arm11_sc7_clear_vbw(), arm11_write_dscr(), arm_dpm_report_dscr(), CHECK_RETVAL, DBG_REASON_NOTHALTED, target::debug_reason, arm::dpm, arm11_common::dscr, DSCR_CORE_HALTED, DSCR_HALT_DBG_MODE, ERROR_OK, LOG_DEBUG, arm11_common::simulate_reset_on_next_halt, target::state, arm::target, TARGET_HALTED, and TARGET_RUNNING.
Referenced by arm11_examine(), and arm11_poll().
|
static |
Definition at line 750 of file arm11.c.
References arm11_poll(), arm11_sc7_set_vcr(), CHECK_RETVAL, ERROR_OK, jtag_add_reset(), jtag_add_tlr(), LOG_WARNING, target::reset_halt, target::state, target_halt(), TARGET_HALTED, target_name(), target_to_arm11(), and arm11_common::vcr.
|
static |
Save processor state.
This is called after a HALT instruction succeeds, and on other occasions the processor enters debug mode (breakpoint, watchpoint, etc). Caller has updated arm11->dscr.
Definition at line 81 of file arm11.c.
References arm11_common::arm, arm11_add_debug_scan_n(), arm11_add_dr_scan_vc(), arm11_add_ir(), ARM11_INTEST, arm11_read_dscr(), arm11_run_instr_data_finish(), arm11_run_instr_data_from_core_via_r0(), arm11_run_instr_data_prepare(), arm11_run_instr_data_to_core_via_r0(), arm11_run_instr_no_data1(), arm11_setup_field(), ARM11_TAP_DEFAULT, arm11_write_dscr(), arm_dpm_read_current_registers(), arm_dpm_report_dscr(), arm_dpm_report_wfar(), ARMV4_5_MRC, ARRAY_SIZE, CHECK_RETVAL, arm::core_cache, DBG_REASON_WATCHPOINT, target::debug_reason, arm::dpm, arm11_common::dpm, arm11_common::dscr, DSCR_DTR_RX_FULL, DSCR_DTR_TX_FULL, DSCR_ITR_EN, ERROR_OK, arm11_common::is_rdtr_saved, arm11_common::is_wdtr_saved, LOG_DEBUG, LOG_ERROR, NULL, register_cache_invalidate(), arm11_common::saved_rdtr, arm11_common::saved_wdtr, arm11_common::simulate_reset_on_next_halt, target::state, target::tap, TAP_DRPAUSE, arm::target, and TARGET_HALTED.
Referenced by arm11_halt(), arm11_poll(), and arm11_step().
|
static |
Definition at line 1122 of file arm11.c.
References arm11_dpm_deinit(), and target_to_arm11().
|
static |
Definition at line 1131 of file arm11.c.
References arm11_common::arm, arm11_add_debug_scan_n(), arm11_add_dr_scan_vc(), arm11_add_ir(), arm11_check_init(), ARM11_DEBUG_V6, ARM11_DEBUG_V61, arm11_dpm_init(), ARM11_IDCODE, ARM11_INTEST, arm11_setup_field(), ARM11_TAP_DEFAULT, ARM_CORE_TYPE_SEC_EXT, ARRAY_SIZE, arm11_common::brp, CHECK_RETVAL, arm::core_type, ERROR_FAIL, ERROR_OK, arm::etm, etm_build_reg_cache(), etm_setup(), arm11_common::free_brps, jtag_execute_queue(), arm11_common::jtag_info, LOG_DEBUG, LOG_ERROR, LOG_INFO, NULL, target::reg_cache, register_get_last_cache_p(), target::tap, TAP_DRPAUSE, TAP_IDLE, arm::target, target_set_examined(), target_to_arm11(), target_was_examined(), and type.
|
static |
Definition at line 353 of file arm11.c.
References arm11_add_ir(), arm11_debug_entry(), ARM11_HALT, arm11_read_dscr(), CHECK_RETVAL, arm11_common::dscr, DSCR_CORE_HALTED, ERROR_FAIL, ERROR_OK, jtag_execute_queue(), LOG_DEBUG, LOG_WARNING, arm11_common::simulate_reset_on_next_halt, target::state, TAP_IDLE, target_call_event_callbacks(), TARGET_DEBUG_RUNNING, TARGET_EVENT_DEBUG_HALTED, TARGET_EVENT_HALTED, TARGET_HALTED, target_state_name(), target_to_arm11(), TARGET_UNKNOWN, and timeval_ms().
|
static |
|
static |
Restore processor state.
This is called in preparation for the RESTART function.
Definition at line 216 of file arm11.c.
References arm11_common::arm, arm11_add_debug_scan_n(), arm11_add_dr_scan_vc(), arm11_add_ir(), arm11_bpwp_flush(), ARM11_EXTEST, arm11_read_dscr(), arm11_run_instr_data_finish(), arm11_run_instr_data_prepare(), arm11_run_instr_data_to_core_via_r0(), arm11_setup_field(), ARM11_TAP_DEFAULT, arm11_write_dscr(), arm_dpm_write_dirty_registers(), ARRAY_SIZE, CHECK_RETVAL, arm::core_cache, arm11_common::dpm, arm11_common::dscr, DSCR_DTR_RX_FULL, DSCR_DTR_TX_FULL, ERROR_FAIL, ERROR_OK, arm11_common::is_rdtr_saved, arm11_common::is_wdtr_saved, LOG_ERROR, NULL, register_cache_invalidate(), arm11_common::saved_rdtr, arm11_common::saved_wdtr, target::tap, TAP_DRPAUSE, and arm::target.
Referenced by arm11_resume(), and arm11_step().
|
static |
Definition at line 405 of file arm11.c.
References arm11_common::arm, ARM_STATE_ARM, ARM_STATE_THUMB, buf_get_u32(), buf_set_u32(), arm::core_state, reg::dirty, arm::pc, reg::valid, and reg::value.
Referenced by arm11_resume(), and arm11_step().
|
static |
Definition at line 305 of file arm11.c.
References arm11_check_init(), arm11_debug_entry(), CHECK_RETVAL, DBG_REASON_NOTHALTED, target::debug_reason, arm11_common::dscr, DSCR_CORE_HALTED, ERROR_OK, LOG_DEBUG, target::state, target_call_event_callbacks(), TARGET_DEBUG_RUNNING, TARGET_EVENT_DEBUG_HALTED, TARGET_EVENT_HALTED, TARGET_HALTED, TARGET_RUNNING, and target_to_arm11().
Referenced by arm11_deassert_reset().
|
static |
|
static |
Definition at line 792 of file arm11.c.
References arm11_common::arm, arm11_run_instr_data_finish(), arm11_run_instr_data_from_core(), arm11_run_instr_data_prepare(), arm11_run_instr_data_to_core1(), arm11_run_instr_no_data1(), buffer, CHECK_RETVAL, arm::core_cache, count, reg::dirty, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_DEBUG, LOG_WARNING, reg_cache::reg_list, size, target::state, TARGET_HALTED, and target_to_arm11().
Referenced by arm11_read_memory().
|
static |
Definition at line 1074 of file arm11.c.
References ERROR_OK, arm11_common::free_brps, and target_to_arm11().
|
static |
Definition at line 439 of file arm11.c.
References arm11_sc7_action::address, breakpoint::address, arm11_add_ir(), arm11_leave_debug_state(), arm11_nextpc(), arm11_read_dscr(), ARM11_RESTART, ARM11_SC7_BCR0, ARM11_SC7_BVR0, arm11_sc7_clear_vbw(), arm11_sc7_run(), arm11_sc7_set_vcr(), arm11_step(), ARRAY_SIZE, target::breakpoints, CHECK_RETVAL, DBG_REASON_NOTHALTED, target::debug_reason, arm11_common::dscr, DSCR_CORE_RESTARTED, ERROR_FAIL, ERROR_OK, ERROR_TARGET_NOT_HALTED, jtag_execute_queue(), LOG_DEBUG, LOG_ERROR, LOG_WARNING, breakpoint::next, target::state, TAP_IDLE, target_call_event_callbacks(), TARGET_DEBUG_RUNNING, TARGET_EVENT_RESUMED, target_free_all_working_areas(), TARGET_HALTED, TARGET_PRIxADDR, TARGET_RUNNING, target_state_name(), target_to_arm11(), timeval_ms(), arm11_sc7_action::value, arm11_common::vcr, and arm11_sc7_action::write.
|
static |
Definition at line 547 of file arm11.c.
References arm11_sc7_action::address, arm11_add_ir(), arm11_debug_entry(), arm11_leave_debug_state(), arm11_nextpc(), arm11_read_dscr(), arm11_read_memory_word(), ARM11_RESTART, ARM11_SC7_BCR0, ARM11_SC7_BVR0, arm11_sc7_clear_vbw(), arm11_sc7_run(), arm_simulate_step(), ARRAY_SIZE, CHECK_RETVAL, DBG_REASON_SINGLESTEP, target::debug_reason, arm11_common::dscr, DSCR_CORE_HALTED, DSCR_CORE_RESTARTED, DSCR_INT_DIS, ERROR_FAIL, ERROR_OK, ERROR_TARGET_NOT_HALTED, arm11_common::hardware_step, jtag_execute_queue(), LOG_DEBUG, LOG_WARNING, mask, target::state, arm11_common::step_irq_enable, TAP_IDLE, target_call_event_callbacks(), TARGET_EVENT_HALTED, TARGET_HALTED, TARGET_PRIxADDR, target_state_name(), target_to_arm11(), timeval_ms(), arm11_sc7_action::value, and arm11_sc7_action::write.
Referenced by arm11_resume().
|
static |
Definition at line 1084 of file arm11.c.
References arm11_common::arm, ARM11_INTEST, ARM11_SCAN_N, ARM_CORE_TYPE_STD, arm_init_arch_info(), arm::core_type, arm_jtag::cur_scan_chain, ERROR_COMMAND_SYNTAX_ERROR, ERROR_FAIL, ERROR_OK, arm_jtag::intest_instr, jtag_tap::ir_length, arm11_common::jtag_info, LOG_ERROR, arm11_common::memwrite_burst, arm11_common::memwrite_error_fatal, arm_jtag::scann_instr, arm_jtag::scann_size, arm_jtag::tap, and target::tap.
|
static |
|
static |
Definition at line 891 of file arm11.c.
References arm11_common::arm, arm11_run_instr_data_finish(), arm11_run_instr_data_from_core(), arm11_run_instr_data_prepare(), arm11_run_instr_data_to_core(), arm11_run_instr_data_to_core1(), arm11_run_instr_data_to_core_noack(), arm11_run_instr_no_data1(), buffer, arm::core_cache, count, reg::dirty, ERROR_FAIL, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_DEBUG, LOG_ERROR, LOG_WARNING, arm11_common::memwrite_burst, arm11_common::memwrite_error_fatal, reg_cache::reg_list, size, target::state, TARGET_HALTED, and target_to_arm11().
Referenced by arm11_write_memory().
|
static |
|
static |
|
static |
struct target_type arm11_target |