20 #define _DEBUG_INSTRUCTION_EXECUTION_
81 uint8_t reg_addr_buf = reg_addr & 0x3f;
108 fields[1].
in_value = (uint8_t *)value;
115 #ifdef _DEBUG_INSTRUCTION_EXECUTION_
119 LOG_DEBUG(
"addr: 0x%x value: %8.8x", reg_addr, *value);
132 uint8_t reg_addr_buf = reg_addr & 0x3f;
133 uint8_t nr_w_buf = 1;
134 uint8_t value_buf[4];
159 #ifdef _DEBUG_INSTRUCTION_EXECUTION_
160 LOG_DEBUG(
"addr: 0x%x value: %8.8x", reg_addr, value);
191 "couldn't access reg %" PRIu32,
207 "couldn't access reg %" PRIu32,
222 .handler = arm966e_handle_cp15_command,
224 .usage =
"regnum [value]",
225 .help =
"display/modify cp15 register",
237 .help =
"arm966e command group",
int arm7_9_write_memory_opt(struct target *target, target_addr_t address, uint32_t size, uint32_t count, const uint8_t *buffer)
int arm7_9_examine(struct target *target)
Perform per-target setup that requires JTAG access.
void arm7_9_deinit(struct target *target)
int arm7_9_read_memory(struct target *target, target_addr_t address, uint32_t size, uint32_t count, uint8_t *buffer)
int arm7_9_add_breakpoint(struct target *target, struct breakpoint *breakpoint)
Add a breakpoint to an ARM7/9 target.
int arm7_9_soft_reset_halt(struct target *target)
Issue a software reset and halt to an ARM7/9 target.
int arm7_9_assert_reset(struct target *target)
Asserts the reset (SRST) on an ARM7/9 target.
int arm7_9_poll(struct target *target)
Polls an ARM7/9 target for its current status.
int arm7_9_halt(struct target *target)
Halt an ARM7/9 target.
int arm7_9_remove_breakpoint(struct target *target, struct breakpoint *breakpoint)
Removes a breakpoint from an ARM7/9 target.
int arm7_9_remove_watchpoint(struct target *target, struct watchpoint *watchpoint)
Remove a watchpoint from an ARM7/9 target.
int arm7_9_deassert_reset(struct target *target)
Deassert the reset (SRST) signal on an ARM7/9 target.
int arm7_9_step(struct target *target, int current, target_addr_t address, int handle_breakpoints)
int arm7_9_target_request_data(struct target *target, uint32_t size, uint8_t *buffer)
Get some data from the ARM7/9 target.
int arm7_9_add_watchpoint(struct target *target, struct watchpoint *watchpoint)
Add a watchpoint to an ARM7/9 target.
int arm7_9_check_reset(struct target *target)
int arm7_9_resume(struct target *target, int current, target_addr_t address, int handle_breakpoints, int debug_execution)
static struct arm7_9_common * target_to_arm7_9(struct target *target)
struct target_type arm966e_target
Holds methods for ARM966 targets.
static const struct command_registration arm966e_exec_command_handlers[]
static int arm966e_read_cp15(struct target *target, int reg_addr, uint32_t *value)
static int arm966e_verify_pointer(struct command_invocation *cmd, struct arm966e_common *arm966e)
int arm966e_write_cp15(struct target *target, int reg_addr, uint32_t value)
static void arm966e_deinit_target(struct target *target)
static int arm966e_target_create(struct target *target, Jim_Interp *interp)
COMMAND_HANDLER(arm966e_handle_cp15_command)
const struct command_registration arm966e_command_handlers[]
int arm966e_init_arch_info(struct target *target, struct arm966e_common *arm966e, struct jtag_tap *tap)
static struct arm966e_common * target_to_arm966(struct target *target)
#define ARM966E_COMMON_MAGIC
int arm9tdmi_init_arch_info(struct target *target, struct arm7_9_common *arm7_9, struct jtag_tap *tap)
int arm9tdmi_init_target(struct command_context *cmd_ctx, struct target *target)
const struct command_registration arm9tdmi_command_handlers[]
int arm_blank_check_memory(struct target *target, struct target_memory_check_block *blocks, int num_blocks, uint8_t erased_value)
Runs ARM code in the target to check whether a memory block holds all ones.
int arm_arch_state(struct target *target)
int arm_checksum_memory(struct target *target, target_addr_t address, uint32_t count, uint32_t *checksum)
Runs ARM code in the target to calculate a CRC32 checksum.
int arm_get_gdb_reg_list(struct target *target, struct reg **reg_list[], int *reg_list_size, enum target_register_class reg_class)
int armv4_5_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)
void arm_free_reg_cache(struct arm *arm)
const char * arm_get_gdb_arch(struct target *target)
static struct arm * target_to_arm(struct target *target)
Convert target handle to generic ARM target state handle.
static int arm_jtag_scann(struct arm_jtag *jtag_info, uint32_t new_scan_chain, tap_state_t end_state)
static int arm_jtag_set_instr(struct jtag_tap *tap, uint32_t new_instr, void *no_verify_capture, tap_state_t end_state)
static void arm_le_to_h_u32(jtag_callback_data_t arg)
Macros used to generate various ARM or Thumb opcodes.
static void buf_set_u32(uint8_t *_buffer, unsigned first, unsigned num, uint32_t value)
Sets num bits in _buffer, starting at the first bit, using the bits in value.
void command_print(struct command_invocation *cmd, const char *format,...)
#define CMD
Use this macro to access the command being handled, rather than accessing the variable directly.
#define CMD_NAME
Use this macro to access the name of the command being handled, rather than accessing the variable di...
#define CMD_ARGV
Use this macro to access the arguments for the command being handled, rather than accessing the varia...
#define CMD_ARGC
Use this macro to access the number of arguments for the command being handled, rather than accessing...
#define COMMAND_PARSE_NUMBER(type, in, out)
parses the string in into out as a type, or prints a command error and passes the error code to the c...
#define CMD_CTX
Use this macro to access the context of the command being handled, rather than accessing the variable...
#define COMMAND_REGISTRATION_DONE
Use this as the last entry in an array of command_registration records.
int jtag_execute_queue(void)
For software FIFO implementations, the queued commands can be executed during this call or earlier.
void jtag_add_dr_scan(struct jtag_tap *active, int in_num_fields, const struct scan_field *in_fields, tap_state_t state)
Generate a DR SCAN using the fields passed to the function.
void jtag_add_callback(jtag_callback1_t f, jtag_callback_data_t data0)
A simpler version of jtag_add_callback4().
intptr_t jtag_callback_data_t
Defines the type of data passed to the jtag_callback_t interface.
#define LOG_DEBUG(expr ...)
Structure for items that are common between both ARM7 and ARM9 targets.
uint32_t arm_bkpt
ARM breakpoint instruction.
struct arm_jtag jtag_info
JTAG information for target.
uint16_t thumb_bkpt
Thumb breakpoint instruction.
struct arm7_9_common arm7_9_common
unsigned int common_magic
Represents a generic ARM core, with standard application registers.
When run_command is called, a new instance will be created on the stack, filled with the proper value...
const struct command_registration * chain
If non-NULL, the commands in chain will be registered in the same context and scope of this registrat...
This structure defines a single scan field in the scan.
int num_bits
The number of bits this field specifies.
uint8_t * in_value
A pointer to a 32-bit memory location for data scanned out.
const uint8_t * out_value
A pointer to value to be scanned into the device.
This holds methods shared between all instances of a given target type.
const char * name
Name of this type of target.
struct target * get_current_target(struct command_context *cmd_ctx)
#define ERROR_TARGET_INVALID