diff options
author | Tim Newsome <tim@sifive.com> | 2019-01-25 13:11:06 -0800 |
---|---|---|
committer | Tim Newsome <tim@sifive.com> | 2019-01-25 13:11:06 -0800 |
commit | 82cf37d36c6b91b1fd5f27fe4df7f80928153c8c (patch) | |
tree | ca4d41c3830e1d2862608a8bf376d1873807fefe /src | |
parent | b29215735cf150266f3b9928276fe3fc48d2fa1e (diff) | |
download | riscv-openocd-82cf37d36c6b91b1fd5f27fe4df7f80928153c8c.zip riscv-openocd-82cf37d36c6b91b1fd5f27fe4df7f80928153c8c.tar.gz riscv-openocd-82cf37d36c6b91b1fd5f27fe4df7f80928153c8c.tar.bz2 |
Invalidate register cache on reset.
All tests pass with `-rtos hwthread` against spike32!
Change-Id: I9051259d2702c76b7c35aeffeac020a773e0597a
Diffstat (limited to 'src')
-rw-r--r-- | src/target/riscv/riscv.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/target/riscv/riscv.c b/src/target/riscv/riscv.c index aa871e9..d05b9c7 100644 --- a/src/target/riscv/riscv.c +++ b/src/target/riscv/riscv.c @@ -867,13 +867,15 @@ static int old_or_new_riscv_halt(struct target *target) static int riscv_assert_reset(struct target *target) { + LOG_DEBUG("[%d]", target->coreid); struct target_type *tt = get_target_type(target); + riscv_invalidate_register_cache(target); return tt->assert_reset(target); } static int riscv_deassert_reset(struct target *target) { - LOG_DEBUG("RISCV DEASSERT RESET"); + LOG_DEBUG("[%d]", target->coreid); struct target_type *tt = get_target_type(target); return tt->deassert_reset(target); } |