OpenOCD
|
Go to the source code of this file.
Macros | |
#define | TAPINS_BYPASS 0x1F |
#define | TAPINS_BYPASS_LEN 1 |
#define | TAPINS_IDCODE 0x1E |
#define | TAPINS_IDCODE_LEN 32 |
#define | TAPINS_NARSEL 0x1C |
#define | TAPINS_NARSEL_ADRLEN 8 |
#define | TAPINS_NARSEL_DATALEN 32 |
#define | TAPINS_PWRCTL 0x08 |
#define | TAPINS_PWRCTL_LEN 8 |
#define | TAPINS_PWRSTAT 0x09 |
#define | TAPINS_PWRSTAT_LEN 8 |
Variables | |
static const struct xtensa_dm_pwr_reg_offsets | xdm_pwr_regs [XDMREG_PWRNUM] |
static const struct xtensa_dm_reg_offsets | xdm_regs [XDMREG_NUM] |
#define TAPINS_BYPASS 0x1F |
Definition at line 20 of file xtensa_debug_module.c.
#define TAPINS_BYPASS_LEN 1 |
Definition at line 27 of file xtensa_debug_module.c.
#define TAPINS_IDCODE 0x1E |
Definition at line 19 of file xtensa_debug_module.c.
#define TAPINS_IDCODE_LEN 32 |
Definition at line 26 of file xtensa_debug_module.c.
#define TAPINS_NARSEL 0x1C |
Definition at line 18 of file xtensa_debug_module.c.
#define TAPINS_NARSEL_ADRLEN 8 |
Definition at line 24 of file xtensa_debug_module.c.
#define TAPINS_NARSEL_DATALEN 32 |
Definition at line 25 of file xtensa_debug_module.c.
#define TAPINS_PWRCTL 0x08 |
Definition at line 16 of file xtensa_debug_module.c.
#define TAPINS_PWRCTL_LEN 8 |
Definition at line 22 of file xtensa_debug_module.c.
#define TAPINS_PWRSTAT 0x09 |
Definition at line 17 of file xtensa_debug_module.c.
#define TAPINS_PWRSTAT_LEN 8 |
Definition at line 23 of file xtensa_debug_module.c.
|
static |
Definition at line 49 of file xtensa_debug_module.c.
References scan_field::in_value, jtag_add_dr_scan(), scan_field::num_bits, scan_field::out_value, and xtensa_debug_module::tap.
Referenced by xtensa_dm_queue_pwr_reg_read(), xtensa_dm_queue_pwr_reg_write(), xtensa_dm_queue_reg_read(), and xtensa_dm_queue_reg_write().
|
static |
Definition at line 37 of file xtensa_debug_module.c.
References buf_set_u32(), jtag_tap::ir_length, jtag_add_ir_scan(), scan_field::num_bits, scan_field::out_value, xtensa_debug_module::tap, and TAP_IDLE.
Referenced by xtensa_dm_queue_pwr_reg_read(), xtensa_dm_queue_pwr_reg_write(), xtensa_dm_queue_reg_read(), and xtensa_dm_queue_reg_write().
int xtensa_dm_core_status_clear | ( | struct xtensa_debug_module * | dm, |
xtensa_dsr_t | bits | ||
) |
Definition at line 281 of file xtensa_debug_module.c.
References bits, xtensa_debug_module::dbg_ops, xtensa_debug_ops::queue_reg_write, XDMREG_DSR, xtensa_dm_queue_execute(), and xtensa_dm_queue_tdi_idle().
Referenced by xtensa_core_status_check(), xtensa_core_status_clear(), and xtensa_poll().
int xtensa_dm_core_status_read | ( | struct xtensa_debug_module * | dm | ) |
Definition at line 267 of file xtensa_debug_module.c.
References buf_get_u32(), xtensa_debug_module::core_status, xtensa_debug_module::dbg_ops, xtensa_core_status::dsr, ERROR_OK, xtensa_debug_ops::queue_reg_read, XDMREG_DSR, xtensa_dm_queue_enable(), xtensa_dm_queue_execute(), and xtensa_dm_queue_tdi_idle().
Referenced by xtensa_core_status_check(), xtensa_do_step(), xtensa_halt(), and xtensa_poll().
void xtensa_dm_deinit | ( | struct xtensa_debug_module * | dm | ) |
Definition at line 86 of file xtensa_debug_module.c.
References dap_put_ap(), xtensa_debug_module::debug_ap, and NULL.
Referenced by xtensa_target_deinit().
int xtensa_dm_device_id_read | ( | struct xtensa_debug_module * | dm | ) |
Definition at line 234 of file xtensa_debug_module.c.
References buf_get_u32(), xtensa_debug_module::dbg_ops, xtensa_debug_module::device_id, ERROR_OK, xtensa_debug_ops::queue_reg_read, XDMREG_OCDID, xtensa_dm_queue_execute(), and xtensa_dm_queue_tdi_idle().
int xtensa_dm_examine | ( | struct xtensa_debug_module * | dm | ) |
Definition at line 104 of file xtensa_debug_module.c.
References adiv5_ap::ap_num, AP_TYPE_APB_AP, xtensa_debug_module::dap, dap_find_get_ap(), dap_get_ap(), dap_put_ap(), xtensa_debug_module::debug_ap, xtensa_debug_module::debug_apsel, DP_APSEL_INVALID, ERROR_OK, LOG_DEBUG, LOG_ERROR, mem_ap_init(), adiv5_ap::memaccess_tck, NULL, and adiv5_ap::tar_autoincr_block.
Referenced by xtensa_chip_examine().
int xtensa_dm_init | ( | struct xtensa_debug_module * | dm, |
const struct xtensa_debug_module_config * | cfg | ||
) |
Definition at line 64 of file xtensa_debug_module.c.
References xtensa_debug_module_config::ap_offset, xtensa_debug_module::ap_offset, xtensa_debug_module_config::dap, xtensa_debug_module::dap, xtensa_debug_module_config::dbg_ops, xtensa_debug_module::dbg_ops, xtensa_debug_module_config::debug_ap, xtensa_debug_module::debug_ap, xtensa_debug_module_config::debug_apsel, xtensa_debug_module::debug_apsel, ERROR_FAIL, ERROR_OK, IS_ALIGNED, LOG_ERROR, xtensa_debug_module_config::pwr_ops, xtensa_debug_module::pwr_ops, xtensa_debug_module_config::queue_tdi_idle, xtensa_debug_module::queue_tdi_idle, xtensa_debug_module_config::queue_tdi_idle_arg, xtensa_debug_module::queue_tdi_idle_arg, xtensa_debug_module_config::tap, xtensa_debug_module::tap, and XTENSA_DM_APB_ALIGN.
Referenced by xtensa_init_arch_info().
int xtensa_dm_perfmon_dump | ( | struct xtensa_debug_module * | dm, |
int | counter_id, | ||
struct xtensa_perfmon_result * | out_result | ||
) |
Definition at line 420 of file xtensa_debug_module.c.
References buf_get_u32(), xtensa_debug_module::dbg_ops, ERROR_OK, xtensa_perfmon_result::overflow, xtensa_debug_ops::queue_reg_read, xtensa_trace_status::stat, xtensa_perfmon_result::value, XDMREG_PM0, XDMREG_PMSTAT0, xtensa_dm_queue_execute(), and xtensa_dm_queue_tdi_idle().
Referenced by COMMAND_HELPER().
int xtensa_dm_perfmon_enable | ( | struct xtensa_debug_module * | dm, |
int | counter_id, | ||
const struct xtensa_perfmon_config * | config | ||
) |
Definition at line 398 of file xtensa_debug_module.c.
References config, xtensa_debug_module::dbg_ops, ERROR_FAIL, xtensa_debug_ops::queue_reg_read, xtensa_debug_ops::queue_reg_write, XDMREG_PM0, XDMREG_PMCTRL0, XDMREG_PMG, XDMREG_PMSTAT0, xtensa_dm_queue_execute(), and xtensa_dm_queue_tdi_idle().
Referenced by COMMAND_HELPER().
int xtensa_dm_poll | ( | struct xtensa_debug_module * | dm | ) |
Definition at line 94 of file xtensa_debug_module.c.
References xtensa_debug_module::dap, xtensa_debug_module::debug_ap, ERROR_FAIL, and ERROR_OK.
Referenced by xtensa_poll().
int xtensa_dm_power_status_read | ( | struct xtensa_debug_module * | dm, |
uint32_t | clear | ||
) |
Definition at line 247 of file xtensa_debug_module.c.
References buf_get_u32(), ERROR_OK, xtensa_debug_module::power_status, xtensa_debug_module::pwr_ops, xtensa_power_ops::queue_reg_read, xtensa_power_status::stat, xtensa_power_status::stath, XDMREG_PWRSTAT, xtensa_dm_queue_execute(), and xtensa_dm_queue_tdi_idle().
Referenced by xtensa_poll().
int xtensa_dm_queue_enable | ( | struct xtensa_debug_module * | dm | ) |
Definition at line 147 of file xtensa_debug_module.c.
References xtensa_debug_module::dbg_ops, OCDDCR_ENABLEOCD, xtensa_debug_ops::queue_reg_write, and XDMREG_DCRSET.
Referenced by xtensa_dm_core_status_read(), and xtensa_examine().
int xtensa_dm_queue_pwr_reg_read | ( | struct xtensa_debug_module * | dm, |
enum xtensa_dm_pwr_reg | reg, | ||
uint8_t * | data, | ||
uint32_t | clear | ||
) |
Definition at line 187 of file xtensa_debug_module.c.
References xtensa_debug_module::ap_offset, xtensa_dm_pwr_reg_offsets::apb, xtensa_debug_module::dap, xtensa_debug_module::debug_ap, ERROR_FAIL, ERROR_OK, LOG_ERROR, mem_ap_read_buf(), mem_ap_write_u32(), TAP_IDLE, TAPINS_PWRCTL, TAPINS_PWRCTL_LEN, TAPINS_PWRSTAT, TAPINS_PWRSTAT_LEN, xdm_pwr_regs, XDMREG_PWRCTL, XDMREG_PWRNUM, xtensa_dm_add_dr_scan(), and xtensa_dm_add_set_ir().
int xtensa_dm_queue_pwr_reg_write | ( | struct xtensa_debug_module * | dm, |
enum xtensa_dm_pwr_reg | reg, | ||
uint32_t | data | ||
) |
Definition at line 214 of file xtensa_debug_module.c.
References xtensa_debug_module::ap_offset, xtensa_dm_pwr_reg_offsets::apb, xtensa_debug_module::dap, xtensa_debug_module::debug_ap, ERROR_FAIL, ERROR_OK, LOG_ERROR, mem_ap_write_u32(), NULL, TAP_IDLE, TAPINS_PWRCTL, TAPINS_PWRCTL_LEN, TAPINS_PWRSTAT, TAPINS_PWRSTAT_LEN, xdm_pwr_regs, XDMREG_PWRCTL, XDMREG_PWRNUM, xtensa_dm_add_dr_scan(), and xtensa_dm_add_set_ir().
int xtensa_dm_queue_reg_read | ( | struct xtensa_debug_module * | dm, |
enum xtensa_dm_reg | reg, | ||
uint8_t * | value | ||
) |
Definition at line 152 of file xtensa_debug_module.c.
References xtensa_debug_module::ap_offset, xtensa_dm_reg_offsets::apb, xtensa_debug_module::dap, xtensa_debug_module::debug_ap, dummy, ERROR_FAIL, ERROR_OK, LOG_ERROR, mem_ap_read_buf(), xtensa_dm_reg_offsets::nar, NULL, TAP_IDLE, TAPINS_NARSEL, TAPINS_NARSEL_ADRLEN, TAPINS_NARSEL_DATALEN, xdm_regs, XDMREG_NUM, xtensa_dm_add_dr_scan(), and xtensa_dm_add_set_ir().
int xtensa_dm_queue_reg_write | ( | struct xtensa_debug_module * | dm, |
enum xtensa_dm_reg | reg, | ||
uint32_t | value | ||
) |
Definition at line 171 of file xtensa_debug_module.c.
References xtensa_debug_module::ap_offset, xtensa_dm_reg_offsets::apb, xtensa_debug_module::dap, xtensa_debug_module::debug_ap, ERROR_FAIL, ERROR_OK, LOG_ERROR, mem_ap_write_u32(), xtensa_dm_reg_offsets::nar, NULL, TAP_IDLE, TAPINS_NARSEL, TAPINS_NARSEL_ADRLEN, TAPINS_NARSEL_DATALEN, xdm_regs, XDMREG_NUM, xtensa_dm_add_dr_scan(), and xtensa_dm_add_set_ir().
int xtensa_dm_trace_config_read | ( | struct xtensa_debug_module * | dm, |
struct xtensa_trace_config * | config | ||
) |
Definition at line 362 of file xtensa_debug_module.c.
References buf_get_u32(), config, xtensa_debug_module::dbg_ops, ERROR_FAIL, ERROR_OK, xtensa_debug_ops::queue_reg_read, XDMREG_MEMADDREND, XDMREG_MEMADDRSTART, XDMREG_TRAXADDR, XDMREG_TRAXCTRL, xtensa_dm_queue_execute(), and xtensa_dm_queue_tdi_idle().
Referenced by COMMAND_HELPER().
int xtensa_dm_trace_data_read | ( | struct xtensa_debug_module * | dm, |
uint8_t * | dest, | ||
uint32_t | size | ||
) |
Definition at line 387 of file xtensa_debug_module.c.
References xtensa_debug_module::dbg_ops, ERROR_FAIL, xtensa_debug_ops::queue_reg_read, size, XDMREG_TRAXDATA, xtensa_dm_queue_execute(), and xtensa_dm_queue_tdi_idle().
Referenced by COMMAND_HELPER().
int xtensa_dm_trace_start | ( | struct xtensa_debug_module * | dm, |
struct xtensa_trace_start_config * | cfg | ||
) |
Definition at line 288 of file xtensa_debug_module.c.
References xtensa_trace_start_config::after, xtensa_trace_start_config::after_is_words, xtensa_debug_module::dbg_ops, ERROR_OK, PCMATCHCTRL_PCML_SHIFT, xtensa_debug_ops::queue_reg_write, xtensa_trace_start_config::stopmask, xtensa_trace_start_config::stoppc, TRAXCTRL_CNTU, TRAXCTRL_PCMEN, TRAXCTRL_PTOWS, TRAXCTRL_SMPER_SHIFT, TRAXCTRL_TMEN, TRAXCTRL_TREN, XDMREG_DELAYCNT, XDMREG_PCMATCHCTRL, XDMREG_TRAXADDR, XDMREG_TRAXCTRL, XDMREG_TRIGGERPC, xtensa_dm_queue_execute(), xtensa_dm_queue_tdi_idle(), and XTENSA_STOPMASK_DISABLED.
Referenced by COMMAND_HELPER().
int xtensa_dm_trace_status_read | ( | struct xtensa_debug_module * | dm, |
struct xtensa_trace_status * | status | ||
) |
Definition at line 350 of file xtensa_debug_module.c.
References buf_get_u32(), xtensa_debug_module::dbg_ops, ERROR_OK, xtensa_debug_ops::queue_reg_read, status, XDMREG_TRAXSTAT, xtensa_dm_queue_execute(), and xtensa_dm_queue_tdi_idle().
Referenced by COMMAND_HELPER(), xtensa_dm_trace_stop(), and xtensa_poll().
int xtensa_dm_trace_stop | ( | struct xtensa_debug_module * | dm, |
bool | pto_enable | ||
) |
Definition at line 316 of file xtensa_debug_module.c.
References buf_get_u32(), xtensa_debug_module::dbg_ops, ERROR_FAIL, ERROR_OK, LOG_ERROR, xtensa_debug_ops::queue_reg_read, xtensa_debug_ops::queue_reg_write, TRAXCTRL_PTOWS, TRAXCTRL_PTOWT, TRAXCTRL_TRSTP, TRAXSTAT_TRACT, XDMREG_TRAXCTRL, xtensa_dm_queue_execute(), xtensa_dm_queue_tdi_idle(), and xtensa_dm_trace_status_read().
Referenced by COMMAND_HELPER().
|
static |
Definition at line 1 of file xtensa_debug_module.c.
Referenced by xtensa_dm_queue_pwr_reg_read(), and xtensa_dm_queue_pwr_reg_write().
|
static |
Definition at line 1 of file xtensa_debug_module.c.
Referenced by xtensa_dm_queue_reg_read(), and xtensa_dm_queue_reg_write().