From 6aff46adcc46e2f12e1a8b31a5e300e602764547 Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Thu, 14 Dec 2017 13:51:13 -0800 Subject: [PATCH] Fix cut and paste bug. Now reading 64-bit FPRs on 32-bit harts using scratch memory might work. Change-Id: Ie8c0fc689386c6e724ecab5e8c855e725fa8dd97 --- src/target/riscv/riscv-013.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c index 1f3bb74f2..14a7d2671 100644 --- a/src/target/riscv/riscv-013.c +++ b/src/target/riscv/riscv-013.c @@ -873,7 +873,7 @@ static int scratch_find(struct target *target, } if (riscv_use_scratch_ram) { - scratch->hart_address = (riscv_use_scratch_ram + alignment - 1) & + scratch->hart_address = (riscv_scratch_ram_address + alignment - 1) & ~(alignment - 1); scratch->memory_space = SPACE_DMI_RAM; scratch->debug_address = scratch->hart_address;