OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | riscv_program |
Macros | |
#define | RISCV_DSCRATCH_COUNT 2 |
#define | RISCV_MAX_DEBUG_BUFFER_SIZE 32 |
#define | RISCV_REGISTER_COUNT 32 |
int riscv_program_addi | ( | struct riscv_program * | p, |
enum gdb_regno | d, | ||
enum gdb_regno | s, | ||
int16_t | i | ||
) |
Definition at line 170 of file program.c.
References addi(), and riscv_program_insert().
Referenced by read_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 137 of file program.c.
References csr, csrrs(), GDB_REGNO_CSR0, GDB_REGNO_CSR4095, GDB_REGNO_ZERO, and riscv_program_insert().
Referenced by register_read_direct().
int riscv_program_csrrci | ( | struct riscv_program * | p, |
enum gdb_regno | d, | ||
unsigned int | z, | ||
enum gdb_regno | csr | ||
) |
Definition at line 131 of file program.c.
References csr, csrrci(), GDB_REGNO_CSR0, GDB_REGNO_CSR4095, and riscv_program_insert().
Referenced by read_memory_progbuf(), read_memory_progbuf_one(), and write_memory_progbuf().
int riscv_program_csrrsi | ( | struct riscv_program * | p, |
enum gdb_regno | d, | ||
unsigned int | z, | ||
enum gdb_regno | csr | ||
) |
Definition at line 125 of file program.c.
References csr, csrrsi(), GDB_REGNO_CSR0, GDB_REGNO_CSR4095, and riscv_program_insert().
Referenced by read_memory_progbuf(), read_memory_progbuf_one(), and write_memory_progbuf().
int riscv_program_csrw | ( | struct riscv_program * | p, |
enum gdb_regno | s, | ||
enum gdb_regno | csr | ||
) |
Definition at line 143 of file program.c.
References csr, csrrw(), GDB_REGNO_CSR0, GDB_REGNO_ZERO, and riscv_program_insert().
Referenced by register_write_direct().
int riscv_program_ebreak | ( | struct riscv_program * | p | ) |
Definition at line 159 of file program.c.
References ebreak(), ERROR_OK, riscv_program::instruction_count, riscv_debug_buffer_size(), RISCV_INFO, riscv_program_insert(), and riscv_program::target.
Referenced by read_memory_progbuf(), read_memory_progbuf_one(), 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 44 of file program.c.
References riscv_program::debug_buffer, ERROR_FAIL, ERROR_OK, GDB_REGNO_XPR31, GDB_REGNO_ZERO, keep_alive(), LOG_DEBUG, LOG_ERROR, riscv_debug_buffer_size(), riscv_execute_debug_buffer(), riscv_get_register(), riscv_program_ebreak(), riscv_program_write(), riscv_read_debug_buffer(), riscv_set_register(), riscv_program::target, and riscv_program::writes_xreg.
Referenced by examine_progbuf(), execute_fence(), register_read_direct(), register_write_direct(), riscv013_get_register_buf(), and riscv013_set_register_buf().
int riscv_program_fence | ( | struct riscv_program * | p | ) |
Definition at line 154 of file program.c.
References fence(), and riscv_program_insert().
Referenced by execute_fence().
int riscv_program_fence_i | ( | struct riscv_program * | p | ) |
Definition at line 149 of file program.c.
References fence_i(), and riscv_program_insert().
Referenced by execute_fence().
int riscv_program_init | ( | struct riscv_program * | p, |
struct target * | t | ||
) |
Definition at line 17 of file program.c.
References riscv_program::debug_buffer, ERROR_OK, riscv_program::instruction_count, RISCV_MAX_DEBUG_BUFFER_SIZE, RISCV_REGISTER_COUNT, riscv_xlen(), target, riscv_program::target, riscv_program::target_xlen, and riscv_program::writes_xreg.
Referenced by examine_progbuf(), execute_fence(), read_memory_progbuf(), read_memory_progbuf_one(), register_read_direct(), register_write_direct(), riscv013_get_register_buf(), riscv013_set_register_buf(), and write_memory_progbuf().
int riscv_program_insert | ( | struct riscv_program * | p, |
riscv_insn_t | i | ||
) |
Definition at line 175 of file program.c.
References riscv_program::debug_buffer, ERROR_FAIL, ERROR_OK, riscv_program::instruction_count, LOG_ERROR, riscv_debug_buffer_size(), and riscv_program::target.
Referenced by examine_progbuf(), register_read_direct(), register_write_direct(), 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(), riscv_program_fence_i(), riscv_program_lbr(), riscv_program_ldr(), riscv_program_lhr(), riscv_program_lwr(), riscv_program_sbr(), riscv_program_sdr(), riscv_program_shr(), and riscv_program_swr().
int riscv_program_lbr | ( | struct riscv_program * | p, |
enum gdb_regno | d, | ||
enum gdb_regno | a, | ||
int | o | ||
) |
Definition at line 120 of file program.c.
References lb(), offset, and riscv_program_insert().
Referenced by read_memory_progbuf(), and read_memory_progbuf_one().
int riscv_program_ldr | ( | struct riscv_program * | p, |
enum gdb_regno | d, | ||
enum gdb_regno | a, | ||
int | o | ||
) |
Definition at line 105 of file program.c.
References ld(), offset, and riscv_program_insert().
Referenced by read_memory_progbuf(), and read_memory_progbuf_one().
int riscv_program_lhr | ( | struct riscv_program * | p, |
enum gdb_regno | d, | ||
enum gdb_regno | a, | ||
int | o | ||
) |
Definition at line 115 of file program.c.
References lh(), offset, and riscv_program_insert().
Referenced by read_memory_progbuf(), and read_memory_progbuf_one().
int riscv_program_lwr | ( | struct riscv_program * | p, |
enum gdb_regno | d, | ||
enum gdb_regno | a, | ||
int | o | ||
) |
Definition at line 110 of file program.c.
References lw(), offset, and riscv_program_insert().
Referenced by read_memory_progbuf(), and read_memory_progbuf_one().
int riscv_program_sbr | ( | struct riscv_program * | p, |
enum gdb_regno | s, | ||
enum gdb_regno | a, | ||
int | o | ||
) |
Definition at line 100 of file program.c.
References offset, riscv_program_insert(), and sb().
Referenced by write_memory_progbuf().
int riscv_program_sdr | ( | struct riscv_program * | p, |
enum gdb_regno | s, | ||
enum gdb_regno | a, | ||
int | o | ||
) |
Definition at line 85 of file program.c.
References offset, riscv_program_insert(), and sd().
Referenced by write_memory_progbuf().
int riscv_program_shr | ( | struct riscv_program * | p, |
enum gdb_regno | s, | ||
enum gdb_regno | a, | ||
int | o | ||
) |
Definition at line 95 of file program.c.
References offset, riscv_program_insert(), and sh().
Referenced by write_memory_progbuf().
int riscv_program_swr | ( | struct riscv_program * | p, |
enum gdb_regno | s, | ||
enum gdb_regno | a, | ||
int | o | ||
) |
Definition at line 90 of file program.c.
References offset, riscv_program_insert(), and sw().
Referenced by write_memory_progbuf().
int riscv_program_write | ( | struct riscv_program * | program | ) |
Definition at line 32 of file program.c.
References riscv_program::debug_buffer, ERROR_FAIL, ERROR_OK, riscv_program::instruction_count, LOG_DEBUG, riscv_write_debug_buffer(), and riscv_program::target.
Referenced by read_memory_progbuf(), read_memory_progbuf_one(), riscv_program_exec(), and write_memory_progbuf().