OpenOCD
|
Go to the source code of this file.
Functions | |
static int | nds32_v2_activate_hardware_breakpoint (struct target *target) |
static int | nds32_v2_activate_hardware_watchpoint (struct target *target) |
static int | nds32_v2_add_breakpoint (struct target *target, struct breakpoint *breakpoint) |
static int | nds32_v2_add_watchpoint (struct target *target, struct watchpoint *watchpoint) |
static int | nds32_v2_check_interrupt_stack (struct nds32_v2_common *nds32_v2) |
static int | nds32_v2_checksum_memory (struct target *target, target_addr_t address, uint32_t count, uint32_t *checksum) |
static int | nds32_v2_deactivate_hardware_breakpoint (struct target *target) |
static int | nds32_v2_deactivate_hardware_watchpoint (struct target *target) |
static int | nds32_v2_deassert_reset (struct target *target) |
static int | nds32_v2_debug_entry (struct nds32 *nds32, bool enable_watchpoint) |
Save processor state. More... | |
static int | nds32_v2_examine (struct target *target) |
static int | nds32_v2_get_debug_reason (struct nds32 *nds32, uint32_t *reason) |
static int | nds32_v2_get_exception_address (struct nds32 *nds32, uint32_t *address, uint32_t reason) |
static int | nds32_v2_hit_watchpoint (struct target *target, struct watchpoint **hit_watchpoint) |
find out which watchpoint hits get exception address and compare the address to watchpoints More... | |
static int | nds32_v2_init_target (struct command_context *cmd_ctx, struct target *target) |
static int | nds32_v2_leave_debug_state (struct nds32 *nds32, bool enable_watchpoint) |
Restore processor state. More... | |
static int | nds32_v2_read_buffer (struct target *target, target_addr_t address, uint32_t size, uint8_t *buffer) |
static int | nds32_v2_read_memory (struct target *target, target_addr_t address, uint32_t size, uint32_t count, uint8_t *buffer) |
static int | nds32_v2_register_mapping (struct nds32 *nds32, int reg_no) |
static int | nds32_v2_remove_breakpoint (struct target *target, struct breakpoint *breakpoint) |
static int | nds32_v2_remove_watchpoint (struct target *target, struct watchpoint *watchpoint) |
static int | nds32_v2_restore_interrupt_stack (struct nds32_v2_common *nds32_v2) |
static int | nds32_v2_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 | nds32_v2_target_create (struct target *target, Jim_Interp *interp) |
static int | nds32_v2_target_request_data (struct target *target, uint32_t size, uint8_t *buffer) |
static int | nds32_v2_translate_address (struct target *target, target_addr_t *address) |
static int | nds32_v2_write_buffer (struct target *target, target_addr_t address, uint32_t size, const uint8_t *buffer) |
static int | nds32_v2_write_memory (struct target *target, target_addr_t address, uint32_t size, uint32_t count, const uint8_t *buffer) |
Variables | |
struct target_type | nds32_v2_target |
Holds methods for V2 targets. More... | |
|
static |
Definition at line 78 of file nds32_v2.c.
References breakpoint::address, nds32_memory::address_translation, aice_write_debug_reg(), BKPT_HARD, BKPT_SOFT, target::breakpoints, ERROR_FAIL, ERROR_OK, LOG_DEBUG, nds32::memory, nds32_v2_common::nds32, NDS_EDM_SR_BPA0, NDS_EDM_SR_BPAM0, NDS_EDM_SR_BPC0, NDS_EDM_SR_BPV0, breakpoint::next, TARGET_PRIxADDR, target_to_aice(), target_to_nds32_v2(), and breakpoint::type.
Referenced by nds32_v2_debug_entry(), and nds32_v2_leave_debug_state().
|
static |
Definition at line 140 of file nds32_v2.c.
References watchpoint::address, nds32_memory::address_translation, aice_write_debug_reg(), ERROR_OK, watchpoint::length, LOG_DEBUG, watchpoint::mask, nds32::memory, nds32_v2_common::nds32, NDS_EDM_SR_BPA0, NDS_EDM_SR_BPAM0, NDS_EDM_SR_BPC0, NDS_EDM_SR_BPV0, watchpoint::next, nds32_v2_common::next_hbr_index, watchpoint::rw, TARGET_PRIxADDR, target_to_aice(), target_to_nds32_v2(), target::watchpoints, WPT_ACCESS, WPT_READ, and WPT_WRITE.
Referenced by nds32_v2_debug_entry(), and nds32_v2_leave_debug_state().
|
static |
Definition at line 404 of file nds32_v2.c.
References nds32::auto_convert_hw_bp, BKPT_HARD, BKPT_SOFT, ERROR_FAIL, ERROR_OK, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, LOG_WARNING, nds32_v2_common::n_hbr, nds32_v2_common::nds32, nds32_add_software_breakpoint(), nds32_v2_common::next_hbr_index, target_to_nds32_v2(), and breakpoint::type.
|
static |
Definition at line 467 of file nds32_v2.c.
References ERROR_OK, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, LOG_WARNING, nds32_v2_common::n_hbr, nds32_v2_common::next_hbr_index, and target_to_nds32_v2().
|
static |
Definition at line 203 of file nds32_v2.c.
References aice_read_register(), aice_write_register(), nds32_v2_common::backup_ir0, nds32::current_interrupt_level, ERROR_OK, IR0, IR1, IR2, LOG_ERROR, nds32::max_interrupt_level, nds32_v2_common::nds32, nds32_reach_max_interrupt_level(), nds32::target, and target_to_aice().
Referenced by nds32_v2_debug_entry().
|
static |
Definition at line 396 of file nds32_v2.c.
References ERROR_FAIL, and LOG_WARNING.
|
static |
Definition at line 116 of file nds32_v2.c.
References breakpoint::address, aice_write_debug_reg(), BKPT_HARD, BKPT_SOFT, target::breakpoints, ERROR_FAIL, ERROR_OK, LOG_DEBUG, NDS_EDM_SR_BPC0, breakpoint::next, TARGET_PRIxADDR, target_to_aice(), and breakpoint::type.
Referenced by nds32_v2_debug_entry().
|
static |
Definition at line 184 of file nds32_v2.c.
References watchpoint::address, aice_write_debug_reg(), ERROR_OK, LOG_DEBUG, watchpoint::mask, NDS_EDM_SR_BPC0, watchpoint::next, nds32_v2_common::next_hbr_index, TARGET_PRIxADDR, target_to_aice(), target_to_nds32_v2(), and target::watchpoints.
Referenced by nds32_v2_debug_entry().
|
static |
Definition at line 378 of file nds32_v2.c.
References CHECK_RETVAL, ERROR_OK, LOG_WARNING, nds32_poll(), target::state, target_halt(), TARGET_HALTED, and target_name().
|
static |
Save processor state.
This is called after a HALT instruction succeeds, and on other occasions the processor enters debug mode (breakpoint, watchpoint, etc).
Definition at line 273 of file nds32_v2.c.
References CHECK_RETVAL, nds32::core_cache, ERROR_FAIL, ERROR_OK, nds32::init_arch_info_after_halted, LOG_DEBUG, LOG_WARNING, nds32_config(), nds32_examine_debug_reason(), nds32_full_context(), nds32_v2_activate_hardware_breakpoint(), nds32_v2_activate_hardware_watchpoint(), nds32_v2_check_interrupt_stack(), nds32_v2_deactivate_hardware_breakpoint(), nds32_v2_deactivate_hardware_watchpoint(), register_cache_invalidate(), target::state, nds32::target, TARGET_HALTED, target_to_nds32_v2(), and nds32::virtual_hosting.
Referenced by nds32_v2_target_create().
|
static |
Definition at line 595 of file nds32_v2.c.
References aice_read_debug_reg(), CHECK_RETVAL, DBG_REASON_NOTHALTED, target::debug_reason, ERROR_OK, LOG_INFO, nds32_v2_common::n_hbr, nds32_v2_common::nds32, nds32_edm_config(), nds32_reset_halt(), NDS_EDM_SR_EDM_CFG, nds32_v2_common::next_hbr_index, nds32::reset_halt_as_examine, target::state, nds32::target, target_name(), TARGET_RUNNING, target_set_examined(), target_to_aice(), target_to_nds32_v2(), and target_was_examined().
|
static |
Definition at line 66 of file nds32_v2.c.
References aice_read_register(), ERROR_OK, IR6, nds32::target, and target_to_aice().
Referenced by nds32_v2_target_create().
|
static |
Definition at line 500 of file nds32_v2.c.
References aice_read_register(), ERROR_OK, IR4, nds32::target, and target_to_aice().
Referenced by nds32_v2_target_create().
|
static |
find out which watchpoint hits get exception address and compare the address to watchpoints
Definition at line 516 of file nds32_v2.c.
References watchpoint::address, ERROR_FAIL, ERROR_OK, watchpoint::mask, watchpoint::next, watchpoint::rw, target_to_nds32(), watchpoint::unique_id, nds32::watched_address, target::watchpoints, and WPT_WRITE.
|
static |
Definition at line 582 of file nds32_v2.c.
References ERROR_OK, nds32_init(), and target_to_nds32().
|
static |
Restore processor state.
Definition at line 350 of file nds32_v2.c.
References CHECK_RETVAL, nds32::core_cache, ERROR_OK, LOG_DEBUG, nds32_restore_context(), nds32_v2_activate_hardware_breakpoint(), nds32_v2_activate_hardware_watchpoint(), nds32_v2_restore_interrupt_stack(), register_cache_invalidate(), nds32::target, and target_to_nds32_v2().
Referenced by nds32_v2_target_create().
|
static |
Definition at line 648 of file nds32_v2.c.
References nds32_memory::access_channel, buffer, ERROR_TARGET_NOT_HALTED, LOG_WARNING, nds32::memory, nds32_read_buffer(), nds32_v2_translate_address(), NDS_MEMORY_ACC_CPU, size, target::state, TARGET_HALTED, and target_to_nds32().
|
static |
Definition at line 688 of file nds32_v2.c.
References nds32_memory::access_channel, buffer, count, ERROR_TARGET_NOT_HALTED, LOG_WARNING, nds32::memory, nds32_read_memory(), nds32_v2_translate_address(), NDS_MEMORY_ACC_CPU, size, target::state, TARGET_HALTED, and target_to_nds32().
|
static |
|
static |
Definition at line 445 of file nds32_v2.c.
References BKPT_HARD, BKPT_SOFT, ERROR_FAIL, ERROR_OK, nds32_remove_software_breakpoint(), nds32_v2_common::next_hbr_index, target_to_nds32_v2(), and breakpoint::type.
|
static |
Definition at line 486 of file nds32_v2.c.
References ERROR_FAIL, ERROR_OK, nds32_v2_common::next_hbr_index, and target_to_nds32_v2().
|
static |
Definition at line 257 of file nds32_v2.c.
References aice_write_register(), nds32_v2_common::backup_ir0, ERROR_OK, IR0, nds32_v2_common::nds32, nds32::target, and target_to_aice().
Referenced by nds32_v2_leave_debug_state().
|
static |
Definition at line 548 of file nds32_v2.c.
References ERROR_FAIL, and LOG_WARNING.
|
static |
Definition at line 563 of file nds32_v2.c.
References nds32::enter_debug_state, ERROR_FAIL, ERROR_OK, nds32::get_debug_reason, nds32::get_watched_address, nds32::leave_debug_state, nds32_v2_common::nds32, nds32_init_arch_info(), nds32_v2_debug_entry(), nds32_v2_get_debug_reason(), nds32_v2_get_exception_address(), nds32_v2_leave_debug_state(), nds32_v2_register_mapping(), and nds32::register_map.
|
static |
Definition at line 327 of file nds32_v2.c.
References ERROR_OK, and LOG_WARNING.
|
static |
Definition at line 627 of file nds32_v2.c.
References nds32_memory::access_channel, ERROR_FAIL, ERROR_OK, nds32::memory, nds32_reach_max_interrupt_level(), NDS_MEMORY_ACC_BUS, NDS_MEMORY_ACC_CPU, target_to_nds32(), target::type, and target_type::virt2phys.
Referenced by nds32_v2_read_buffer(), nds32_v2_read_memory(), and nds32_v2_write_buffer().
|
static |
Definition at line 668 of file nds32_v2.c.
References nds32_memory::access_channel, buffer, ERROR_TARGET_NOT_HALTED, LOG_WARNING, nds32::memory, nds32_v2_translate_address(), nds32_write_buffer(), NDS_MEMORY_ACC_CPU, size, target::state, TARGET_HALTED, and target_to_nds32().
|
static |
Definition at line 708 of file nds32_v2.c.
struct target_type nds32_v2_target |
Holds methods for V2 targets.
Definition at line 708 of file nds32_v2.c.