-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ndmreset acknowledgement and resetting halted state in dm_mem #118
Comments
Indeed the debug module assumes Introducing |
andreaskurth
added a commit
to andreaskurth/riscv-dbg
that referenced
this issue
Sep 28, 2022
As described in pulp-platform#118, the debug module currently considers a hart that is being reset with `ndmreset` to be halted. However, after a reset, the hart is no longer halted. This commit feeds `ndmreset` into `dm_mem`, where it clears the state of the hart and sets it to neither halted nor resuming. Signed-off-by: Andreas Kurth <adk@lowrisc.org>
msfschaffner
pushed a commit
to msfschaffner/riscv-dbg
that referenced
this issue
Oct 26, 2022
As described in pulp-platform#118, the debug module currently considers a hart that is being reset with `ndmreset` to be halted. However, after a reset, the hart is no longer halted. This commit feeds `ndmreset` into `dm_mem`, where it clears the state of the hart and sets it to neither halted nor resuming. Signed-off-by: Andreas Kurth <adk@lowrisc.org>
msfschaffner
pushed a commit
to msfschaffner/riscv-dbg
that referenced
this issue
Nov 8, 2023
As described in pulp-platform#118, the debug module currently considers a hart that is being reset with `ndmreset` to be halted. However, after a reset, the hart is no longer halted. This commit feeds `ndmreset` into `dm_mem`, where it clears the state of the hart and sets it to neither halted nor resuming. Signed-off-by: Andreas Kurth <adk@lowrisc.org>
msfschaffner
pushed a commit
to msfschaffner/riscv-dbg
that referenced
this issue
Nov 8, 2023
As described in pulp-platform#118, the debug module currently considers a hart that is being reset with `ndmreset` to be halted. However, after a reset, the hart is no longer halted. This commit feeds `ndmreset` into `dm_mem`, where it clears the state of the hart and sets it to neither halted nor resuming. Signed-off-by: Andreas Kurth <adk@lowrisc.org>
msfschaffner
pushed a commit
to msfschaffner/riscv-dbg
that referenced
this issue
Mar 13, 2024
As described in pulp-platform#118, the debug module currently considers a hart that is being reset with `ndmreset` to be halted. However, after a reset, the hart is no longer halted. This commit feeds `ndmreset` into `dm_mem`, where it clears the state of the hart and sets it to neither halted nor resuming. Signed-off-by: Andreas Kurth <adk@lowrisc.org>
msfschaffner
pushed a commit
to msfschaffner/riscv-dbg
that referenced
this issue
Mar 15, 2024
As described in pulp-platform#118, the debug module currently considers a hart that is being reset with `ndmreset` to be halted. However, after a reset, the hart is no longer halted. This commit feeds `ndmreset` into `dm_mem`, where it clears the state of the hart and sets it to neither halted nor resuming. Signed-off-by: Andreas Kurth <adk@lowrisc.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently the debug module seems to assume any assertion of
ndmreset_o
will instantly cause a reset. Thedmstatus.allhavereset
/dmstatus.anyhavereset
bits are set purely onndmreset_o
being asserted rather than any acknowledgement a reset has occurred.There's also an issue with trigger a non-debug reset (by writing to
dmcontrol
via the DMI interface) when a hart is in halted state (sodmstatus.anyhalted
/dmstatus.allhalted
is asserted). When the hart resets the debug module still considers the hart to be halted when it is not.The issue is the handling of
halted_q
indm_mem
which produces thehalted_o
output that feeds intodmstatus
. Currently this is solely under the control of the debug ROM (which continuously sets it in a loop until it is requested to do something else). When the hart is reset whilst in the middle of the debug ROM it never gets unset so after resetdmstatus.anyhalted
/dmstatus.allhalted
remains asserted. So if you run areset run
command in OpenOCD it times out stating the hart remains halted.I think the
ndmreset
needs to be factored into the logic settinghalted_q
and potentiallyresuming_q
withindm_mem
(maybe other state there too, I'm not familiar enough with it to be sure). Directly feeding thendmreset
signal into it and clearinghalted_q
when it is asserted can work but if you have a system where it takes a while for thendmreset
signal to be acted on perhaps the ROM will successfully sethalted_q
again before the hart reset takes effect.Perhaps a top-level
ndmreset_ack_i
should be introduced which can feed intodmstatus.anyhalted
/dmstatus.allhalted
as well as reset the relevent state indm_mem
?The text was updated successfully, but these errors were encountered: