OpenOCD
|
Go to the source code of this file.
Functions | |
COMMAND_HANDLER (or1k_addreg_command_handler) | |
COMMAND_HANDLER (or1k_du_list_command_handler) | |
COMMAND_HANDLER (or1k_du_select_command_handler) | |
COMMAND_HANDLER (or1k_tap_list_command_handler) | |
COMMAND_HANDLER (or1k_tap_select_command_handler) | |
static bool | is_any_soft_breakpoint (struct target *target) |
LIST_HEAD (du_list) | |
LIST_HEAD (tap_list) | |
static int | or1k_add_breakpoint (struct target *target, struct breakpoint *breakpoint) |
static int | or1k_add_reg (struct target *target, struct or1k_core_reg *new_reg) |
static int | or1k_add_watchpoint (struct target *target, struct watchpoint *watchpoint) |
static int | or1k_arch_state (struct target *target) |
static int | or1k_assert_reset (struct target *target) |
static struct reg_cache * | or1k_build_reg_cache (struct target *target) |
static int | or1k_checksum_memory (struct target *target, target_addr_t address, uint32_t count, uint32_t *checksum) |
static int | or1k_create_reg_list (struct target *target) |
static int | or1k_deassert_reset (struct target *target) |
static int | or1k_debug_entry (struct target *target) |
static int | or1k_examine (struct target *target) |
static int | or1k_get_core_reg (struct reg *reg) |
static int | or1k_get_gdb_fileio_info (struct target *target, struct gdb_fileio_info *fileio_info) |
static int | or1k_get_gdb_reg_list (struct target *target, struct reg **reg_list[], int *reg_list_size, enum target_register_class reg_class) |
static int | or1k_halt (struct target *target) |
static int | or1k_init_target (struct command_context *cmd_ctx, struct target *target) |
static int | or1k_is_cpu_running (struct target *target, int *running) |
static int | or1k_jtag_read_regs (struct or1k_common *or1k, uint32_t *regs) |
static int | or1k_jtag_write_regs (struct or1k_common *or1k, uint32_t *regs) |
static int | or1k_poll (struct target *target) |
static int | or1k_profiling (struct target *target, uint32_t *samples, uint32_t max_num_samples, uint32_t *num_samples, uint32_t seconds) |
static int | or1k_read_core_reg (struct target *target, int num) |
static int | or1k_read_memory (struct target *target, target_addr_t address, uint32_t size, uint32_t count, uint8_t *buffer) |
static int | or1k_remove_breakpoint (struct target *target, struct breakpoint *breakpoint) |
static int | or1k_remove_watchpoint (struct target *target, struct watchpoint *watchpoint) |
static int | or1k_restore_context (struct target *target) |
static int | or1k_resume (struct target *target, int current, target_addr_t address, int handle_breakpoints, int debug_execution) |
static int | or1k_resume_or_step (struct target *target, int current, uint32_t address, int handle_breakpoints, int debug_execution, int step) |
static int | or1k_save_context (struct target *target) |
static int | or1k_set_core_reg (struct reg *reg, uint8_t *buf) |
static int | or1k_soft_reset_halt (struct target *target) |
static int | or1k_step (struct target *target, int current, target_addr_t address, int handle_breakpoints) |
static int | or1k_target_create (struct target *target, Jim_Interp *interp) |
static int | or1k_write_core_reg (struct target *target, int num) |
static int | or1k_write_memory (struct target *target, target_addr_t address, uint32_t size, uint32_t count, const uint8_t *buffer) |
Variables | |
static const struct command_registration | or1k_command_handlers [] |
static struct or1k_core_reg * | or1k_core_reg_list_arch_info |
static const struct command_registration | or1k_hw_ip_command_handlers [] |
static const struct or1k_core_reg_init | or1k_init_reg_list [] |
static const struct command_registration | or1k_reg_command_handlers [] |
static const struct reg_arch_type | or1k_reg_type |
struct target_type | or1k_target |
COMMAND_HANDLER | ( | or1k_addreg_command_handler | ) |
Definition at line 1336 of file or1k.c.
References addr, CMD_ARGC, CMD_ARGV, CMD_CTX, COMMAND_PARSE_NUMBER, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, or1k_core_reg::feature, get_current_target(), or1k_core_reg::group, LOG_DEBUG, or1k_core_reg::name, NULL, or1k_add_reg(), or1k_core_reg::or1k_common, or1k_core_reg::spr_num, and or1k_core_reg::target.
COMMAND_HANDLER | ( | or1k_du_list_command_handler | ) |
Definition at line 1321 of file or1k.c.
References CMD, CMD_ARGC, command_print(), du_list, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, or1k_du::list, list_for_each_entry, and or1k_du::name.
COMMAND_HANDLER | ( | or1k_du_select_command_handler | ) |
Definition at line 1288 of file or1k.c.
References CMD_ARGC, CMD_ARGV, CMD_CTX, COMMAND_PARSE_NUMBER, or1k_jtag::du_core, du_list, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, get_current_target(), or1k_common::jtag, or1k_du::list, list_for_each_entry, LOG_ERROR, LOG_INFO, or1k_du::name, or1k_du::options, and target_to_or1k().
COMMAND_HANDLER | ( | or1k_tap_list_command_handler | ) |
Definition at line 1273 of file or1k.c.
References CMD, CMD_ARGC, command_print(), ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, or1k_tap_ip::list, list_for_each_entry, or1k_tap_ip::name, and tap_list.
COMMAND_HANDLER | ( | or1k_tap_select_command_handler | ) |
Definition at line 1249 of file or1k.c.
References CMD_ARGC, CMD_ARGV, CMD_CTX, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, get_current_target(), or1k_common::jtag, or1k_tap_ip::list, list_for_each_entry, LOG_ERROR, LOG_INFO, or1k_tap_ip::name, or1k_jtag::tap_ip, tap_list, and target_to_or1k().
|
static |
Definition at line 765 of file or1k.c.
References BKPT_SOFT, target::breakpoints, LOG_DEBUG, and breakpoint::type.
Referenced by or1k_resume_or_step().
LIST_HEAD | ( | du_list | ) |
LIST_HEAD | ( | tap_list | ) |
|
static |
Definition at line 908 of file or1k.c.
References addr, breakpoint::address, BKPT_HARD, ERROR_OK, or1k_common::jtag, breakpoint::length, LOG_DEBUG, LOG_ERROR, OR1K_ICBIR_CPU_REG_ADD, or1k_du::or1k_jtag_read_memory, or1k_du::or1k_jtag_write_cpu, or1k_du::or1k_jtag_write_memory, or1k_to_du(), OR1K_TRAP_INSTR, breakpoint::orig_instr, target_buffer_set_u32(), TARGET_PRIxADDR, target_to_or1k(), breakpoint::type, and breakpoint::unique_id.
|
static |
Definition at line 224 of file or1k.c.
References ERROR_OK, or1k_core_reg::list_num, or1k_common::nb_regs, or1k_core_reg_list_arch_info, and target_to_or1k().
Referenced by COMMAND_HANDLER(), and or1k_create_reg_list().
|
static |
|
static |
|
static |
Definition at line 709 of file or1k.c.
References CPU_RESET, ERROR_OK, or1k_common::jtag, LOG_DEBUG, LOG_ERROR, or1k_du::or1k_cpu_reset, or1k_to_du(), and target_to_or1k().
Referenced by or1k_soft_reset_halt().
Definition at line 499 of file or1k.c.
References or1k_common::arch_info, reg::arch_info, or1k_common::core_cache, reg::dirty, reg::exist, feature, or1k_core_reg::feature, reg::feature, or1k_core_reg::group, reg::group, LOG_DEBUG, or1k_core_reg::name, reg::name, reg_cache::name, or1k_common::nb_regs, reg_cache::next, NULL, reg_cache::num_regs, reg::number, or1k_core_reg::or1k_common, or1k_core_reg_list_arch_info, or1k_reg_type, target::reg_cache, reg_cache::reg_list, register_get_last_cache_p(), reg::size, target, or1k_core_reg::target, target_to_or1k(), reg::type, reg::valid, and reg::value.
Referenced by or1k_init_target().
|
static |
Definition at line 1197 of file or1k.c.
References ERROR_FAIL.
|
static |
Definition at line 242 of file or1k.c.
References ARRAY_SIZE, ERROR_OK, or1k_core_reg::feature, or1k_core_reg_init::feature, or1k_core_reg::group, or1k_core_reg_init::group, GROUP1, GROUP2, or1k_core_reg::list_num, LOG_DEBUG, name, or1k_core_reg::name, or1k_core_reg_init::name, or1k_common::nb_regs, NULL, or1k_add_reg(), or1k_core_reg::or1k_common, or1k_core_reg_list_arch_info, or1k_init_reg_list, or1k_core_reg::spr_num, or1k_core_reg_init::spr_num, or1k_core_reg::target, and target_to_or1k().
Referenced by or1k_target_create().
|
static |
Definition at line 725 of file or1k.c.
References CPU_NOT_RESET, ERROR_OK, or1k_common::jtag, LOG_DEBUG, LOG_ERROR, or1k_du::or1k_cpu_reset, or1k_to_du(), and target_to_or1k().
Referenced by or1k_soft_reset_halt().
|
static |
Definition at line 544 of file or1k.c.
References addr, breakpoint_find(), or1k_common::core_cache, or1k_common::core_regs, ERROR_OK, LOG_DEBUG, LOG_ERROR, OR1K_REG_NPC, or1k_save_context(), or1k_set_core_reg(), reg_cache::reg_list, and target_to_or1k().
Referenced by or1k_poll().
|
static |
Definition at line 1121 of file or1k.c.
References DBG_REASON_DBGRQ, target::debug_reason, ERROR_OK, or1k_common::jtag, LOG_DEBUG, LOG_ERROR, or1k_du::or1k_is_cpu_running, or1k_to_du(), target::state, TARGET_HALTED, TARGET_RUNNING, target_set_examined(), target_to_or1k(), TARGET_UNKNOWN, and target_was_examined().
|
static |
Definition at line 451 of file or1k.c.
References reg::arch_info, ERROR_TARGET_NOT_HALTED, or1k_core_reg::list_num, LOG_DEBUG, or1k_read_core_reg(), target::state, or1k_core_reg::target, and TARGET_HALTED.
|
static |
Definition at line 1192 of file or1k.c.
References ERROR_FAIL.
|
static |
Definition at line 1162 of file or1k.c.
References or1k_common::core_cache, ERROR_OK, LOG_ERROR, or1k_common::nb_regs, or1k_save_context(), OR1KNUMCOREREGS, REG_CLASS_GENERAL, reg_cache::reg_list, and target_to_or1k().
|
static |
Definition at line 565 of file or1k.c.
References CPU_STALL, DBG_REASON_DBGRQ, target::debug_reason, ERROR_OK, ERROR_TARGET_FAILURE, or1k_common::jtag, jtag_get_reset_config(), jtag_get_srst(), LOG_DEBUG, LOG_ERROR, LOG_WARNING, or1k_du::or1k_cpu_stall, or1k_to_du(), RESET_SRST_PULLS_TRST, target::state, TARGET_HALTED, TARGET_RESET, target_state_name(), target_to_or1k(), and TARGET_UNKNOWN.
Referenced by or1k_poll().
|
static |
Definition at line 1074 of file or1k.c.
References or1k_jtag::du_core, ERROR_FAIL, ERROR_OK, or1k_common::jtag, LOG_ERROR, or1k_build_reg_cache(), or1k_jtag::or1k_jtag_inited, or1k_jtag::or1k_jtag_module_selected, or1k_to_du(), or1k_jtag::tap, target::tap, or1k_jtag::tap_ip, target, or1k_jtag::target, and target_to_or1k().
|
static |
Definition at line 603 of file or1k.c.
References alive_sleep(), ERROR_OK, or1k_common::jtag, LOG_ERROR, LOG_WARNING, or1k_du::or1k_is_cpu_running, or1k_du::or1k_jtag_init, or1k_to_du(), and target_to_or1k().
Referenced by or1k_poll().
|
static |
Definition at line 307 of file or1k.c.
References or1k_common::arch_info, or1k_common::jtag, LOG_DEBUG, or1k_du::or1k_jtag_read_cpu, or1k_jtag_to_du(), OR1K_REG_R0, OR1K_REG_R31, regs, and or1k_core_reg::spr_num.
Referenced by or1k_save_context().
|
static |
Definition at line 318 of file or1k.c.
References or1k_common::arch_info, or1k_common::jtag, LOG_DEBUG, or1k_jtag_to_du(), or1k_du::or1k_jtag_write_cpu, OR1K_REG_R0, OR1K_REG_R31, regs, and or1k_core_reg::spr_num.
Referenced by or1k_restore_context().
|
static |
Definition at line 640 of file or1k.c.
References ERROR_OK, LOG_ERROR, or1k_debug_entry(), or1k_halt(), or1k_is_cpu_running(), target::state, target_call_event_callbacks(), TARGET_DEBUG_RUNNING, TARGET_EVENT_DEBUG_HALTED, TARGET_EVENT_HALTED, TARGET_HALTED, TARGET_RESET, and TARGET_RUNNING.
|
static |
Definition at line 1203 of file or1k.c.
References ERROR_OK, gettimeofday(), GROUP0, or1k_common::jtag, LOG_ERROR, LOG_INFO, NULL, or1k_du::or1k_jtag_read_cpu, or1k_to_du(), target::state, TARGET_HALTED, target_poll(), target_resume(), target_to_or1k(), timeval_add_time(), and timeval_compare().
|
static |
Definition at line 401 of file or1k.c.
References or1k_common::arch_info, buf_set_u32(), or1k_common::core_cache, or1k_common::core_regs, reg::dirty, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, or1k_common::jtag, LOG_DEBUG, LOG_ERROR, or1k_common::nb_regs, or1k_du::or1k_jtag_read_cpu, or1k_to_du(), OR1KNUMCOREREGS, reg_cache::reg_list, or1k_core_reg::spr_num, target_to_or1k(), reg::valid, and reg::value.
Referenced by or1k_get_core_reg(), and or1k_save_context().
|
static |
Definition at line 1020 of file or1k.c.
References buffer, count, ERROR_COMMAND_SYNTAX_ERROR, ERROR_TARGET_NOT_HALTED, ERROR_TARGET_UNALIGNED_ACCESS, or1k_common::jtag, LOG_DEBUG, LOG_ERROR, or1k_du::or1k_jtag_read_memory, or1k_to_du(), size, target::state, TARGET_HALTED, TARGET_PRIxADDR, and target_to_or1k().
|
static |
Definition at line 967 of file or1k.c.
References addr, breakpoint::address, BKPT_HARD, ERROR_OK, or1k_common::jtag, breakpoint::length, LOG_DEBUG, LOG_ERROR, OR1K_ICBIR_CPU_REG_ADD, or1k_du::or1k_jtag_write_cpu, or1k_du::or1k_jtag_write_memory, or1k_to_du(), breakpoint::orig_instr, TARGET_PRIxADDR, target_to_or1k(), breakpoint::type, and breakpoint::unique_id.
Referenced by or1k_resume_or_step().
|
static |
|
static |
Definition at line 363 of file or1k.c.
References or1k_common::arch_info, or1k_common::core_cache, or1k_common::core_regs, reg::dirty, ERROR_OK, or1k_common::jtag, LOG_DEBUG, LOG_ERROR, or1k_du::or1k_jtag_write_cpu, or1k_jtag_write_regs(), OR1K_REG_NPC, OR1K_REG_PPC, OR1K_REG_SR, or1k_to_du(), or1k_write_core_reg(), OR1KNUMCOREREGS, reg_cache::reg_list, or1k_core_reg::spr_num, and target_to_or1k().
Referenced by or1k_resume_or_step().
|
static |
Definition at line 888 of file or1k.c.
References breakpoint::address, NO_SINGLE_STEP, and or1k_resume_or_step().
|
static |
Definition at line 778 of file or1k.c.
References breakpoint::address, breakpoint_find(), buf_get_u32(), buf_set_u32(), or1k_common::core_cache, CPU_UNSTALL, DBG_REASON_NOTHALTED, DBG_REASON_SINGLESTEP, target::debug_reason, ERROR_OK, ERROR_TARGET_NOT_HALTED, is_any_soft_breakpoint(), or1k_common::jtag, LOG_DEBUG, LOG_ERROR, NULL, or1k_du::or1k_cpu_stall, OR1K_DEBUG_REG_DMR1, OR1K_DEBUG_REG_DMR2, OR1K_DEBUG_REG_DRR, OR1K_DEBUG_REG_DSR, OR1K_DEBUG_REG_NUM, OR1K_DMR1_BT, OR1K_DMR1_CPU_REG_ADD, OR1K_DMR1_ST, OR1K_DMR2_WGB, OR1K_DSR_TE, or1k_du::or1k_jtag_read_cpu, or1k_du::or1k_jtag_write_cpu, OR1K_REG_NPC, or1k_remove_breakpoint(), or1k_restore_context(), or1k_to_du(), reg_cache::reg_list, register_cache_invalidate(), target::state, step(), target_call_event_callbacks(), TARGET_DEBUG_RUNNING, TARGET_EVENT_DEBUG_RESUMED, TARGET_EVENT_RESUMED, target_free_all_working_areas(), TARGET_HALTED, TARGET_PRIxADDR, TARGET_RUNNING, target_to_or1k(), and reg::value.
Referenced by or1k_resume(), and or1k_step().
|
static |
Definition at line 329 of file or1k.c.
References or1k_common::arch_info, or1k_common::core_cache, or1k_common::core_regs, ERROR_OK, or1k_common::jtag, LOG_DEBUG, or1k_du::or1k_jtag_read_cpu, or1k_jtag_read_regs(), or1k_read_core_reg(), OR1K_REG_NPC, OR1K_REG_PPC, OR1K_REG_SR, or1k_to_du(), OR1KNUMCOREREGS, reg_cache::reg_list, or1k_core_reg::spr_num, target_to_or1k(), and reg::valid.
Referenced by or1k_debug_entry(), and or1k_get_gdb_reg_list().
|
static |
Definition at line 464 of file or1k.c.
Referenced by or1k_debug_entry().
|
static |
Definition at line 741 of file or1k.c.
References CPU_STALL, ERROR_OK, or1k_common::jtag, LOG_DEBUG, LOG_ERROR, or1k_assert_reset(), or1k_du::or1k_cpu_stall, or1k_deassert_reset(), or1k_to_du(), and target_to_or1k().
|
static |
Definition at line 898 of file or1k.c.
References breakpoint::address, or1k_resume_or_step(), and SINGLE_STEP.
|
static |
Definition at line 1101 of file or1k.c.
References target::arch_info, ERROR_FAIL, ERROR_OK, or1k_create_reg_list(), or1k_du_adv_register(), or1k_tap_mohor_register(), or1k_tap_vjtag_register(), or1k_tap_xilinx_bscan_register(), and target::tap.
|
static |
Definition at line 433 of file or1k.c.
References buf_get_u32(), or1k_common::core_cache, or1k_common::core_regs, reg::dirty, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, LOG_DEBUG, OR1KNUMCOREREGS, reg_cache::reg_list, target_to_or1k(), reg::valid, and reg::value.
Referenced by or1k_restore_context().
|
static |
Definition at line 1047 of file or1k.c.
References buffer, count, ERROR_COMMAND_SYNTAX_ERROR, ERROR_TARGET_NOT_HALTED, ERROR_TARGET_UNALIGNED_ACCESS, or1k_common::jtag, LOG_DEBUG, LOG_ERROR, LOG_WARNING, or1k_du::or1k_jtag_write_memory, or1k_to_du(), size, target::state, TARGET_HALTED, TARGET_PRIxADDR, and target_to_or1k().
|
static |
|
static |
Definition at line 39 of file or1k.c.
Referenced by or1k_add_reg(), or1k_build_reg_cache(), and or1k_create_reg_list().
|
static |
|
static |
Definition at line 39 of file or1k.c.
Referenced by or1k_create_reg_list().
|
static |
|
static |
Definition at line 464 of file or1k.c.
Referenced by or1k_build_reg_cache().
struct target_type or1k_target |