OpenOCD
|
Go to the source code of this file.
Functions | |
int | esirisc_jtag_assert_reset (struct esirisc_jtag *jtag_info) |
int | esirisc_jtag_break (struct esirisc_jtag *jtag_info) |
static int | esirisc_jtag_check_status (struct esirisc_jtag *jtag_info) |
int | esirisc_jtag_continue (struct esirisc_jtag *jtag_info) |
static int | esirisc_jtag_count_bits (unsigned int num_fields, struct scan_field *fields) |
int | esirisc_jtag_deassert_reset (struct esirisc_jtag *jtag_info) |
int | esirisc_jtag_disable_debug (struct esirisc_jtag *jtag_info) |
int | esirisc_jtag_enable_debug (struct esirisc_jtag *jtag_info) |
int | esirisc_jtag_flush_caches (struct esirisc_jtag *jtag_info) |
uint8_t | esirisc_jtag_get_eid (struct esirisc_jtag *jtag_info) |
static int | esirisc_jtag_get_padding (void) |
bool | esirisc_jtag_is_debug_active (struct esirisc_jtag *jtag_info) |
bool | esirisc_jtag_is_stopped (struct esirisc_jtag *jtag_info) |
int | esirisc_jtag_read_byte (struct esirisc_jtag *jtag_info, uint32_t address, uint8_t *data) |
int | esirisc_jtag_read_csr (struct esirisc_jtag *jtag_info, uint8_t bank, uint8_t csr, uint32_t *data) |
int | esirisc_jtag_read_hword (struct esirisc_jtag *jtag_info, uint32_t address, uint16_t *data) |
int | esirisc_jtag_read_reg (struct esirisc_jtag *jtag_info, uint8_t reg, uint32_t *data) |
int | esirisc_jtag_read_word (struct esirisc_jtag *jtag_info, uint32_t address, uint32_t *data) |
static int | esirisc_jtag_recv (struct esirisc_jtag *jtag_info, int num_in_fields, struct scan_field *in_fields) |
static int | esirisc_jtag_send (struct esirisc_jtag *jtag_info, uint8_t command, int num_out_fields, struct scan_field *out_fields) |
static int | esirisc_jtag_send_and_recv (struct esirisc_jtag *jtag_info, uint8_t command, int num_out_fields, struct scan_field *out_fields, int num_in_fields, struct scan_field *in_fields) |
static int | esirisc_jtag_send_ctrl (struct esirisc_jtag *jtag_info, uint8_t command) |
static void | esirisc_jtag_set_instr (struct esirisc_jtag *jtag_info, uint32_t new_instr) |
static void | esirisc_jtag_unstuff (uint8_t *data, size_t len) |
int | esirisc_jtag_write_byte (struct esirisc_jtag *jtag_info, uint32_t address, uint8_t data) |
int | esirisc_jtag_write_csr (struct esirisc_jtag *jtag_info, uint8_t bank, uint8_t csr, uint32_t data) |
int | esirisc_jtag_write_hword (struct esirisc_jtag *jtag_info, uint32_t address, uint16_t data) |
int | esirisc_jtag_write_reg (struct esirisc_jtag *jtag_info, uint8_t reg, uint32_t data) |
int | esirisc_jtag_write_word (struct esirisc_jtag *jtag_info, uint32_t address, uint32_t data) |
int esirisc_jtag_assert_reset | ( | struct esirisc_jtag * | jtag_info | ) |
Definition at line 498 of file esirisc_jtag.c.
References DEBUG_ASSERT_RESET, and esirisc_jtag_send_ctrl().
Referenced by esirisc_assert_reset(), and esirisc_debug_reset().
int esirisc_jtag_break | ( | struct esirisc_jtag * | jtag_info | ) |
Definition at line 508 of file esirisc_jtag.c.
References DEBUG_BREAK, and esirisc_jtag_send_ctrl().
Referenced by esirisc_examine(), and esirisc_halt().
|
static |
Definition at line 172 of file esirisc_jtag.c.
References EID_NONE, ERROR_FAIL, ERROR_OK, esirisc_jtag_get_eid(), esirisc_jtag_is_debug_active(), esirisc_jtag_is_stopped(), LOG_ERROR, and esirisc_jtag::status.
Referenced by esirisc_jtag_send_and_recv().
int esirisc_jtag_continue | ( | struct esirisc_jtag * | jtag_info | ) |
Definition at line 513 of file esirisc_jtag.c.
References DEBUG_CONTINUE, and esirisc_jtag_send_ctrl().
Referenced by esirisc_deassert_reset(), esirisc_debug_step(), esirisc_examine(), and esirisc_resume_or_step().
|
static |
Definition at line 61 of file esirisc_jtag.c.
References scan_field::num_bits.
Referenced by esirisc_jtag_recv().
int esirisc_jtag_deassert_reset | ( | struct esirisc_jtag * | jtag_info | ) |
Definition at line 503 of file esirisc_jtag.c.
References DEBUG_DEASSERT_RESET, and esirisc_jtag_send_ctrl().
Referenced by esirisc_deassert_reset(), and esirisc_debug_reset().
int esirisc_jtag_disable_debug | ( | struct esirisc_jtag * | jtag_info | ) |
Definition at line 493 of file esirisc_jtag.c.
References DEBUG_DISABLE_DEBUG, and esirisc_jtag_send_ctrl().
int esirisc_jtag_enable_debug | ( | struct esirisc_jtag * | jtag_info | ) |
Definition at line 488 of file esirisc_jtag.c.
References DEBUG_ENABLE_DEBUG, and esirisc_jtag_send_ctrl().
Referenced by esirisc_debug_enable(), esirisc_poll(), and esirisc_wait_debug_active().
int esirisc_jtag_flush_caches | ( | struct esirisc_jtag * | jtag_info | ) |
Definition at line 518 of file esirisc_jtag.c.
References DEBUG_FLUSH_CACHES, and esirisc_jtag_send_ctrl().
Referenced by esirisc_flush_caches().
uint8_t esirisc_jtag_get_eid | ( | struct esirisc_jtag * | jtag_info | ) |
Definition at line 224 of file esirisc_jtag.c.
References esirisc_jtag::status.
Referenced by esirisc_jtag_check_status().
|
static |
Definition at line 44 of file esirisc_jtag.c.
References jtag_tap_next_enabled(), NULL, and scan_field::num_bits.
Referenced by esirisc_jtag_recv(), and esirisc_jtag_send().
bool esirisc_jtag_is_debug_active | ( | struct esirisc_jtag * | jtag_info | ) |
Definition at line 214 of file esirisc_jtag.c.
References esirisc_jtag::status.
Referenced by esirisc_examine(), esirisc_jtag_check_status(), esirisc_poll(), and esirisc_wait_debug_active().
bool esirisc_jtag_is_stopped | ( | struct esirisc_jtag * | jtag_info | ) |
Definition at line 219 of file esirisc_jtag.c.
References esirisc_jtag::status.
Referenced by esirisc_debug_enable(), esirisc_jtag_check_status(), and esirisc_poll().
int esirisc_jtag_read_byte | ( | struct esirisc_jtag * | jtag_info, |
uint32_t | address, | ||
uint8_t * | data | ||
) |
Definition at line 237 of file esirisc_jtag.c.
References ARRAY_SIZE, DEBUG_READ_BYTE, ERROR_OK, esirisc_jtag_send_and_recv(), h_u32_to_be(), scan_field::in_value, LOG_DEBUG, NULL, scan_field::num_bits, and scan_field::out_value.
Referenced by esirisc_read_memory().
int esirisc_jtag_read_csr | ( | struct esirisc_jtag * | jtag_info, |
uint8_t | bank, | ||
uint8_t | csr, | ||
uint32_t * | data | ||
) |
Definition at line 429 of file esirisc_jtag.c.
References ARRAY_SIZE, bank, csr, DEBUG_READ_CSR, ERROR_OK, esirisc_jtag_send_and_recv(), h_u16_to_be(), scan_field::in_value, le_to_h_u32(), LOG_DEBUG, NULL, scan_field::num_bits, and scan_field::out_value.
Referenced by esirisc_add_breakpoint(), esirisc_add_watchpoint(), esirisc_disable_interrupts(), esirisc_disable_step(), esirisc_enable_step(), esirisc_identify(), esirisc_read_csr(), esirisc_remove_breakpoint(), esirisc_remove_watchpoint(), esirisc_reset_entry(), esirisc_save_interrupts(), esirisc_trace_get_status(), esirisc_trace_read_buffer(), esirisc_trace_start(), and esirisc_trace_stop().
int esirisc_jtag_read_hword | ( | struct esirisc_jtag * | jtag_info, |
uint32_t | address, | ||
uint16_t * | data | ||
) |
Definition at line 265 of file esirisc_jtag.c.
References ARRAY_SIZE, DEBUG_READ_HWORD, ERROR_OK, esirisc_jtag_send_and_recv(), h_u32_to_be(), scan_field::in_value, le_to_h_u16(), LOG_DEBUG, NULL, scan_field::num_bits, and scan_field::out_value.
Referenced by esirisc_read_memory().
int esirisc_jtag_read_reg | ( | struct esirisc_jtag * | jtag_info, |
uint8_t | reg, | ||
uint32_t * | data | ||
) |
Definition at line 383 of file esirisc_jtag.c.
References ARRAY_SIZE, DEBUG_READ_REG, ERROR_OK, esirisc_jtag_send_and_recv(), scan_field::in_value, le_to_h_u32(), LOG_DEBUG, NULL, scan_field::num_bits, and scan_field::out_value.
Referenced by esirisc_read_reg().
int esirisc_jtag_read_word | ( | struct esirisc_jtag * | jtag_info, |
uint32_t | address, | ||
uint32_t * | data | ||
) |
Definition at line 293 of file esirisc_jtag.c.
References ARRAY_SIZE, DEBUG_READ_WORD, ERROR_OK, esirisc_jtag_send_and_recv(), h_u32_to_be(), scan_field::in_value, le_to_h_u32(), LOG_DEBUG, NULL, scan_field::num_bits, and scan_field::out_value.
Referenced by esirisc_read_memory(), and esirisc_reset_entry().
|
static |
Definition at line 127 of file esirisc_jtag.c.
References ARRAY_SIZE, buf_set_buf(), DIV_ROUND_UP, ERROR_OK, esirisc_jtag_count_bits(), esirisc_jtag_get_padding(), esirisc_jtag_set_instr(), esirisc_jtag_unstuff(), scan_field::in_value, INSTR_DEBUG, jtag_add_dr_scan(), jtag_execute_queue(), NULL, scan_field::num_bits, scan_field::out_value, esirisc_jtag::status, esirisc_jtag::tap, and TAP_IDLE.
Referenced by esirisc_jtag_send_and_recv().
|
static |
Definition at line 102 of file esirisc_jtag.c.
References cmd_queue_alloc(), esirisc_jtag_get_padding(), esirisc_jtag_set_instr(), scan_field::in_value, INSTR_DEBUG, jtag_add_dr_scan(), jtag_execute_queue(), jtag_scan_field_clone(), NULL, scan_field::num_bits, scan_field::out_value, esirisc_jtag::tap, and TAP_IDLE.
Referenced by esirisc_jtag_send_and_recv().
|
static |
Definition at line 186 of file esirisc_jtag.c.
References ERROR_FAIL, ERROR_OK, esirisc_jtag_check_status(), esirisc_jtag_recv(), esirisc_jtag_send(), LOG_ERROR, and esirisc_jtag::status.
Referenced by esirisc_jtag_read_byte(), esirisc_jtag_read_csr(), esirisc_jtag_read_hword(), esirisc_jtag_read_reg(), esirisc_jtag_read_word(), esirisc_jtag_send_ctrl(), esirisc_jtag_write_byte(), esirisc_jtag_write_csr(), esirisc_jtag_write_hword(), esirisc_jtag_write_reg(), and esirisc_jtag_write_word().
|
inlinestatic |
Definition at line 483 of file esirisc_jtag.c.
References esirisc_jtag_send_and_recv(), and NULL.
Referenced by esirisc_jtag_assert_reset(), esirisc_jtag_break(), esirisc_jtag_continue(), esirisc_jtag_deassert_reset(), esirisc_jtag_disable_debug(), esirisc_jtag_enable_debug(), and esirisc_jtag_flush_caches().
|
static |
Definition at line 22 of file esirisc_jtag.c.
References buf_get_u32(), buf_set_u32(), jtag_tap::cur_instr, scan_field::in_value, jtag_tap::ir_length, jtag_add_ir_scan(), NULL, scan_field::num_bits, scan_field::out_value, esirisc_jtag::tap, and TAP_IDLE.
Referenced by esirisc_jtag_recv(), and esirisc_jtag_send().
|
static |
Definition at line 77 of file esirisc_jtag.c.
References STUFF_MARKER.
Referenced by esirisc_jtag_recv().
int esirisc_jtag_write_byte | ( | struct esirisc_jtag * | jtag_info, |
uint32_t | address, | ||
uint8_t | data | ||
) |
Definition at line 321 of file esirisc_jtag.c.
References ARRAY_SIZE, DEBUG_WRITE_BYTE, esirisc_jtag_send_and_recv(), h_u32_to_be(), scan_field::in_value, LOG_DEBUG, NULL, scan_field::num_bits, and scan_field::out_value.
Referenced by esirisc_write_memory().
int esirisc_jtag_write_csr | ( | struct esirisc_jtag * | jtag_info, |
uint8_t | bank, | ||
uint8_t | csr, | ||
uint32_t | data | ||
) |
Definition at line 457 of file esirisc_jtag.c.
References ARRAY_SIZE, bank, csr, DEBUG_WRITE_CSR, esirisc_jtag_send_and_recv(), h_u16_to_be(), h_u32_to_be(), scan_field::in_value, LOG_DEBUG, NULL, scan_field::num_bits, and scan_field::out_value.
Referenced by esirisc_add_breakpoint(), esirisc_add_watchpoint(), esirisc_disable_interrupts(), esirisc_disable_step(), esirisc_enable_step(), esirisc_remove_breakpoint(), esirisc_remove_breakpoints(), esirisc_remove_watchpoint(), esirisc_remove_watchpoints(), esirisc_reset_entry(), esirisc_restore_hwdc(), esirisc_restore_interrupts(), esirisc_trace_clear_status(), esirisc_trace_init(), esirisc_trace_start(), esirisc_trace_stop(), and esirisc_write_csr().
int esirisc_jtag_write_hword | ( | struct esirisc_jtag * | jtag_info, |
uint32_t | address, | ||
uint16_t | data | ||
) |
Definition at line 341 of file esirisc_jtag.c.
References ARRAY_SIZE, DEBUG_WRITE_HWORD, esirisc_jtag_send_and_recv(), h_u16_to_be(), h_u32_to_be(), scan_field::in_value, LOG_DEBUG, NULL, scan_field::num_bits, and scan_field::out_value.
Referenced by esirisc_write_memory().
int esirisc_jtag_write_reg | ( | struct esirisc_jtag * | jtag_info, |
uint8_t | reg, | ||
uint32_t | data | ||
) |
Definition at line 409 of file esirisc_jtag.c.
References ARRAY_SIZE, DEBUG_WRITE_REG, esirisc_jtag_send_and_recv(), h_u32_to_be(), scan_field::in_value, LOG_DEBUG, NULL, scan_field::num_bits, and scan_field::out_value.
Referenced by esirisc_write_reg().
int esirisc_jtag_write_word | ( | struct esirisc_jtag * | jtag_info, |
uint32_t | address, | ||
uint32_t | data | ||
) |
Definition at line 362 of file esirisc_jtag.c.
References ARRAY_SIZE, DEBUG_WRITE_WORD, esirisc_jtag_send_and_recv(), h_u32_to_be(), scan_field::in_value, LOG_DEBUG, NULL, scan_field::num_bits, and scan_field::out_value.
Referenced by esirisc_write_memory().