OpenOCD
esirisc_jtag.c File Reference
Include dependency graph for esirisc_jtag.c:

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 (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)
 

Function Documentation

◆ esirisc_jtag_assert_reset()

int esirisc_jtag_assert_reset ( struct esirisc_jtag jtag_info)

Definition at line 497 of file esirisc_jtag.c.

References DEBUG_ASSERT_RESET, and esirisc_jtag_send_ctrl().

Referenced by esirisc_assert_reset(), and esirisc_debug_reset().

◆ esirisc_jtag_break()

int esirisc_jtag_break ( struct esirisc_jtag jtag_info)

Definition at line 507 of file esirisc_jtag.c.

References DEBUG_BREAK, and esirisc_jtag_send_ctrl().

Referenced by esirisc_examine(), and esirisc_halt().

◆ esirisc_jtag_check_status()

static int esirisc_jtag_check_status ( struct esirisc_jtag jtag_info)
static

◆ esirisc_jtag_continue()

int esirisc_jtag_continue ( struct esirisc_jtag jtag_info)

◆ esirisc_jtag_count_bits()

static int esirisc_jtag_count_bits ( int  num_fields,
struct scan_field fields 
)
static

Definition at line 61 of file esirisc_jtag.c.

References scan_field::num_bits.

Referenced by esirisc_jtag_recv().

◆ esirisc_jtag_deassert_reset()

int esirisc_jtag_deassert_reset ( struct esirisc_jtag jtag_info)

Definition at line 502 of file esirisc_jtag.c.

References DEBUG_DEASSERT_RESET, and esirisc_jtag_send_ctrl().

Referenced by esirisc_deassert_reset(), and esirisc_debug_reset().

◆ esirisc_jtag_disable_debug()

int esirisc_jtag_disable_debug ( struct esirisc_jtag jtag_info)

Definition at line 492 of file esirisc_jtag.c.

References DEBUG_DISABLE_DEBUG, and esirisc_jtag_send_ctrl().

◆ esirisc_jtag_enable_debug()

int esirisc_jtag_enable_debug ( struct esirisc_jtag jtag_info)

◆ esirisc_jtag_flush_caches()

int esirisc_jtag_flush_caches ( struct esirisc_jtag jtag_info)

Definition at line 517 of file esirisc_jtag.c.

References DEBUG_FLUSH_CACHES, and esirisc_jtag_send_ctrl().

Referenced by esirisc_flush_caches().

◆ esirisc_jtag_get_eid()

uint8_t esirisc_jtag_get_eid ( struct esirisc_jtag jtag_info)

Definition at line 223 of file esirisc_jtag.c.

References esirisc_jtag::status.

Referenced by esirisc_jtag_check_status().

◆ esirisc_jtag_get_padding()

static int esirisc_jtag_get_padding ( void  )
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().

◆ esirisc_jtag_is_debug_active()

bool esirisc_jtag_is_debug_active ( struct esirisc_jtag jtag_info)

◆ esirisc_jtag_is_stopped()

bool esirisc_jtag_is_stopped ( struct esirisc_jtag jtag_info)

Definition at line 218 of file esirisc_jtag.c.

References esirisc_jtag::status.

Referenced by esirisc_debug_enable(), esirisc_jtag_check_status(), and esirisc_poll().

◆ esirisc_jtag_read_byte()

int esirisc_jtag_read_byte ( struct esirisc_jtag jtag_info,
uint32_t  address,
uint8_t *  data 
)

◆ esirisc_jtag_read_csr()

◆ esirisc_jtag_read_hword()

int esirisc_jtag_read_hword ( struct esirisc_jtag jtag_info,
uint32_t  address,
uint16_t *  data 
)

◆ esirisc_jtag_read_reg()

int esirisc_jtag_read_reg ( struct esirisc_jtag jtag_info,
uint8_t  reg,
uint32_t *  data 
)

◆ esirisc_jtag_read_word()

int esirisc_jtag_read_word ( struct esirisc_jtag jtag_info,
uint32_t  address,
uint32_t *  data 
)

◆ esirisc_jtag_recv()

◆ esirisc_jtag_send()

static int esirisc_jtag_send ( struct esirisc_jtag jtag_info,
uint8_t  command,
int  num_out_fields,
struct scan_field out_fields 
)
static

◆ esirisc_jtag_send_and_recv()

◆ esirisc_jtag_send_ctrl()

static int esirisc_jtag_send_ctrl ( struct esirisc_jtag jtag_info,
uint8_t  command 
)
inlinestatic

◆ esirisc_jtag_set_instr()

static void esirisc_jtag_set_instr ( struct esirisc_jtag jtag_info,
uint32_t  new_instr 
)
static

◆ esirisc_jtag_unstuff()

static void esirisc_jtag_unstuff ( uint8_t *  data,
size_t  len 
)
static

Definition at line 76 of file esirisc_jtag.c.

References STUFF_MARKER.

Referenced by esirisc_jtag_recv().

◆ esirisc_jtag_write_byte()

int esirisc_jtag_write_byte ( struct esirisc_jtag jtag_info,
uint32_t  address,
uint8_t  data 
)

◆ esirisc_jtag_write_csr()

◆ esirisc_jtag_write_hword()

int esirisc_jtag_write_hword ( struct esirisc_jtag jtag_info,
uint32_t  address,
uint16_t  data 
)

◆ esirisc_jtag_write_reg()

int esirisc_jtag_write_reg ( struct esirisc_jtag jtag_info,
uint8_t  reg,
uint32_t  data 
)

◆ esirisc_jtag_write_word()

int esirisc_jtag_write_word ( struct esirisc_jtag jtag_info,
uint32_t  address,
uint32_t  data 
)