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 1339 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 1393 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 121 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 816 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 963 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 292 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 1264 of file mips_m4k.c.
References address, 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(), working_area::size, TARGET_ADDR_FMT, target_alloc_working_area(), target_buffer_set_u32_array(), and target_to_mips32().
Referenced by mips_m4k_read_memory().
|
static |
Definition at line 1198 of file mips_m4k.c.
References address, 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 372 of file mips_m4k.c.
References ERROR_OK, jtag_add_reset(), LOG_DEBUG, and target_state_name().
|
static |
Definition at line 87 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_cpu_probe(), MIPS32_ISA_MIPS16E, MIPS32_ISA_MIPS32, MIPS32_ISA_MMIPS32, mips32_read_config_regs(), MIPS32_REGLIST_C0_PC_INDEX, 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 585 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 997 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 1170 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 42 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 255 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 133 of file mips_m4k.c.
References ERROR_OK, foreach_smp_target, LOG_TARGET_ERROR, mips_m4k_halt(), target::smp_targets, target::state, target_list::target, and TARGET_HALTED.
Referenced by update_halt_gdb().
|
static |
Definition at line 1147 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 1139 of file mips_m4k.c.
References ERROR_OK, and mips32_build_reg_cache().
|
static |
Definition at line 425 of file mips_m4k.c.
References address, 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_REGLIST_C0_PC_INDEX, 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 163 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 1009 of file mips_m4k.c.
References address, 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(), mips_m4k_bulk_read_memory(), 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 838 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 978 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 401 of file mips_m4k.c.
References address, ERROR_OK, foreach_smp_target, LOG_TARGET_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 499 of file mips_m4k.c.
References 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 597 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 858 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 382 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 526 of file mips_m4k.c.
References 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_REGLIST_C0_PC_INDEX, 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 1161 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 728 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 936 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 1329 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 1074 of file mips_m4k.c.
References address, 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 152 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 1393 of file mips_m4k.c.
|
static |
Definition at line 1393 of file mips_m4k.c.
struct target_type mips_m4k_target |
Definition at line 1393 of file mips_m4k.c.
Referenced by dw_spi_probe().