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

Go to the source code of this file.

Macros

#define ARM11_BOOL_WRAPPER(name, print_name)
 

Functions

static int arm11_add_breakpoint (struct target *target, struct breakpoint *breakpoint)
 
static int arm11_arch_state (struct target *target)
 
static int arm11_assert_reset (struct target *target)
 
static int arm11_check_init (struct arm11_common *arm11)
 Check and if necessary take control of the system. More...
 
static int arm11_deassert_reset (struct target *target)
 
static int arm11_debug_entry (struct arm11_common *arm11)
 Save processor state. More...
 
static void arm11_deinit_target (struct target *target)
 
static int arm11_examine (struct target *target)
 
static int arm11_halt (struct target *target)
 
static int arm11_init_target (struct command_context *cmd_ctx, struct target *target)
 
static int arm11_leave_debug_state (struct arm11_common *arm11, bool bpwp)
 Restore processor state. More...
 
static uint32_t arm11_nextpc (struct arm11_common *arm11, int current, uint32_t address)
 
static int arm11_poll (struct target *target)
 
static int arm11_read_memory (struct target *target, target_addr_t address, uint32_t size, uint32_t count, uint8_t *buffer)
 
static int arm11_read_memory_inner (struct target *target, uint32_t address, uint32_t size, uint32_t count, uint8_t *buffer, bool arm11_config_memrw_no_increment)
 
static int arm11_remove_breakpoint (struct target *target, struct breakpoint *breakpoint)
 
static int arm11_resume (struct target *target, int current, target_addr_t address, int handle_breakpoints, int debug_execution)
 
static int arm11_step (struct target *target, int current, target_addr_t address, int handle_breakpoints)
 
static int arm11_target_create (struct target *target, Jim_Interp *interp)
 
static int arm11_write_memory (struct target *target, target_addr_t address, uint32_t size, uint32_t count, const uint8_t *buffer)
 
static int arm11_write_memory_inner (struct target *target, uint32_t address, uint32_t size, uint32_t count, const uint8_t *buffer, bool no_increment)
 
 COMMAND_HANDLER (arm11_handle_vcr)
 

Variables

static const struct command_registration arm11_any_command_handlers []
 
static const struct command_registration arm11_command_handlers []
 
static const struct command_registration arm11_mw_command_handlers []
 
struct target_type arm11_target
 Holds methods for ARM11xx targets. More...
 

Macro Definition Documentation

◆ ARM11_BOOL_WRAPPER

