aboutsummaryrefslogtreecommitdiff
path: root/riscv/debug_module.cc
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2022-07-25 16:47:22 -0700
committerGitHub <noreply@github.com>2022-07-25 16:47:22 -0700
commitcdc05e6719f30e6e9192dc92f8cd8d5b22f53417 (patch)
treeec1e65393fda2be071157b02002c85fa1fe10873 /riscv/debug_module.cc
parent3ea7494620face7e65c7b53af52898e69951a1ac (diff)
downloadspike-cdc05e6719f30e6e9192dc92f8cd8d5b22f53417.zip
spike-cdc05e6719f30e6e9192dc92f8cd8d5b22f53417.tar.gz
spike-cdc05e6719f30e6e9192dc92f8cd8d5b22f53417.tar.bz2
Pay attention to dmcs2.grouptype. (#1049)
Diffstat (limited to 'riscv/debug_module.cc')
-rw-r--r--riscv/debug_module.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/riscv/debug_module.cc b/riscv/debug_module.cc
index 0eac842..a3d35ea 100644
--- a/riscv/debug_module.cc
+++ b/riscv/debug_module.cc
@@ -920,7 +920,9 @@ bool debug_module_t::dmi_write(unsigned address, uint32_t value)
}
return true;
case DM_DMCS2:
- if (config.support_haltgroups && get_field(value, DM_DMCS2_HGWRITE)) {
+ if (config.support_haltgroups &&
+ get_field(value, DM_DMCS2_HGWRITE) &&
+ get_field(value, DM_DMCS2_GROUPTYPE) == 0) {
hart_state[dmcontrol.hartsel].haltgroup = get_field(value,
DM_DMCS2_GROUP);
}