OpenOCD
|
Go to the source code of this file.
Variables | |
static const struct command_registration | mips_m4k_command_handlers [] |
static const struct command_registration | mips_m4k_exec_command_handlers [] |
struct target_type | mips_m4k_target |
COMMAND_HANDLER | ( | mips_m4k_handle_cp0_command | ) |
Definition at line 1262 of file mips_m4k.c.
References CMD, CMD_ARGC, CMD_ARGV, CMD_CTX, CMD_NAME, COMMAND_PARSE_NUMBER, command_print(), mips32_common::ejtag_info, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, get_current_target(), mips_m4k_common::mips32, mips32_cp0_read(), mips32_cp0_write(), mips_m4k_verify_pointer(), target::state, TARGET_HALTED, and target_to_m4k().
COMMAND_HANDLER | ( | mips_m4k_handle_scan_delay_command | ) |
Definition at line 1316 of file mips_m4k.c.
References CMD, CMD_ARGC, CMD_ARGV, CMD_CTX, COMMAND_PARSE_NUMBER, command_print(), mips32_common::ejtag_info, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, get_current_target(), mips_m4k_common::mips32, MIPS32_SCAN_DELAY_LEGACY_MODE, mips_ejtag::mode, mips_ejtag::scan_delay, and target_to_m4k().
Definition at line 117 of file mips_m4k.c.
References target::coreid, foreach_smp_target, target::smp_targets, target::state, target, target_list::target, and TARGET_HALTED.
Referenced by mips_m4k_poll().
|
static |
Definition at line 810 of file mips_m4k.c.
References breakpoint::address, BKPT_HARD, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, mips32_common::isa_imp, breakpoint::length, LOG_INFO, MIPS32_ONLY, mips_m4k_set_breakpoint(), mips32_common::num_inst_bpoints_avail, target_to_mips32(), and breakpoint::type.
|
static |
Definition at line 957 of file mips_m4k.c.
References ERROR_OK, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, LOG_INFO, mips_m4k_set_watchpoint(), mips32_common::num_data_bpoints_avail, and target_to_mips32().
|
static |
Definition at line 288 of file mips_m4k.c.
References mips32_common::core_cache, mips_ejtag::ejtag_ctrl, EJTAG_CTRL_PERRST, EJTAG_CTRL_PRRST, mips32_common::ejtag_info, EJTAG_INST_CONTROL, EJTAG_INST_EJTAGBOOT, EJTAG_INST_NORMALBOOT, mips_ejtag::ejtag_version, EJTAG_VERSION_20, ERROR_OK, ERROR_TARGET_NOT_EXAMINED, mips_m4k_common::is_pic32mx, jtag_add_reset(), jtag_add_sleep(), jtag_get_reset_config(), jtag_reset_config, LOG_DEBUG, LOG_WARNING, MCHP_ASERT_RST, MCHP_DE_ASSERT_RST, mips_m4k_common::mips32, mips_ejtag_drscan_32_out(), mips_ejtag_drscan_8_out(), mips_ejtag_set_instr(), MTAP_COMMAND, MTAP_SW_ETAP, MTAP_SW_MTAP, register_cache_invalidate(), target::reset_halt, RESET_HAS_SRST, RESET_SRST_NO_GATING, RESET_SRST_PULLS_TRST, srst_asserted, target::state, TARGET_EVENT_RESET_ASSERT, target_halt(), target_handle_event(), target_has_event_action(), TARGET_RESET, target_state_name(), target_to_m4k(), and target_was_examined().
|
static |
Definition at line 1186 of file mips_m4k.c.
References working_area::address, buffer, count, mips32_common::ejtag_info, ERROR_FAIL, ERROR_OK, ERROR_TARGET_UNALIGNED_ACCESS, mips_ejtag::fast_access_save, mips32_common::fast_data_area, working_area::free, LOG_DEBUG, LOG_ERROR, MIPS32_FASTDATA_HANDLER_SIZE, mips32_pracc_fastdata_xfer(), NULL, working_area::size, TARGET_ADDR_FMT, target_alloc_working_area(), target_buffer_get_u32_array(), and target_to_mips32().
Referenced by mips_m4k_write_memory().
|
static |
Definition at line 368 of file mips_m4k.c.
References ERROR_OK, jtag_add_reset(), LOG_DEBUG, and target_state_name().
|
static |
Definition at line 85 of file mips_m4k.c.
References buf_get_u32(), mips32_common::core_cache, mips32_common::ejtag_info, ERROR_OK, mips32_common::isa_imp, mips32_common::isa_mode, LOG_DEBUG, mips32_configure_break_unit(), MIPS32_ISA_MIPS16E, MIPS32_ISA_MIPS32, MIPS32_ISA_MMIPS32, MIPS32_PC, mips32_read_config_regs(), mips32_save_context(), mips_ejtag_config_step(), mips_m4k_examine_debug_reason(), reg_cache::reg_list, target_state_name(), target_to_mips32(), and reg::value.
Referenced by mips_m4k_poll(), mips_m4k_single_step_core(), and mips_m4k_step().
|
static |
Definition at line 579 of file mips_m4k.c.
References target::breakpoints, breakpoint::is_set, mips_m4k_set_breakpoint(), and breakpoint::next.
Referenced by mips_m4k_internal_restore().
|
static |
Definition at line 991 of file mips_m4k.c.
References watchpoint::is_set, mips_m4k_set_watchpoint(), watchpoint::next, and target::watchpoints.
Referenced by mips_m4k_internal_restore().
|
static |
Definition at line 1158 of file mips_m4k.c.
References mips32_common::ejtag_info, ERROR_OK, mips_ejtag::idcode, mips_m4k_common::is_pic32mx, LOG_DEBUG, LOG_ERROR, mips_m4k_common::mips32, mips32_examine(), mips_ejtag_get_idcode(), mips_ejtag_init(), mips_ejtag_set_instr(), MTAP_SW_ETAP, target_to_m4k(), and target_was_examined().
|
static |
Definition at line 40 of file mips_m4k.c.
References DBG_REASON_BREAKPOINT, DBG_REASON_DBGRQ, DBG_REASON_SINGLESTEP, DBG_REASON_WATCHPOINT, mips_ejtag::debug_caps, target::debug_reason, mips_ejtag::ejtag_dbs_addr, EJTAG_DCR_DB, EJTAG_DCR_IB, mips_ejtag::ejtag_ibs_addr, mips32_common::ejtag_info, ERROR_OK, target_read_u32(), target_to_mips32(), and target_write_u32().
Referenced by mips_m4k_debug_entry().
|
static |
Definition at line 251 of file mips_m4k.c.
References DBG_REASON_DBGRQ, target::debug_reason, mips32_common::ejtag_info, ERROR_OK, ERROR_TARGET_FAILURE, jtag_get_reset_config(), jtag_get_srst(), LOG_DEBUG, LOG_ERROR, LOG_WARNING, mips_ejtag_enter_debug(), RESET_SRST_PULLS_TRST, target::state, TARGET_HALTED, TARGET_RESET, target_state_name(), target_to_mips32(), and TARGET_UNKNOWN.
Referenced by mips_m4k_halt_smp().
|
static |
Definition at line 129 of file mips_m4k.c.
References target::coreid, ERROR_OK, foreach_smp_target, LOG_ERROR, mips_m4k_halt(), target::smp_targets, target::state, target_list::target, and TARGET_HALTED.
Referenced by update_halt_gdb().
|
static |
Definition at line 1135 of file mips_m4k.c.
References mips32_common::arch_info, mips_m4k_common::common_magic, ERROR_OK, mips_m4k_common::mips32, mips32_init_arch_info(), and MIPSM4K_COMMON_MAGIC.
Referenced by mips_m4k_target_create().
|
static |
Definition at line 1127 of file mips_m4k.c.
References ERROR_OK, and mips32_build_reg_cache().
|
static |
Definition at line 420 of file mips_m4k.c.
References breakpoint::address, breakpoint_find(), buf_get_u32(), buf_set_u32(), mips32_common::core_cache, DBG_REASON_NOTHALTED, target::debug_reason, reg::dirty, mips32_common::ejtag_info, ERROR_OK, ERROR_TARGET_NOT_HALTED, mips32_common::isa_imp, mips32_common::isa_mode, LOG_DEBUG, LOG_WARNING, mips32_enable_interrupts(), MIPS32_PC, mips32_restore_context(), mips_ejtag_exit_debug(), mips_m4k_enable_breakpoints(), mips_m4k_enable_watchpoints(), mips_m4k_isa_filter(), mips_m4k_set_breakpoint(), mips_m4k_single_step_core(), mips_m4k_unset_breakpoint(), NULL, reg_cache::reg_list, register_cache_invalidate(), target::state, TARGET_ADDR_FMT, target_call_event_callbacks(), TARGET_DEBUG_RUNNING, TARGET_EVENT_DEBUG_RESUMED, TARGET_EVENT_RESUMED, target_free_all_working_areas(), TARGET_HALTED, TARGET_RUNNING, target_to_mips32(), reg::valid, and reg::value.
Referenced by mips_m4k_restore_smp(), and mips_m4k_resume().
|
static |
Definition at line 159 of file mips_m4k.c.
References gdb_service::core, mips_ejtag::ejtag_ctrl, EJTAG_CTRL_BRKST, EJTAG_CTRL_DBGISA, EJTAG_CTRL_ROCC, mips32_common::ejtag_info, EJTAG_INST_CONTROL, EJTAG_INST_NORMALBOOT, ERROR_OK, target::gdb_service, get_mips_m4k(), mips_ejtag::isa, LOG_DEBUG, mips_ejtag_drscan_32(), mips_ejtag_set_instr(), mips_m4k_debug_entry(), target::smp, target::state, gdb_service::target, target_call_event_callbacks(), TARGET_DEBUG_RUNNING, TARGET_EVENT_DEBUG_HALTED, TARGET_EVENT_HALTED, TARGET_HALTED, TARGET_RESET, TARGET_RUNNING, target_to_mips32(), TARGET_UNKNOWN, and update_halt_gdb().
|
static |
Definition at line 1003 of file mips_m4k.c.
References buffer, count, EJTAG_IMP_NODMA, mips32_common::ejtag_info, ERROR_COMMAND_SYNTAX_ERROR, ERROR_FAIL, ERROR_OK, ERROR_TARGET_NOT_HALTED, ERROR_TARGET_UNALIGNED_ACCESS, mips_ejtag::impcode, LOG_DEBUG, LOG_ERROR, LOG_WARNING, mips32_dmaacc_read_mem(), mips32_pracc_read_mem(), NULL, size, target::state, TARGET_ADDR_FMT, target_buffer_set_u16_array(), target_buffer_set_u32_array(), TARGET_HALTED, and target_to_mips32().
|
static |
Definition at line 832 of file mips_m4k.c.
References BKPT_HARD, ERROR_OK, ERROR_TARGET_NOT_HALTED, breakpoint::is_set, LOG_WARNING, mips_m4k_unset_breakpoint(), mips32_common::num_inst_bpoints_avail, target::state, TARGET_HALTED, target_to_mips32(), and breakpoint::type.
|
static |
Definition at line 972 of file mips_m4k.c.
References ERROR_OK, ERROR_TARGET_NOT_HALTED, watchpoint::is_set, LOG_WARNING, mips_m4k_unset_watchpoint(), mips32_common::num_data_bpoints_avail, target::state, TARGET_HALTED, and target_to_mips32().
|
static |
Definition at line 397 of file mips_m4k.c.
References target::coreid, ERROR_OK, foreach_smp_target, LOG_ERROR, mips_m4k_internal_restore(), target::smp_targets, target::state, target_list::target, and TARGET_RUNNING.
Referenced by mips_m4k_resume().
|
static |
Definition at line 493 of file mips_m4k.c.
References breakpoint::address, gdb_service::core, ERROR_OK, target::gdb_service, mips_m4k_internal_restore(), mips_m4k_restore_smp(), NULL, target::smp, gdb_service::target, target_call_event_callbacks(), and TARGET_EVENT_RESUMED.
|
static |
Definition at line 591 of file mips_m4k.c.
References breakpoint::address, BKPT_HARD, BKPT_SOFT, mips32_comparator::bp_value, breakpoint_hw_set(), mips_ejtag::ejtag_ibc_offs, mips_ejtag::ejtag_ibm_offs, mips32_common::ejtag_info, mips_ejtag::ejtag_version, EJTAG_VERSION_20, mips_ejtag::endianness, ERROR_OK, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, mips32_common::inst_break_list, breakpoint::is_set, breakpoint::length, LOG_DEBUG, LOG_ERROR, LOG_WARNING, MIPS16_SDBBP, MIPS32_SDBBP, mips32_common::num_inst_bpoints, breakpoint::orig_instr, mips32_comparator::reg_address, SWAP16, target_buffer_get_u32(), target_buffer_set_u32(), TARGET_PRIxADDR, target_read_memory(), target_read_u16(), target_read_u32(), target_to_mips32(), target_write_memory(), target_write_u16(), target_write_u32(), breakpoint::type, breakpoint::unique_id, and mips32_comparator::used.
Referenced by mips_m4k_add_breakpoint(), mips_m4k_enable_breakpoints(), mips_m4k_internal_restore(), and mips_m4k_step().
|
static |
Definition at line 852 of file mips_m4k.c.
References watchpoint::address, mips32_comparator::bp_value, mips32_common::data_break_list, mips_ejtag::ejtag_dbasid_offs, mips_ejtag::ejtag_dbc_offs, EJTAG_DBCN_BE, EJTAG_DBCN_BLM_SHIFT, EJTAG_DBCN_NOLB, EJTAG_DBCN_NOSB, mips_ejtag::ejtag_dbm_offs, mips_ejtag::ejtag_dbv_offs, mips32_common::ejtag_info, mips_ejtag::ejtag_version, EJTAG_VERSION_20, ERROR_FAIL, ERROR_OK, ERROR_TARGET_UNALIGNED_ACCESS, watchpoint::is_set, watchpoint::length, LOG_DEBUG, LOG_ERROR, LOG_WARNING, mips32_common::num_data_bpoints, mips32_comparator::reg_address, watchpoint::rw, target_to_mips32(), target_write_u32(), mips32_comparator::used, watchpoint_set(), WPT_ACCESS, WPT_READ, and WPT_WRITE.
Referenced by mips_m4k_add_watchpoint(), and mips_m4k_enable_watchpoints().
|
static |
Definition at line 378 of file mips_m4k.c.
References mips32_common::ejtag_info, ERROR_OK, mips32_enable_interrupts(), mips_ejtag_config_step(), mips_ejtag_exit_debug(), mips_m4k_debug_entry(), and target_to_mips32().
Referenced by mips_m4k_internal_restore().
|
static |
Definition at line 520 of file mips_m4k.c.
References breakpoint::address, breakpoint_find(), buf_get_u32(), buf_set_u32(), mips32_common::core_cache, DBG_REASON_SINGLESTEP, target::debug_reason, reg::dirty, mips32_common::ejtag_info, ERROR_OK, ERROR_TARGET_NOT_HALTED, mips32_common::isa_imp, LOG_DEBUG, LOG_WARNING, mips32_enable_interrupts(), MIPS32_PC, mips32_restore_context(), mips_ejtag_config_step(), mips_ejtag_exit_debug(), mips_m4k_debug_entry(), mips_m4k_isa_filter(), mips_m4k_set_breakpoint(), mips_m4k_unset_breakpoint(), NULL, reg_cache::reg_list, register_cache_invalidate(), target::state, target_call_event_callbacks(), TARGET_EVENT_HALTED, TARGET_EVENT_RESUMED, TARGET_HALTED, target_to_mips32(), reg::valid, and reg::value.
|
static |
Definition at line 1149 of file mips_m4k.c.
References ERROR_OK, mips_m4k_init_arch_info(), and target::tap.
|
static |
target_read_memory() gets us data in target endianness. If we want to use this data on the host for comparisons with some macros we must first transform it to host endianness using target_buffer_get_u16().
Definition at line 722 of file mips_m4k.c.
References breakpoint::address, BKPT_HARD, mips32_comparator::bp_value, mips_ejtag::ejtag_ibc_offs, mips32_common::ejtag_info, mips_ejtag::endianness, ERROR_OK, mips32_common::inst_break_list, breakpoint::is_set, breakpoint::length, LOG_DEBUG, LOG_WARNING, MIPS16_SDBBP, MIPS32_SDBBP, mips32_common::num_inst_bpoints, breakpoint::number, breakpoint::orig_instr, mips32_comparator::reg_address, SWAP16, target_buffer_get_u16(), target_buffer_get_u32(), target_read_memory(), target_to_mips32(), target_write_memory(), target_write_u32(), breakpoint::type, breakpoint::unique_id, and mips32_comparator::used.
Referenced by mips_m4k_internal_restore(), mips_m4k_remove_breakpoint(), and mips_m4k_step().
|
static |
Definition at line 930 of file mips_m4k.c.
References mips32_comparator::bp_value, mips32_common::data_break_list, mips_ejtag::ejtag_dbc_offs, mips32_common::ejtag_info, ERROR_OK, watchpoint::is_set, LOG_DEBUG, LOG_WARNING, mips32_common::num_data_bpoints, watchpoint::number, mips32_comparator::reg_address, target_to_mips32(), target_write_u32(), and mips32_comparator::used.
Referenced by mips_m4k_remove_watchpoint().
|
static |
Definition at line 1252 of file mips_m4k.c.
References cmd, command_print(), mips_m4k_common::common_magic, ERROR_OK, ERROR_TARGET_INVALID, and MIPSM4K_COMMON_MAGIC.
Referenced by COMMAND_HANDLER().
|
static |
correct endianness if we have word or hword access
Definition at line 1062 of file mips_m4k.c.
References buffer, count, EJTAG_IMP_NODMA, mips32_common::ejtag_info, ERROR_COMMAND_SYNTAX_ERROR, ERROR_FAIL, ERROR_OK, ERROR_TARGET_NOT_HALTED, ERROR_TARGET_UNALIGNED_ACCESS, mips_ejtag::impcode, LOG_DEBUG, LOG_ERROR, LOG_WARNING, mips32_dmaacc_write_mem(), mips32_pracc_write_mem(), mips_m4k_bulk_write_memory(), NULL, size, target::state, TARGET_ADDR_FMT, target_buffer_get_u16_array(), target_buffer_get_u32_array(), TARGET_HALTED, and target_to_mips32().
|
static |
Definition at line 148 of file mips_m4k.c.
References gdb_service::core, target::coreid, ERROR_OK, target::gdb_service, mips_m4k_halt_smp(), target, and gdb_service::target.
Referenced by mips_m4k_poll().
|
static |
Definition at line 1316 of file mips_m4k.c.
|
static |
Definition at line 1316 of file mips_m4k.c.
struct target_type mips_m4k_target |
Definition at line 1316 of file mips_m4k.c.