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

Go to the source code of this file.

Functions

static int nds32_v2_activate_hardware_breakpoint (struct target *target)
 
static int nds32_v2_activate_hardware_watchpoint (struct target *target)
 
static int nds32_v2_add_breakpoint (struct target *target, struct breakpoint *breakpoint)
 
static int nds32_v2_add_watchpoint (struct target *target, struct watchpoint *watchpoint)
 
static int nds32_v2_check_interrupt_stack (struct nds32_v2_common *nds32_v2)
 
static int nds32_v2_checksum_memory (struct target *target, target_addr_t address, uint32_t count, uint32_t *checksum)
 
static int nds32_v2_deactivate_hardware_breakpoint (struct target *target)
 
static int nds32_v2_deactivate_hardware_watchpoint (struct target *target)
 
static int nds32_v2_deassert_reset (struct target *target)
 
static int nds32_v2_debug_entry (struct nds32 *nds32, bool enable_watchpoint)
 Save processor state. More...
 
static int nds32_v2_examine (struct target *target)
 
static int nds32_v2_get_debug_reason (struct nds32 *nds32, uint32_t *reason)
 
static int nds32_v2_get_exception_address (struct nds32 *nds32, uint32_t *address, uint32_t reason)
 
static int nds32_v2_hit_watchpoint (struct target *target, struct watchpoint **hit_watchpoint)
 find out which watchpoint hits get exception address and compare the address to watchpoints More...
 
static int nds32_v2_init_target (struct command_context *cmd_ctx, struct target *target)
 
static int nds32_v2_leave_debug_state (struct nds32 *nds32, bool enable_watchpoint)
 Restore processor state. More...
 
static int nds32_v2_read_buffer (struct target *target, target_addr_t address, uint32_t size, uint8_t *buffer)
 
static int nds32_v2_read_memory (struct target *target, target_addr_t address, uint32_t size, uint32_t count, uint8_t *buffer)
 
static int nds32_v2_register_mapping (struct nds32 *nds32, int reg_no)
 
static int nds32_v2_remove_breakpoint (struct target *target, struct breakpoint *breakpoint)
 
static int nds32_v2_remove_watchpoint (struct target *target, struct watchpoint *watchpoint)
 
static int nds32_v2_restore_interrupt_stack (struct nds32_v2_common *nds32_v2)
 
static int nds32_v2_run_algorithm (struct target *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, struct reg_param *reg_params, target_addr_t entry_point, target_addr_t exit_point, int timeout_ms, void *arch_info)
 
static int nds32_v2_target_create (struct target *target, Jim_Interp *interp)
 
static int nds32_v2_target_request_data (struct target *target, uint32_t size, uint8_t *buffer)
 
static int nds32_v2_translate_address (struct target *target, target_addr_t *address)
 
static int nds32_v2_write_buffer (struct target *target, target_addr_t address, uint32_t size, const uint8_t *buffer)
 
static int nds32_v2_write_memory (struct target *target, target_addr_t address, uint32_t size, uint32_t count, const uint8_t *buffer)
 

Variables

struct target_type nds32_v2_target
 Holds methods for V2 targets. More...
 

Function Documentation

◆ nds32_v2_activate_hardware_breakpoint()

◆ nds32_v2_activate_hardware_watchpoint()

◆ nds32_v2_add_breakpoint()

◆ nds32_v2_add_watchpoint()

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

◆ nds32_v2_check_interrupt_stack()

◆ nds32_v2_checksum_memory()

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

Definition at line 396 of file nds32_v2.c.

References ERROR_FAIL, and LOG_WARNING.

◆ nds32_v2_deactivate_hardware_breakpoint()

static int nds32_v2_deactivate_hardware_breakpoint ( struct target target)
static

◆ nds32_v2_deactivate_hardware_watchpoint()

static int nds32_v2_deactivate_hardware_watchpoint ( struct target target)
static

◆ nds32_v2_deassert_reset()

static int nds32_v2_deassert_reset ( struct target target)
static

◆ nds32_v2_debug_entry()

static int nds32_v2_debug_entry ( struct nds32 nds32,
bool  enable_watchpoint 
)
static

◆ nds32_v2_examine()

◆ nds32_v2_get_debug_reason()

static int nds32_v2_get_debug_reason ( struct nds32 nds32,
uint32_t *  reason 
)
static

Definition at line 66 of file nds32_v2.c.

References aice_read_register(), ERROR_OK, IR6, nds32::target, and target_to_aice().

Referenced by nds32_v2_target_create().

◆ nds32_v2_get_exception_address()

static int nds32_v2_get_exception_address ( struct nds32 nds32,
uint32_t *  address,
uint32_t  reason 
)
static

Definition at line 500 of file nds32_v2.c.

References aice_read_register(), ERROR_OK, IR4, nds32::target, and target_to_aice().

Referenced by nds32_v2_target_create().

◆ nds32_v2_hit_watchpoint()

static int nds32_v2_hit_watchpoint ( struct target target,
struct watchpoint **  hit_watchpoint 
)
static

find out which watchpoint hits get exception address and compare the address to watchpoints

Definition at line 516 of file nds32_v2.c.

References watchpoint::address, ERROR_FAIL, ERROR_OK, watchpoint::mask, watchpoint::next, watchpoint::rw, target_to_nds32(), watchpoint::unique_id, nds32::watched_address, target::watchpoints, and WPT_WRITE.

◆ nds32_v2_init_target()

static int nds32_v2_init_target ( struct command_context cmd_ctx,
struct target target 
)
static

Definition at line 582 of file nds32_v2.c.

References ERROR_OK, nds32_init(), and target_to_nds32().

◆ nds32_v2_leave_debug_state()

static int nds32_v2_leave_debug_state ( struct nds32 nds32,
bool  enable_watchpoint 
)
static

◆ nds32_v2_read_buffer()

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

◆ nds32_v2_read_memory()

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

◆ nds32_v2_register_mapping()

static int nds32_v2_register_mapping ( struct nds32 nds32,
int  reg_no 
)
static

◆ nds32_v2_remove_breakpoint()

static int nds32_v2_remove_breakpoint ( struct target target,
struct breakpoint breakpoint 
)
static

◆ nds32_v2_remove_watchpoint()

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

◆ nds32_v2_restore_interrupt_stack()

static int nds32_v2_restore_interrupt_stack ( struct nds32_v2_common nds32_v2)
static

◆ nds32_v2_run_algorithm()

static int nds32_v2_run_algorithm ( struct target target,
int  num_mem_params,
struct mem_param mem_params,
int  num_reg_params,
struct reg_param reg_params,
target_addr_t  entry_point,
target_addr_t  exit_point,
int  timeout_ms,
void *  arch_info 
)
static

Definition at line 548 of file nds32_v2.c.

References ERROR_FAIL, and LOG_WARNING.

◆ nds32_v2_target_create()

◆ nds32_v2_target_request_data()

static int nds32_v2_target_request_data ( struct target target,
uint32_t  size,
uint8_t *  buffer 
)
static

Definition at line 327 of file nds32_v2.c.

References ERROR_OK, and LOG_WARNING.

◆ nds32_v2_translate_address()

◆ nds32_v2_write_buffer()

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

◆ nds32_v2_write_memory()

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

Definition at line 708 of file nds32_v2.c.

Variable Documentation

◆ nds32_v2_target

struct target_type nds32_v2_target

Holds methods for V2 targets.

Definition at line 708 of file nds32_v2.c.