diff options
author | Tim Newsome <tim@sifive.com> | 2020-06-25 17:33:56 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-25 17:33:56 -0700 |
commit | f0151889f0f5a51e2555980d74e7a86d0b9aa849 (patch) | |
tree | d46b55b1314ad3f5d224fa24f3a4ff67d13e932f | |
parent | 0b1b9e2034c4f8a298d5b6fa537a4d3d819bdf30 (diff) | |
download | riscv-openocd-f0151889f0f5a51e2555980d74e7a86d0b9aa849.zip riscv-openocd-f0151889f0f5a51e2555980d74e7a86d0b9aa849.tar.gz riscv-openocd-f0151889f0f5a51e2555980d74e7a86d0b9aa849.tar.bz2 |
Don't halt the algorith-running hart because another is halted. (#490)
This logic is a little tortured, but it still passes the semihosting
tests that were the cause for the recent rewrite.
Change-Id: Ic6760bb068621ab2a49feb0cf3998fc6957b5cfc
-rw-r--r-- | src/target/riscv/riscv.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/target/riscv/riscv.c b/src/target/riscv/riscv.c index 65b60cd..8e7d5c7 100644 --- a/src/target/riscv/riscv.c +++ b/src/target/riscv/riscv.c @@ -2080,7 +2080,7 @@ int riscv_openocd_poll(struct target *target) } else if (target->smp) { unsigned halts_discovered = 0; unsigned total_targets = 0; - bool newly_halted[128] = {0}; + bool newly_halted[RISCV_MAX_HARTS] = {0}; unsigned should_remain_halted = 0; unsigned should_resume = 0; unsigned i = 0; @@ -2093,8 +2093,6 @@ int riscv_openocd_poll(struct target *target) enum riscv_poll_hart out = riscv_poll_hart(t, r->current_hartid); switch (out) { case RPH_NO_CHANGE: - if (t->state == TARGET_HALTED) - should_remain_halted++; break; case RPH_DISCOVERED_RUNNING: t->state = TARGET_RUNNING; |