|
OpenOCD
|


Go to the source code of this file.
Data Structures | |
| struct | riscv_program |
Macros | |
| #define | RISCV013_MAX_PROGBUF_SIZE 16 |
| int riscv_program_addi | ( | struct riscv_program * | p, |
| enum gdb_regno | d, | ||
| enum gdb_regno | s, | ||
| int16_t | i | ||
| ) |
Definition at line 192 of file program.c.
References addi(), and riscv_program_insert().
Referenced by access_memory_progbuf(), and write_memory_progbuf().
| int riscv_program_csrr | ( | struct riscv_program * | p, |
| enum gdb_regno | d, | ||
| enum gdb_regno | csr | ||
| ) |
Definition at line 159 of file program.c.
References csr, csrrs(), GDB_REGNO_CSR0, GDB_REGNO_CSR4095, GDB_REGNO_ZERO, and riscv_program_insert().
Referenced by csr_read_progbuf().
| int riscv_program_csrrci | ( | struct riscv_program * | p, |
| enum gdb_regno | d, | ||
| uint8_t | z, | ||
| enum gdb_regno | csr | ||
| ) |
Definition at line 153 of file program.c.
References csr, csrrci(), GDB_REGNO_CSR0, GDB_REGNO_CSR4095, and riscv_program_insert().
| int riscv_program_csrrsi | ( | struct riscv_program * | p, |
| enum gdb_regno | d, | ||
| uint8_t | z, | ||
| enum gdb_regno | csr | ||
| ) |
Definition at line 147 of file program.c.
References csr, csrrsi(), GDB_REGNO_CSR0, GDB_REGNO_CSR4095, and riscv_program_insert().
| int riscv_program_csrw | ( | struct riscv_program * | p, |
| enum gdb_regno | s, | ||
| enum gdb_regno | csr | ||
| ) |
Definition at line 165 of file program.c.
References csr, csrrw(), GDB_REGNO_CSR0, GDB_REGNO_CSR4095, GDB_REGNO_ZERO, and riscv_program_insert().
Referenced by csr_write_progbuf().
| int riscv_program_ebreak | ( | struct riscv_program * | p | ) |
Definition at line 181 of file program.c.
References ebreak(), ERROR_OK, riscv_program::instruction_count, RISCV_INFO, riscv_progbuf_size(), riscv_program_insert(), and riscv_program::target.
Referenced by access_memory_progbuf(), riscv_program_exec(), and write_memory_progbuf().
| int riscv_program_exec | ( | struct riscv_program * | p, |
| struct target * | t | ||
| ) |
Add ebreak and execute the program.
Definition at line 42 of file program.c.
References DM_ABSTRACTCS_CMDERR_EXCEPTION, ERROR_FAIL, ERROR_OK, riscv_program::execution_result, keep_alive(), LOG_TARGET_DEBUG, LOG_TARGET_ERROR, riscv_program::progbuf, riscv_execute_progbuf(), RISCV_PROGBUF_EXEC_RESULT_EXCEPTION, RISCV_PROGBUF_EXEC_RESULT_SUCCESS, RISCV_PROGBUF_EXEC_RESULT_UNKNOWN, RISCV_PROGBUF_EXEC_RESULT_UNKNOWN_ERROR, riscv_progbuf_size(), riscv_program_ebreak(), riscv_program_write(), and riscv_program::target.
Referenced by COMMAND_HANDLER(), csr_read_progbuf(), csr_write_progbuf(), examine_progbuf(), execute_autofence(), fpr_read_progbuf(), fpr_write_progbuf(), internal_register_read64_progbuf_scratch(), internal_register_write64_progbuf_scratch(), riscv013_get_register_buf(), riscv013_set_register_buf(), vl_write_progbuf(), and vtype_write_progbuf().
| int riscv_program_fence_i | ( | struct riscv_program * | p | ) |
Definition at line 171 of file program.c.
References fence_i(), and riscv_program_insert().
Referenced by execute_autofence().
| int riscv_program_fence_rw_rw | ( | struct riscv_program * | p | ) |
Definition at line 176 of file program.c.
References fence_rw_rw(), and riscv_program_insert().
Referenced by execute_autofence().
| int riscv_program_init | ( | struct riscv_program * | p, |
| struct target * | t | ||
| ) |
Definition at line 17 of file program.c.
References ERROR_OK, riscv_program::execution_result, riscv_program::instruction_count, riscv_program::progbuf, RISCV013_MAX_PROGBUF_SIZE, RISCV_PROGBUF_EXEC_RESULT_NOT_EXECUTED, target, and riscv_program::target.
Referenced by access_memory_progbuf(), COMMAND_HANDLER(), csr_read_progbuf(), csr_write_progbuf(), examine_progbuf(), execute_autofence(), fpr_read_progbuf(), fpr_write_progbuf(), riscv013_get_register_buf(), riscv013_set_register_buf(), vl_write_progbuf(), vtype_write_progbuf(), and write_memory_progbuf().
| int riscv_program_insert | ( | struct riscv_program * | p, |
| riscv_insn_t | i | ||
| ) |
Definition at line 197 of file program.c.
References ERROR_FAIL, ERROR_OK, riscv_program::instruction_count, LOG_TARGET_ERROR, riscv_program::progbuf, riscv_progbuf_size(), and riscv_program::target.
Referenced by COMMAND_HANDLER(), examine_progbuf(), fpr_read_progbuf(), fpr_write_progbuf(), riscv013_get_register_buf(), riscv013_set_register_buf(), riscv_program_addi(), riscv_program_csrr(), riscv_program_csrrci(), riscv_program_csrrsi(), riscv_program_csrw(), riscv_program_ebreak(), riscv_program_fence_i(), riscv_program_fence_rw_rw(), riscv_program_lbr(), riscv_program_ldr(), riscv_program_lhr(), riscv_program_lwr(), riscv_program_sbr(), riscv_program_sdr(), riscv_program_shr(), riscv_program_swr(), vl_write_progbuf(), and vtype_write_progbuf().
| int riscv_program_lbr | ( | struct riscv_program * | p, |
| enum gdb_regno | d, | ||
| enum gdb_regno | a, | ||
| int16_t | o | ||
| ) |
Definition at line 125 of file program.c.
References lb(), offset, and riscv_program_insert().
Referenced by riscv_program_load().
| int riscv_program_ldr | ( | struct riscv_program * | p, |
| enum gdb_regno | d, | ||
| enum gdb_regno | a, | ||
| int16_t | o | ||
| ) |
Definition at line 110 of file program.c.
References ld(), offset, and riscv_program_insert().
Referenced by riscv_program_load().
| int riscv_program_lhr | ( | struct riscv_program * | p, |
| enum gdb_regno | d, | ||
| enum gdb_regno | a, | ||
| int16_t | o | ||
| ) |
Definition at line 120 of file program.c.
References lh(), offset, and riscv_program_insert().
Referenced by riscv_program_load().
| int riscv_program_load | ( | struct riscv_program * | p, |
| enum gdb_regno | d, | ||
| enum gdb_regno | b, | ||
| int16_t | o, | ||
| unsigned int | s | ||
| ) |
Definition at line 130 of file program.c.
References ERROR_FAIL, offset, riscv_program_lbr(), riscv_program_ldr(), riscv_program_lhr(), riscv_program_lwr(), and size.
Referenced by access_memory_progbuf().
| int riscv_program_lwr | ( | struct riscv_program * | p, |
| enum gdb_regno | d, | ||
| enum gdb_regno | a, | ||
| int16_t | o | ||
| ) |
Definition at line 115 of file program.c.
References lw(), offset, and riscv_program_insert().
Referenced by riscv_program_load().
| int riscv_program_sbr | ( | struct riscv_program * | p, |
| enum gdb_regno | s, | ||
| enum gdb_regno | a, | ||
| int16_t | o | ||
| ) |
Definition at line 88 of file program.c.
References offset, riscv_program_insert(), and sb().
Referenced by riscv_program_store().
| int riscv_program_sdr | ( | struct riscv_program * | p, |
| enum gdb_regno | s, | ||
| enum gdb_regno | a, | ||
| int16_t | o | ||
| ) |
Definition at line 73 of file program.c.
References offset, riscv_program_insert(), and sd().
Referenced by riscv_program_store().
| int riscv_program_shr | ( | struct riscv_program * | p, |
| enum gdb_regno | s, | ||
| enum gdb_regno | a, | ||
| int16_t | o | ||
| ) |
Definition at line 83 of file program.c.
References offset, riscv_program_insert(), and sh().
Referenced by riscv_program_store().
| int riscv_program_store | ( | struct riscv_program * | p, |
| enum gdb_regno | d, | ||
| enum gdb_regno | b, | ||
| int16_t | o, | ||
| unsigned int | s | ||
| ) |
Definition at line 93 of file program.c.
References ERROR_FAIL, offset, riscv_program_sbr(), riscv_program_sdr(), riscv_program_shr(), riscv_program_swr(), and size.
Referenced by write_memory_progbuf().
| int riscv_program_swr | ( | struct riscv_program * | p, |
| enum gdb_regno | s, | ||
| enum gdb_regno | a, | ||
| int16_t | o | ||
| ) |
Definition at line 78 of file program.c.
References offset, riscv_program_insert(), and sw().
Referenced by riscv_program_store().
| int riscv_program_write | ( | struct riscv_program * | program | ) |
Definition at line 30 of file program.c.
References ERROR_FAIL, ERROR_OK, riscv_program::instruction_count, LOG_TARGET_DEBUG, riscv_program::progbuf, riscv_write_progbuf(), and riscv_program::target.
Referenced by access_memory_progbuf(), riscv_program_exec(), and write_memory_progbuf().