From 50c11cd7d0bdf1de36584e63922c99c635996e5a Mon Sep 17 00:00:00 2001 From: Palmer Dabbelt Date: Tue, 9 May 2017 18:03:33 -0700 Subject: [PATCH] Work around a race condition in an old debug spec --- src/target/riscv/riscv-013.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c index 5c1bd3258..d74c83c00 100644 --- a/src/target/riscv/riscv-013.c +++ b/src/target/riscv/riscv-013.c @@ -1329,7 +1329,7 @@ static int read_memory(struct target *target, uint32_t address, struct riscv_batch *batch = riscv_batch_alloc( target, 1024, - info->dmi_busy_delay + info->ac_busy_delay); + info->dmi_busy_delay + info->ac_busy_delay + 10); size_t reads = 0; 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( target, 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) { riscv_addr_t offset = size*i;