OpenOCD
|
Go to the source code of this file.
Macros | |
#define | MIPS32_GDB_DUMMY_FP_REG 1 |
#define | MIPS32_NUM_REGS ARRAY_SIZE(mips32_regs) |
Functions | |
COMMAND_HANDLER (mips32_handle_cp0_command) | |
MIPS32 targets expose command interface to manipulate CP0 registers. More... | |
COMMAND_HANDLER (mips32_handle_scan_delay_command) | |
int | mips32_arch_state (struct target *target) |
int | mips32_blank_check_memory (struct target *target, struct target_memory_check_block *blocks, int num_blocks, uint8_t erased_value) |
Checks whether a memory region is erased. More... | |
struct reg_cache * | mips32_build_reg_cache (struct target *target) |
int | mips32_checksum_memory (struct target *target, target_addr_t address, uint32_t count, uint32_t *checksum) |
int | mips32_configure_break_unit (struct target *target) |
static int | mips32_configure_dbs (struct target *target) |
static int | mips32_configure_ibs (struct target *target) |
int | mips32_enable_interrupts (struct target *target, int enable) |
int | mips32_examine (struct target *target) |
static int | mips32_get_core_reg (struct reg *reg) |
int | mips32_get_gdb_reg_list (struct target *target, struct reg **reg_list[], int *reg_list_size, enum target_register_class reg_class) |
int | mips32_init_arch_info (struct target *target, struct mips32_common *mips32, struct jtag_tap *tap) |
int | mips32_read_config_regs (struct target *target) |
static int | mips32_read_core_reg (struct target *target, unsigned int num) |
int | mips32_restore_context (struct target *target) |
int | mips32_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) |
static int | mips32_run_and_wait (struct target *target, target_addr_t entry_point, int timeout_ms, target_addr_t exit_point, struct mips32_common *mips32) |
int | mips32_save_context (struct target *target) |
static int | mips32_set_core_reg (struct reg *reg, uint8_t *buf) |
static int | mips32_verify_pointer (struct command_invocation *cmd, struct mips32_common *mips32) |
static int | mips32_write_core_reg (struct target *target, unsigned int num) |
Variables | |
const struct command_registration | mips32_command_handlers [] |
static const struct command_registration | mips32_exec_command_handlers [] |
static uint8_t | mips32_gdb_dummy_fp_value [] = {0, 0, 0, 0} |
static const struct reg_arch_type | mips32_reg_type |
struct { | |
const char * feature | |
int flag | |
const char * group | |
unsigned id | |
const char * name | |
enum reg_type type | |
} | mips32_regs [] |
static const char * | mips_isa_strings [] |
#define MIPS32_NUM_REGS ARRAY_SIZE(mips32_regs) |
COMMAND_HANDLER | ( | mips32_handle_cp0_command | ) |
MIPS32 targets expose command interface to manipulate CP0 registers.
Definition at line 911 of file mips32.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(), mips32_cp0_read(), mips32_cp0_write(), mips32_verify_pointer(), target::state, TARGET_HALTED, and target_to_mips32().
COMMAND_HANDLER | ( | mips32_handle_scan_delay_command | ) |
Definition at line 967 of file mips32.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(), MIPS32_SCAN_DELAY_LEGACY_MODE, mips_ejtag::mode, mips_ejtag::scan_delay, and target_to_mips32().
int mips32_arch_state | ( | struct target * | target | ) |
Definition at line 280 of file mips32.c.
References buf_get_u32(), mips32_common::core_cache, debug_reason_name(), ERROR_OK, mips32_common::isa_mode, LOG_USER, MIPS32_PC, mips_isa_strings, reg_cache::reg_list, target_to_mips32(), and reg::value.
int mips32_blank_check_memory | ( | struct target * | target, |
struct target_memory_check_block * | blocks, | ||
int | num_blocks, | ||
uint8_t | erased_value | ||
) |
Checks whether a memory region is erased.
Definition at line 823 of file mips32.c.
References working_area::address, ARRAY_SIZE, buf_get_u32(), buf_set_u32(), mips32_algorithm::common_magic, destroy_reg_param(), mips32_common::ejtag_info, ERROR_FAIL, ERROR_OK, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, init_reg_param(), mips_ejtag::isa, mips32_algorithm::isa_mode, LOG_ERROR, MIPS32_ADDIU, MIPS32_AND, MIPS32_BNE, MIPS32_COMMON_MAGIC, MIPS32_ISA_MIPS32, MIPS32_ISA_MMIPS32, MIPS32_LB, MIPS32_SDBBP, NEG16, NULL, PARAM_IN_OUT, PARAM_OUT, pracc_swap16_array(), target_memory_check_block::result, size, target_alloc_working_area(), target_buffer_set_u32_array(), target_free_working_area(), target_run_algorithm(), target_to_mips32(), and target_write_buffer().
Definition at line 297 of file mips32.c.
References reg::arch_info, reg::caller_save, mips32_common::core_cache, reg::dirty, reg::exist, feature, reg::feature, flag, reg::group, LOG_ERROR, mips32_core_reg::mips32_common, MIPS32_GDB_DUMMY_FP_REG, mips32_gdb_dummy_fp_value, MIPS32_NUM_REGS, mips32_reg_type, mips32_regs, reg::name, reg_cache::name, reg_cache::next, NULL, mips32_core_reg::num, reg_cache::num_regs, reg::number, target::reg_cache, reg::reg_data_type, reg_cache::reg_list, register_get_last_cache_p(), register_init_dummy(), reg::size, target, mips32_core_reg::target, target_to_mips32(), reg_data_type::type, reg::type, reg::valid, and reg::value.
Referenced by mips_m4k_init_target().
int mips32_checksum_memory | ( | struct target * | target, |
target_addr_t | address, | ||
uint32_t | count, | ||
uint32_t * | checksum | ||
) |
Definition at line 740 of file mips32.c.
References working_area::address, ARRAY_SIZE, buf_get_u32(), buf_set_u32(), mips32_algorithm::common_magic, count, destroy_reg_param(), mips32_common::ejtag_info, ERROR_OK, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, init_reg_param(), mips_ejtag::isa, mips32_algorithm::isa_mode, MIPS32_ADDI, MIPS32_ADDIU, MIPS32_ADDU, MIPS32_BEQ, MIPS32_BNE, MIPS32_COMMON_MAGIC, MIPS32_ISA_MIPS32, MIPS32_ISA_MMIPS32, MIPS32_LB, MIPS32_LUI, MIPS32_MOVN, MIPS32_ORI, MIPS32_SDBBP, MIPS32_SLL, MIPS32_SLTI, MIPS32_XOR, NEG16, NULL, PARAM_IN_OUT, PARAM_OUT, pracc_swap16_array(), target_alloc_working_area(), target_buffer_set_u32_array(), target_free_working_area(), target_run_algorithm(), target_to_mips32(), and target_write_buffer().
int mips32_configure_break_unit | ( | struct target * | target | ) |
Definition at line 606 of file mips32.c.
References mips32_common::bp_scanned, mips_ejtag::debug_caps, EJTAG_DCR, EJTAG_DCR_DB, EJTAG_DCR_ENM, EJTAG_DCR_IB, mips32_common::ejtag_info, EJTAG_V20_IMP_NODB, EJTAG_V20_IMP_NOIB, mips_ejtag::ejtag_version, EJTAG_VERSION_20, target::endianness, ERROR_OK, mips_ejtag::impcode, LOG_DEBUG, LOG_WARNING, mips32_configure_dbs(), mips32_configure_ibs(), mips32_common::num_data_bpoints, mips32_common::num_inst_bpoints, TARGET_BIG_ENDIAN, TARGET_LITTLE_ENDIAN, target_read_u32(), and target_to_mips32().
Referenced by mips_m4k_debug_entry().
|
static |
Definition at line 579 of file mips32.c.
References mips32_common::data_break_list, mips_ejtag::ejtag_dba0_addr, mips_ejtag::ejtag_dba_step_size, mips_ejtag::ejtag_dbs_addr, mips32_common::ejtag_info, ERROR_OK, mips32_common::num_data_bpoints, mips32_common::num_data_bpoints_avail, mips32_comparator::reg_address, target_read_u32(), target_to_mips32(), and target_write_u32().
Referenced by mips32_configure_break_unit().
|
static |
Definition at line 552 of file mips32.c.
References mips_ejtag::ejtag_iba0_addr, mips_ejtag::ejtag_iba_step_size, mips_ejtag::ejtag_ibs_addr, mips32_common::ejtag_info, ERROR_OK, mips32_common::inst_break_list, mips32_common::num_inst_bpoints, mips32_common::num_inst_bpoints_avail, mips32_comparator::reg_address, target_read_u32(), target_to_mips32(), and target_write_u32().
Referenced by mips32_configure_break_unit().
int mips32_enable_interrupts | ( | struct target * | target, |
int | enable | ||
) |
Definition at line 662 of file mips32.c.
References EJTAG_DCR, EJTAG_DCR_INTE, ERROR_OK, target_read_u32(), and target_write_u32().
Referenced by mips_m4k_internal_restore(), mips_m4k_single_step_core(), and mips_m4k_step().
int mips32_examine | ( | struct target * | target | ) |
Definition at line 534 of file mips32.c.
References mips32_common::bp_scanned, ERROR_OK, mips32_common::num_data_bpoints, mips32_common::num_data_bpoints_avail, mips32_common::num_inst_bpoints, mips32_common::num_inst_bpoints_avail, target_set_examined(), target_to_mips32(), and target_was_examined().
Referenced by mips_m4k_examine().
|
static |
Definition at line 157 of file mips32.c.
References reg::arch_info, ERROR_TARGET_NOT_HALTED, mips32_core_reg::num, mips32_common::read_core_reg, target::state, mips32_core_reg::target, TARGET_HALTED, and target_to_mips32().
int mips32_get_gdb_reg_list | ( | struct target * | target, |
struct reg ** | reg_list[], | ||
int * | reg_list_size, | ||
enum target_register_class | reg_class | ||
) |
Definition at line 225 of file mips32.c.
References mips32_common::core_cache, ERROR_OK, MIPS32_NUM_REGS, reg_cache::reg_list, and target_to_mips32().
int mips32_init_arch_info | ( | struct target * | target, |
struct mips32_common * | mips32, | ||
struct jtag_tap * | tap | ||
) |
Definition at line 362 of file mips32.c.
References target::arch_info, mips32_common::bp_scanned, mips32_common::common_magic, mips_ejtag::config_regs, mips32_common::data_break_list, mips32_common::ejtag_info, mips_ejtag::endianness, target::endianness, ERROR_OK, mips32_common::fast_data_area, mips_ejtag::isa, mips32_common::isa_imp, MIPS32_COMMON_MAGIC, MIPS32_ONLY, mips32_read_core_reg(), MIPS32_SCAN_DELAY_LEGACY_MODE, mips32_write_core_reg(), mips_ejtag::mode, NULL, mips32_common::read_core_reg, mips_ejtag::scan_delay, mips_ejtag::tap, TARGET_BIG_ENDIAN, and mips32_common::write_core_reg.
Referenced by mips_m4k_init_arch_info().
int mips32_read_config_regs | ( | struct target * | target | ) |
Definition at line 697 of file mips32.c.
References mips_ejtag::config, mips_ejtag::config_regs, EJTAG_IMP_MIPS16, mips32_common::ejtag_info, ERROR_OK, mips_ejtag::impcode, mips32_common::isa_imp, LOG_DEBUG, LOG_ERROR, LOG_USER, MIPS32_CONFIG3_ISA_MASK, MIPS32_CONFIG3_ISA_SHIFT, mips32_cp0_read(), MIPS32_MIPS16, MIPS32_MMIPS32, MIPS32_ONLY, MMIPS32_ONLY, and target_to_mips32().
Referenced by mips_m4k_debug_entry().
|
static |
Definition at line 188 of file mips32.c.
References buf_set_u32(), mips32_common::core_cache, mips32_common::core_regs, reg::dirty, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, MIPS32_NUM_REGS, reg_cache::reg_list, target_to_mips32(), reg::valid, and reg::value.
Referenced by mips32_init_arch_info().
int mips32_restore_context | ( | struct target * | target | ) |
Definition at line 261 of file mips32.c.
References mips32_common::core_cache, mips32_common::core_regs, reg::dirty, mips32_common::ejtag_info, ERROR_OK, MIPS32_NUM_REGS, mips32_pracc_write_regs(), reg_cache::reg_list, target_to_mips32(), and mips32_common::write_core_reg.
Referenced by mips_m4k_internal_restore(), and mips_m4k_step().
int mips32_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 | ||
) |
Definition at line 418 of file mips32.c.
References buf_get_u32(), buf_set_u32(), mips32_common::common_magic, mips32_common::core_cache, direction, reg::dirty, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, ERROR_TARGET_INVALID, ERROR_TARGET_NOT_HALTED, mips32_common::isa_mode, mips32_algorithm::isa_mode, LOG_DEBUG, LOG_ERROR, LOG_WARNING, MIPS32_COMMON_MAGIC, MIPS32_NUM_REGS, mips32_run_and_wait(), mips32_set_core_reg(), reg::name, PARAM_IN, PARAM_OUT, mips32_common::read_core_reg, reg_cache::reg_list, reg_param::reg_name, register_get_by_name(), size, reg_param::size, reg::size, target::state, TARGET_HALTED, target_read_buffer(), target_to_mips32(), target_write_buffer(), reg::valid, and reg::value.
|
static |
Definition at line 386 of file mips32.c.
References buf_get_u32(), mips32_common::core_cache, ERROR_OK, ERROR_TARGET_TIMEOUT, LOG_DEBUG, MIPS32_PC, reg_cache::reg_list, target::state, target_halt(), TARGET_HALTED, target_resume(), target_wait_state(), and reg::value.
Referenced by mips32_run_algorithm().
int mips32_save_context | ( | struct target * | target | ) |
Definition at line 242 of file mips32.c.
References mips32_common::core_cache, mips32_common::core_regs, mips32_common::ejtag_info, ERROR_OK, MIPS32_NUM_REGS, mips32_pracc_read_regs(), mips32_common::read_core_reg, reg_cache::reg_list, target_to_mips32(), and reg::valid.
Referenced by mips_m4k_debug_entry().
|
static |
Definition at line 172 of file mips32.c.
References reg::arch_info, buf_get_u32(), buf_set_u32(), reg::dirty, ERROR_OK, ERROR_TARGET_NOT_HALTED, target::state, mips32_core_reg::target, TARGET_HALTED, reg::valid, and reg::value.
Referenced by mips32_run_algorithm().
|
static |
Definition at line 897 of file mips32.c.
References cmd, command_print(), mips32_common::common_magic, ERROR_OK, ERROR_TARGET_INVALID, and MIPS32_COMMON_MAGIC.
Referenced by COMMAND_HANDLER().
|
static |
Definition at line 206 of file mips32.c.
References buf_get_u32(), mips32_common::core_cache, mips32_common::core_regs, reg::dirty, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, LOG_DEBUG, MIPS32_NUM_REGS, reg_cache::reg_list, target_to_mips32(), reg::valid, and reg::value.
Referenced by mips32_init_arch_info().
const char* feature |
Definition at line 40 of file mips32.c.
Referenced by mips32_build_reg_cache().
int flag |
Definition at line 41 of file mips32.c.
Referenced by add_connection(), arm11_add_debug_inst(), arm11_run_instr_no_data(), get_stacking_info_arm926ejs(), jtag_dpi_init(), jtag_vpi_init(), and mips32_build_reg_cache().
const struct command_registration mips32_command_handlers[] |
|
static |
|
static |
Definition at line 155 of file mips32.c.
Referenced by mips32_build_reg_cache().
|
static |
Definition at line 280 of file mips32.c.
Referenced by mips32_build_reg_cache().
const { ... } mips32_regs[] |
Referenced by mips32_build_reg_cache().
|
static |
Definition at line 25 of file mips32.c.
Referenced by mips32_arch_state().