jtag_add_pathmove(3, path);
else
{
- jtag_add_pathmove(sizeof(noconsume_path)/sizeof(*noconsume_path), noconsume_path);
+ jtag_add_pathmove(ARRAY_SIZE(noconsume_path), noconsume_path);
}
jtag_add_dr_scan(3, fields, jtag_set_end_state(TAP_IDLE));
return ERROR_OK;
}
+static int xscale_read_phys_memory(struct target *target, uint32_t address,
+ uint32_t size, uint32_t count, uint8_t *buffer)
+{
+ /** \todo: provide a non-stub implementtion of this routine. */
+ LOG_ERROR("%s: %s is not implemented. Disable MMU?",
+ target_name(target), __func__);
+ return ERROR_FAIL;
+}
+
static int xscale_write_memory(struct target *target, uint32_t address,
uint32_t size, uint32_t count, uint8_t *buffer)
{
return ERROR_OK;
}
+static int xscale_write_phys_memory(struct target *target, uint32_t address,
+ uint32_t size, uint32_t count, uint8_t *buffer)
+{
+ /** \todo: provide a non-stub implementtion of this routine. */
+ LOG_ERROR("%s: %s is not implemented. Disable MMU?",
+ target_name(target), __func__);
+ return ERROR_FAIL;
+}
+
static int xscale_bulk_write_memory(struct target *target, uint32_t address,
uint32_t count, uint8_t *buffer)
{
{
struct xscale_common *xscale = target_to_xscale(target);
- if (target->state != TARGET_HALTED)
- {
- LOG_WARNING("target not halted");
- return ERROR_TARGET_NOT_HALTED;
- }
-
if ((breakpoint->type == BKPT_HARD) && (xscale->ibcr_available < 1))
{
LOG_INFO("no breakpoint unit available for hardware breakpoint");
{
struct xscale_common *xscale = target_to_xscale(target);
- if (target->state != TARGET_HALTED)
- {
- LOG_WARNING("target not halted");
- return ERROR_TARGET_NOT_HALTED;
- }
-
if (xscale->dbr_available < 1)
{
return ERROR_TARGET_RESOURCE_NOT_AVAILABLE;
struct reg_cache **cache_p = register_get_last_cache_p(&target->reg_cache);
struct xscale_reg *arch_info = malloc(sizeof(xscale_reg_arch_info));
int i;
- int num_regs = sizeof(xscale_reg_arch_info) / sizeof(struct xscale_reg);
+ int num_regs = ARRAY_SIZE(xscale_reg_arch_info);
(*cache_p) = armv4_5_build_reg_cache(target, armv4_5);
.get_gdb_reg_list = armv4_5_get_gdb_reg_list,
.read_memory = xscale_read_memory,
+ .read_phys_memory = xscale_read_phys_memory,
.write_memory = xscale_write_memory,
+ .write_phys_memory = xscale_write_phys_memory,
.bulk_write_memory = xscale_bulk_write_memory,
.checksum_memory = arm_checksum_memory,