OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | arm_cti |
Functions | |
int | arm_cti_ack_events (struct arm_cti *self, uint32_t event) |
int | arm_cti_cleanup_all (void) |
int | arm_cti_clear_channel (struct arm_cti *self, uint32_t channel) |
int | arm_cti_enable (struct arm_cti *self, bool enable) |
int | arm_cti_gate_channel (struct arm_cti *self, uint32_t channel) |
static int | arm_cti_mod_reg_bits (struct arm_cti *self, unsigned int reg, uint32_t mask, uint32_t value) |
const char * | arm_cti_name (struct arm_cti *self) |
int | arm_cti_pulse_channel (struct arm_cti *self, uint32_t channel) |
int | arm_cti_read_reg (struct arm_cti *self, unsigned int reg, uint32_t *p_value) |
int | arm_cti_set_channel (struct arm_cti *self, uint32_t channel) |
int | arm_cti_ungate_channel (struct arm_cti *self, uint32_t channel) |
int | arm_cti_write_reg (struct arm_cti *self, unsigned int reg, uint32_t value) |
COMMAND_HANDLER (handle_cti_ack) | |
COMMAND_HANDLER (handle_cti_channel) | |
COMMAND_HANDLER (handle_cti_dump) | |
COMMAND_HANDLER (handle_cti_enable) | |
COMMAND_HANDLER (handle_cti_read) | |
COMMAND_HANDLER (handle_cti_testmode) | |
COMMAND_HANDLER (handle_cti_write) | |
static int | cti_configure (struct jim_getopt_info *goi, struct arm_cti *cti) |
static int | cti_create (struct jim_getopt_info *goi) |
static int | cti_find_reg_offset (const char *name) |
struct arm_cti * | cti_instance_by_jim_obj (Jim_Interp *interp, Jim_Obj *o) |
int | cti_register_commands (struct command_context *cmd_ctx) |
static int | jim_cti_create (Jim_Interp *interp, int argc, Jim_Obj *const *argv) |
static int | jim_cti_names (Jim_Interp *interp, int argc, Jim_Obj *const *argv) |
static | LIST_HEAD (all_cti) |
Variables | |
static const struct command_registration | cti_command_handlers [] |
static const struct command_registration | cti_instance_command_handlers [] |
struct { | |
const char * label | |
uint32_t offset | |
uint32_t * p_val | |
} | cti_names [] |
static uint32_t | cti_regs [28] |
static const struct command_registration | cti_subcommand_handlers [] |
int arm_cti_ack_events | ( | struct arm_cti * | self, |
uint32_t | event | ||
) |
Definition at line 81 of file arm_cti.c.
References CTI_INACK, CTI_TROUT_STATUS, ERROR_OK, ERROR_TARGET_TIMEOUT, LOG_ERROR, mem_ap_read_atomic_u32(), mem_ap_write_atomic_u32(), and timeval_ms().
Referenced by aarch64_debug_entry(), aarch64_prepare_restart_one(), and COMMAND_HANDLER().
int arm_cti_cleanup_all | ( | void | ) |
Definition at line 210 of file arm_cti.c.
References arm_cti::ap, dap_put_ap(), ERROR_OK, lh(), list_for_each_entry_safe, and arm_cti::name.
Referenced by openocd_main().
int arm_cti_clear_channel | ( | struct arm_cti * | self, |
uint32_t | channel | ||
) |
Definition at line 152 of file arm_cti.c.
References arm_cti_write_reg(), CTI_APPCLEAR, CTI_CHNL, and ERROR_COMMAND_ARGUMENT_INVALID.
Referenced by COMMAND_HANDLER().
int arm_cti_enable | ( | struct arm_cti * | self, |
bool | enable | ||
) |
Definition at line 74 of file arm_cti.c.
References CTI_CTR, and mem_ap_write_atomic_u32().
Referenced by aarch64_init_debug_access(), and COMMAND_HANDLER().
int arm_cti_gate_channel | ( | struct arm_cti * | self, |
uint32_t | channel | ||
) |
Definition at line 107 of file arm_cti.c.
References arm_cti_mod_reg_bits(), CTI_CHNL, CTI_GATE, and ERROR_COMMAND_ARGUMENT_INVALID.
Referenced by aarch64_prepare_restart_one(), aarch64_step(), and COMMAND_HANDLER().
|
static |
Definition at line 55 of file arm_cti.c.
References ERROR_OK, mask, mem_ap_read_atomic_u32(), and mem_ap_write_atomic_u32().
Referenced by arm_cti_gate_channel(), and arm_cti_ungate_channel().
const char* arm_cti_name | ( | struct arm_cti * | self | ) |
Definition at line 30 of file arm_cti.c.
Referenced by aarch64_jim_configure().
int arm_cti_pulse_channel | ( | struct arm_cti * | self, |
uint32_t | channel | ||
) |
Definition at line 136 of file arm_cti.c.
References arm_cti_write_reg(), CTI_APPPULSE, CTI_CHNL, and ERROR_COMMAND_ARGUMENT_INVALID.
Referenced by aarch64_do_restart_one(), aarch64_halt_one(), and COMMAND_HANDLER().
int arm_cti_read_reg | ( | struct arm_cti * | self, |
unsigned int | reg, | ||
uint32_t * | p_value | ||
) |
Definition at line 128 of file arm_cti.c.
References ERROR_COMMAND_ARGUMENT_INVALID, and mem_ap_read_atomic_u32().
Referenced by COMMAND_HANDLER().
int arm_cti_set_channel | ( | struct arm_cti * | self, |
uint32_t | channel | ||
) |
Definition at line 144 of file arm_cti.c.
References arm_cti_write_reg(), CTI_APPSET, CTI_CHNL, and ERROR_COMMAND_ARGUMENT_INVALID.
Referenced by COMMAND_HANDLER().
int arm_cti_ungate_channel | ( | struct arm_cti * | self, |
uint32_t | channel | ||
) |
Definition at line 115 of file arm_cti.c.
References arm_cti_mod_reg_bits(), CTI_CHNL, CTI_GATE, and ERROR_COMMAND_ARGUMENT_INVALID.
Referenced by aarch64_prepare_halt_smp(), aarch64_prepare_restart_one(), and COMMAND_HANDLER().
int arm_cti_write_reg | ( | struct arm_cti * | self, |
unsigned int | reg, | ||
uint32_t | value | ||
) |
Definition at line 123 of file arm_cti.c.
References mem_ap_write_atomic_u32().
Referenced by aarch64_debug_entry(), aarch64_init_debug_access(), arm_cti_clear_channel(), arm_cti_pulse_channel(), arm_cti_set_channel(), and COMMAND_HANDLER().
COMMAND_HANDLER | ( | handle_cti_ack | ) |
Definition at line 314 of file arm_cti.c.
References arm_cti_ack_events(), CMD_ARGC, CMD_ARGV, CMD_DATA, COMMAND_PARSE_NUMBER, ERROR_COMMAND_SYNTAX_ERROR, and ERROR_OK.
COMMAND_HANDLER | ( | handle_cti_channel | ) |
Definition at line 333 of file arm_cti.c.
References arm_cti_clear_channel(), arm_cti_gate_channel(), arm_cti_pulse_channel(), arm_cti_set_channel(), arm_cti_ungate_channel(), CMD, CMD_ARGC, CMD_ARGV, CMD_DATA, COMMAND_PARSE_NUMBER, command_print(), ERROR_COMMAND_ARGUMENT_INVALID, ERROR_COMMAND_SYNTAX_ERROR, and ERROR_OK.
COMMAND_HANDLER | ( | handle_cti_dump | ) |
Definition at line 224 of file arm_cti.c.
References arm_cti::ap, ARRAY_SIZE, adiv5_mem_ap_spot::base, CMD, CMD_DATA, command_print(), cti_names, adiv5_ap::dap, dap_run(), ERROR_OK, label, mem_ap_read_u32(), offset, p_val, and arm_cti::spot.
COMMAND_HANDLER | ( | handle_cti_enable | ) |
Definition at line 247 of file arm_cti.c.
References arm_cti_enable(), CMD_ARGC, CMD_ARGV, CMD_DATA, COMMAND_PARSE_ON_OFF, and ERROR_COMMAND_SYNTAX_ERROR.
COMMAND_HANDLER | ( | handle_cti_read | ) |
Definition at line 291 of file arm_cti.c.
References arm_cti_read_reg(), CMD, CMD_ARGC, CMD_ARGV, CMD_DATA, command_print(), cti_find_reg_offset(), ERROR_COMMAND_SYNTAX_ERROR, ERROR_FAIL, ERROR_OK, and offset.
COMMAND_HANDLER | ( | handle_cti_testmode | ) |
Definition at line 260 of file arm_cti.c.
References arm_cti_write_reg(), CMD_ARGC, CMD_ARGV, CMD_DATA, COMMAND_PARSE_ON_OFF, and ERROR_COMMAND_SYNTAX_ERROR.
COMMAND_HANDLER | ( | handle_cti_write | ) |
Definition at line 273 of file arm_cti.c.
References arm_cti_write_reg(), CMD_ARGC, CMD_ARGV, CMD_DATA, COMMAND_PARSE_NUMBER, cti_find_reg_offset(), ERROR_COMMAND_SYNTAX_ERROR, ERROR_FAIL, and offset.
|
static |
Definition at line 419 of file arm_cti.c.
References adiv5_jim_mem_ap_spot_configure(), jim_getopt_info::argc, jim_getopt_info::argv, adiv5_mem_ap_spot::dap, jim_getopt_info::interp, and arm_cti::spot.
Referenced by cti_create().
|
static |
Definition at line 440 of file arm_cti.c.
References adiv5_mem_ap_spot_init(), arm_cti::ap, adiv5_mem_ap_spot::ap_num, jim_getopt_info::argc, jim_getopt_info::argv, command_registration::chain, cmd, COMMAND_ANY, COMMAND_REGISTRATION_DONE, cti_configure(), cti_instance_command_handlers, current_command_context(), adiv5_mem_ap_spot::dap, dap_get_ap(), ERROR_OK, jim_getopt_info::interp, jim_getopt_info::isconfigure, jim_getopt_obj(), arm_cti::lh, list_add_tail(), command_registration::name, arm_cti::name, NULL, register_commands_with_data(), and arm_cti::spot.
Referenced by jim_cti_create().
|
static |
Definition at line 197 of file arm_cti.c.
References ARRAY_SIZE, cti_names, label, LOG_ERROR, name, and offset.
Referenced by COMMAND_HANDLER().
struct arm_cti* cti_instance_by_jim_obj | ( | Jim_Interp * | interp, |
Jim_Obj * | o | ||
) |
Definition at line 35 of file arm_cti.c.
References lh(), list_for_each_entry, arm_cti::name, name, and NULL.
Referenced by aarch64_jim_configure().
int cti_register_commands | ( | struct command_context * | cmd_ctx | ) |
Definition at line 574 of file arm_cti.c.
Referenced by setup_command_handler().
|
static |
Definition at line 516 of file arm_cti.c.
References jim_getopt_info::argc, jim_getopt_info::argv, cti_create(), jim_getopt_info::interp, and jim_getopt_setup().
|
static |
|
static |
|
static |
|
static |
Definition at line 333 of file arm_cti.c.
Referenced by cti_create().
const { ... } cti_names[] |
Referenced by COMMAND_HANDLER(), and cti_find_reg_offset().
|
static |
const char* label |
Definition at line 164 of file arm_cti.c.
Referenced by at91sam9_halted(), COMMAND_HANDLER(), COMMAND_HELPER(), cti_find_reg_offset(), and halted().
uint32_t offset |
Definition at line 163 of file arm_cti.c.
Referenced by COMMAND_HANDLER(), and cti_find_reg_offset().
uint32_t* p_val |
Definition at line 165 of file arm_cti.c.
Referenced by COMMAND_HANDLER().