target/riscv: Fix small riscv013_halt_go() bug

Exit the loop when no harts are running, instead of when at least one
hart has halted.

Change-Id: Ia69b626bf1fee4034bd5ccc800a651bfe0e53685
Signed-off-by: Tim Newsome <tim@sifive.com>
This commit is contained in:
Tim Newsome 2022-11-21 13:11:19 -08:00
parent 69222be761
commit 2d7dc3f5f5
1 changed files with 1 additions and 1 deletions

View File

@ -4281,7 +4281,7 @@ static int riscv013_halt_go(struct target *target)
if (dmstatus_read(target, &dmstatus, true) != ERROR_OK)
return ERROR_FAIL;
/* When no harts are running, there's no point in continuing this loop. */
if (!get_field(dmstatus, DM_DMSTATUS_ALLRUNNING))
if (!get_field(dmstatus, DM_DMSTATUS_ANYRUNNING))
break;
}