diff --git a/src/target/riscv/riscv-011.c b/src/target/riscv/riscv-011.c index 10612e22c..8663082b2 100644 --- a/src/target/riscv/riscv-011.c +++ b/src/target/riscv/riscv-011.c @@ -1910,6 +1910,9 @@ static int examine(struct target *target) } target_set_examined(target); + riscv_set_current_hartid(target, 0); + for (size_t i = 0; i < 32; ++i) + reg_cache_set(target, i, -1); LOG_INFO("Examined RISCV core; XLEN=%d, misa=0x%" PRIx64, riscv_xlen(target), info->misa); return ERROR_OK;