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

Go to the source code of this file.

Functions

 COMMAND_HANDLER (or1k_addreg_command_handler)
 
 COMMAND_HANDLER (or1k_du_list_command_handler)
 
 COMMAND_HANDLER (or1k_du_select_command_handler)
 
 COMMAND_HANDLER (or1k_tap_list_command_handler)
 
 COMMAND_HANDLER (or1k_tap_select_command_handler)
 
static bool is_any_soft_breakpoint (struct target *target)
 
 LIST_HEAD (du_list)
 
 LIST_HEAD (tap_list)
 
static int or1k_add_breakpoint (struct target *target, struct breakpoint *breakpoint)
 
static int or1k_add_reg (struct target *target, struct or1k_core_reg *new_reg)
 
static int or1k_add_watchpoint (struct target *target, struct watchpoint *watchpoint)
 
static int or1k_arch_state (struct target *target)
 
static int or1k_assert_reset (struct target *target)
 
static struct reg_cacheor1k_build_reg_cache (struct target *target)
 
static int or1k_checksum_memory (struct target *target, target_addr_t address, uint32_t count, uint32_t *checksum)
 
static int or1k_create_reg_list (struct target *target)
 
static int or1k_deassert_reset (struct target *target)
 
static int or1k_debug_entry (struct target *target)
 
static int or1k_examine (struct target *target)
 
static int or1k_get_core_reg (struct reg *reg)
 
static int or1k_get_gdb_fileio_info (struct target *target, struct gdb_fileio_info *fileio_info)
 
static int or1k_get_gdb_reg_list (struct target *target, struct reg **reg_list[], int *reg_list_size, enum target_register_class reg_class)
 
static int or1k_halt (struct target *target)
 
static int or1k_init_target (struct command_context *cmd_ctx, struct target *target)
 
static int or1k_is_cpu_running (struct target *target, int *running)
 
static int or1k_jtag_read_regs (struct or1k_common *or1k, uint32_t *regs)
 
static int or1k_jtag_write_regs (struct or1k_common *or1k, uint32_t *regs)
 
static int or1k_poll (struct target *target)
 
static int or1k_profiling (struct target *target, uint32_t *samples, uint32_t max_num_samples, uint32_t *num_samples, uint32_t seconds)
 
static int or1k_read_core_reg (struct target *target, int num)
 
static int or1k_read_memory (struct target *target, target_addr_t address, uint32_t size, uint32_t count, uint8_t *buffer)
 
static int or1k_remove_breakpoint (struct target *target, struct breakpoint *breakpoint)
 
static int or1k_remove_watchpoint (struct target *target, struct watchpoint *watchpoint)
 
static int or1k_restore_context (struct target *target)
 
static int or1k_resume (struct target *target, int current, target_addr_t address, int handle_breakpoints, int debug_execution)
 
static int or1k_resume_or_step (struct target *target, int current, uint32_t address, int handle_breakpoints, int debug_execution, int step)
 
static int or1k_save_context (struct target *target)
 
static int or1k_set_core_reg (struct reg *reg, uint8_t *buf)
 
static int or1k_soft_reset_halt (struct target *target)
 
static int or1k_step (struct target *target, int current, target_addr_t address, int handle_breakpoints)
 
static int or1k_target_create (struct target *target, Jim_Interp *interp)
 
static int or1k_write_core_reg (struct target *target, int num)
 
static int or1k_write_memory (struct target *target, target_addr_t address, uint32_t size, uint32_t count, const uint8_t *buffer)
 

Variables

static const struct command_registration or1k_command_handlers []
 
static struct or1k_core_regor1k_core_reg_list_arch_info
 
static const struct command_registration or1k_hw_ip_command_handlers []
 
static const struct or1k_core_reg_init or1k_init_reg_list []
 
static const struct command_registration or1k_reg_command_handlers []
 
static const struct reg_arch_type or1k_reg_type
 
struct target_type or1k_target
 

Function Documentation

◆ COMMAND_HANDLER() [1/5]

◆ COMMAND_HANDLER() [2/5]

COMMAND_HANDLER ( or1k_du_list_command_handler  )

◆ COMMAND_HANDLER() [3/5]

◆ COMMAND_HANDLER() [4/5]

COMMAND_HANDLER ( or1k_tap_list_command_handler  )

◆ COMMAND_HANDLER() [5/5]

◆ is_any_soft_breakpoint()

static bool is_any_soft_breakpoint ( struct target target)
static

Definition at line 765 of file or1k.c.

References BKPT_SOFT, target::breakpoints, LOG_DEBUG, and breakpoint::type.

Referenced by or1k_resume_or_step().

◆ LIST_HEAD() [1/2]

LIST_HEAD ( du_list  )

◆ LIST_HEAD() [2/2]

LIST_HEAD ( tap_list  )

◆ or1k_add_breakpoint()

◆ or1k_add_reg()

static int or1k_add_reg ( struct target target,
struct or1k_core_reg new_reg 
)
static

◆ or1k_add_watchpoint()

static int or1k_add_watchpoint ( struct target target,
struct watchpoint watchpoint 
)
static

Definition at line 1006 of file or1k.c.

References ERROR_OK, and LOG_ERROR.

◆ or1k_arch_state()

static int or1k_arch_state ( struct target target)
static

Definition at line 1157 of file or1k.c.

References ERROR_OK.

◆ or1k_assert_reset()

static int or1k_assert_reset ( struct target target)
static

◆ or1k_build_reg_cache()

◆ or1k_checksum_memory()

static int or1k_checksum_memory ( struct target target,
target_addr_t  address,
uint32_t  count,
uint32_t *  checksum 
)
static

