Browse Source
Merge pull request #1473 from riscv-software-src/unavailable
Fix behavior of unavailable harts.
pull/1477/head
Andrew Waterman
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
9 additions and
5 deletions
-
riscv/debug_module.cc
|
|
|
@ -413,14 +413,14 @@ bool debug_module_t::dmi_read(unsigned address, uint32_t *value) |
|
|
|
dmstatus.allresumeack = false; |
|
|
|
} |
|
|
|
auto hart = sim->get_harts().at(hart_id); |
|
|
|
if (hart_state[hart_id].halted) { |
|
|
|
dmstatus.allrunning = false; |
|
|
|
dmstatus.anyhalted = true; |
|
|
|
dmstatus.allunavail = false; |
|
|
|
} else if (!hart_available(hart_id)) { |
|
|
|
if (!hart_available(hart_id)) { |
|
|
|
dmstatus.allrunning = false; |
|
|
|
dmstatus.allhalted = false; |
|
|
|
dmstatus.anyunavail = true; |
|
|
|
} else if (hart_state[hart_id].halted) { |
|
|
|
dmstatus.allrunning = false; |
|
|
|
dmstatus.anyhalted = true; |
|
|
|
dmstatus.allunavail = false; |
|
|
|
} else { |
|
|
|
dmstatus.allhalted = false; |
|
|
|
dmstatus.anyrunning = true; |
|
|
|
@ -579,6 +579,10 @@ bool debug_module_t::perform_abstract_command() |
|
|
|
abstractcs.cmderr = CMDERR_BUSY; |
|
|
|
return true; |
|
|
|
} |
|
|
|
if (!hart_available(dmcontrol.hartsel)) { |
|
|
|
abstractcs.cmderr = CMDERR_HALTRESUME; |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
if ((command >> 24) == 0) { |
|
|
|
// register access
|
|
|
|
|