OpenOCD
|
Holds the interface to Andes cores. More...
Go to the source code of this file.
Data Structures | |
struct | nds32 |
Represents a generic Andes core. More... | |
struct | nds32_cache |
struct | nds32_cpu_version |
struct | nds32_edm |
struct | nds32_edm_operation |
struct | nds32_memory |
struct | nds32_misc_config |
struct | nds32_mmu_config |
struct | nds32_reg |
Macros | |
#define | CHECK_RETVAL(action) |
#define | NDS32_COMMON_MAGIC 0xADE5ADE5U |
#define | NDS32_EDM_OPERATION_MAX_NUM 64 |
#define | NDS32_STRUCT_STAT_SIZE 60 |
#define | NDS32_STRUCT_TIMEVAL_SIZE 8 |
Enumerations | |
enum | nds32_debug_reason { NDS32_DEBUG_BREAK = 0 , NDS32_DEBUG_BREAK_16 , NDS32_DEBUG_INST_BREAK , NDS32_DEBUG_DATA_ADDR_WATCHPOINT_PRECISE , NDS32_DEBUG_DATA_VALUE_WATCHPOINT_PRECISE , NDS32_DEBUG_DATA_VALUE_WATCHPOINT_IMPRECISE , NDS32_DEBUG_DEBUG_INTERRUPT , NDS32_DEBUG_HARDWARE_SINGLE_STEP , NDS32_DEBUG_DATA_ADDR_WATCHPOINT_NEXT_PRECISE , NDS32_DEBUG_DATA_VALUE_WATCHPOINT_NEXT_PRECISE , NDS32_DEBUG_LOAD_STORE_GLOBAL_STOP } |
enum | nds32_syscall_id { NDS32_SYSCALL_UNDEFINED = 0 , NDS32_SYSCALL_EXIT = 1 , NDS32_SYSCALL_OPEN = 2 , NDS32_SYSCALL_CLOSE = 3 , NDS32_SYSCALL_READ = 4 , NDS32_SYSCALL_WRITE = 5 , NDS32_SYSCALL_LSEEK = 6 , NDS32_SYSCALL_UNLINK = 7 , NDS32_SYSCALL_RENAME = 3001 , NDS32_SYSCALL_FSTAT = 10 , NDS32_SYSCALL_STAT = 15 , NDS32_SYSCALL_GETTIMEOFDAY = 19 , NDS32_SYSCALL_ISATTY = 3002 , NDS32_SYSCALL_SYSTEM = 3003 , NDS32_SYSCALL_ERRNO = 6001 } |
Functions | |
static bool | is_nds32 (struct nds32 *nds32) |
int | nds32_add_software_breakpoint (struct target *target, struct breakpoint *breakpoint) |
int | nds32_arch_state (struct target *target) |
int | nds32_assert_reset (struct target *target) |
int | nds32_cache_sync (struct target *target, target_addr_t address, uint32_t length) |
int | nds32_config (struct nds32 *nds32) |
int | nds32_edm_config (struct nds32 *nds32) |
int | nds32_examine_debug_reason (struct nds32 *nds32) |
int | nds32_full_context (struct nds32 *nds32) |
int | nds32_gdb_fileio_end (struct target *target, int retcode, int fileio_errno, bool ctrl_c) |
int | nds32_gdb_fileio_write_memory (struct nds32 *nds32, uint32_t address, uint32_t size, const uint8_t *buffer) |
int | nds32_get_gdb_fileio_info (struct target *target, struct gdb_fileio_info *fileio_info) |
int | nds32_get_gdb_reg_list (struct target *target, struct reg **reg_list[], int *reg_list_size, enum target_register_class reg_class) |
get all register list More... | |
int | nds32_get_mapped_reg (struct nds32 *nds32, unsigned regnum, uint32_t *value) |
int | nds32_halt (struct target *target) |
int | nds32_init (struct nds32 *nds32) |
int | nds32_init_arch_info (struct target *target, struct nds32 *nds32) |
int | nds32_init_memory_info (struct nds32 *nds32) |
int | nds32_init_register_table (struct nds32 *nds32) |
int | nds32_login (struct nds32 *nds32) |
int | nds32_mmu (struct target *target, int *enabled) |
uint32_t | nds32_nextpc (struct nds32 *nds32, int current, uint32_t address) |
int | nds32_poll (struct target *target) |
int | nds32_profiling (struct target *target, uint32_t *samples, uint32_t max_num_samples, uint32_t *num_samples, uint32_t seconds) |
static bool | nds32_reach_max_interrupt_level (struct nds32 *nds32) |
int | nds32_read_buffer (struct target *target, uint32_t address, uint32_t size, uint8_t *buffer) |
int | nds32_read_memory (struct target *target, uint32_t address, uint32_t size, uint32_t count, uint8_t *buffer) |
int | nds32_read_phys_memory (struct target *target, target_addr_t address, uint32_t size, uint32_t count, uint8_t *buffer) |
int | nds32_remove_software_breakpoint (struct target *target, struct breakpoint *breakpoint) |
int | nds32_reset_halt (struct nds32 *nds32) |
int | nds32_restore_context (struct target *target) |
Restore the processor context on an Andes target. More... | |
int | nds32_resume (struct target *target, int current, target_addr_t address, int handle_breakpoints, int debug_execution) |
int | nds32_set_mapped_reg (struct nds32 *nds32, unsigned regnum, uint32_t value) |
set register internally More... | |
int | nds32_step (struct target *target, int current, target_addr_t address, int handle_breakpoints) |
int | nds32_target_state (struct nds32 *nds32, enum target_state *state) |
int | nds32_virtual_to_physical (struct target *target, target_addr_t address, target_addr_t *physical) |
int | nds32_write_buffer (struct target *target, uint32_t address, uint32_t size, const uint8_t *buffer) |
int | nds32_write_memory (struct target *target, uint32_t address, uint32_t size, uint32_t count, const uint8_t *buffer) |
int | nds32_write_phys_memory (struct target *target, target_addr_t address, uint32_t size, uint32_t count, const uint8_t *buffer) |
static struct aice_port_s * | target_to_aice (struct target *target) |
static struct nds32 * | target_to_nds32 (struct target *target) |
Convert target handle to generic Andes target state handle. More... | |
Variables | |
const char * | nds32_debug_type_name [11] |
Holds the interface to Andes cores.
Definition in file nds32.h.
#define CHECK_RETVAL | ( | action | ) |
enum nds32_debug_reason |
enum nds32_syscall_id |
|
inlinestatic |
Definition at line 435 of file nds32.h.
References nds32::common_magic, and NDS32_COMMON_MAGIC.
Referenced by COMMAND_HANDLER().
int nds32_add_software_breakpoint | ( | struct target * | target, |
struct breakpoint * | breakpoint | ||
) |
Definition at line 1431 of file nds32.c.
References breakpoint::address, ERROR_FAIL, ERROR_OK, breakpoint::length, NDS32_BREAK_16, NDS32_BREAK_32, nds32_cache_sync(), breakpoint::orig_instr, target_type::read_buffer, target::type, and target_type::write_buffer.
Referenced by nds32_v2_add_breakpoint(), nds32_v3_add_breakpoint(), and nds32_v3m_add_breakpoint().
int nds32_arch_state | ( | struct target * | target | ) |
Definition at line 964 of file nds32.c.
References buf_set_u32(), nds32::common_magic, debug_reason_name(), ERROR_FAIL, ERROR_OK, IR0, LOG_ERROR, LOG_USER, NDS32_COMMON_MAGIC, nds32_get_mapped_reg(), PC, target::reg_cache, register_get_by_name(), target_to_nds32(), reg::value, and nds32::virtual_hosting.
int nds32_assert_reset | ( | struct target * | target | ) |
Definition at line 2176 of file nds32.c.
References aice_assert_srst(), AICE_RESET_HOLD, AICE_SRST, alive_sleep(), nds32::boot_time, nds32::core_cache, nds32_cpu_version::cpu_id_family, nds32_cpu_version::cpu_id_version, nds32::cpu_version, nds32::edm, ERROR_OK, ERROR_TARGET_NOT_EXAMINED, LOG_WARNING, nds32_login(), nds32_soft_reset_halt(), register_cache_invalidate(), target::reset_halt, nds32_cpu_version::revision, nds32::soft_reset_halt, target::state, TARGET_RESET, target_to_aice(), target_to_nds32(), target_was_examined(), and nds32_edm::version.
int nds32_cache_sync | ( | struct target * | target, |
target_addr_t | address, | ||
uint32_t | length | ||
) |
Definition at line 1680 of file nds32.c.
References aice_cache_ctl(), AICE_CACHE_CTL_L1D_VA_INVAL, AICE_CACHE_CTL_L1D_VA_WB, AICE_CACHE_CTL_L1I_VA_INVAL, nds32_memory::dcache, nds32_cache::enable, ERROR_FAIL, ERROR_OK, nds32_memory::icache, length, nds32_cache::line_size, nds32::memory, nds32_line_size_table, target_to_aice(), target_to_nds32(), target::type, and target_type::virt2phys.
Referenced by nds32_add_software_breakpoint(), and nds32_remove_software_breakpoint().
int nds32_config | ( | struct nds32 * | nds32 | ) |
Definition at line 1593 of file nds32.c.
References nds32_memory::dlm_size, ERROR_OK, nds32_memory::ilm_size, nds32_misc_config::interruption_level, nds32::max_interrupt_level, nds32::memory, nds32::misc_config, MR6, MR7, nds32_get_mapped_reg(), nds32_init_config(), nds32_init_option_registers(), and nds32_lm_size_table.
Referenced by nds32_v2_debug_entry(), and nds32_v3_debug_entry().
int nds32_edm_config | ( | struct nds32 * | nds32 | ) |
Definition at line 1554 of file nds32.c.
References nds32_edm::access_control, aice_read_debug_reg(), nds32_edm::breakpoint_num, nds32_edm::direct_access_local_memory, nds32::edm, ERROR_OK, LOG_INFO, nds32_login(), NDS_EDM_SR_EDM_CFG, NDS_EDM_SR_EDM_CTL, nds32_edm::support_max_stop, nds32::target, target_to_aice(), and nds32_edm::version.
Referenced by nds32_v2_examine(), nds32_v3_examine(), and nds32_v3m_examine().
int nds32_examine_debug_reason | ( | struct nds32 * | nds32 | ) |
Definition at line 1888 of file nds32.c.
References DBG_REASON_BREAKPOINT, DBG_REASON_DBGRQ, DBG_REASON_EXIT, DBG_REASON_SINGLESTEP, DBG_REASON_UNDEFINED, DBG_REASON_WATCHPOINT, target::debug_reason, ERROR_FAIL, ERROR_OK, nds32::get_debug_reason, nds32::get_watched_address, nds32::hit_syscall, nds32_instruction::imm, nds32_instruction::info, LOG_DEBUG, NDS32_DEBUG_BREAK, NDS32_DEBUG_BREAK_16, NDS32_DEBUG_DATA_ADDR_WATCHPOINT_NEXT_PRECISE, NDS32_DEBUG_DATA_ADDR_WATCHPOINT_PRECISE, NDS32_DEBUG_DATA_VALUE_WATCHPOINT_IMPRECISE, NDS32_DEBUG_DATA_VALUE_WATCHPOINT_NEXT_PRECISE, NDS32_DEBUG_DATA_VALUE_WATCHPOINT_PRECISE, NDS32_DEBUG_DEBUG_INTERRUPT, NDS32_DEBUG_HARDWARE_SINGLE_STEP, NDS32_DEBUG_INST_BREAK, NDS32_DEBUG_LOAD_STORE_GLOBAL_STOP, nds32_debug_type_name, nds32_evaluate_opcode(), nds32_get_mapped_reg(), nds32_read_opcode(), nds32_step_without_watchpoint(), nds32_instruction::opc_6, nds32_instruction::opcode, PC, nds32_instruction::sub_opc, nds32::target, and nds32::watched_address.
Referenced by nds32_v2_debug_entry(), and nds32_v3_debug_entry().
int nds32_full_context | ( | struct nds32 * | nds32 | ) |
Definition at line 494 of file nds32.c.
References ERROR_OK, IR0, nds32_check_extension(), nds32_get_mapped_reg(), nds32_update_cache_info(), nds32_update_lm_info(), nds32_update_mmu_info(), nds32_update_psw(), PC, and reg::value.
Referenced by nds32_v2_debug_entry(), and nds32_v3_debug_entry().
int nds32_gdb_fileio_end | ( | struct target * | target, |
int | retcode, | ||
int | fileio_errno, | ||
bool | ctrl_c | ||
) |
Definition at line 2458 of file nds32.c.
References nds32::active_syscall_id, ERROR_OK, LOG_DEBUG, nds32_set_mapped_reg(), NDS32_SYSCALL_UNDEFINED, R0, target_to_nds32(), nds32::virtual_hosting_ctrl_c, and nds32::virtual_hosting_errno.
int nds32_gdb_fileio_write_memory | ( | struct nds32 * | nds32, |
uint32_t | address, | ||
uint32_t | size, | ||
const uint8_t * | buffer | ||
) |
Definition at line 2499 of file nds32.c.
References nds32::active_syscall_id, buffer, NDS32_STRUCT_STAT_SIZE, NDS32_STRUCT_TIMEVAL_SIZE, NDS32_SYSCALL_FSTAT, NDS32_SYSCALL_GETTIMEOFDAY, NDS32_SYSCALL_STAT, nds32_write_buffer(), size, and nds32::target.
Referenced by nds32_v3_write_buffer().
int nds32_get_gdb_fileio_info | ( | struct target * | target, |
struct gdb_fileio_info * | fileio_info | ||
) |
Definition at line 2297 of file nds32.c.
References nds32::active_syscall_id, ERROR_FAIL, ERROR_OK, nds32::hit_syscall, gdb_fileio_info::identifier, IR6, LOG_DEBUG, LOG_ERROR, nds32_get_mapped_reg(), nds32_set_mapped_reg(), NDS32_SYSCALL_CLOSE, NDS32_SYSCALL_ERRNO, NDS32_SYSCALL_EXIT, NDS32_SYSCALL_FSTAT, NDS32_SYSCALL_GETTIMEOFDAY, NDS32_SYSCALL_ISATTY, NDS32_SYSCALL_LSEEK, NDS32_SYSCALL_OPEN, NDS32_SYSCALL_READ, NDS32_SYSCALL_RENAME, NDS32_SYSCALL_STAT, NDS32_SYSCALL_SYSTEM, NDS32_SYSCALL_UNLINK, NDS32_SYSCALL_WRITE, NULL, gdb_fileio_info::param_1, gdb_fileio_info::param_2, gdb_fileio_info::param_3, gdb_fileio_info::param_4, R0, R1, R2, target_type::read_buffer, target_to_nds32(), target::type, and nds32::virtual_hosting_errno.
int nds32_get_gdb_reg_list | ( | struct target * | target, |
struct reg ** | reg_list[], | ||
int * | reg_list_size, | ||
enum target_register_class | reg_class | ||
) |
get all register list
Definition at line 596 of file nds32.c.
References ERROR_FAIL, nds32_get_all_reg_list(), nds32_get_general_reg_list(), REG_CLASS_ALL, REG_CLASS_GENERAL, and target_to_nds32().
int nds32_get_mapped_reg | ( | struct nds32 * | nds32, |
unsigned | regnum, | ||
uint32_t * | value | ||
) |
Definition at line 513 of file nds32.c.
References buf_get_u32(), nds32::core_cache, ERROR_FAIL, ERROR_OK, reg_arch_type::get, nds32_reg_current(), reg_cache::num_regs, reg::type, and reg::value.
Referenced by COMMAND_HANDLER(), nds32_arch_state(), nds32_calculate_lsmw_access_range(), nds32_check_extension(), nds32_config(), nds32_examine_debug_reason(), nds32_full_context(), nds32_get_gdb_fileio_info(), nds32_init_config(), nds32_init_memory_config(), nds32_init_option_registers(), nds32_nextpc(), nds32_parse_group_0_insn(), nds32_parse_group_1_insn(), nds32_parse_group_1_insn_16(), nds32_parse_group_2_insn(), nds32_parse_group_3_insn_16(), nds32_parse_hwgp(), nds32_parse_mem(), nds32_parse_sbgp(), nds32_resume(), nds32_soft_reset_halt(), nds32_step(), nds32_step_without_watchpoint(), nds32_update_cache_info(), nds32_update_lm_info(), nds32_update_mmu_info(), nds32_update_psw(), nds32_v3_check_interrupt_stack(), nds32_v3_deassert_reset(), nds32_v3_debug_entry(), nds32_v3_get_exception_address(), nds32_v3_leave_debug_state(), nds32_v3_restore_interrupt_stack(), nds32_v3m_check_interrupt_stack(), nds32_v3m_restore_interrupt_stack(), and nds32_walk_page_table().
int nds32_halt | ( | struct target * | target | ) |
Definition at line 2031 of file nds32.c.
References aice_halt(), CHECK_RETVAL, nds32::enter_debug_state, ERROR_FAIL, ERROR_OK, LOG_DEBUG, nds32_target_state(), state, target::state, target_call_event_callbacks(), TARGET_EVENT_HALTED, TARGET_HALTED, target_state_name(), target_to_aice(), and target_to_nds32().
int nds32_init | ( | struct nds32 * | nds32 | ) |
Definition at line 2285 of file nds32.c.
References nds32_memory::access_channel, ERROR_OK, nds32::memory, nds32_callback_event_handler(), NDS_MEMORY_ACC_CPU, nds32::target, target::target_number, and target_register_event_callback().
Referenced by nds32_v2_init_target(), and nds32_v3_init_target().
Definition at line 1620 of file nds32.c.
References nds32::active_syscall_id, target::arch_info, breakpoint::asid, nds32::attached, nds32::auto_convert_hw_bp, nds32::boot_time, nds32::common_magic, nds32::edm_passcode, ERROR_FAIL, ERROR_OK, nds32::global_stop, nds32::hit_syscall, nds32::init_arch_info_after_halted, breakpoint::is_set, nds32::keep_target_edm_ctl, breakpoint::length, breakpoint::linked_brp, NDS32_COMMON_MAGIC, nds32_init_register_table(), nds32_reg_cache_init(), nds32_reg_init(), NDS32_SYSCALL_UNDEFINED, breakpoint::next, NULL, breakpoint::orig_instr, nds32::privilege_level, nds32::reset_halt_as_examine, nds32::soft_reset_halt, nds32::syscall_break, target, nds32::target, target::target_number, breakpoint::unique_id, nds32::virtual_hosting, nds32::virtual_hosting_ctrl_c, nds32::virtual_hosting_errno, and nds32::word_access_mem.
Referenced by nds32_v2_target_create(), and nds32_v3_target_create_common().
int nds32_init_memory_info | ( | struct nds32 * | nds32 | ) |
int nds32_init_register_table | ( | struct nds32 * | nds32 | ) |
Definition at line 1424 of file nds32.c.
References ERROR_OK, and nds32_init_must_have_registers().
Referenced by nds32_init_arch_info().
int nds32_login | ( | struct nds32 * | nds32 | ) |
Definition at line 1969 of file nds32.c.
References aice_program_edm(), aice_read_debug_reg(), nds32::edm_passcode, ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_INFO, nds32_edm_ops, nds32_edm_ops_num, NDS_EDM_SR_EDMSW, NULL, nds32::privilege_level, nds32::target, target_to_aice(), and nds32_edm_operation::value.
Referenced by nds32_assert_reset(), and nds32_edm_config().
int nds32_mmu | ( | struct target * | target, |
int * | enabled | ||
) |
Definition at line 945 of file nds32.c.
References nds32_memory::address_translation, ERROR_OK, ERROR_TARGET_INVALID, LOG_ERROR, nds32::memory, nds32_mmu_config::memory_protection, nds32::mmu_config, target::state, TARGET_HALTED, and target_to_nds32().
uint32_t nds32_nextpc | ( | struct nds32 * | nds32, |
int | current, | ||
uint32_t | address | ||
) |
Definition at line 1740 of file nds32.c.
References nds32_get_mapped_reg(), nds32_set_mapped_reg(), and PC.
Referenced by nds32_resume(), and nds32_step().
int nds32_poll | ( | struct target * | target | ) |
Definition at line 2061 of file nds32.c.
References aice_run(), nds32::core_cache, DBG_REASON_NOTHALTED, target::debug_reason, nds32::enter_debug_state, ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_WARNING, nds32_target_state(), register_cache_invalidate(), state, target::state, target_call_event_callbacks(), TARGET_DEBUG_RUNNING, TARGET_EVENT_HALTED, TARGET_HALTED, TARGET_RESET, TARGET_RUNNING, target_to_aice(), and target_to_nds32().
Referenced by nds32_v2_deassert_reset(), nds32_v3_deassert_reset(), and nds32_v3m_deassert_reset().
int nds32_profiling | ( | struct target * | target, |
uint32_t * | samples, | ||
uint32_t | max_num_samples, | ||
uint32_t * | num_samples, | ||
uint32_t | seconds | ||
) |
Definition at line 2474 of file nds32.c.
References aice_profiling(), target::cmd_name, nds32::core_cache, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_WARNING, PC, register_cache_invalidate(), nds32::register_map, target::state, TARGET_HALTED, target_to_aice(), and target_to_nds32().
|
inlinestatic |
Definition at line 441 of file nds32.h.
References nds32::current_interrupt_level, and nds32::max_interrupt_level.
Referenced by nds32_resume(), nds32_v2_check_interrupt_stack(), nds32_v2_translate_address(), nds32_v3_check_interrupt_stack(), and nds32_v3m_check_interrupt_stack().
int nds32_read_buffer | ( | struct target * | target, |
uint32_t | address, | ||
uint32_t | size, | ||
uint8_t * | buffer | ||
) |
Definition at line 713 of file nds32.c.
References nds32_memory::access_channel, aice_read_mem_bulk(), aice_read_mem_unit(), buffer, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_DEBUG, LOG_WARNING, nds32::memory, nds32_select_memory_mode(), NDS_MEMORY_ACC_CPU, size, target::state, TARGET_HALTED, target_to_aice(), and target_to_nds32().
Referenced by nds32_v2_read_buffer(), nds32_v3_read_buffer(), and nds32_walk_page_table().
int nds32_read_memory | ( | struct target * | target, |
uint32_t | address, | ||
uint32_t | size, | ||
uint32_t | count, | ||
uint8_t * | buffer | ||
) |
Definition at line 804 of file nds32.c.
References aice_read_mem_unit(), buffer, count, size, and target_to_aice().
Referenced by nds32_v2_read_memory(), and nds32_v3_read_memory().
int nds32_read_phys_memory | ( | struct target * | target, |
target_addr_t | address, | ||
uint32_t | size, | ||
uint32_t | count, | ||
uint8_t * | buffer | ||
) |
Definition at line 812 of file nds32.c.
References nds32_memory::access_channel, aice_memory_access(), aice_read_mem_unit(), buffer, count, nds32::memory, NDS_MEMORY_ACC_BUS, size, target_to_aice(), and target_to_nds32().
int nds32_remove_software_breakpoint | ( | struct target * | target, |
struct breakpoint * | breakpoint | ||
) |
Definition at line 1469 of file nds32.c.
References breakpoint::address, ERROR_FAIL, ERROR_OK, breakpoint::length, NDS32_BREAK_16, NDS32_BREAK_32, nds32_cache_sync(), breakpoint::orig_instr, target_type::read_buffer, target::type, and target_type::write_buffer.
Referenced by nds32_v2_remove_breakpoint(), nds32_v3_remove_breakpoint(), and nds32_v3m_remove_breakpoint().
int nds32_reset_halt | ( | struct nds32 * | nds32 | ) |
Definition at line 2605 of file nds32.c.
References aice_assert_srst(), AICE_RESET_HOLD, ERROR_OK, LOG_INFO, nds32::target, and target_to_aice().
Referenced by nds32_v2_examine(), nds32_v3_examine(), and nds32_v3m_examine().
int nds32_restore_context | ( | struct target * | target | ) |
Restore the processor context on an Andes target.
The full processor context is analyzed to see if any of the registers are dirty on this end, but have a valid new value. If this is the case, the processor is changed to the appropriate mode and the new register values are written out to the processor. If there happens to be a dirty register with an invalid value, an error will be logged.
target | Pointer to the Andes target to have its context restored |
Definition at line 1510 of file nds32.c.
References aice_write_reg_64(), aice_write_register(), reg::arch_info, buf_get_u32(), buf_get_u64(), nds32::core_cache, reg::dirty, ERROR_OK, ERROR_TARGET_NOT_HALTED, FD0, FD31, LOG_DEBUG, LOG_WARNING, reg::name, nds32_reg::num, reg_cache::num_regs, reg_cache::reg_list, target::state, TARGET_HALTED, target_to_aice(), target_to_nds32(), reg::valid, nds32_reg::value, and reg::value.
Referenced by nds32_v2_leave_debug_state(), and nds32_v3_leave_debug_state().
int nds32_resume | ( | struct target * | target, |
int | current, | ||
target_addr_t | address, | ||
int | handle_breakpoints, | ||
int | debug_execution | ||
) |
Definition at line 2104 of file nds32.c.
References aice_run(), CHECK_RETVAL, DBG_REASON_NOTHALTED, target::debug_reason, ERROR_OK, ERROR_TARGET_NOT_HALTED, IR0, nds32::leave_debug_state, LOG_DEBUG, LOG_ERROR, nds32_get_mapped_reg(), nds32_nextpc(), nds32_reach_max_interrupt_level(), nds32_set_mapped_reg(), target::state, target_call_event_callbacks(), TARGET_DEBUG_RUNNING, TARGET_EVENT_RESUMED, target_free_all_working_areas(), TARGET_HALTED, TARGET_PRIxADDR, TARGET_RUNNING, target_state_name(), target_to_aice(), target_to_nds32(), and nds32::virtual_hosting_ctrl_c.
int nds32_set_mapped_reg | ( | struct nds32 * | nds32, |
unsigned | regnum, | ||
uint32_t | value | ||
) |
set register internally
Definition at line 532 of file nds32.c.
References buf_set_u32(), nds32::core_cache, ERROR_FAIL, nds32_reg_current(), reg_cache::num_regs, reg_arch_type::set, reg::type, and reg::value.
Referenced by COMMAND_HANDLER(), nds32_gdb_fileio_end(), nds32_get_gdb_fileio_info(), nds32_init_option_registers(), nds32_nextpc(), nds32_resume(), nds32_soft_reset_halt(), nds32_step(), nds32_step_without_watchpoint(), nds32_v3_deassert_reset(), nds32_v3_restore_interrupt_stack(), and nds32_v3m_restore_interrupt_stack().
int nds32_step | ( | struct target * | target, |
int | current, | ||
target_addr_t | address, | ||
int | handle_breakpoints | ||
) |
set DSSIM
Definition at line 1750 of file nds32.c.
References aice_step(), CHECK_RETVAL, nds32::enter_debug_state, ERROR_FAIL, ERROR_OK, ERROR_TARGET_NOT_HALTED, nds32::hit_syscall, IR14, nds32::leave_debug_state, LOG_DEBUG, LOG_WARNING, nds32_get_mapped_reg(), nds32_nextpc(), nds32_set_mapped_reg(), target::state, nds32::step_isr_enable, target_call_event_callbacks(), TARGET_EVENT_HALTED, TARGET_EVENT_RESUMED, TARGET_HALTED, TARGET_PRIxADDR, target_state_name(), target_to_aice(), and target_to_nds32().
int nds32_target_state | ( | struct nds32 * | nds32, |
enum target_state * | state | ||
) |
Definition at line 1851 of file nds32.c.
References AICE_DISCONNECT, aice_state(), AICE_TARGET_DEBUG_RUNNING, AICE_TARGET_DETACH, AICE_TARGET_HALTED, AICE_TARGET_RESET, AICE_TARGET_RUNNING, AICE_TARGET_UNKNOWN, ERROR_FAIL, ERROR_OK, LOG_INFO, state, nds32::target, TARGET_DEBUG_RUNNING, TARGET_HALTED, TARGET_RESET, TARGET_RUNNING, target_to_aice(), and TARGET_UNKNOWN.
Referenced by nds32_halt(), and nds32_poll().
int nds32_virtual_to_physical | ( | struct target * | target, |
target_addr_t | address, | ||
target_addr_t * | physical | ||
) |
Definition at line 1662 of file nds32.c.
References nds32_memory::address_translation, ERROR_FAIL, ERROR_OK, nds32::memory, nds32_probe_tlb(), nds32_walk_page_table(), and target_to_nds32().
int nds32_write_buffer | ( | struct target * | target, |
uint32_t | address, | ||
uint32_t | size, | ||
const uint8_t * | buffer | ||
) |
Definition at line 836 of file nds32.c.
References nds32_memory::access_channel, aice_write_mem_bulk(), aice_write_mem_unit(), buffer, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_DEBUG, LOG_WARNING, nds32::memory, nds32_select_memory_mode(), NDS_MEMORY_ACC_CPU, size, target::state, TARGET_HALTED, target_to_aice(), and target_to_nds32().
Referenced by nds32_gdb_fileio_write_memory(), nds32_v2_write_buffer(), and nds32_v3_write_buffer().
int nds32_write_memory | ( | struct target * | target, |
uint32_t | address, | ||
uint32_t | size, | ||
uint32_t | count, | ||
const uint8_t * | buffer | ||
) |
Definition at line 913 of file nds32.c.
References aice_write_mem_unit(), buffer, count, size, and target_to_aice().
Referenced by nds32_v3_write_memory().
int nds32_write_phys_memory | ( | struct target * | target, |
target_addr_t | address, | ||
uint32_t | size, | ||
uint32_t | count, | ||
const uint8_t * | buffer | ||
) |
Definition at line 921 of file nds32.c.
References nds32_memory::access_channel, aice_memory_access(), aice_write_mem_unit(), buffer, count, nds32::memory, NDS_MEMORY_ACC_BUS, size, target_to_aice(), and target_to_nds32().
|
inlinestatic |
Definition at line 429 of file nds32.h.
References jtag_tap::priv, and target::tap.
Referenced by COMMAND_HANDLER(), jim_nds32_multi_write(), jim_nds32_read_edm_sr(), jim_nds32_write_edm_sr(), nds32_assert_reset(), nds32_cache_sync(), nds32_edm_config(), nds32_gdb_attach(), nds32_gdb_detach(), nds32_get_core_reg(), nds32_get_core_reg_64(), nds32_halt(), nds32_login(), nds32_poll(), nds32_probe_tlb(), nds32_profiling(), nds32_read_buffer(), nds32_read_memory(), nds32_read_phys_memory(), nds32_reset_halt(), nds32_restore_context(), nds32_resume(), nds32_select_memory_mode(), nds32_set_core_reg(), nds32_soft_reset_halt(), nds32_step(), nds32_step_without_watchpoint(), nds32_target_state(), nds32_update_psw(), 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(), nds32_v2_examine(), nds32_v2_get_debug_reason(), nds32_v2_get_exception_address(), nds32_v2_restore_interrupt_stack(), nds32_v3_activate_hardware_breakpoint(), nds32_v3_activate_hardware_watchpoint(), nds32_v3_deactivate_hardware_breakpoint(), nds32_v3_deactivate_hardware_watchpoint(), nds32_v3_deassert_reset(), nds32_v3_examine(), nds32_v3_get_debug_reason(), nds32_v3_get_exception_address(), nds32_v3_leave_debug_state(), nds32_v3_read_buffer(), nds32_v3_read_memory(), nds32_v3_write_buffer(), nds32_v3m_activate_hardware_breakpoint(), nds32_v3m_activate_hardware_watchpoint(), nds32_v3m_deactivate_hardware_breakpoint(), nds32_v3m_deactivate_hardware_watchpoint(), nds32_v3m_examine(), nds32_write_buffer(), nds32_write_memory(), and nds32_write_phys_memory().
Convert target handle to generic Andes target state handle.
Definition at line 422 of file nds32.h.
References target::arch_info.
Referenced by COMMAND_HANDLER(), nds32_arch_state(), nds32_assert_reset(), nds32_cache_sync(), nds32_callback_event_handler(), nds32_gdb_fileio_end(), nds32_get_core_reg(), nds32_get_core_reg_64(), nds32_get_gdb_fileio_info(), nds32_get_gdb_reg_list(), nds32_halt(), nds32_mmu(), nds32_poll(), nds32_profiling(), nds32_read_buffer(), nds32_read_phys_memory(), nds32_restore_context(), nds32_resume(), nds32_select_memory_mode(), nds32_set_core_reg(), nds32_soft_reset_halt(), nds32_step(), nds32_v2_hit_watchpoint(), nds32_v2_init_target(), nds32_v2_read_buffer(), nds32_v2_read_memory(), nds32_v2_translate_address(), nds32_v2_write_buffer(), nds32_v3_hit_watchpoint(), nds32_v3_init_target(), nds32_v3_read_buffer(), nds32_v3_read_memory(), nds32_v3_write_buffer(), nds32_v3_write_memory(), nds32_virtual_to_physical(), nds32_write_buffer(), and nds32_write_phys_memory().
|
extern |
Definition at line 22 of file nds32.c.
Referenced by nds32_examine_debug_reason().