Definition at line 1197 of file or1k.c.

References ERROR_FAIL.

◆ or1k_create_reg_list()

◆ or1k_deassert_reset()

static int or1k_deassert_reset ( struct target target)
static

◆ or1k_debug_entry()

static int or1k_debug_entry ( struct target target)
static

◆ or1k_examine()

◆ or1k_get_core_reg()

static int or1k_get_core_reg ( struct reg reg)
static

◆ or1k_get_gdb_fileio_info()

static int or1k_get_gdb_fileio_info ( struct target target,
struct gdb_fileio_info fileio_info 
)
static

Definition at line 1192 of file or1k.c.

References ERROR_FAIL.

◆ or1k_get_gdb_reg_list()

static int or1k_get_gdb_reg_list ( struct target target,
struct reg **  reg_list[],
int *  reg_list_size,
enum target_register_class  reg_class 
)
static

◆ or1k_halt()

◆ or1k_init_target()

◆ or1k_is_cpu_running()

static int or1k_is_cpu_running ( struct target target,
int *  running 
)
static

◆ or1k_jtag_read_regs()

static int or1k_jtag_read_regs ( struct or1k_common or1k,
uint32_t *  regs 
)
static

◆ or1k_jtag_write_regs()

static int or1k_jtag_write_regs ( struct or1k_common or1k,
uint32_t *  regs 
)
static

◆ or1k_poll()

◆ or1k_profiling()

static int or1k_profiling ( struct target target,
uint32_t *  samples,
uint32_t  max_num_samples,
uint32_t *  num_samples,
uint32_t  seconds 
)
static

◆ or1k_read_core_reg()

◆ or1k_read_memory()

static int or1k_read_memory ( struct target target,
target_addr_t  address,
uint32_t  size,
uint32_t  count,
uint8_t *  buffer 
)
static

◆ or1k_remove_breakpoint()

◆ or1k_remove_watchpoint()

static int or1k_remove_watchpoint ( struct target target,
struct watchpoint watchpoint 
)
static

Definition at line 1013 of file or1k.c.

References ERROR_OK, and LOG_ERROR.

◆ or1k_restore_context()

◆ or1k_resume()

static int or1k_resume ( struct target target,
int  current,
target_addr_t  address,
int  handle_breakpoints,
int  debug_execution 
)
static

Definition at line 888 of file or1k.c.

References breakpoint::address, NO_SINGLE_STEP, and or1k_resume_or_step().

◆ or1k_resume_or_step()

◆ or1k_save_context()

◆ or1k_set_core_reg()

static int or1k_set_core_reg ( struct reg reg,
uint8_t *  buf 
)
static

Definition at line 464 of file or1k.c.

Referenced by or1k_debug_entry().

◆ or1k_soft_reset_halt()

static int or1k_soft_reset_halt ( struct target target)
static

◆ or1k_step()

static int or1k_step ( struct target target,
int  current,
target_addr_t  address,
int  handle_breakpoints 
)
static

Definition at line 898 of file or1k.c.

References breakpoint::address, or1k_resume_or_step(), and SINGLE_STEP.

◆ or1k_target_create()

static int or1k_target_create ( struct target target,
Jim_Interp *  interp 
)
static

◆ or1k_write_core_reg()

static int or1k_write_core_reg ( struct target target,
int  num 
)
static

◆ or1k_write_memory()

static int or1k_write_memory ( struct target target,
target_addr_t  address,
uint32_t  size,
uint32_t  count,
const uint8_t *  buffer 
)
static

Variable Documentation

◆ or1k_command_handlers

const struct command_registration or1k_command_handlers[]
static
Initial value:
= {
{
},
{
},
}
#define COMMAND_REGISTRATION_DONE
Use this as the last entry in an array of command_registration records.
Definition: command.h:253
static const struct command_registration or1k_reg_command_handlers[]
Definition: or1k.c:1395
static const struct command_registration or1k_hw_ip_command_handlers[]
Definition: or1k.c:1363
const struct command_registration * chain
If non-NULL, the commands in chain will be registered in the same context and scope of this registrat...
Definition: command.h:249

Definition at line 1336 of file or1k.c.

◆ or1k_core_reg_list_arch_info

struct or1k_core_reg* or1k_core_reg_list_arch_info
static

Definition at line 39 of file or1k.c.

Referenced by or1k_add_reg(), or1k_build_reg_cache(), and or1k_create_reg_list().

◆ or1k_hw_ip_command_handlers

const struct command_registration or1k_hw_ip_command_handlers[]
static

Definition at line 1336 of file or1k.c.

◆ or1k_init_reg_list

const struct or1k_core_reg_init or1k_init_reg_list[]
static

Definition at line 39 of file or1k.c.

Referenced by or1k_create_reg_list().

◆ or1k_reg_command_handlers

const struct command_registration or1k_reg_command_handlers[]
static
Initial value:
= {
{
.name = "addreg",
.handler = or1k_addreg_command_handler,
.mode = COMMAND_ANY,
.usage = "name addr feature group",
.help = "Add a register to the register list",
},
}
@ COMMAND_ANY
Definition: command.h:42

Definition at line 1336 of file or1k.c.

◆ or1k_reg_type

const struct reg_arch_type or1k_reg_type
static
Initial value:
= {
}
static int or1k_set_core_reg(struct reg *reg, uint8_t *buf)
Definition: or1k.c:464
static int or1k_get_core_reg(struct reg *reg)
Definition: or1k.c:451

Definition at line 464 of file or1k.c.

Referenced by or1k_build_reg_cache().

◆ or1k_target

struct target_type or1k_target

Definition at line 1336 of file or1k.c.