Work around a race condition in an old debug spec

This commit is contained in:
Palmer Dabbelt 2017-05-09 18:03:33 -07:00
parent 563f6acc3c
commit 50c11cd7d0
1 changed files with 2 additions and 2 deletions

View File

@ -1329,7 +1329,7 @@ static int read_memory(struct target *target, uint32_t address,
struct riscv_batch *batch = riscv_batch_alloc( struct riscv_batch *batch = riscv_batch_alloc(
target, target,
1024, 1024,
info->dmi_busy_delay + info->ac_busy_delay); info->dmi_busy_delay + info->ac_busy_delay + 10);
size_t reads = 0; size_t reads = 0;
size_t rereads = reads; size_t rereads = reads;
@ -1522,7 +1522,7 @@ static int write_memory(struct target *target, uint32_t address,
struct riscv_batch *batch = riscv_batch_alloc( struct riscv_batch *batch = riscv_batch_alloc(
target, target,
1024, 1024,
info->dmi_busy_delay + info->ac_busy_delay); info->dmi_busy_delay + info->ac_busy_delay + 10);
for (riscv_addr_t i = start; i < count; ++i) { for (riscv_addr_t i = start; i < count; ++i) {
riscv_addr_t offset = size*i; riscv_addr_t offset = size*i;