|
OpenOCD
|

Go to the source code of this file.
Data Structures | |
| struct | ac_cache |
| struct | dm013_info_t |
| struct | mem_access_result |
| struct | riscv013_info_t |
| struct | scratch_mem_t |
| struct | target_list_t |
Enumerations | |
| enum | dmi_op_t { DMI_OP_NOP = DTM_DMI_OP_NOP , DMI_OP_READ = DTM_DMI_OP_READ , DMI_OP_WRITE = DTM_DMI_OP_WRITE } |
| enum | dmi_status_t { DMI_STATUS_SUCCESS = DTM_DMI_OP_SUCCESS , DMI_STATUS_FAILED = DTM_DMI_OP_FAILED , DMI_STATUS_BUSY = DTM_DMI_OP_BUSY } |
| enum | grouptype { HALT_GROUP , RESUME_GROUP } |
| enum | mem_access_result_enum { LIST_OF_MEM_ACCESS_RESULTS } |
| enum | mem_access_result_type { MEM_ACCESS_RESULT_TYPE_OK , MEM_ACCESS_RESULT_TYPE_DISABLED , MEM_ACCESS_RESULT_TYPE_SKIPPED , MEM_ACCESS_RESULT_TYPE_FAILED , MEM_ACCESS_RESULT_TYPE_ENUM_SIZE } |
| enum | memory_space_t { SPACE_DM_DATA , SPACE_DMI_PROGBUF , SPACE_DMI_RAM } |
Functions | |
| static uint32_t | __attribute__ ((unused)) |
| static int | abstract_cmd_batch_check_and_clear_cmderr (struct target *target, const struct riscv_batch *batch, size_t abstractcs_read_key, uint32_t *cmderr) |
| static size_t | abstract_cmd_fill_batch (struct riscv_batch *batch, uint32_t command) |
| static riscv_reg_t | abstract_data_get_from_batch (struct riscv_batch *batch, unsigned int index, unsigned int size_bits) |
| static void | abstract_data_read_fill_batch (struct riscv_batch *batch, unsigned int index, unsigned int size_bits) |
| Queue scans into a batch that read the value from abstract data registers: data[index] (and data[index+1] in case of 64-bit value). More... | |
| static void | abstract_data_write_fill_batch (struct riscv_batch *batch, riscv_reg_t value, unsigned int index, unsigned int size_bits) |
| Queue scans into a batch that write the value to abstract data registers: data[index] (and data[index+1] in case of 64-bit value). More... | |
| static uint32_t | abstract_memory_size (unsigned int width) |
| static struct ac_cache | ac_cache_construct (void) |
| static bool | ac_cache_contains (const struct ac_cache *cache, uint32_t command) |
| static int | ac_cache_elem_comparator (const void *p_lhs, const void *p_rhs) |
| static void | ac_cache_free (struct ac_cache *cache) |
| static void | ac_cache_insert (struct ac_cache *cache, uint32_t command) |
| static struct mem_access_result | access_memory_abstract (struct target *target, const struct riscv_mem_access_args args) |
| static uint32_t | access_memory_command (struct target *target, bool virtual, unsigned int width, bool postincrement, bool is_write) |
| static struct mem_access_result | access_memory_progbuf (struct target *target, const struct riscv_mem_access_args args) |
| static struct mem_access_result | access_memory_sysbus (struct target *target, const struct riscv_mem_access_args args) |
| static int | arch_state (struct target *target) |
| static int | assert_reset (struct target *target) |
| static void | batch_fill_sb_write_address (const struct target *target, struct riscv_batch *batch, target_addr_t address, enum riscv_scan_delay_class sbaddr0_delay) |
| static int | batch_run (struct target *target, struct riscv_batch *batch) |
| static int | batch_run_timeout (struct target *target, struct riscv_batch *batch) |
| static bool | check_dbgbase_exists (struct target *target) |
| static int | cleanup_after_register_access (struct target *target, riscv_reg_t mstatus, enum gdb_regno regno) |
| static int | cleanup_after_vector_access (struct target *target, riscv_reg_t mstatus, riscv_reg_t vtype, riscv_reg_t vl) |
| static | COMMAND_HELPER (riscv013_print_info, struct target *target) |
| static int | csr_read_progbuf (struct target *target, uint64_t *value, enum gdb_regno number) |
| static int | csr_write_progbuf (struct target *target, enum gdb_regno number, riscv_reg_t value) |
| static bool | dcsr_ebreak_config_equals_reset_value (const struct target *target) |
| static int | deassert_reset (struct target *target) |
| static void | decrement_reset_delays_counter (struct target *target, size_t finished_scans) |
| static void | deinit_target (struct target *target) |
| static int | dm013_select_hart (struct target *target, int hart_index) |
| static int | dm013_select_target (struct target *target) |
| static int | dm_read (struct target *target, uint32_t *value, uint32_t address) |
| static int | dm_read_exec (struct target *target, uint32_t *value, uint32_t address) |
| static int | dm_write (struct target *target, uint32_t address, uint32_t value) |
| static int | dmi_read (struct target *target, uint32_t *value, uint32_t address) |
| static int | dmi_write (struct target *target, uint32_t address, uint32_t value) |
| static int | dmstatus_read (struct target *target, uint32_t *dmstatus, bool authenticated) |
| static int | examine (struct target *target) |
| static int | examine_dm (struct target *target) |
| static int | examine_progbuf (struct target *target) |
| static int | execute_autofence (struct target *target) |
| static int | fpr_read_progbuf (struct target *target, uint64_t *value, enum gdb_regno number) |
| static int | fpr_write_progbuf (struct target *target, enum gdb_regno number, riscv_reg_t value) |
| enum riscv_debug_reg_ordinal | get_cmdtype (uint32_t command) |
| static dm013_info_t * | get_dm (struct target *target) |
| Return the DM structure for this target. More... | |
| static riscv013_info_t * | get_info (const struct target *target) |
| static struct riscv_debug_reg_ctx | get_riscv_debug_reg_ctx (const struct target *target) |
| static unsigned int | get_sbaadress_reg_count (const struct target *target) |
| static int | halt_set_dcsr_ebreak (struct target *target) |
| static int | handle_became_unavailable (struct target *target, enum riscv_hart_state previous_riscv_state) |
| static bool | has_sufficient_progbuf (struct target *target, unsigned int size) |
| static int | increase_ac_busy_delay (struct target *target) |
| static int | increase_dmi_busy_delay (struct target *target) |
| static int | init_target (struct command_context *cmd_ctx, struct target *target) |
| static int | internal_register_read64_progbuf_scratch (struct target *target, struct riscv_program *program, riscv_reg_t *value) |
| This function is used to read a 64-bit value from a register by executing a program. More... | |
| static int | internal_register_write64_progbuf_scratch (struct target *target, struct riscv_program *program, riscv_reg_t value) |
| This function is used to write a 64-bit value to a register by executing a program. More... | |
| static bool | is_command_unsupported (struct target *target, uint32_t command) |
| static int | is_fpu_reg (enum gdb_regno gdb_regno) |
| bool | is_mem_access_failed (struct mem_access_result status) |
| bool | is_mem_access_ok (struct mem_access_result status) |
| bool | is_mem_access_skipped (struct mem_access_result status) |
| static int | is_vector_reg (enum gdb_regno gdb_regno) |
| static void | log_debug_reg (struct target *target, enum riscv_debug_reg_ordinal reg, riscv_reg_t value, const char *file, unsigned int line, const char *func) |
| static void | log_mem_access_result (struct target *target, bool success, enum riscv_mem_access_method method, bool is_read) |
| static void | log_memory_access (target_addr_t address, uint32_t *sbvalue, unsigned int size_bytes, bool is_read) |
| static void | log_memory_access128 (target_addr_t address, uint64_t value_h, uint64_t value_l, bool is_read) |
| static void | log_memory_access64 (target_addr_t address, uint64_t value, unsigned int size_bytes, bool is_read) |
| static void | mark_command_as_unsupported (struct target *target, uint32_t command) |
| static struct mem_access_result | mem_access_result (enum mem_access_result_enum value) |
| const char * | mem_access_result_to_str (struct mem_access_result status) |
| static struct mem_access_result | mem_should_skip_abstract (struct target *target, const struct riscv_mem_access_args args) |
| static struct mem_access_result | mem_should_skip_progbuf (struct target *target, const struct riscv_mem_access_args args) |
| static struct mem_access_result | mem_should_skip_sysbus (struct target *target, const struct riscv_mem_access_args args) |
| static int | modify_privilege_for_virt2phys_mode (struct target *target, riscv_reg_t *mstatus, riscv_reg_t *mstatus_old, riscv_reg_t *dcsr, riscv_reg_t *dcsr_old) |
| static | OOCD_LIST_HEAD (dm_list) |
| static int | prep_for_register_access (struct target *target, riscv_reg_t *orig_mstatus, enum gdb_regno regno) |
| static int | prep_for_vector_access (struct target *target, riscv_reg_t *orig_mstatus, riscv_reg_t *orig_vtype, riscv_reg_t *orig_vl, unsigned int *debug_vl, unsigned int *debug_vsew) |
| static int | read_abstract_arg (struct target *target, riscv_reg_t *value, unsigned int index, unsigned int size_bits) |
| static struct mem_access_result | read_memory_abstract (struct target *target, const struct riscv_mem_access_args args) |
| static int | read_memory_bus_v0 (struct target *target, const struct riscv_mem_access_args args) |
| static int | read_memory_bus_v1 (struct target *target, const struct riscv_mem_access_args args) |
| Read the requested memory using the system bus interface. More... | |
| static int | read_memory_bus_word (struct target *target, target_addr_t address, uint32_t size, uint8_t *buffer) |
| static struct mem_access_result | read_memory_progbuf (struct target *target, const struct riscv_mem_access_args args) |
| Read the requested memory, silently handling memory access errors. More... | |
| static struct mem_access_result | read_memory_progbuf_inner (struct target *target, const struct riscv_mem_access_args args) |
Read the requested memory, taking care to minimize the number of reads and re-read the data only if abstract command busy or DMI busy is encountered in the process. More... | |
| static int | read_memory_progbuf_inner_ensure_forward_progress (struct target *target, const struct riscv_mem_access_args args, uint32_t start_index) |
| read_memory_progbuf_inner_startup() must be called before calling this function with the address argument equal to curr_target_address. More... | |
| static int | read_memory_progbuf_inner_extract_batch_data (struct target *target, const struct riscv_batch *batch, uint32_t start_index, uint32_t elements_to_read, uint32_t *elements_read, const struct riscv_mem_access_args args) |
| This function extracts the data from the batch. More... | |
| static uint32_t | read_memory_progbuf_inner_fill_batch (struct riscv_batch *batch, uint32_t count, uint32_t size) |
| static int | read_memory_progbuf_inner_fill_progbuf (struct target *target, uint32_t increment, uint32_t size) |
| static int | read_memory_progbuf_inner_on_ac_busy (struct target *target, uint32_t start_index, uint32_t *elements_read, const struct riscv_mem_access_args args) |
| This function attempts to restore the pipeline after a busy on abstract access. More... | |
| static int | read_memory_progbuf_inner_on_dmi_busy (struct target *target, uint32_t start_index, uint32_t next_start_index, const struct riscv_mem_access_args args) |
| This function attempts to restore the pipeline after a dmi busy. More... | |
| static struct mem_access_result | read_memory_progbuf_inner_one (struct target *target, const struct riscv_mem_access_args args) |
| Only need to save/restore one GPR to read a single word, and the progbuf program doesn't need to increment. More... | |
| static int | read_memory_progbuf_inner_run_and_process_batch (struct target *target, struct riscv_batch *batch, const struct riscv_mem_access_args args, uint32_t start_index, uint32_t elements_to_read, uint32_t *elements_read) |
| This function reads a batch of elements from memory. More... | |
| static int | read_memory_progbuf_inner_startup (struct target *target, target_addr_t address, uint32_t increment, uint32_t index) |
| This function is used to start the memory-reading pipeline. More... | |
| static int | read_memory_progbuf_inner_try_to_read (struct target *target, const struct riscv_mem_access_args args, uint32_t *elements_read, uint32_t index, uint32_t loop_count) |
| static int | read_sbcs_nonbusy (struct target *target, uint32_t *sbcs) |
| static int | read_word_from_dm_data_regs (struct target *target, const struct riscv_mem_access_args args, uint32_t index) |
| static struct mem_access_result | read_word_from_s1 (struct target *target, const struct riscv_mem_access_args args, uint32_t index) |
| static int | register_read_abstract (struct target *target, riscv_reg_t *value, enum gdb_regno number) |
| static int | register_read_abstract_with_size (struct target *target, riscv_reg_t *value, enum gdb_regno number, unsigned int size) |
| static int | register_read_direct (struct target *target, riscv_reg_t *value, enum gdb_regno number) |
| Actually read registers from the target right now. More... | |
| static int | register_read_progbuf (struct target *target, uint64_t *value, enum gdb_regno number) |
| This function reads a register by writing a program to program buffer and executing it. More... | |
| static unsigned int | register_size (struct target *target, enum gdb_regno number) |
| Return register size in bits. More... | |
| static int | register_write_abstract (struct target *target, enum gdb_regno number, riscv_reg_t value) |
| static int | register_write_direct (struct target *target, enum gdb_regno number, riscv_reg_t value) |
| Immediately write the new value to the requested register. More... | |
| static int | register_write_progbuf (struct target *target, enum gdb_regno number, riscv_reg_t value) |
| This function writes a register by writing a program to program buffer and executing it. More... | |
| static int | reset_dm (struct target *target) |
| static void | reset_learned_delays (struct target *target) |
| static int | restore_privilege_from_virt2phys_mode (struct target *target, riscv_reg_t mstatus, riscv_reg_t mstatus_old, riscv_reg_t dcsr, riscv_reg_t dcsr_old) |
| static int | riscv013_access_memory (struct target *target, const struct riscv_mem_access_args args) |
| uint32_t | riscv013_access_register_command (struct target *target, uint32_t number, unsigned int size, uint32_t flags) |
| static int | riscv013_authdata_read (struct target *target, uint32_t *value, unsigned int index) |
| static int | riscv013_authdata_write (struct target *target, uint32_t value, unsigned int index) |
| static int | riscv013_clear_abstract_error (struct target *target) |
| static unsigned int | riscv013_data_bits (struct target *target) |
| static void | riscv013_dm_free (struct target *target) |
| int | riscv013_execute_abstract_command (struct target *target, uint32_t command, uint32_t *cmderr) |
| static int | riscv013_execute_progbuf (struct target *target, uint32_t *cmderr) |
| static void | riscv013_fill_dm_nop (const struct target *target, uint8_t *buf) |
| static void | riscv013_fill_dmi_read (const struct target *target, uint8_t *buf, uint32_t a) |
| static void | riscv013_fill_dmi_write (const struct target *target, uint8_t *buf, uint32_t a, uint32_t d) |
| static uint32_t | riscv013_get_dmi_address (const struct target *target, uint32_t address) |
| static unsigned int | riscv013_get_dmi_address_bits (const struct target *target) |
| static int | riscv013_get_hart_state (struct target *target, enum riscv_hart_state *state) |
| static bool | riscv013_get_impebreak (const struct target *target) |
| static unsigned int | riscv013_get_progbufsize (const struct target *target) |
| int | riscv013_get_register (struct target *target, riscv_reg_t *value, enum gdb_regno rid) |
| int | riscv013_get_register_buf (struct target *target, uint8_t *value, enum gdb_regno regno) |
| static int | riscv013_halt_go (struct target *target) |
| static int | riscv013_halt_prep (struct target *target) |
| static enum riscv_halt_reason | riscv013_halt_reason (struct target *target) |
| static int | riscv013_invalidate_cached_progbuf (struct target *target) |
| static int | riscv013_on_step (struct target *target) |
| static int | riscv013_on_step_or_resume (struct target *target, bool step) |
| static riscv_insn_t | riscv013_read_progbuf (struct target *target, unsigned int index) |
| static int | riscv013_resume_go (struct target *target) |
| static int | riscv013_resume_prep (struct target *target) |
| int | riscv013_set_register (struct target *target, enum gdb_regno rid, riscv_reg_t value) |
| int | riscv013_set_register_buf (struct target *target, enum gdb_regno regno, const uint8_t *value) |
| static int | riscv013_step_current_hart (struct target *target) |
| static int | riscv013_step_or_resume_current_hart (struct target *target, bool step) |
| static int | riscv013_write_progbuf (struct target *target, unsigned int index, riscv_insn_t d) |
| static int | sample_memory (struct target *target, struct riscv_sample_buf *buf, riscv_sample_config_t *config, int64_t until_ms) |
| static int | sample_memory_bus_v1 (struct target *target, struct riscv_sample_buf *buf, const riscv_sample_config_t *config, int64_t until_ms) |
| static target_addr_t | sb_read_address (struct target *target) |
| static uint32_t | sb_sbaccess (unsigned int size_bytes) |
| static int | sb_write_address (struct target *target, target_addr_t address, enum riscv_scan_delay_class sbaddr0_delay) |
| static int | sba_supports_access (struct target *target, unsigned int size_bytes) |
| static int | scratch_read64 (struct target *target, scratch_mem_t *scratch, uint64_t *value) |
| static int | scratch_release (struct target *target, scratch_mem_t *scratch) |
| static int | scratch_reserve (struct target *target, scratch_mem_t *scratch, struct riscv_program *program, unsigned int size_bytes) |
| Find some scratch memory to be used with the given program. More... | |
| static int | scratch_write64 (struct target *target, scratch_mem_t *scratch, uint64_t value) |
| static void | select_dmi (struct jtag_tap *tap) |
| static int | select_prepped_harts (struct target *target) |
| static void | set_buffer_and_log_read (const struct riscv_mem_access_args args, uint32_t index, uint64_t value) |
| static int | set_dcsr_ebreak (struct target *target, bool step) |
| static uint32_t | set_dmcontrol_hartsel (uint32_t initial, int hart_index) |
| static int | set_group (struct target *target, bool *supported, unsigned int group, enum grouptype grouptype) |
| static int | set_group (struct target *target, bool *supported, unsigned int group, enum grouptype grouptype) |
| static int | tick (struct target *target) |
| static int | try_set_vsew (struct target *target, unsigned int *debug_vsew) |
| static int | vl_write_progbuf (struct target *target, riscv_reg_t value) |
| static int | vtype_write_progbuf (struct target *target, riscv_reg_t value) |
| static int | wait_for_authbusy (struct target *target, uint32_t *dmstatus) |
| static int | wait_for_idle (struct target *target, uint32_t *abstractcs) |
| static int | wait_for_idle_if_needed (struct target *target) |
| static int | write_abstract_arg (struct target *target, unsigned int index, riscv_reg_t value, unsigned int size_bits) |
| static struct mem_access_result | write_memory_abstract (struct target *target, const struct riscv_mem_access_args args) |
| static int | write_memory_bus_v0 (struct target *target, const struct riscv_mem_access_args args) |
| static int | write_memory_bus_v1 (struct target *target, const struct riscv_mem_access_args args) |
| static struct mem_access_result | write_memory_progbuf (struct target *target, const struct riscv_mem_access_args args) |
| static target_addr_t | write_memory_progbuf_fill_batch (struct riscv_batch *batch, target_addr_t start_address, target_addr_t end_address, uint32_t size, const uint8_t *buffer) |
| This function fills the batch with DMI writes (but does not execute the batch). More... | |
| static int | write_memory_progbuf_fill_progbuf (struct target *target, uint32_t size) |
| static int | write_memory_progbuf_handle_busy (struct target *target, target_addr_t *address_p, target_addr_t end_address, uint32_t size, const uint8_t *buffer) |
| This function attempts to restore the pipeline after a busy on abstract access or a DMI busy by reading the content of s0 – the address of the failed write. More... | |
| static struct mem_access_result | write_memory_progbuf_inner (struct target *target, const struct riscv_mem_access_args args) |
| static int | write_memory_progbuf_run_batch (struct target *target, struct riscv_batch *batch, target_addr_t *address_p, target_addr_t end_address, uint32_t size, const uint8_t *buffer) |
| This function runs the batch of writes and updates address_p with the address of the next write. More... | |
| static int | write_memory_progbuf_startup (struct target *target, target_addr_t *address_p, const uint8_t *buffer, uint32_t size) |
| This function is used to start the memory-writing pipeline. More... | |
| static int | write_memory_progbuf_teardown (struct target *target) |
This function reverts the changes made by write_memory_progbuf_startup() More... | |
| static int | write_memory_progbuf_try_to_write (struct target *target, target_addr_t *address_p, target_addr_t end_address, uint32_t size, const uint8_t *buffer) |
Variables | |
| struct target_type | riscv013_target |
| #define ABSTRACT_COMMAND_BATCH_SIZE 2 |
Definition at line 664 of file riscv-013.c.
| #define CMDERR_BUSY DM_ABSTRACTCS_CMDERR_BUSY |
Definition at line 104 of file riscv-013.c.
| #define CMDERR_EXCEPTION DM_ABSTRACTCS_CMDERR_EXCEPTION |
Definition at line 106 of file riscv-013.c.
| #define CMDERR_HALT_RESUME DM_ABSTRACTCS_CMDERR_HALT_RESUME |
Definition at line 107 of file riscv-013.c.
| #define CMDERR_NONE DM_ABSTRACTCS_CMDERR_NONE |
Definition at line 103 of file riscv-013.c.
| #define CMDERR_NOT_SUPPORTED DM_ABSTRACTCS_CMDERR_NOT_SUPPORTED |
Definition at line 105 of file riscv-013.c.
| #define CMDERR_OTHER DM_ABSTRACTCS_CMDERR_OTHER |
Definition at line 108 of file riscv-013.c.
| #define HART_INDEX_MULTIPLE -1 |
Definition at line 110 of file riscv-013.c.
| #define HART_INDEX_UNKNOWN -2 |
Definition at line 111 of file riscv-013.c.
| #define LIST_OF_MEM_ACCESS_RESULTS |
Definition at line 3540 of file riscv-013.c.
| #define LOG_DEBUG_REG | ( | t, | |
| r, | |||
| v | |||
| ) | log_debug_reg(t, r##_ORDINAL, v, __FILE__, __LINE__, __func__) |
Definition at line 384 of file riscv-013.c.
Definition at line 3599 of file riscv-013.c.
| #define MEM_ACCESS_RESULT_HANDLER | ( | name, | |
| kind, | |||
| msg | |||
| ) |
Definition at line 3599 of file riscv-013.c.
| #define MEM_ACCESS_RESULT_HANDLER | ( | name, | |
| kind, | |||
| msg | |||
| ) |
Definition at line 3599 of file riscv-013.c.
| #define MEM_ACCESS_RESULT_HANDLER | ( | name, | |
| kind, | |||
| msg | |||
| ) |
Definition at line 3599 of file riscv-013.c.
Definition at line 3599 of file riscv-013.c.
| #define RISCV013_INFO | ( | r | ) | riscv013_info_t *r = get_info(target) |
Since almost everything can be accomplish by scanning the dbus register, all functions here assume dbus is already selected.
The exception are functions called directly by OpenOCD, which can't assume anything about what's currently in IR. They should set IR to dbus explicitly.
Definition at line 85 of file riscv-013.c.
| enum dmi_op_t |
| Enumerator | |
|---|---|
| DMI_OP_NOP | |
| DMI_OP_READ | |
| DMI_OP_WRITE | |
Definition at line 89 of file riscv-013.c.
| enum dmi_status_t |
| Enumerator | |
|---|---|
| DMI_STATUS_SUCCESS | |
| DMI_STATUS_FAILED | |
| DMI_STATUS_BUSY | |
Definition at line 94 of file riscv-013.c.
| enum grouptype |
| Enumerator | |
|---|---|
| HALT_GROUP | |
| RESUME_GROUP | |
Definition at line 71 of file riscv-013.c.
| Enumerator | |
|---|---|
| LIST_OF_MEM_ACCESS_RESULTS | |
Definition at line 3600 of file riscv-013.c.
| Enumerator | |
|---|---|
| MEM_ACCESS_RESULT_TYPE_OK | |
| MEM_ACCESS_RESULT_TYPE_DISABLED | |
| MEM_ACCESS_RESULT_TYPE_SKIPPED | |
| MEM_ACCESS_RESULT_TYPE_FAILED | |
| MEM_ACCESS_RESULT_TYPE_ENUM_SIZE | |
Definition at line 3532 of file riscv-013.c.
| enum memory_space_t |
| Enumerator | |
|---|---|
| SPACE_DM_DATA | |
| SPACE_DMI_PROGBUF | |
| SPACE_DMI_RAM | |
Definition at line 1170 of file riscv-013.c.
|
staticpure virtual |
Definition at line 599 of file riscv-013.c.
References AC_ACCESS_REGISTER_AARSIZE, LOG_ERROR, set_field(), and width.
|
static |
Definition at line 676 of file riscv-013.c.
References dm013_info_t::abstract_cmd_maybe_busy, CMDERR_NONE, DM_ABSTRACTCS, DM_ABSTRACTCS_BUSY, DM_ABSTRACTCS_CMDERR, dm_write(), ERROR_FAIL, ERROR_OK, get_dm(), get_field32(), increase_ac_busy_delay(), LOG_DEBUG_REG, LOG_ERROR, LOG_TARGET_DEBUG, LOG_TARGET_ERROR, riscv_batch_get_dmi_read_data(), target_name(), and wait_for_idle().
Referenced by register_write_abstract(), and riscv013_execute_abstract_command().
|
static |
Definition at line 666 of file riscv-013.c.
References ABSTRACT_COMMAND_BATCH_SIZE, DM_ABSTRACTCS, DM_COMMAND, riscv_batch_add_dm_read(), riscv_batch_add_dm_write(), riscv_batch_available_scans(), RISCV_DELAY_ABSTRACT_COMMAND, and RISCV_DELAY_BASE.
Referenced by register_write_abstract(), and riscv013_execute_abstract_command().
|
static |
Definition at line 802 of file riscv-013.c.
References riscv_batch_get_dmi_read_data().
Referenced by read_abstract_arg().
|
static |
Queue scans into a batch that read the value from abstract data registers: data[index] (and data[index+1] in case of 64-bit value).
No extra DTM delay is added after the write to data[N]. It is assumed that this is a one-shot abstract command, that means no auto-execution is set up (abstractauto.autoexecdata bits are zero).
Definition at line 789 of file riscv-013.c.
References DM_DATA0, offset, riscv_batch_add_dm_read(), and RISCV_DELAY_BASE.
Referenced by read_abstract_arg().
|
static |
Queue scans into a batch that write the value to abstract data registers: data[index] (and data[index+1] in case of 64-bit value).
No extra DTM delay is added after the write to data[N]. It is assumed that this is a one-shot abstract command, that means no auto-execution is set up (abstractauto.autoexecdata bits are zero).
Definition at line 841 of file riscv-013.c.
References DM_DATA0, offset, riscv_batch_add_dm_write(), and RISCV_DELAY_BASE.
Referenced by register_write_abstract().
|
static |
Definition at line 1010 of file riscv-013.c.
References AC_ACCESS_MEMORY_AAMSIZE, LOG_ERROR, set_field(), and width.
Referenced by access_memory_command().
|
static |
Definition at line 153 of file riscv-013.c.
Referenced by init_target().
|
static |
Definition at line 202 of file riscv-013.c.
References ac_cache_elem_comparator(), ac_cache::commands, and ac_cache::size.
Referenced by is_command_unsupported().
|
static |
Definition at line 153 of file riscv-013.c.
Referenced by ac_cache_contains(), and ac_cache_insert().
|
static |
Definition at line 173 of file riscv-013.c.
References ac_cache::commands, NULL, and ac_cache::size.
Referenced by deinit_target().
|
static |
Definition at line 180 of file riscv-013.c.
References ac_cache_elem_comparator(), ac_cache::commands, LOG_ERROR, and ac_cache::size.
Referenced by mark_command_as_unsupported().
|
static |
Definition at line 4513 of file riscv-013.c.
Referenced by riscv013_access_memory().
|
static |
Definition at line 1032 of file riscv-013.c.
References abstract_memory_size(), AC_ACCESS_MEMORY_AAMPOSTINCREMENT, AC_ACCESS_MEMORY_AAMVIRTUAL, AC_ACCESS_MEMORY_CMDTYPE, AC_ACCESS_MEMORY_WRITE, set_field(), and width.
|
static |
Definition at line 4322 of file riscv-013.c.
References ERROR_FAIL, ERROR_OK, GDB_REGNO_A0, GDB_REGNO_S0, GDB_REGNO_S1, riscv013_reg_save(), riscv_program_addi(), riscv_program_ebreak(), riscv_program_init(), riscv_program_load(), riscv_program_write(), and size.
Referenced by riscv013_access_memory().
|
static |
Definition at line 4513 of file riscv-013.c.
Referenced by riscv013_access_memory().
|
static |
Definition at line 5087 of file riscv-013.c.
References ERROR_OK.
|
static |
Definition at line 2907 of file riscv-013.c.
References dm013_info_t::current_hartid, DM_DMCONTROL, DM_DMCONTROL_DMACTIVE, DM_DMCONTROL_HALTREQ, DM_DMCONTROL_NDMRESET, dm_write(), ERROR_FAIL, ERROR_OK, get_dm(), info, target::reset_halt, RISCV013_INFO, riscv013_invalidate_cached_progbuf(), select_dmi(), set_dmcontrol_hartsel(), set_field(), target::state, target::tap, TARGET_EVENT_RESET_ASSERT, target_handle_event(), target_has_event_action(), TARGET_RESET, and wait_for_idle_if_needed().
|
static |
Definition at line 2483 of file riscv-013.c.
References address, ARRAY_SIZE, DM_SBADDRESS0, DM_SBADDRESS1, DM_SBADDRESS2, DM_SBADDRESS3, get_sbaadress_reg_count(), riscv_batch_add_dm_write(), and RISCV_DELAY_BASE.
Referenced by sb_write_address().
|
static |
Definition at line 2514 of file riscv-013.c.
References decrement_reset_delays_counter(), ERROR_OK, increase_dmi_busy_delay(), info, RISCV013_INFO, riscv_batch_add_nop(), riscv_batch_run_from(), riscv_batch_was_batch_busy(), RISCV_INFO, select_dmi(), target::tap, and riscv_batch::used_scans.
Referenced by read_memory_progbuf_inner_run_and_process_batch(), sample_memory_bus_v1(), write_memory_bus_v1(), and write_memory_progbuf_run_batch().
|
static |
Definition at line 2538 of file riscv-013.c.
References decrement_reset_delays_counter(), ERROR_OK, ERROR_TIMEOUT_REACHED, increase_dmi_busy_delay(), info, LOG_TARGET_DEBUG, LOG_TARGET_ERROR, NULL, RISCV013_INFO, riscv_batch_add_nop(), riscv_batch_finished_scans(), riscv_batch_run_from(), riscv_batch_was_batch_busy(), RISCV_DELAY_BASE, riscv_get_command_timeout_sec(), RISCV_INFO, riscv_scan_delay_class_name(), riscv_scan_get_delay(), riscv_scan_set_delay(), select_dmi(), start, target::tap, and riscv_batch::used_scans.
Referenced by dm_read_exec(), dmi_read(), dmi_write(), read_abstract_arg(), read_memory_bus_v1(), register_write_abstract(), riscv013_execute_abstract_command(), and sb_write_address().
|
static |
Definition at line 537 of file riscv-013.c.
References count, target::dbgbase, DM_NEXTDM, dmi_read(), ERROR_OK, get_info(), info, LOG_TARGET_DEBUG, LOG_TARGET_ERROR, and RISCV_MAX_DMS.
Referenced by examine().
|
static |
Definition at line 1159 of file riscv-013.c.
References ERROR_OK, GDB_REGNO_MSTATUS, is_fpu_reg(), is_vector_reg(), LOG_TARGET_DEBUG, and riscv_reg_write().
Referenced by cleanup_after_vector_access(), register_read_direct(), and register_write_direct().
|
static |
Definition at line 2353 of file riscv-013.c.
References cleanup_after_register_access(), ERROR_FAIL, ERROR_OK, GDB_REGNO_VL, GDB_REGNO_VTYPE, and riscv_reg_write().
Referenced by riscv013_get_register_buf(), and riscv013_set_register_buf().
|
static |
Definition at line 2256 of file riscv-013.c.
References CMD, DM_DMSTATUS_AUTHENTICATED, DM_SBCS_SBACCESS128, DM_SBCS_SBACCESS16, DM_SBCS_SBACCESS32, DM_SBCS_SBACCESS64, DM_SBCS_SBACCESS8, DM_SBCS_SBASIZE, DM_SBCS_SBVERSION, dmstatus_read(), ERROR_OK, get_field(), info, and RISCV013_INFO.
|
static |
Definition at line 1416 of file riscv-013.c.
References ERROR_FAIL, ERROR_OK, GDB_REGNO_CSR0, GDB_REGNO_CSR4095, GDB_REGNO_S0, number, register_read_abstract(), riscv013_reg_save(), riscv_program_csrr(), riscv_program_exec(), riscv_program_init(), S0, target::state, and TARGET_HALTED.
Referenced by register_read_progbuf().
|
static |
Definition at line 1558 of file riscv-013.c.
References ERROR_FAIL, ERROR_OK, GDB_REGNO_CSR0, GDB_REGNO_CSR4095, GDB_REGNO_S0, number, register_write_abstract(), riscv013_reg_save(), riscv_program_csrw(), riscv_program_exec(), riscv_program_init(), S0, target::state, and TARGET_HALTED.
Referenced by register_write_progbuf().
|
static |
Definition at line 2949 of file riscv-013.c.
References config, N_RISCV_MODE, and riscv_private_config().
Referenced by deassert_reset().
|
static |
Definition at line 2958 of file riscv-013.c.
References dm013_info_t::current_hartid, DBG_REASON_DBGRQ, DBG_REASON_NOTHALTED, dcsr_ebreak_config_equals_reset_value(), target::debug_reason, DM_DMCONTROL, DM_DMCONTROL_ACKHAVERESET, DM_DMCONTROL_DMACTIVE, DM_DMCONTROL_HALTREQ, DM_DMSTATUS_ALLHAVERESET, DM_DMSTATUS_ALLUNAVAIL, dm_write(), dmstatus_read(), ERROR_FAIL, ERROR_OK, ERROR_TIMEOUT_REACHED, get_dm(), get_field(), info, LOG_TARGET_DEBUG, LOG_TARGET_ERROR, NULL, target::reset_halt, RISCV013_INFO, RISCV_DELAY_BASE, riscv_get_command_timeout_sec(), riscv_scan_get_delay(), riscv_scan_set_delay(), select_dmi(), set_dmcontrol_hartsel(), set_field(), start, target::state, target::tap, TARGET_HALTED, TARGET_RUNNING, and wait_for_idle_if_needed().
|
static |
Definition at line 462 of file riscv-013.c.
References LOG_TARGET_DEBUG, reset_learned_delays(), and RISCV_INFO.
Referenced by batch_run(), and batch_run_timeout().
|
static |
Definition at line 1776 of file riscv-013.c.
References ac_cache_free(), riscv013_info_t::ac_not_supported_cache, target::arch_info, info, LOG_TARGET_DEBUG, NULL, and riscv013_dm_free().
|
static |
Definition at line 5151 of file riscv-013.c.
References dm013_info_t::current_hartid, DM_DMCONTROL, DM_DMCONTROL_DMACTIVE, dm_write(), ERROR_FAIL, ERROR_OK, get_dm(), HART_INDEX_UNKNOWN, set_dmcontrol_hartsel(), and wait_for_idle_if_needed().
Referenced by dm013_select_target(), examine_dm(), and select_prepped_harts().
|
static |
Definition at line 658 of file riscv-013.c.
References dm013_select_hart(), get_info(), and info.
Referenced by examine(), execute_autofence(), init_target(), riscv013_get_hart_state(), riscv013_get_register(), riscv013_get_register_buf(), riscv013_halt_go(), riscv013_set_register(), riscv013_set_register_buf(), select_prepped_harts(), and set_dcsr_ebreak().
|
static |
Definition at line 502 of file riscv-013.c.
References address, dmi_read(), and riscv013_get_dmi_address().
Referenced by dmstatus_read(), examine(), examine_dm(), examine_progbuf(), read_memory_bus_v0(), read_memory_bus_word(), read_sbcs_nonbusy(), reset_dm(), riscv013_authdata_read(), riscv013_halt_go(), riscv013_read_progbuf(), sb_read_address(), scratch_read64(), set_group(), and wait_for_idle().
|
static |
Definition at line 507 of file riscv-013.c.
References dm013_info_t::abstract_cmd_maybe_busy, address, batch_run_timeout(), ERROR_FAIL, ERROR_OK, get_dm(), riscv_batch_add_dm_read(), riscv_batch_alloc(), riscv_batch_free(), riscv_batch_get_dmi_read_data(), and RISCV_DELAY_ABSTRACT_COMMAND.
Referenced by read_memory_progbuf_inner_startup().
|
static |
Definition at line 532 of file riscv-013.c.
References address, dmi_write(), and riscv013_get_dmi_address().
Referenced by abstract_cmd_batch_check_and_clear_cmderr(), assert_reset(), deassert_reset(), dm013_select_hart(), examine_dm(), read_memory_bus_v0(), read_memory_bus_v1(), read_memory_progbuf_inner_on_ac_busy(), read_memory_progbuf_inner_on_dmi_busy(), read_memory_progbuf_inner_startup(), reset_dm(), riscv013_authdata_write(), riscv013_get_hart_state(), riscv013_halt_go(), riscv013_step_or_resume_current_hart(), riscv013_write_progbuf(), sample_memory_bus_v1(), scratch_write64(), select_prepped_harts(), set_group(), write_abstract_arg(), write_memory_bus_v0(), write_memory_bus_v1(), write_memory_progbuf_startup(), and write_memory_progbuf_teardown().
|
static |
Definition at line 491 of file riscv-013.c.
References address, batch_run_timeout(), ERROR_OK, riscv_batch_add_dmi_read(), riscv_batch_alloc(), riscv_batch_free(), riscv_batch_get_dmi_read_data(), and RISCV_DELAY_BASE.
Referenced by check_dbgbase_exists(), dm_read(), and init_target().
|
static |
Definition at line 522 of file riscv-013.c.
References address, batch_run_timeout(), riscv_batch_add_dmi_write(), riscv_batch_alloc(), riscv_batch_free(), and RISCV_DELAY_BASE.
Referenced by dm_write(), and init_target().
|
static |
Definition at line 571 of file riscv-013.c.
References DM_DMSTATUS, DM_DMSTATUS_AUTHENTICATED, DM_DMSTATUS_VERSION, dm_read(), ERROR_FAIL, ERROR_OK, get_field(), get_field32(), and LOG_ERROR.
Referenced by COMMAND_HELPER(), deassert_reset(), examine(), examine_dm(), riscv013_get_hart_state(), riscv013_halt_go(), riscv013_step_or_resume_current_hart(), and wait_for_authbusy().
|
static |
Definition at line 1994 of file riscv-013.c.
References check_dbgbase_exists(), target::coreid, DBG_REASON_DBGRQ, DBG_REASON_NOTHALTED, DBG_REASON_UNDEFINED, target::dbgbase, target::debug_reason, dm013_select_target(), DM_ABSTRACTCS, DM_ABSTRACTCS_DATACOUNT, DM_ABSTRACTCS_PROGBUFSIZE, DM_DMSTATUS_AUTHENTICATED, DM_DMSTATUS_IMPEBREAK, DM_DMSTATUS_VERSION, DM_HARTINFO, DM_HARTINFO_DATAACCESS, DM_HARTINFO_DATAADDR, DM_HARTINFO_DATASIZE, dm_read(), DM_SBCS, dmstatus_read(), DTM_DTMCS, DTM_DTMCS_ABITS, DTM_DTMCS_IDLE, DTM_DTMCS_VERSION, dtmcs_scan(), ERROR_FAIL, ERROR_OK, examine_dm(), get_field(), get_field32(), get_info(), HALT_GROUP, has_sufficient_progbuf(), info, LOG_DEBUG_REG, LOG_TARGET_DEBUG, LOG_TARGET_ERROR, LOG_TARGET_INFO, LOG_TARGET_WARNING, RISCV013_DTMCS_ABITS_MAX, RISCV013_DTMCS_ABITS_MIN, riscv013_halt_go(), riscv013_invalidate_cached_progbuf(), riscv013_reg_examine_all(), riscv013_step_or_resume_current_hart(), riscv_get_hart_state(), RISCV_INFO, RISCV_STATE_HALTED, RISCV_STATE_RUNNING, set_dcsr_ebreak(), set_group(), target::smp, target::state, target::tap, TARGET_HALTED, TARGET_RUNNING, and TARGET_UNKNOWN.
|
static |
Definition at line 1904 of file riscv-013.c.
References dm013_info_t::abstract_cmd_maybe_busy, dm013_info_t::current_hartid, dm013_select_hart(), DM_DMCONTROL, DM_DMCONTROL_ACKHAVERESET, DM_DMCONTROL_DMACTIVE, DM_DMCONTROL_HARTSELHI, DM_DMCONTROL_HARTSELLO, DM_DMCONTROL_HARTSELLO_LENGTH, DM_DMCONTROL_HASEL, DM_DMSTATUS_ANYHAVERESET, DM_DMSTATUS_ANYNONEXISTENT, dm_read(), dm_write(), dmstatus_read(), ERROR_FAIL, ERROR_OK, get_dm(), get_field(), dm013_info_t::hart_count, HART_INDEX_UNKNOWN, dm013_info_t::hasel_supported, LOG_TARGET_DEBUG, LOG_TARGET_ERROR, MIN, reset_dm(), RISCV_MAX_HARTS, set_dmcontrol_hartsel(), wait_for_idle_if_needed(), dm013_info_t::was_examined, and dm013_info_t::was_reset.
Referenced by examine().
|
static |
Definition at line 1045 of file riscv-013.c.
References auipc(), DM_PROGBUF0, dm_read(), ERROR_FAIL, ERROR_OK, GDB_REGNO_S0, get_info(), info, LOG_TARGET_INFO, register_read_direct(), riscv013_reg_save(), riscv_program_exec(), riscv_program_init(), riscv_program_insert(), S0, sw(), YNM_MAYBE, YNM_NO, and YNM_YES.
Referenced by scratch_reserve().
|
static |
Definition at line 3037 of file riscv-013.c.
References dm013_select_target(), ERROR_FAIL, ERROR_OK, riscv_program::execution_result, has_sufficient_progbuf(), LOG_TARGET_DEBUG, LOG_TARGET_ERROR, RISCV_INFO, RISCV_PROGBUF_EXEC_RESULT_EXCEPTION, riscv_program_exec(), riscv_program_fence_i(), riscv_program_fence_rw_rw(), and riscv_program_init().
Referenced by riscv013_on_step_or_resume().
|
static |
Definition at line 1384 of file riscv-013.c.
References ERROR_FAIL, ERROR_OK, fmv_x_d(), fmv_x_w(), fsd(), GDB_REGNO_FPR0, GDB_REGNO_FPR31, GDB_REGNO_S0, internal_register_read64_progbuf_scratch(), number, register_read_abstract(), riscv013_reg_save(), riscv_program_exec(), riscv_program_init(), riscv_program_insert(), riscv_supports_extension(), riscv_xlen(), S0, target::state, and TARGET_HALTED.
Referenced by register_read_progbuf().
|
static |
Definition at line 1483 of file riscv-013.c.
References ERROR_FAIL, ERROR_OK, fld(), fmv_d_x(), fmv_w_x(), GDB_REGNO_FPR0, GDB_REGNO_FPR31, GDB_REGNO_S0, internal_register_write64_progbuf_scratch(), number, register_write_abstract(), riscv013_reg_save(), riscv_program_exec(), riscv_program_init(), riscv_program_insert(), riscv_supports_extension(), riscv_xlen(), S0, target::state, and TARGET_HALTED.
Referenced by register_write_progbuf().
| enum riscv_debug_reg_ordinal get_cmdtype | ( | uint32_t | command | ) |
Definition at line 676 of file riscv-013.c.
Referenced by is_command_unsupported(), and mark_command_as_unsupported().
|
static |
Return the DM structure for this target.
If there isn't one, find it in the global list of DMs. If it's not in there, then create one and initialize it to 0.
Definition at line 277 of file riscv-013.c.
References jtag_tap::abs_chain_position, dm013_info_t::abs_chain_position, dm013_info_t::base, target::coreid, dm013_info_t::current_hartid, target::dbgbase, target::dbgbase_set, dm013_info_t::hart_count, info, INIT_LIST_HEAD(), target_list_t::list, dm013_info_t::list, list_add(), list_for_each_entry, LOG_TARGET_DEBUG, NULL, RISCV013_INFO, target::tap, target, target_list_t::target, and dm013_info_t::target_list.
Referenced by abstract_cmd_batch_check_and_clear_cmderr(), assert_reset(), deassert_reset(), dm013_select_hart(), dm_read_exec(), examine_dm(), read_memory_bus_v1(), read_memory_progbuf_inner_run_and_process_batch(), register_write_abstract(), reset_dm(), riscv013_authdata_write(), riscv013_execute_abstract_command(), riscv013_halt_go(), riscv013_invalidate_cached_progbuf(), riscv013_step_or_resume_current_hart(), riscv013_write_progbuf(), select_prepped_harts(), wait_for_idle(), wait_for_idle_if_needed(), and write_memory_progbuf_run_batch().
|
static |
Definition at line 264 of file riscv-013.c.
References target::arch_info, and info.
Referenced by check_dbgbase_exists(), dm013_select_target(), examine(), examine_progbuf(), increase_ac_busy_delay(), init_target(), is_command_unsupported(), mark_command_as_unsupported(), scratch_reserve(), and select_prepped_harts().
|
static |
Definition at line 329 of file riscv-013.c.
References info, target_list_t::list, dm013_info_t::list, list_del(), list_empty(), list_for_each_entry, NULL, RISCV013_INFO, target_list_t::target, and dm013_info_t::target_list.
Referenced by log_debug_reg().
|
static |
Definition at line 2476 of file riscv-013.c.
References DIV_ROUND_UP, DM_SBCS_SBASIZE, get_field(), info, and RISCV013_INFO.
Referenced by batch_fill_sb_write_address(), and sb_write_address().
|
static |
Definition at line 1711 of file riscv-013.c.
References DBG_REASON_NOTHALTED, target::debug_reason, ERROR_FAIL, ERROR_OK, HALT_GROUP, info, LOG_TARGET_DEBUG, LOG_TARGET_ERROR, riscv013_halt_go(), RISCV013_INFO, riscv013_step_or_resume_current_hart(), RISCV_INFO, set_dcsr_ebreak(), set_group(), target::smp, target::state, and TARGET_RUNNING.
Referenced by tick().
|
static |
Definition at line 2829 of file riscv-013.c.
References ERROR_OK, info, LOG_LVL_WARNING, LOG_TARGET_WARNING, RISCV013_INFO, riscv_reg_cache_any_dirty(), and riscv_reg_cache_invalidate_all().
Referenced by init_target().
|
static |
Definition at line 1348 of file riscv-013.c.
References info, RISCV013_INFO, and size.
Referenced by examine(), execute_autofence(), riscv013_data_bits(), and riscv013_on_step_or_resume().
|
static |
Definition at line 592 of file riscv-013.c.
References get_info(), info, RISCV_DELAY_ABSTRACT_COMMAND, and riscv_scan_increase_delay().
Referenced by abstract_cmd_batch_check_and_clear_cmderr(), read_memory_progbuf_inner_on_ac_busy(), and write_memory_progbuf_handle_busy().
|
static |
Definition at line 441 of file riscv-013.c.
References DTM_DTMCS_DMIRESET, dtmcs_scan(), ERROR_OK, info, NULL, RISCV013_INFO, RISCV_DELAY_BASE, riscv_scan_increase_delay(), and target::tap.
Referenced by batch_run(), batch_run_timeout(), and sample_memory_bus_v1().
|
static |
Definition at line 2854 of file riscv-013.c.
References ac_cache_construct(), dm013_select_target(), dmi_read(), dmi_write(), ERROR_FAIL, ERROR_OK, get_info(), handle_became_unavailable(), info, LOG_TARGET_DEBUG, reset_learned_delays(), riscv013_access_memory(), riscv013_authdata_read(), riscv013_authdata_write(), riscv013_data_bits(), riscv013_execute_progbuf(), riscv013_fill_dm_nop(), riscv013_fill_dmi_read(), riscv013_fill_dmi_write(), riscv013_get_dmi_address(), riscv013_get_dmi_address_bits(), riscv013_get_hart_state(), riscv013_get_impebreak(), riscv013_get_progbufsize(), riscv013_halt_go(), riscv013_halt_prep(), riscv013_halt_reason(), riscv013_invalidate_cached_progbuf(), riscv013_on_step(), riscv013_read_progbuf(), riscv013_resume_go(), riscv013_resume_prep(), riscv013_step_current_hart(), riscv013_write_progbuf(), RISCV_INFO, sample_memory(), and tick().
|
static |
This function is used to read a 64-bit value from a register by executing a program.
The program stores a register to address located in S0. The caller should save S0.
Definition at line 1360 of file riscv-013.c.
References ERROR_FAIL, ERROR_OK, GDB_REGNO_S0, scratch_mem_t::hart_address, register_write_abstract(), riscv_program_exec(), scratch_read64(), scratch_release(), and scratch_reserve().
Referenced by fpr_read_progbuf().
|
static |
This function is used to write a 64-bit value to a register by executing a program.
The program loads a value from address located in S0 to a register. The caller should save S0.
Definition at line 1460 of file riscv-013.c.
References ERROR_FAIL, ERROR_OK, GDB_REGNO_S0, scratch_mem_t::hart_address, register_write_abstract(), riscv_program_exec(), scratch_release(), scratch_reserve(), and scratch_write64().
Referenced by fpr_write_progbuf().
|
static |
Definition at line 921 of file riscv-013.c.
References ac_cache_contains(), get_cmdtype(), get_info(), log_debug_reg(), and LOG_TARGET_DEBUG.
Referenced by register_read_abstract_with_size(), and register_write_abstract().
|
static |
Definition at line 1100 of file riscv-013.c.
References CSR_FCSR, CSR_FFLAGS, CSR_FRM, GDB_REGNO_CSR0, GDB_REGNO_FPR0, and GDB_REGNO_FPR31.
Referenced by cleanup_after_register_access(), and prep_for_register_access().
| bool is_mem_access_failed | ( | struct mem_access_result | status | ) |
Definition at line 3627 of file riscv-013.c.
References LIST_OF_MEM_ACCESS_RESULTS, LOG_ERROR, and status.
Referenced by riscv013_access_memory().
| bool is_mem_access_ok | ( | struct mem_access_result | status | ) |
Definition at line 3611 of file riscv-013.c.
References LIST_OF_MEM_ACCESS_RESULTS, LOG_ERROR, and status.
Referenced by riscv013_access_memory().
| bool is_mem_access_skipped | ( | struct mem_access_result | status | ) |
Definition at line 3643 of file riscv-013.c.
References LIST_OF_MEM_ACCESS_RESULTS, LOG_ERROR, and status.
|
static |
Definition at line 1108 of file riscv-013.c.
References GDB_REGNO_V0, GDB_REGNO_V31, GDB_REGNO_VCSR, GDB_REGNO_VL, GDB_REGNO_VLENB, GDB_REGNO_VSTART, GDB_REGNO_VTYPE, GDB_REGNO_VXRM, and GDB_REGNO_VXSAT.
Referenced by cleanup_after_register_access(), and prep_for_register_access().
|
static |
Definition at line 368 of file riscv-013.c.
References get_riscv_debug_reg_ctx(), LOG_ERROR, LOG_LEVEL_IS, LOG_LVL_DEBUG, log_printf_lf(), NULL, RISCV_DEBUG_REG_HIDE_UNNAMED_0, riscv_debug_reg_to_s(), target_name(), and riscv_debug_reg_ctx::value.
Referenced by is_command_unsupported(), and mark_command_as_unsupported().
|
static |
Definition at line 3506 of file riscv-013.c.
References LOG_TARGET_DEBUG, LOG_TARGET_WARNING, RISCV_INFO, RISCV_MEM_ACCESS_PROGBUF, and RISCV_MEM_ACCESS_SYSBUS.
Referenced by riscv013_access_memory().
|
static |
Definition at line 3139 of file riscv-013.c.
References address, log_memory_access128(), and log_memory_access64().
Referenced by read_memory_bus_v1(), read_memory_bus_word(), and write_memory_bus_v1().
|
static |
Definition at line 3101 of file riscv-013.c.
References address, LOG_DEBUG, LOG_LEVEL_IS, LOG_LVL_DEBUG, and TARGET_PRIxADDR.
Referenced by log_memory_access().
|
static |
Definition at line 3113 of file riscv-013.c.
References address, LOG_DEBUG, LOG_LEVEL_IS, LOG_LVL_DEBUG, and TARGET_PRIxADDR.
Referenced by log_memory_access(), read_memory_progbuf_inner_extract_batch_data(), set_buffer_and_log_read(), write_memory_progbuf_fill_batch(), and write_memory_progbuf_startup().
|
static |
Definition at line 731 of file riscv-013.c.
References ac_cache_insert(), get_cmdtype(), get_info(), log_debug_reg(), and LOG_TARGET_DEBUG.
Referenced by register_write_abstract(), and riscv013_execute_abstract_command().
|
static |
Definition at line 3658 of file riscv-013.c.
References ARRAY_SIZE, LIST_OF_MEM_ACCESS_RESULTS, and status.
Referenced by riscv013_access_memory().
| const char* mem_access_result_to_str | ( | struct mem_access_result | status | ) |
Definition at line 3658 of file riscv-013.c.
Referenced by riscv013_access_memory().
|
static |
Definition at line 3658 of file riscv-013.c.
|
static |
Definition at line 3658 of file riscv-013.c.
|
static |
Definition at line 3658 of file riscv-013.c.
|
static |
Definition at line 3205 of file riscv-013.c.
References CSR_DCSR_MPRVEN, CSR_DCSR_MPRVEN_ENABLED, CSR_DCSR_PRV, ERROR_FAIL, ERROR_OK, GDB_REGNO_DCSR, GDB_REGNO_MSTATUS, get_field(), MSTATUS_MPP, MSTATUS_MPRV, PRV_M, riscv_reg_get(), riscv_reg_set(), riscv_virt2phys_mode_is_hw(), and set_field().
|
static |
|
static |
Definition at line 1120 of file riscv-013.c.
References ERROR_FAIL, ERROR_OK, GDB_REGNO_MSTATUS, is_fpu_reg(), is_vector_reg(), LOG_TARGET_DEBUG, MSTATUS_FS, MSTATUS_VS, riscv_reg_gdb_regno_name(), riscv_reg_get(), riscv_reg_write(), set_field(), target::state, and TARGET_HALTED.
Referenced by prep_for_vector_access(), register_read_direct(), and register_write_direct().
|
static |
Definition at line 2319 of file riscv-013.c.
References DIV_ROUND_UP, ERROR_FAIL, ERROR_OK, ERROR_TARGET_NOT_HALTED, GDB_REGNO_VL, GDB_REGNO_VTYPE, LOG_TARGET_ERROR, prep_for_register_access(), RISCV_INFO, riscv_reg_get(), riscv_reg_write(), target::state, TARGET_HALTED, and try_set_vsew().
Referenced by riscv013_get_register_buf(), and riscv013_set_register_buf().
|
static |
Definition at line 817 of file riscv-013.c.
References abstract_data_get_from_batch(), abstract_data_read_fill_batch(), batch_run_timeout(), ERROR_OK, riscv_batch_alloc(), and riscv_batch_free().
Referenced by read_word_from_dm_data_regs(), and register_read_abstract_with_size().
|
static |
Definition at line 3658 of file riscv-013.c.
|
static |
Definition at line 3270 of file riscv-013.c.
References riscv_mem_access_args::address, buf_set_u32(), riscv_mem_access_args::count, dm_read(), DM_SBADDRESS0, DM_SBCS, DM_SBCS_SBACCESS, DM_SBCS_SBAUTOINCREMENT, DM_SBDATA0, dm_write(), ERROR_FAIL, ERROR_NOT_IMPLEMENTED, ERROR_OK, riscv_mem_access_args::increment, LOG_TARGET_DEBUG, LOG_TARGET_ERROR, riscv_mem_access_args::read_buffer, riscv_mem_access_is_read(), set_field(), riscv_mem_access_args::size, and TARGET_PRIxADDR.
|
static |
Read the requested memory using the system bus interface.
Definition at line 3360 of file riscv-013.c.
References address, riscv_mem_access_args::address, batch_run_timeout(), buf_set_u32(), buffer, count, riscv_mem_access_args::count, DIV_ROUND_UP, DM_SBCS, DM_SBCS_SBAUTOINCREMENT, DM_SBCS_SBBUSYERROR, DM_SBCS_SBERROR, DM_SBCS_SBERROR_NONE, DM_SBCS_SBREADONADDR, DM_SBCS_SBREADONDATA, DM_SBDATA0, DM_SBDATA1, DM_SBDATA2, DM_SBDATA3, dm_write(), ERROR_FAIL, ERROR_NOT_IMPLEMENTED, ERROR_OK, get_dm(), get_field(), riscv_mem_access_args::increment, info, IS_PWR_OF_2, log_memory_access(), LOG_TARGET_ERROR, MIN, riscv_mem_access_args::read_buffer, riscv_batch::read_keys_used, read_memory_bus_word(), read_sbcs_nonbusy(), RISCV013_INFO, riscv_batch_add_dm_read(), riscv_batch_alloc(), riscv_batch_free(), riscv_batch_get_dmi_read_data(), RISCV_DELAY_BASE, RISCV_DELAY_SYSBUS_READ, riscv_mem_access_is_read(), riscv_scan_increase_delay(), sb_read_address(), sb_sbaccess(), sb_write_address(), set_field(), size, and riscv_mem_access_args::size.
|
static |
Definition at line 3154 of file riscv-013.c.
References address, buf_set_u32(), buffer, dm_read(), DM_SBDATA0, DM_SBDATA1, DM_SBDATA2, DM_SBDATA3, ERROR_OK, log_memory_access(), MIN, and size.
Referenced by read_memory_bus_v1().
|
static |
Read the requested memory, silently handling memory access errors.
Definition at line 4322 of file riscv-013.c.
|
static |
Read the requested memory, taking care to minimize the number of reads and re-read the data only if abstract command busy or DMI busy is encountered in the process.
Definition at line 4322 of file riscv-013.c.
|
static |
read_memory_progbuf_inner_startup() must be called before calling this function with the address argument equal to curr_target_address.
Definition at line 4247 of file riscv-013.c.
References riscv_mem_access_args::address, ERROR_FAIL, ERROR_OK, riscv_mem_access_args::increment, LOG_TARGET_DEBUG, riscv_mem_access_args::read_buffer, read_memory_progbuf_inner_try_to_read(), riscv_mem_access_is_read(), and riscv_mem_access_args::size.
|
static |
This function extracts the data from the batch.
Definition at line 4094 of file riscv-013.c.
References riscv_mem_access_args::address, buf_get_u64(), buf_set_u32(), DMI_STATUS_BUSY, DMI_STATUS_FAILED, DMI_STATUS_SUCCESS, ERROR_FAIL, ERROR_OK, riscv_mem_access_args::increment, log_memory_access64(), LOG_TARGET_DEBUG, riscv_mem_access_args::read_buffer, read_memory_progbuf_inner_on_dmi_busy(), riscv_batch_get_dmi_read_data(), riscv_batch_get_dmi_read_op(), riscv_mem_access_is_read(), riscv_xlen(), size, and riscv_mem_access_args::size.
Referenced by read_memory_progbuf_inner_run_and_process_batch().
|
static |
Definition at line 4201 of file riscv-013.c.
References count, DM_DATA0, DM_DATA1, MIN, riscv_batch_add_dm_read(), riscv_batch_available_scans(), RISCV_DELAY_ABSTRACT_COMMAND, and size.
Referenced by read_memory_progbuf_inner_try_to_read().
|
static |
Definition at line 4322 of file riscv-013.c.
|
static |
This function attempts to restore the pipeline after a busy on abstract access.
Target's state is as follows: s0 contains address + index_on_target * increment s1 contains mem[address + (index_on_target - 1) * increment] dm_data[0:1] contains mem[address + (index_on_target - 2) * increment]
Definition at line 4015 of file riscv-013.c.
References riscv_mem_access_args::address, DM_ABSTRACTAUTO, dm_write(), ERROR_FAIL, ERROR_OK, GDB_REGNO_A0, GDB_REGNO_S0, increase_ac_busy_delay(), riscv_mem_access_args::increment, LOG_TARGET_DEBUG, LOG_TARGET_ERROR, LOG_TARGET_WARNING, read_memory_progbuf_inner_startup(), register_read_direct(), riscv013_clear_abstract_error(), riscv_mem_access_is_read(), and TARGET_PRIxADDR.
Referenced by read_memory_progbuf_inner_run_and_process_batch().
|
static |
This function attempts to restore the pipeline after a dmi busy.
Definition at line 4074 of file riscv-013.c.
References riscv_mem_access_args::address, DM_ABSTRACTAUTO, dm_write(), ERROR_FAIL, ERROR_OK, riscv_mem_access_args::increment, LOG_TARGET_DEBUG, read_memory_progbuf_inner_startup(), and riscv_mem_access_is_read().
Referenced by read_memory_progbuf_inner_extract_batch_data().
|
static |
Only need to save/restore one GPR to read a single word, and the progbuf program doesn't need to increment.
Definition at line 4322 of file riscv-013.c.
|
static |
This function reads a batch of elements from memory.
Prior to calling this function the folowing conditions should be met:
Definition at line 4153 of file riscv-013.c.
References dm013_info_t::abstract_cmd_maybe_busy, batch_run(), CMDERR_BUSY, CMDERR_NONE, DM_ABSTRACTCS_CMDERR, ERROR_FAIL, ERROR_OK, get_dm(), get_field32(), LOG_TARGET_DEBUG, read_memory_progbuf_inner_extract_batch_data(), read_memory_progbuf_inner_on_ac_busy(), riscv013_clear_abstract_error(), riscv_mem_access_is_read(), and wait_for_idle().
Referenced by read_memory_progbuf_inner_try_to_read().
|
static |
This function is used to start the memory-reading pipeline.
The pipeline looks like this: memory -> s1 -> dm_data[0:1] -> debugger Prior to calling it, the program buffer should contain the appropriate program. This function sets DM_ABSTRACTAUTO_AUTOEXECDATA to trigger second stage of the pipeline (s1 -> dm_data[0:1]) whenever dm_data is read.
Definition at line 3945 of file riscv-013.c.
References AC_ACCESS_REGISTER_POSTEXEC, AC_ACCESS_REGISTER_TRANSFER, address, CMDERR_BUSY, CMDERR_NONE, DM_ABSTRACTAUTO, DM_ABSTRACTAUTO_AUTOEXECDATA, DM_ABSTRACTCS_CMDERR, DM_DATA0, dm_read_exec(), dm_write(), ERROR_FAIL, ERROR_OK, GDB_REGNO_A0, GDB_REGNO_S0, GDB_REGNO_S1, get_field32(), LOG_TARGET_DEBUG, LOG_TARGET_ERROR, NULL, register_write_direct(), riscv013_access_register_command(), riscv013_clear_abstract_error(), riscv013_execute_abstract_command(), riscv_xlen(), set_field(), and wait_for_idle().
Referenced by read_memory_progbuf_inner_on_ac_busy(), and read_memory_progbuf_inner_on_dmi_busy().
|
static |
Definition at line 4224 of file riscv-013.c.
References ERROR_FAIL, read_memory_progbuf_inner_fill_batch(), read_memory_progbuf_inner_run_and_process_batch(), riscv_batch_alloc(), RISCV_BATCH_ALLOC_SIZE, riscv_batch_free(), riscv_mem_access_is_read(), and riscv_mem_access_args::size.
Referenced by read_memory_progbuf_inner_ensure_forward_progress().
|
static |
Definition at line 3187 of file riscv-013.c.
References dm_read(), DM_SBCS, DM_SBCS_SBBUSY, ERROR_FAIL, ERROR_OK, get_field(), LOG_TARGET_ERROR, NULL, riscv_get_command_timeout_sec(), and start.
Referenced by read_memory_bus_v1(), and write_memory_bus_v1().
|
static |
Definition at line 4297 of file riscv-013.c.
References ERROR_OK, read_abstract_arg(), set_buffer_and_log_read(), and riscv_mem_access_args::size.
|
static |
Definition at line 4297 of file riscv-013.c.
|
static |
Definition at line 957 of file riscv-013.c.
References number, register_read_abstract_with_size(), register_size(), and size.
Referenced by csr_read_progbuf(), fpr_read_progbuf(), and register_read_direct().
|
static |
Definition at line 934 of file riscv-013.c.
References AC_ACCESS_REGISTER_TRANSFER, ERROR_FAIL, ERROR_OK, GDB_REGNO_V0, GDB_REGNO_V31, is_command_unsupported(), number, read_abstract_arg(), riscv013_access_register_command(), riscv013_execute_abstract_command(), and size.
Referenced by register_read_abstract().
|
static |
Actually read registers from the target right now.
Definition at line 1633 of file riscv-013.c.
References cleanup_after_register_access(), ERROR_FAIL, ERROR_OK, LOG_TARGET_DEBUG, number, prep_for_register_access(), register_read_abstract(), register_read_progbuf(), riscv_reg_gdb_regno_name(), target::state, and TARGET_HALTED.
Referenced by examine_progbuf(), read_memory_progbuf_inner_on_ac_busy(), riscv013_get_register(), riscv013_get_register_buf(), and write_memory_progbuf_handle_busy().
|
static |
This function reads a register by writing a program to program buffer and executing it.
Definition at line 1439 of file riscv-013.c.
References csr_read_progbuf(), ERROR_FAIL, fpr_read_progbuf(), GDB_REGNO_CSR0, GDB_REGNO_CSR4095, GDB_REGNO_FPR0, GDB_REGNO_FPR31, LOG_TARGET_ERROR, number, riscv_reg_gdb_regno_name(), target::state, and TARGET_HALTED.
Referenced by register_read_direct().
Return register size in bits.
Definition at line 1338 of file riscv-013.c.
References number, target::reg_cache, reg_cache::reg_list, riscv_xlen(), and reg::size.
Referenced by register_read_abstract(), and register_write_abstract().
|
static |
Definition at line 965 of file riscv-013.c.
References abstract_cmd_batch_check_and_clear_cmderr(), abstract_cmd_fill_batch(), dm013_info_t::abstract_cmd_maybe_busy, ABSTRACT_COMMAND_BATCH_SIZE, abstract_data_write_fill_batch(), AC_ACCESS_REGISTER_TRANSFER, AC_ACCESS_REGISTER_WRITE, batch_run_timeout(), CMDERR_NOT_SUPPORTED, ERROR_FAIL, ERROR_OK, get_dm(), is_command_unsupported(), LOG_DEBUG_REG, mark_command_as_unsupported(), number, register_size(), riscv013_access_register_command(), riscv_batch_alloc(), and riscv_batch_free().
Referenced by csr_write_progbuf(), fpr_write_progbuf(), internal_register_read64_progbuf_scratch(), internal_register_write64_progbuf_scratch(), register_write_direct(), vl_write_progbuf(), and vtype_write_progbuf().
|
static |
Immediately write the new value to the requested register.
This mechanism bypasses any caches.
Definition at line 1604 of file riscv-013.c.
References cleanup_after_register_access(), ERROR_FAIL, ERROR_OK, LOG_TARGET_DEBUG, number, prep_for_register_access(), register_write_abstract(), register_write_progbuf(), riscv_reg_gdb_regno_name(), target::state, and TARGET_HALTED.
Referenced by read_memory_progbuf_inner_startup(), riscv013_set_register(), riscv013_set_register_buf(), and write_memory_progbuf_startup().
|
static |
This function writes a register by writing a program to program buffer and executing it.
Definition at line 1581 of file riscv-013.c.
References csr_write_progbuf(), ERROR_FAIL, fpr_write_progbuf(), GDB_REGNO_CSR0, GDB_REGNO_CSR4095, GDB_REGNO_FPR0, GDB_REGNO_FPR31, GDB_REGNO_VL, GDB_REGNO_VTYPE, LOG_TARGET_ERROR, number, riscv_reg_gdb_regno_name(), target::state, TARGET_HALTED, vl_write_progbuf(), and vtype_write_progbuf().
Referenced by register_write_direct().
|
static |
Definition at line 1831 of file riscv-013.c.
References DM_DMCONTROL, DM_DMCONTROL_DMACTIVE, DM_DMCONTROL_HARTSELHI, DM_DMCONTROL_HARTSELLO, dm_read(), dm_write(), ERROR_OK, ERROR_TIMEOUT_REACHED, get_dm(), get_field32(), LOG_TARGET_DEBUG, LOG_TARGET_ERROR, NULL, riscv_get_command_timeout_sec(), start, and dm013_info_t::was_reset.
Referenced by examine_dm().
|
static |
Definition at line 455 of file riscv-013.c.
References info, and RISCV013_INFO.
Referenced by decrement_reset_delays_counter(), and init_target().
|
static |
Definition at line 3251 of file riscv-013.c.
References ERROR_FAIL, ERROR_OK, GDB_REGNO_DCSR, GDB_REGNO_MSTATUS, riscv_reg_set(), and riscv_virt2phys_mode_is_hw().
|
static |
Definition at line 4563 of file riscv-013.c.
References access_memory_abstract(), access_memory_progbuf(), access_memory_sysbus(), riscv_mem_access_args::address, ERROR_FAIL, ERROR_NOT_IMPLEMENTED, ERROR_OK, riscv_mem_access_args::increment, is_mem_access_failed(), is_mem_access_ok(), IS_PWR_OF_2, log_mem_access_result(), LOG_TARGET_ERROR, mem_access_result(), mem_access_result_to_str(), RISCV_INFO, RISCV_MEM_ACCESS_ABSTRACT, riscv_mem_access_is_read(), riscv_mem_access_is_valid(), RISCV_MEM_ACCESS_PROGBUF, RISCV_MEM_ACCESS_SYSBUS, and riscv_mem_access_args::size.
Referenced by init_target(), scratch_read64(), and scratch_write64().
| uint32_t riscv013_access_register_command | ( | struct target * | target, |
| uint32_t | number, | ||
| unsigned int | size, | ||
| uint32_t | flags | ||
| ) |
Definition at line 879 of file riscv-013.c.
References AC_ACCESS_REGISTER_AARSIZE, AC_ACCESS_REGISTER_REGNO, reg::arch_info, riscv_reg_info_t::custom_number, DM_COMMAND_CMDTYPE, GDB_REGNO_COUNT, GDB_REGNO_CSR0, GDB_REGNO_CSR4095, GDB_REGNO_FPR0, GDB_REGNO_FPR31, GDB_REGNO_XPR31, GDB_REGNO_ZERO, LOG_TARGET_ERROR, number, target::reg_cache, reg_cache::reg_list, riscv_reg_gdb_regno_name(), set_field(), and size.
Referenced by examine_xlen(), read_memory_progbuf_inner_startup(), register_read_abstract_with_size(), register_write_abstract(), and write_memory_progbuf_startup().
|
static |
Definition at line 2173 of file riscv-013.c.
References DM_AUTHDATA, dm_read(), ERROR_FAIL, ERROR_OK, LOG_TARGET_ERROR, NULL, and wait_for_authbusy().
Referenced by init_target().
|
static |
Definition at line 2186 of file riscv-013.c.
References DM_AUTHDATA, DM_DMSTATUS_AUTHENTICATED, dm_write(), ERROR_FAIL, ERROR_OK, get_dm(), get_field(), list_for_each_entry, LOG_TARGET_ERROR, LOG_TARGET_INFO, target_list_t::target, target_examine_one(), dm013_info_t::target_list, and wait_for_authbusy().
Referenced by init_target().
|
static |
Definition at line 5557 of file riscv-013.c.
Referenced by read_memory_progbuf_inner_on_ac_busy(), read_memory_progbuf_inner_run_and_process_batch(), read_memory_progbuf_inner_startup(), write_memory_progbuf_handle_busy(), and write_memory_progbuf_run_batch().
|
static |
Definition at line 2221 of file riscv-013.c.
References DM_SBCS_SBACCESS128, DM_SBCS_SBACCESS16, DM_SBCS_SBACCESS32, DM_SBCS_SBACCESS64, DM_SBCS_SBACCESS8, get_field(), has_sufficient_progbuf(), info, LOG_TARGET_ERROR, RISCV013_INFO, RISCV_INFO, RISCV_MEM_ACCESS_ABSTRACT, RISCV_MEM_ACCESS_PROGBUF, RISCV_MEM_ACCESS_SYSBUS, and riscv_xlen().
Referenced by init_target().
|
static |
Definition at line 329 of file riscv-013.c.
Referenced by deinit_target().
| int riscv013_execute_abstract_command | ( | struct target * | target, |
| uint32_t | command, | ||
| uint32_t * | cmderr | ||
| ) |
Definition at line 740 of file riscv-013.c.
References abstract_cmd_batch_check_and_clear_cmderr(), abstract_cmd_fill_batch(), dm013_info_t::abstract_cmd_maybe_busy, ABSTRACT_COMMAND_BATCH_SIZE, batch_run_timeout(), CMDERR_NONE, CMDERR_NOT_SUPPORTED, DM_COMMAND_CMDTYPE, ERROR_FAIL, ERROR_OK, get_dm(), get_field(), LOG_DEBUG_REG, LOG_LEVEL_IS, LOG_LVL_DEBUG, LOG_TARGET_DEBUG, mark_command_as_unsupported(), riscv_batch_alloc(), and riscv_batch_free().
Referenced by examine_xlen(), read_memory_progbuf_inner_startup(), register_read_abstract_with_size(), riscv013_execute_progbuf(), and write_memory_progbuf_startup().
|
static |
Definition at line 5431 of file riscv-013.c.
References AC_ACCESS_REGISTER_AARSIZE, AC_ACCESS_REGISTER_POSTEXEC, AC_ACCESS_REGISTER_REGNO, AC_ACCESS_REGISTER_TRANSFER, riscv013_execute_abstract_command(), and set_field().
Referenced by init_target().
|
static |
Definition at line 5458 of file riscv-013.c.
References buf_set_u32(), DMI_OP_NOP, DTM_DMI_ADDRESS_OFFSET, DTM_DMI_DATA_LENGTH, DTM_DMI_DATA_OFFSET, DTM_DMI_OP_LENGTH, DTM_DMI_OP_OFFSET, info, and RISCV013_INFO.
Referenced by init_target().
|
static |
Definition at line 5450 of file riscv-013.c.
References buf_set_u32(), DMI_OP_READ, DTM_DMI_ADDRESS_OFFSET, DTM_DMI_DATA_LENGTH, DTM_DMI_DATA_OFFSET, DTM_DMI_OP_LENGTH, DTM_DMI_OP_OFFSET, info, and RISCV013_INFO.
Referenced by init_target().
|
static |
Definition at line 5442 of file riscv-013.c.
References buf_set_u32(), DMI_OP_WRITE, DTM_DMI_ADDRESS_OFFSET, DTM_DMI_DATA_LENGTH, DTM_DMI_DATA_OFFSET, DTM_DMI_OP_LENGTH, DTM_DMI_OP_OFFSET, info, and RISCV013_INFO.
Referenced by init_target().
|
static |
Definition at line 479 of file riscv-013.c.
References address, info, and RISCV013_INFO.
Referenced by dm_read(), dm_write(), and init_target().
|
static |
Definition at line 5466 of file riscv-013.c.
References info, and RISCV013_INFO.
Referenced by init_target().
|
static |
Definition at line 2778 of file riscv-013.c.
References dm013_select_target(), DM_DMCONTROL, DM_DMCONTROL_ACKHAVERESET, DM_DMCONTROL_DMACTIVE, DM_DMCONTROL_HALTREQ, DM_DMSTATUS_ALLHALTED, DM_DMSTATUS_ALLNONEXISTENT, DM_DMSTATUS_ALLRUNNING, DM_DMSTATUS_ALLUNAVAIL, DM_DMSTATUS_ANYHAVERESET, dm_write(), dmstatus_read(), ERROR_FAIL, ERROR_OK, get_field(), info, LOG_TARGET_ERROR, LOG_TARGET_INFO, RISCV013_INFO, RISCV_STATE_HALTED, RISCV_STATE_NON_EXISTENT, RISCV_STATE_RUNNING, RISCV_STATE_UNAVAILABLE, set_dmcontrol_hartsel(), state, target::state, TARGET_HALTED, and wait_for_idle_if_needed().
Referenced by init_target().
|
static |
|
static |
| int riscv013_get_register | ( | struct target * | target, |
| riscv_reg_t * | value, | ||
| enum gdb_regno | rid | ||
| ) |
Definition at line 5110 of file riscv-013.c.
References CSR_DCSR_PRV, CSR_DCSR_V, dm013_select_target(), ERROR_FAIL, ERROR_OK, GDB_REGNO_DCSR, GDB_REGNO_PRIV, get_field(), LOG_TARGET_DEBUG, register_read_direct(), rid, riscv_reg_gdb_regno_name(), riscv_reg_get(), set_field(), VIRT_PRIV_PRV, and VIRT_PRIV_V.
Referenced by riscv_reg_get().
Definition at line 2364 of file riscv-013.c.
References buf_set_u64(), cleanup_after_vector_access(), dm013_select_target(), ERROR_FAIL, ERROR_OK, GDB_REGNO_S0, GDB_REGNO_V0, GDB_REGNO_V31, LOG_TARGET_ERROR, prep_for_vector_access(), register_read_direct(), riscv013_reg_save(), riscv_program_exec(), riscv_program_init(), riscv_program_insert(), riscv_reg_gdb_regno_name(), S0, vmv_x_s(), and vslide1down_vx().
Referenced by riscv013_reg_get().
|
static |
Definition at line 5247 of file riscv-013.c.
References dm013_info_t::current_hartid, DBG_REASON_DBGRQ, DBG_REASON_NOTHALTED, target::debug_reason, dm013_select_target(), DM_DMCONTROL, DM_DMCONTROL_DMACTIVE, DM_DMCONTROL_HALTREQ, DM_DMSTATUS, DM_DMSTATUS_ALLHALTED, DM_DMSTATUS_ALLUNAVAIL, DM_DMSTATUS_ANYRUNNING, dm_read(), dm_write(), dmstatus_read(), ERROR_FAIL, ERROR_OK, get_dm(), get_field(), HART_INDEX_MULTIPLE, list_for_each_entry, LOG_TARGET_DEBUG, LOG_TARGET_ERROR, select_prepped_harts(), set_dmcontrol_hartsel(), set_field(), target::state, target_list_t::target, TARGET_HALTED, dm013_info_t::target_list, TARGET_UNAVAILABLE, and wait_for_idle_if_needed().
Referenced by examine(), halt_set_dcsr_ebreak(), and init_target().
|
static |
|
static |
Definition at line 5353 of file riscv-013.c.
References riscv013_on_step_or_resume().
Referenced by init_target().
|
static |
Definition at line 5418 of file riscv-013.c.
References ERROR_FAIL, ERROR_OK, get_dm(), LOG_TARGET_DEBUG, and dm013_info_t::progbuf_cache.
Referenced by assert_reset(), examine(), init_target(), and scratch_write64().
|
static |
Definition at line 5353 of file riscv-013.c.
Referenced by init_target().
|
static |
Definition at line 5473 of file riscv-013.c.
References ERROR_FAIL, ERROR_OK, execute_autofence(), has_sufficient_progbuf(), riscv_reg_flush_all(), set_dcsr_ebreak(), and step().
Referenced by riscv013_halt_reason(), and riscv013_resume_prep().
|
static |
Definition at line 5409 of file riscv-013.c.
References DM_PROGBUF0, dm_read(), and ERROR_OK.
Referenced by init_target().
|
static |
Definition at line 5334 of file riscv-013.c.
References ERROR_FAIL, ERROR_OK, riscv013_step_or_resume_current_hart(), and select_prepped_harts().
Referenced by init_target().
|
static |
Definition at line 5347 of file riscv-013.c.
References riscv013_on_step_or_resume(), target::state, and TARGET_HALTED.
Referenced by init_target().
| int riscv013_set_register | ( | struct target * | target, |
| enum gdb_regno | rid, | ||
| riscv_reg_t | value | ||
| ) |
Definition at line 5139 of file riscv-013.c.
References dm013_select_target(), ERROR_FAIL, ERROR_OK, LOG_TARGET_DEBUG, register_write_direct(), rid, and riscv_reg_gdb_regno_name().
Referenced by riscv_set_or_write_register().
| int riscv013_set_register_buf | ( | struct target * | target, |
| enum gdb_regno | regno, | ||
| const uint8_t * | value | ||
| ) |
Definition at line 2419 of file riscv-013.c.
References buf_get_u64(), cleanup_after_vector_access(), dm013_select_target(), ERROR_FAIL, ERROR_OK, GDB_REGNO_S0, GDB_REGNO_V0, GDB_REGNO_V31, prep_for_vector_access(), register_write_direct(), riscv013_reg_save(), riscv_program_exec(), riscv_program_init(), riscv_program_insert(), S0, and vslide1down_vx().
Referenced by riscv013_reg_set().
|
static |
Definition at line 5342 of file riscv-013.c.
References riscv013_step_or_resume_current_hart().
Referenced by init_target().
|
static |
Definition at line 5487 of file riscv-013.c.
References dm013_info_t::current_hartid, DM_DMCONTROL, DM_DMCONTROL_DMACTIVE, DM_DMCONTROL_RESUMEREQ, DM_DMSTATUS_ALLHALTED, DM_DMSTATUS_ALLRESUMEACK, DM_DMSTATUS_ALLUNAVAIL, dm_write(), dmstatus_read(), ERROR_FAIL, ERROR_OK, ERROR_TARGET_NOT_HALTED, get_dm(), get_field(), LOG_TARGET_DEBUG, LOG_TARGET_ERROR, riscv_halt(), riscv_reg_cache_invalidate_all(), riscv_reg_flush_all(), set_dmcontrol_hartsel(), set_field(), target::state, step(), TARGET_HALTED, and wait_for_idle_if_needed().
Referenced by examine(), halt_set_dcsr_ebreak(), riscv013_resume_go(), and riscv013_step_current_hart().
|
static |
Definition at line 5391 of file riscv-013.c.
References DM_PROGBUF0, dm_write(), ERROR_FAIL, ERROR_OK, get_dm(), LOG_TARGET_DEBUG, dm013_info_t::progbuf_cache, and RISCV013_MAX_PROGBUF_SIZE.
Referenced by init_target().
|
static |
Definition at line 2767 of file riscv-013.c.
References config, ERROR_OK, and sample_memory_bus_v1().
Referenced by init_target().
|
static |
Definition at line 2606 of file riscv-013.c.
References ARRAY_SIZE, batch_run(), riscv_sample_buf::buf, buf_set_u64(), config, DM_SBADDRESS0, DM_SBADDRESS1, DM_SBCS, DM_SBCS_SBASIZE, DM_SBCS_SBBUSYERROR, DM_SBCS_SBERROR, DM_SBCS_SBREADONADDR, DM_SBCS_SBREADONDATA, DM_SBCS_SBVERSION, DM_SBDATA0, DM_SBDATA1, dm_write(), DTM_DMI_OP_BUSY, ERROR_FAIL, ERROR_NOT_IMPLEMENTED, ERROR_OK, get_field(), increase_dmi_busy_delay(), info, LOG_TARGET_ERROR, RISCV013_INFO, riscv_batch_add_dm_read(), riscv_batch_add_dm_write(), riscv_batch_alloc(), riscv_batch_free(), riscv_batch_get_dmi_read_data(), riscv_batch_get_dmi_read_op(), RISCV_DELAY_BASE, RISCV_DELAY_SYSBUS_READ, RISCV_SAMPLE_BUF_TIMESTAMP_BEFORE, riscv_scan_increase_delay(), sb_sbaccess(), sba_supports_access(), riscv_sample_buf::size, timeval_ms(), and riscv_sample_buf::used.
Referenced by sample_memory().
|
static |
Definition at line 3171 of file riscv-013.c.
References address, dm_read(), DM_SBADDRESS0, DM_SBADDRESS1, DM_SBCS_SBASIZE, ERROR_OK, get_field(), info, and RISCV013_INFO.
Referenced by read_memory_bus_v1(), and write_memory_bus_v1().
|
static |
Definition at line 2458 of file riscv-013.c.
References DM_SBCS_SBACCESS, and set_field().
Referenced by read_memory_bus_v1(), sample_memory_bus_v1(), and write_memory_bus_v1().
|
static |
Definition at line 2503 of file riscv-013.c.
References address, batch_fill_sb_write_address(), batch_run_timeout(), get_sbaadress_reg_count(), riscv_batch_alloc(), and riscv_batch_free().
Referenced by read_memory_bus_v1(), and write_memory_bus_v1().
|
static |
Definition at line 2587 of file riscv-013.c.
References DM_SBCS_SBACCESS128, DM_SBCS_SBACCESS16, DM_SBCS_SBACCESS32, DM_SBCS_SBACCESS64, DM_SBCS_SBACCESS8, get_field(), info, and RISCV013_INFO.
Referenced by sample_memory_bus_v1().
|
static |
Definition at line 1256 of file riscv-013.c.
References riscv_mem_access_args::address, buf_get_u64(), buffer, scratch_mem_t::debug_address, DM_DATA0, DM_DATA1, DM_PROGBUF0, DM_PROGBUF1, dm_read(), ERROR_FAIL, ERROR_OK, scratch_mem_t::memory_space, riscv013_access_memory(), SPACE_DM_DATA, SPACE_DMI_PROGBUF, and SPACE_DMI_RAM.
Referenced by internal_register_read64_progbuf_scratch().
|
static |
Definition at line 1250 of file riscv-013.c.
References scratch_mem_t::area, and target_free_working_area().
Referenced by internal_register_read64_progbuf_scratch(), and internal_register_write64_progbuf_scratch().
|
static |
Find some scratch memory to be used with the given program.
Definition at line 1189 of file riscv-013.c.
References working_area::address, scratch_mem_t::area, scratch_mem_t::debug_address, ERROR_FAIL, ERROR_OK, examine_progbuf(), get_info(), scratch_mem_t::hart_address, info, riscv_program::instruction_count, LOG_TARGET_ERROR, scratch_mem_t::memory_space, NULL, SPACE_DM_DATA, SPACE_DMI_PROGBUF, SPACE_DMI_RAM, target_alloc_working_area(), and YNM_YES.
Referenced by internal_register_read64_progbuf_scratch(), and internal_register_write64_progbuf_scratch().
|
static |
Definition at line 1297 of file riscv-013.c.
References riscv_mem_access_args::address, buffer, scratch_mem_t::debug_address, DM_DATA0, DM_DATA1, DM_PROGBUF0, DM_PROGBUF1, dm_write(), ERROR_FAIL, ERROR_OK, scratch_mem_t::memory_space, riscv013_access_memory(), riscv013_invalidate_cached_progbuf(), SPACE_DM_DATA, SPACE_DMI_PROGBUF, and SPACE_DMI_RAM.
Referenced by internal_register_write64_progbuf_scratch().
|
static |
Definition at line 409 of file riscv-013.c.
References bscan_tunnel_ir_width, buf_eq(), jtag_tap::cur_instr, jtag_tap::enabled, jtag_tap::ir_length, jtag_add_ir_scan(), jtag_tap_name(), jtag_tap_next_enabled(), LOG_ERROR, NULL, scan_field::out_value, select_dbus, select_dmi_via_bscan(), and TAP_IDLE.
Referenced by assert_reset(), batch_run(), batch_run_timeout(), and deassert_reset().
|
static |
Definition at line 5177 of file riscv-013.c.
References dm013_select_hart(), dm013_select_target(), DM_HAWINDOW, DM_HAWINDOWSEL, dm_write(), ERROR_FAIL, ERROR_OK, get_dm(), get_info(), dm013_info_t::hart_count, HART_INDEX_MULTIPLE, dm013_info_t::hasel_supported, riscv013_info_t::index, info, list_for_each_entry, LOG_TARGET_DEBUG, LOG_TARGET_ERROR, riscv_info(), RISCV_INFO, riscv013_info_t::selected, target_list_t::target, and dm013_info_t::target_list.
Referenced by riscv013_halt_go(), and riscv013_resume_go().
|
static |
Definition at line 4281 of file riscv-013.c.
References address, riscv_mem_access_args::address, buf_set_u64(), buffer, riscv_mem_access_args::increment, log_memory_access64(), riscv_mem_access_args::read_buffer, riscv_mem_access_is_read(), size, and riscv_mem_access_args::size.
Referenced by read_word_from_dm_data_regs().
|
static |
Definition at line 1684 of file riscv-013.c.
References config, CSR_DCSR_EBREAKM, CSR_DCSR_EBREAKS, CSR_DCSR_EBREAKU, CSR_DCSR_EBREAKVS, CSR_DCSR_EBREAKVU, CSR_DCSR_STEP, dm013_select_target(), ERROR_FAIL, ERROR_OK, GDB_REGNO_DCSR, info, LOG_TARGET_DEBUG, RISCV013_INFO, RISCV_MODE_M, RISCV_MODE_S, RISCV_MODE_U, RISCV_MODE_VS, RISCV_MODE_VU, riscv_private_config(), riscv_reg_get(), riscv_reg_set(), set_field(), and step().
Referenced by examine(), halt_set_dcsr_ebreak(), and riscv013_on_step_or_resume().
|
static |
Definition at line 386 of file riscv-013.c.
References DM_DMCONTROL_HARTSELHI, DM_DMCONTROL_HARTSELHI_LENGTH, DM_DMCONTROL_HARTSELLO, DM_DMCONTROL_HARTSELLO_LENGTH, DM_DMCONTROL_HASEL, DM_DMCONTROL_HASEL_MULTIPLE, DM_DMCONTROL_HASEL_SINGLE, HART_INDEX_MULTIPLE, HART_INDEX_UNKNOWN, and set_field().
Referenced by assert_reset(), deassert_reset(), dm013_select_hart(), examine_dm(), riscv013_get_hart_state(), riscv013_halt_go(), and riscv013_step_or_resume_current_hart().
|
static |
Referenced by examine(), and halt_set_dcsr_ebreak().
|
static |
Definition at line 1794 of file riscv-013.c.
References DM_DMCS2, DM_DMCS2_GROUP, DM_DMCS2_GROUPTYPE, DM_DMCS2_HGWRITE, dm_read(), dm_write(), ERROR_FAIL, ERROR_OK, get_field(), group, HALT_GROUP, and set_field().
|
static |
Definition at line 2844 of file riscv-013.c.
References ERROR_OK, halt_set_dcsr_ebreak(), info, RISCV013_INFO, target::state, TARGET_RUNNING, and target_was_examined().
Referenced by init_target().
|
static |
Definition at line 2290 of file riscv-013.c.
References ERROR_FAIL, ERROR_OK, GDB_REGNO_VTYPE, RISCV_INFO, riscv_reg_get(), riscv_reg_write(), riscv_xlen(), YNM_MAYBE, YNM_NO, and YNM_YES.
Referenced by prep_for_vector_access().
|
static |
Definition at line 1537 of file riscv-013.c.
References CSR_VTYPE, csrr(), ERROR_FAIL, ERROR_OK, GDB_REGNO_S0, GDB_REGNO_S1, register_write_abstract(), riscv013_reg_save(), riscv_program_exec(), riscv_program_init(), riscv_program_insert(), S0, S1, target::state, TARGET_HALTED, vsetvl(), and ZERO.
Referenced by register_write_progbuf().
|
static |
Definition at line 1516 of file riscv-013.c.
References CSR_VL, csrr(), ERROR_FAIL, ERROR_OK, GDB_REGNO_S0, GDB_REGNO_S1, register_write_abstract(), riscv013_reg_save(), riscv_program_exec(), riscv_program_init(), riscv_program_insert(), S0, S1, target::state, TARGET_HALTED, vsetvl(), and ZERO.
Referenced by register_write_progbuf().
|
static |
Definition at line 1661 of file riscv-013.c.
References DM_DMSTATUS_AUTHBUSY, dmstatus_read(), ERROR_FAIL, ERROR_OK, get_field(), LOG_TARGET_ERROR, NULL, riscv_get_command_timeout_sec(), and start.
Referenced by riscv013_authdata_read(), and riscv013_authdata_write().
|
static |
Definition at line 614 of file riscv-013.c.
References dm013_info_t::abstract_cmd_maybe_busy, DM_ABSTRACTCS, DM_ABSTRACTCS_BUSY, dm_read(), ERROR_FAIL, ERROR_OK, ERROR_TIMEOUT_REACHED, get_dm(), get_field(), LOG_ERROR, LOG_TARGET_ERROR, NULL, riscv_get_command_timeout_sec(), start, and target_name().
Referenced by abstract_cmd_batch_check_and_clear_cmderr(), read_memory_progbuf_inner_run_and_process_batch(), read_memory_progbuf_inner_startup(), wait_for_idle_if_needed(), and write_memory_progbuf_run_batch().
|
static |
Definition at line 1811 of file riscv-013.c.
References dm013_info_t::abstract_cmd_maybe_busy, DM_ABSTRACTCS, ERROR_FAIL, ERROR_OK, get_dm(), LOG_DEBUG_REG, and wait_for_idle().
Referenced by assert_reset(), deassert_reset(), dm013_select_hart(), examine_dm(), riscv013_get_hart_state(), riscv013_halt_go(), and riscv013_step_or_resume_current_hart().
|
static |
Definition at line 859 of file riscv-013.c.
References DM_DATA0, dm_write(), ERROR_FAIL, ERROR_OK, LOG_TARGET_ERROR, and offset.
Referenced by write_memory_progbuf_startup().
|
static |
Definition at line 3658 of file riscv-013.c.
|
static |
Definition at line 4623 of file riscv-013.c.
References riscv_mem_access_args::address, buf_get_u64(), riscv_mem_access_args::count, DM_SBADDRESS0, DM_SBCS, DM_SBCS_SBACCESS, DM_SBCS_SBAUTOINCREMENT, DM_SBDATA0, dm_write(), ERROR_OK, LOG_TARGET_DEBUG, offset, riscv_mem_access_is_write(), set_field(), riscv_mem_access_args::size, TARGET_PRIxADDR, mem_access_result::value, and riscv_mem_access_args::write_buffer.
|
static |
Definition at line 4677 of file riscv-013.c.
References riscv_mem_access_args::address, batch_run(), buf_get_u32(), riscv_mem_access_args::count, DM_SBCS, DM_SBCS_SBAUTOINCREMENT, DM_SBCS_SBBUSYERROR, DM_SBCS_SBERROR, DM_SBDATA0, DM_SBDATA1, DM_SBDATA2, DM_SBDATA3, dm_write(), ERROR_FAIL, ERROR_OK, get_field(), info, log_memory_access(), LOG_TARGET_DEBUG, read_sbcs_nonbusy(), RISCV013_INFO, riscv_batch_add_dm_write(), riscv_batch_alloc(), RISCV_BATCH_ALLOC_SIZE, riscv_batch_available_scans(), riscv_batch_free(), riscv_batch_was_batch_busy(), RISCV_DELAY_BASE, RISCV_DELAY_SYSBUS_WRITE, riscv_mem_access_is_write(), riscv_scan_increase_delay(), sb_read_address(), sb_sbaccess(), sb_write_address(), set_field(), riscv_mem_access_args::size, TARGET_PRIxADDR, and riscv_mem_access_args::write_buffer.
|
static |
Definition at line 5004 of file riscv-013.c.
References ERROR_FAIL, ERROR_OK, GDB_REGNO_S0, GDB_REGNO_S1, riscv013_reg_save(), riscv_program_addi(), riscv_program_ebreak(), riscv_program_init(), riscv_program_store(), riscv_program_write(), and size.
|
static |
This function fills the batch with DMI writes (but does not execute the batch).
It returns the next address – the address that will be the start of the next batch.
Definition at line 4909 of file riscv-013.c.
References address, buf_get_u64(), buffer, DM_DATA0, DM_DATA1, log_memory_access64(), MIN, riscv_batch_add_dm_write(), riscv_batch_available_scans(), RISCV_DELAY_ABSTRACT_COMMAND, RISCV_DELAY_BASE, and size.
Referenced by write_memory_progbuf_try_to_write().
|
static |
Definition at line 5004 of file riscv-013.c.
|
static |
This function attempts to restore the pipeline after a busy on abstract access or a DMI busy by reading the content of s0 – the address of the failed write.
Definition at line 4877 of file riscv-013.c.
References buffer, ERROR_FAIL, ERROR_OK, GDB_REGNO_S0, increase_ac_busy_delay(), LOG_TARGET_DEBUG, register_read_direct(), riscv013_clear_abstract_error(), size, TARGET_PRIxADDR, write_memory_progbuf_startup(), and write_memory_progbuf_teardown().
Referenced by write_memory_progbuf_run_batch().
|
static |
Definition at line 5004 of file riscv-013.c.
|
static |
This function runs the batch of writes and updates address_p with the address of the next write.
Definition at line 4940 of file riscv-013.c.
References dm013_info_t::abstract_cmd_maybe_busy, batch_run(), buffer, CMDERR_BUSY, CMDERR_NONE, DM_ABSTRACTCS_CMDERR, ERROR_FAIL, ERROR_OK, get_dm(), get_field32(), LOG_TARGET_DEBUG, LOG_TARGET_ERROR, riscv013_clear_abstract_error(), riscv_batch_was_batch_busy(), size, TARGET_PRIxADDR, wait_for_idle(), and write_memory_progbuf_handle_busy().
Referenced by write_memory_progbuf_try_to_write().
|
static |
This function is used to start the memory-writing pipeline.
As part of the process, the function writes the first item and waits for completion, so forward progress is ensured. The pipeline looks like this: debugger -> dm_data[0:1] -> s1 -> memory Prior to calling it, the program buffer should contain the appropriate program. This function sets DM_ABSTRACTAUTO_AUTOEXECDATA to trigger second stage of the pipeline (dm_data[0:1] -> s1) whenever dm_data is written.
Definition at line 4823 of file riscv-013.c.
References AC_ACCESS_REGISTER_POSTEXEC, AC_ACCESS_REGISTER_TRANSFER, AC_ACCESS_REGISTER_WRITE, buf_get_u64(), buffer, DM_ABSTRACTAUTO, DM_ABSTRACTAUTO_AUTOEXECDATA_OFFSET, dm_write(), ERROR_FAIL, ERROR_OK, GDB_REGNO_S0, GDB_REGNO_S1, log_memory_access64(), register_write_direct(), riscv013_access_register_command(), riscv013_execute_abstract_command(), riscv_xlen(), size, and write_abstract_arg().
Referenced by write_memory_progbuf_handle_busy().
|
static |
This function reverts the changes made by write_memory_progbuf_startup()
Definition at line 4867 of file riscv-013.c.
References DM_ABSTRACTAUTO, and dm_write().
Referenced by write_memory_progbuf_handle_busy().
|
static |
Definition at line 4987 of file riscv-013.c.
References buffer, ERROR_FAIL, riscv_batch_alloc(), RISCV_BATCH_ALLOC_SIZE, riscv_batch_free(), size, write_memory_progbuf_fill_batch(), and write_memory_progbuf_run_batch().
| struct target_type riscv013_target |
Definition at line 5087 of file riscv-013.c.
Referenced by get_target_type().