#define ARM11_BOOL_WRAPPER (   name,
  print_name 
)
Value:
COMMAND_HANDLER(arm11_handle_bool_ ## name) \
{ \
struct arm11_common *arm11 = target_to_arm11(target); \
\
return CALL_COMMAND_HANDLER(handle_command_parse_bool, \
&arm11->name, print_name); \
}
COMMAND_HANDLER(arm11_handle_vcr)
Definition: arm11.c:1254
static struct arm11_common * target_to_arm11(struct target *target)
Definition: arm11.h:72
const char * name
Definition: armv4_5.c:76
#define CALL_COMMAND_HANDLER(name, extra ...)
Use this to macro to call a command helper (or a nested handler).
Definition: command.h:118
#define CMD_CTX
Use this macro to access the context of the command being handled, rather than accessing the variable...
Definition: command.h:146
Definition: target.h:116
struct target * get_current_target(struct command_context *cmd_ctx)
Definition: target.c:458

Definition at line 1235 of file arm11.c.

Function Documentation

◆ arm11_add_breakpoint()

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

◆ arm11_arch_state()

static int arm11_arch_state ( struct target target)
static

◆ arm11_assert_reset()

◆ arm11_check_init()

static int arm11_check_init ( struct arm11_common arm11)
static

Check and if necessary take control of the system.

Parameters
arm11Target state variable.
Todo:
TODO: this needs further scrutiny because arm11_debug_entry() never gets called. (WHY NOT?) As a result we don't read the actual register states from the target.

Definition at line 41 of file arm11.c.

References arm11_common::arm, arm11_read_dscr(), arm11_sc7_clear_vbw(), arm11_write_dscr(), arm_dpm_report_dscr(), CHECK_RETVAL, DBG_REASON_NOTHALTED, target::debug_reason, arm::dpm, arm11_common::dscr, DSCR_CORE_HALTED, DSCR_HALT_DBG_MODE, ERROR_OK, LOG_DEBUG, arm11_common::simulate_reset_on_next_halt, target::state, arm::target, TARGET_HALTED, and TARGET_RUNNING.

Referenced by arm11_examine(), and arm11_poll().

◆ arm11_deassert_reset()

◆ arm11_debug_entry()

◆ arm11_deinit_target()

static void arm11_deinit_target ( struct target target)
static

Definition at line 1122 of file arm11.c.

References arm11_dpm_deinit(), and target_to_arm11().

◆ arm11_examine()

◆ arm11_halt()

◆ arm11_init_target()

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

Definition at line 1115 of file arm11.c.

References ERROR_OK.

◆ arm11_leave_debug_state()

◆ arm11_nextpc()

static uint32_t arm11_nextpc ( struct arm11_common arm11,
int  current,
uint32_t  address 
)
static

◆ arm11_poll()

◆ arm11_read_memory()

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

Definition at line 877 of file arm11.c.

References arm11_read_memory_inner(), buffer, count, and size.

◆ arm11_read_memory_inner()

static int arm11_read_memory_inner ( struct target target,
uint32_t  address,
uint32_t  size,
uint32_t  count,
uint8_t *  buffer,
bool  arm11_config_memrw_no_increment 
)
static

◆ arm11_remove_breakpoint()

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

Definition at line 1074 of file arm11.c.

References ERROR_OK, arm11_common::free_brps, and target_to_arm11().

◆ arm11_resume()

◆ arm11_step()

◆ arm11_target_create()

◆ arm11_write_memory()

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

Definition at line 1033 of file arm11.c.

References arm11_write_memory_inner(), buffer, count, and size.

◆ arm11_write_memory_inner()

◆ COMMAND_HANDLER()

COMMAND_HANDLER ( arm11_handle_vcr  )

Definition at line 1254 of file arm11.c.

Variable Documentation

◆ arm11_any_command_handlers

const struct command_registration arm11_any_command_handlers[]
static

Definition at line 1254 of file arm11.c.

◆ arm11_command_handlers

const struct command_registration arm11_command_handlers[]
static
Initial value:
= {
{
},
{
},
{
.name = "arm11",
.mode = COMMAND_ANY,
.help = "ARM11 command group",
.usage = "",
},
}
static const struct command_registration arm11_any_command_handlers[]
Definition: arm11.c:1293
const struct command_registration arm_command_handlers[]
Definition: armv4_5.c:1247
#define COMMAND_REGISTRATION_DONE
Use this as the last entry in an array of command_registration records.
Definition: command.h:253
@ COMMAND_ANY
Definition: command.h:42
const struct command_registration etm_command_handlers[]
Definition: etm.c:2008
const char * name
Definition: command.h:235
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 1254 of file arm11.c.

◆ arm11_mw_command_handlers

const struct command_registration arm11_mw_command_handlers[]
static
Initial value:
= {
{
.name = "burst",
.handler = arm11_handle_bool_memwrite_burst,
.mode = COMMAND_ANY,
.help = "Display or modify flag controlling potentially "
"risky fast burst mode (default: enabled)",
.usage = "['enable'|'disable']",
},
{
.name = "error_fatal",
.handler = arm11_handle_bool_memwrite_error_fatal,
.mode = COMMAND_ANY,
.help = "Display or modify flag controlling transfer "
"termination on transfer errors"
" (default: enabled)",
.usage = "['enable'|'disable']",
},
}

Definition at line 1254 of file arm11.c.

◆ arm11_target

struct target_type arm11_target

Holds methods for ARM11xx targets.

Definition at line 1254 of file arm11.c.