Repository navigation
dm: Fix multi-hart resume acknowledgement handling - #194
Merged
Merged
Conversation
phsauter
force-pushed
the
phsauter/issue164
branch
3 times, most recently
from
August 11, 2026 09:09
057b685 to
b9b99d2
Compare
Keep accepted resume actions pending per hart until acknowledged, clear only the acknowledgement of the request target, and preserve same-cycle request and acknowledgement priority. Co-authored-by: Luis Donatien <luis.waucquez.jimenez@alumnos.upm.es>
Exercise retained per-hart requests and flag routing, stale and simultaneous acknowledgements, WARL hart selection, selectable harts, and reset precedence through the integrated Debug Module. Share the Verilator runner and Bender checkout across focused simulator targets.
Mask the write-only haltreq field from DMControl reads while retaining the stored request that drives the selected hart. Extend the multi-hart regression to verify both behaviors.
phsauter
force-pushed
the
phsauter/issue164
branch
from
August 11, 2026 13:39
b9b99d2 to
c4fc8a2
Compare
Expose per-hart pending resume actions directly through the flag page so they cannot block or discard unrelated abstract commands. Admit pending actions only for available halted harts, preserve acknowledgements across non-DM reset, reset them through dmactive, and reject invalid debug-memory hart IDs.
devtyagi3909
added a commit
to devtyagi3909/riscv-dbg
that referenced
this pull request
Sep 2, 2026
Fixes pulp-platform#203. Previously, dm_mem used the live dmcs.hartsel value to route the 'go' and 'resume' flags during command execution, and to wait for completion. If hartsel was changed by the debugger mid-command (while busy=1), the in-flight command would erroneously be relocated to the newly selected hart, causing cross-hart register injection or unrecoverable wedges. This introduces a cmd_hartsel_q register that latches the target hart at command admission (in the Idle state) and uses the latched value for go/resume routing and completion tracking, ensuring execution is bound to the hart selected when the command was admitted. It also enforces the debug spec recommendation by having dm_csrs ignore writes to dmcontrol (except dmactive and ndmreset) while cmdbusy is high. Rebased on top of pulp-platform#194.
This was referenced Sep 3, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #164 and addresses #161.
Clear and evaluate resume acknowledgements per hart so stale acknowledgements cannot complete another hart’s resume request.
Adds Verilator regressions testing for multi-hart configurations.