OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | ipdbg_connection |
struct | ipdbg_fifo |
struct | ipdbg_hub |
struct | ipdbg_service |
struct | ipdbg_virtual_ir_info |
Macros | |
#define | IPDBG_BUFFER_SIZE 16384 |
#define | IPDBG_MAX_DR_LENGTH 13 |
#define | IPDBG_MAX_NUM_OF_OPTIONS 14 |
#define | IPDBG_MIN_DR_LENGTH 11 |
#define | IPDBG_MIN_NUM_OF_OPTIONS 4 |
#define | IPDBG_TCP_PORT_STR_MAX_LENGTH 6 |
Functions | |
COMMAND_HANDLER (handle_ipdbg_command) | |
static void | ipdbg_add_hub (struct ipdbg_hub *hub) |
static void | ipdbg_add_service (struct ipdbg_service *service) |
static void | ipdbg_append_to_fifo (struct ipdbg_fifo *fifo, char data) |
static int | ipdbg_create_hub (struct jtag_tap *tap, uint32_t user_instruction, uint8_t data_register_length, struct ipdbg_virtual_ir_info *virtual_ir, struct ipdbg_hub **hub) |
static int | ipdbg_create_service (struct ipdbg_hub *hub, uint8_t tool, struct ipdbg_service **service, uint16_t port) |
static int | ipdbg_distribute_data_from_hub (struct ipdbg_hub *hub, uint32_t up) |
static bool | ipdbg_fifo_is_empty (struct ipdbg_fifo *fifo) |
static bool | ipdbg_fifo_is_full (struct ipdbg_fifo *fifo) |
static struct ipdbg_hub * | ipdbg_find_hub (struct jtag_tap *tap, uint32_t user_instruction, struct ipdbg_virtual_ir_info *virtual_ir) |
static struct ipdbg_service * | ipdbg_find_service (struct ipdbg_hub *hub, uint8_t tool) |
static void | ipdbg_free_hub (struct ipdbg_hub *hub) |
static char | ipdbg_get_from_fifo (struct ipdbg_fifo *fifo) |
static void | ipdbg_init_fifo (struct ipdbg_fifo *fifo) |
static void | ipdbg_init_scan_field (struct scan_field *fields, uint8_t *in_value, int num_bits, const uint8_t *out_value) |
static int | ipdbg_jtag_transfer_byte (struct ipdbg_hub *hub, size_t tool, struct ipdbg_connection *connection) |
static int | ipdbg_max_tools_from_data_register_length (uint8_t data_register_length) |
static int | ipdbg_move_buffer_to_connection (struct connection *conn, struct ipdbg_fifo *fifo) |
static int | ipdbg_on_connection_closed (struct connection *connection) |
static int | ipdbg_on_connection_input (struct connection *connection) |
static int | ipdbg_on_new_connection (struct connection *connection) |
static int | ipdbg_polling_callback (void *priv) |
int | ipdbg_register_commands (struct command_context *cmd_ctx) |
static int | ipdbg_remove_hub (struct ipdbg_hub *hub) |
static int | ipdbg_remove_service (struct ipdbg_service *service) |
static int | ipdbg_shift_data (struct ipdbg_hub *hub, uint32_t dn_data, uint32_t *up_data) |
static int | ipdbg_shift_instr (struct ipdbg_hub *hub, uint32_t instr) |
static int | ipdbg_shift_vir (struct ipdbg_hub *hub) |
static int | ipdbg_start (uint16_t port, struct jtag_tap *tap, uint32_t user_instruction, uint8_t data_register_length, struct ipdbg_virtual_ir_info *virtual_ir, uint8_t tool) |
static int | ipdbg_start_polling (struct ipdbg_service *service, struct connection *connection) |
static int | ipdbg_stop (struct jtag_tap *tap, uint32_t user_instruction, struct ipdbg_virtual_ir_info *virtual_ir, uint8_t tool) |
static int | ipdbg_stop_polling (struct ipdbg_service *service) |
static void | ipdbg_zero_rd_idx (struct ipdbg_fifo *fifo) |
Variables | |
static const struct command_registration | ipdbg_command_handlers [] |
static struct ipdbg_hub * | ipdbg_first_hub |
static struct ipdbg_service * | ipdbg_first_service |
static const struct service_driver | ipdbg_service_driver |
COMMAND_HANDLER | ( | handle_ipdbg_command | ) |
Definition at line 684 of file ipdbg.c.
References CMD, CMD_ARGC, CMD_ARGV, COMMAND_PARSE_ADDITIONAL_NUMBER, COMMAND_PARSE_OPTIONAL_NUMBER, command_print(), ERROR_COMMAND_SYNTAX_ERROR, ERROR_FAIL, ipdbg_virtual_ir_info::instruction, IPDBG_MAX_DR_LENGTH, IPDBG_MAX_NUM_OF_OPTIONS, ipdbg_max_tools_from_data_register_length(), IPDBG_MIN_DR_LENGTH, IPDBG_MIN_NUM_OF_OPTIONS, ipdbg_start(), ipdbg_stop(), jtag_tap_by_string(), ipdbg_virtual_ir_info::length, LOG_ERROR, NULL, start, and ipdbg_virtual_ir_info::value.
|
static |
Definition at line 222 of file ipdbg.c.
References ipdbg_first_hub, and ipdbg_hub::next.
Referenced by ipdbg_start().
|
static |
Definition at line 159 of file ipdbg.c.
References ipdbg_first_service, and ipdbg_service::next.
Referenced by ipdbg_start().
|
static |
Definition at line 98 of file ipdbg.c.
References ipdbg_fifo::buffer, ipdbg_fifo::count, ipdbg_fifo_is_full(), and ipdbg_zero_rd_idx().
Referenced by ipdbg_distribute_data_from_hub().
|
static |
Definition at line 233 of file ipdbg.c.
References BIT, ipdbg_hub::connections, ipdbg_hub::data_register_length, ERROR_FAIL, ERROR_OK, ipdbg_max_tools_from_data_register_length(), ipdbg_hub::last_dn_tool, LOG_ERROR, ipdbg_hub::max_tools, NULL, ipdbg_hub::tap, ipdbg_hub::tool_mask, ipdbg_hub::user_instruction, ipdbg_hub::valid_mask, ipdbg_hub::virtual_ir, and ipdbg_hub::xoff_mask.
Referenced by ipdbg_start().
|
static |
Definition at line 170 of file ipdbg.c.
References ERROR_FAIL, ERROR_OK, ipdbg_service::hub, LOG_ERROR, ipdbg_service::port, and ipdbg_service::tool.
Referenced by ipdbg_start().
|
static |
Definition at line 386 of file ipdbg.c.
References conn, ipdbg_hub::connections, ipdbg_hub::dn_xoff, ERROR_OK, ipdbg_append_to_fifo(), ipdbg_fifo_is_full(), ipdbg_move_buffer_to_connection(), LOG_INFO, ipdbg_hub::tool_mask, and ipdbg_hub::valid_mask.
Referenced by ipdbg_jtag_transfer_byte(), and ipdbg_polling_callback().
|
static |
Definition at line 77 of file ipdbg.c.
References ipdbg_fifo::count.
Referenced by ipdbg_get_from_fifo(), ipdbg_move_buffer_to_connection(), and ipdbg_polling_callback().
|
static |
Definition at line 82 of file ipdbg.c.
References ipdbg_fifo::count, and IPDBG_BUFFER_SIZE.
Referenced by ipdbg_append_to_fifo(), ipdbg_distribute_data_from_hub(), and ipdbg_on_connection_input().
|
static |
Definition at line 204 of file ipdbg.c.
References ipdbg_virtual_ir_info::instruction, ipdbg_first_hub, ipdbg_virtual_ir_info::length, ipdbg_hub::next, NULL, ipdbg_hub::tap, ipdbg_hub::user_instruction, ipdbg_virtual_ir_info::value, and ipdbg_hub::virtual_ir.
Referenced by ipdbg_start(), and ipdbg_stop().
|
static |
Definition at line 149 of file ipdbg.c.
References ipdbg_service::hub, ipdbg_first_service, service::next, and ipdbg_service::tool.
Referenced by ipdbg_stop().
|
static |
Definition at line 266 of file ipdbg.c.
References ipdbg_hub::connections, and ipdbg_hub::virtual_ir.
Referenced by ipdbg_start(), and ipdbg_stop().
|
static |
Definition at line 107 of file ipdbg.c.
References ipdbg_fifo::buffer, ipdbg_fifo::count, ipdbg_fifo_is_empty(), and ipdbg_fifo::rd_idx.
Referenced by ipdbg_jtag_transfer_byte().
|
static |
Definition at line 71 of file ipdbg.c.
References ipdbg_fifo::count, and ipdbg_fifo::rd_idx.
Referenced by ipdbg_on_new_connection().
|
static |
Definition at line 294 of file ipdbg.c.
References scan_field::check_mask, scan_field::check_value, scan_field::in_value, NULL, scan_field::num_bits, and scan_field::out_value.
Referenced by ipdbg_shift_data(), ipdbg_shift_instr(), and ipdbg_shift_vir().
|
static |
Definition at line 413 of file ipdbg.c.
References BIT, ipdbg_hub::dn_xoff, ERROR_OK, ipdbg_distribute_data_from_hub(), ipdbg_get_from_fifo(), ipdbg_shift_data(), ipdbg_hub::last_dn_tool, LOG_INFO, ipdbg_hub::max_tools, ipdbg_hub::tool_mask, ipdbg_hub::valid_mask, and ipdbg_hub::xoff_mask.
Referenced by ipdbg_polling_callback().
|
static |
Definition at line 138 of file ipdbg.c.
Referenced by COMMAND_HANDLER(), and ipdbg_create_hub().
|
static |
Definition at line 116 of file ipdbg.c.
References ipdbg_fifo::buffer, conn, connection_write(), ipdbg_fifo::count, ERROR_OK, ERROR_SERVER_REMOTE_CLOSED, ipdbg_fifo_is_empty(), ipdbg_zero_rd_idx(), and LOG_ERROR.
Referenced by ipdbg_distribute_data_from_hub(), and ipdbg_polling_callback().
|
static |
Definition at line 581 of file ipdbg.c.
References conn, ipdbg_stop_polling(), LOG_INFO, connection::priv, service::priv, and connection::service.
|
static |
Definition at line 560 of file ipdbg.c.
References ipdbg_fifo::buffer, conn, connection_read(), ipdbg_fifo::count, ERROR_OK, ERROR_SERVER_REMOTE_CLOSED, IPDBG_BUFFER_SIZE, ipdbg_fifo_is_full(), ipdbg_zero_rd_idx(), LOG_ERROR, and connection::priv.
|
static |
Definition at line 538 of file ipdbg.c.
References conn, ERROR_OK, ipdbg_init_fifo(), ipdbg_start_polling(), LOG_ERROR, LOG_INFO, connection::priv, service::priv, and connection::service.
|
static |
Definition at line 436 of file ipdbg.c.
References BIT, conn, ipdbg_hub::connections, ipdbg_hub::dn_xoff, ERROR_OK, ipdbg_distribute_data_from_hub(), ipdbg_fifo_is_empty(), ipdbg_jtag_transfer_byte(), ipdbg_move_buffer_to_connection(), ipdbg_shift_data(), ipdbg_shift_instr(), ipdbg_shift_vir(), ipdbg_hub::max_tools, priv, and ipdbg_hub::user_instruction.
Referenced by ipdbg_start_polling(), and ipdbg_stop_polling().
int ipdbg_register_commands | ( | struct command_context * | cmd_ctx | ) |
Definition at line 787 of file ipdbg.c.
References ipdbg_command_handlers, NULL, and register_commands().
Referenced by jtag_select().
|
static |
Definition at line 275 of file ipdbg.c.
References ERROR_FAIL, ERROR_OK, ipdbg_first_hub, and ipdbg_hub::next.
Referenced by ipdbg_stop().
|
static |
Definition at line 185 of file ipdbg.c.
References ERROR_FAIL, ERROR_OK, ipdbg_first_service, ipdbg_service::next, and service::next.
Referenced by ipdbg_stop().
|
static |
Definition at line 359 of file ipdbg.c.
References buf_get_u32(), buf_set_u32(), ipdbg_hub::data_register_length, DIV_ROUND_UP, ERROR_FAIL, ERROR_OK, ipdbg_init_scan_field(), jtag_add_dr_scan(), jtag_execute_queue(), NULL, ipdbg_hub::tap, and TAP_IDLE.
Referenced by ipdbg_jtag_transfer_byte(), ipdbg_polling_callback(), and ipdbg_start_polling().
|
static |
Definition at line 303 of file ipdbg.c.
References buf_get_u32(), buf_set_u32(), jtag_tap::cur_instr, DIV_ROUND_UP, ERROR_FAIL, ERROR_OK, ipdbg_init_scan_field(), jtag_tap::ir_length, jtag_add_ir_scan(), jtag_execute_queue(), NULL, ipdbg_hub::tap, and TAP_IDLE.
Referenced by ipdbg_polling_callback(), ipdbg_shift_vir(), and ipdbg_start_polling().
|
static |
Definition at line 330 of file ipdbg.c.
References buf_set_u32(), DIV_ROUND_UP, ERROR_FAIL, ERROR_OK, ipdbg_virtual_ir_info::instruction, ipdbg_init_scan_field(), ipdbg_shift_instr(), jtag_add_dr_scan(), jtag_execute_queue(), ipdbg_virtual_ir_info::length, NULL, ipdbg_hub::tap, TAP_IDLE, ipdbg_virtual_ir_info::value, and ipdbg_hub::virtual_ir.
Referenced by ipdbg_polling_callback(), and ipdbg_start_polling().
|
static |
Definition at line 599 of file ipdbg.c.
References ipdbg_hub::active_connections, ipdbg_hub::active_services, add_service(), ipdbg_hub::data_register_length, ERROR_FAIL, ERROR_OK, ipdbg_service::hub, ipdbg_add_hub(), ipdbg_add_service(), ipdbg_create_hub(), ipdbg_create_service(), ipdbg_find_hub(), ipdbg_free_hub(), ipdbg_service_driver, IPDBG_TCP_PORT_STR_MAX_LENGTH, LOG_DEBUG, LOG_INFO, NULL, ipdbg_service::port, ipdbg_hub::tap, ipdbg_service::tool, ipdbg_hub::user_instruction, and ipdbg_hub::virtual_ir.
Referenced by COMMAND_HANDLER().
|
static |
Definition at line 491 of file ipdbg.c.
References ipdbg_hub::active_connections, ipdbg_hub::connections, ipdbg_hub::dn_xoff, ERROR_OK, ipdbg_polling_callback(), ipdbg_shift_data(), ipdbg_shift_instr(), ipdbg_shift_vir(), ipdbg_hub::last_dn_tool, LOG_INFO, ipdbg_hub::max_tools, NULL, target_register_timer_callback(), ipdbg_hub::tool_mask, ipdbg_hub::user_instruction, and ipdbg_hub::valid_mask.
Referenced by ipdbg_on_new_connection().
|
static |
Definition at line 645 of file ipdbg.c.
References ipdbg_hub::active_connections, ipdbg_hub::active_services, ERROR_FAIL, ERROR_OK, ipdbg_service::hub, ipdbg_find_hub(), ipdbg_find_service(), ipdbg_free_hub(), ipdbg_remove_hub(), ipdbg_remove_service(), IPDBG_TCP_PORT_STR_MAX_LENGTH, LOG_ERROR, service::port, remove_service(), ipdbg_hub::tap, ipdbg_service::tool, ipdbg_hub::user_instruction, and ipdbg_hub::virtual_ir.
Referenced by COMMAND_HANDLER().
|
static |
Definition at line 524 of file ipdbg.c.
References ipdbg_hub::active_connections, ipdbg_hub::connections, ERROR_OK, ipdbg_polling_callback(), LOG_INFO, NULL, and target_unregister_timer_callback().
Referenced by ipdbg_on_connection_closed().
|
static |
Definition at line 87 of file ipdbg.c.
References ipdbg_fifo::buffer, ipdbg_fifo::count, and ipdbg_fifo::rd_idx.
Referenced by ipdbg_append_to_fifo(), ipdbg_move_buffer_to_connection(), and ipdbg_on_connection_input().
|
static |
Definition at line 684 of file ipdbg.c.
Referenced by ipdbg_register_commands().
|
static |
Definition at line 67 of file ipdbg.c.
Referenced by ipdbg_add_hub(), ipdbg_find_hub(), and ipdbg_remove_hub().
|
static |
Definition at line 69 of file ipdbg.c.
Referenced by ipdbg_add_service(), ipdbg_find_service(), and ipdbg_remove_service().
|
static |
Definition at line 581 of file ipdbg.c.
Referenced by ipdbg_start().