From cdc05e6719f30e6e9192dc92f8cd8d5b22f53417 Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Mon, 25 Jul 2022 16:47:22 -0700 Subject: [PATCH] Pay attention to dmcs2.grouptype. (#1049) --- riscv/debug_module.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/riscv/debug_module.cc b/riscv/debug_module.cc index 0eac8424..a3d35ea4 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); }