From 030abf5be040dac84ad9d5c16359ddd79a4d977d Mon Sep 17 00:00:00 2001 From: Gleb Gagarin Date: Wed, 20 Sep 2017 17:16:52 -0700 Subject: set hartid in riscv013_is_halted function --- src/target/riscv/riscv-013.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c index 2adf976..be1ddfe 100644 --- a/src/target/riscv/riscv-013.c +++ b/src/target/riscv/riscv-013.c @@ -1810,6 +1810,8 @@ static void riscv013_on_halt(struct target *target) static bool riscv013_is_halted(struct target *target) { + + riscv_set_current_hartid(target, riscv_current_hartid(target)); uint32_t dmstatus = dmi_read(target, DMI_DMSTATUS); if (get_field(dmstatus, DMI_DMSTATUS_ANYUNAVAIL)) LOG_ERROR("hart %d is unavailiable", riscv_current_hartid(target)); -- cgit v1.1