Minor cleanups. (#537)
Requested in http://openocd.zylin.com/#/c/5821/9 Change-Id: I775d9dd3cc8642361d4d129a05053ee3d27b99bb Signed-off-by: Tim Newsome <tim@sifive.com>
This commit is contained in:
parent
675259382b
commit
13b2ed5ec5
|
@ -159,7 +159,7 @@ uint32_t riscv_batch_get_dmi_read_data(struct riscv_batch *batch, size_t key)
|
|||
assert(index <= batch->used_scans);
|
||||
uint8_t *base = batch->data_in + DMI_SCAN_BUF_SIZE * index;
|
||||
/* extract "data" field from the DMI read result */
|
||||
return (uint32_t)buf_get_u32(base, DTM_DMI_DATA_OFFSET, DTM_DMI_DATA_LENGTH);
|
||||
return buf_get_u32(base, DTM_DMI_DATA_OFFSET, DTM_DMI_DATA_LENGTH);
|
||||
}
|
||||
|
||||
void riscv_batch_add_nop(struct riscv_batch *batch)
|
||||
|
|
|
@ -58,8 +58,8 @@ int riscv_program_exec(struct riscv_program *p, struct target *t)
|
|||
if (riscv_program_ebreak(p) != ERROR_OK) {
|
||||
LOG_ERROR("Unable to write ebreak");
|
||||
for (size_t i = 0; i < riscv_debug_buffer_size(p->target); ++i)
|
||||
LOG_ERROR("ram[%02x]: DASM(0x%08lx) [0x%08lx]", (int)i,
|
||||
(long)p->debug_buffer[i], (long)p->debug_buffer[i]);
|
||||
LOG_ERROR("ram[%02x]: DASM(0x%08" PRIx32 ") [0x%08" PRIx32 "]",
|
||||
(int)i, p->debug_buffer[i], p->debug_buffer[i]);
|
||||
return ERROR_FAIL;
|
||||
}
|
||||
|
||||
|
|
|
@ -1561,8 +1561,8 @@ static int discover_vlenb(struct target *target, int hartid)
|
|||
riscv_reg_t vlenb;
|
||||
|
||||
if (register_read(target, &vlenb, GDB_REGNO_VLENB) != ERROR_OK) {
|
||||
LOG_WARNING("Couldn't read vlenb for %s; vector register access won't "
|
||||
"work.", target_name(target));
|
||||
LOG_WARNING("Couldn't read vlenb for %s; vector register access won't work.",
|
||||
target_name(target));
|
||||
r->vlenb[hartid] = 0;
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
@ -4149,7 +4149,7 @@ int riscv013_write_debug_buffer(struct target *target, unsigned index, riscv_ins
|
|||
return ERROR_FAIL;
|
||||
dm->progbuf_cache[index] = data;
|
||||
} else {
|
||||
LOG_DEBUG("cache hit for 0x%x @%d", data, index);
|
||||
LOG_DEBUG("cache hit for 0x%" PRIx32 " @%d", data, index);
|
||||
}
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue