-
Notifications
You must be signed in to change notification settings - Fork 94
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
Clarify the restriction on dmcontrol
writes while abstractcs.busy
is high
#1040
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the spirit of this change. I wonder if it also needs a line in the definition of dmactive that makes it clear that when 0 is written to dmactive that all other dmcontrol bits are ignored.
debug_module.adoc
Outdated
While an abstract command is executing ({abstractcs-busy} in {dm-abstractcs} is high), a debugger must not change {hartsel}, and must not write 1 to {dmcontrol-haltreq}, {dmcontrol-resumereq}, {dmcontrol-ackhavereset}, {dmcontrol-setresethaltreq}, or {dmcontrol-clrresethaltreq}, | ||
unless the DM is reset by the same write to {dm-dmcontrol} ({dmcontrol-dmactive} is lowered). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence is getting really long.
While an abstract command is executing ({abstractcs-busy} in {dm-abstractcs} is high), a debugger must not change {hartsel}, and must not write 1 to {dmcontrol-haltreq}, {dmcontrol-resumereq}, {dmcontrol-ackhavereset}, {dmcontrol-setresethaltreq}, or {dmcontrol-clrresethaltreq}, | |
unless the DM is reset by the same write to {dm-dmcontrol} ({dmcontrol-dmactive} is lowered). | |
While an abstract command is executing ({abstractcs-busy} in {dm-abstractcs} is high), a debugger must not change {hartsel}, and must not write 1 to {dmcontrol-haltreq}, {dmcontrol-resumereq}, {dmcontrol-ackhavereset}, {dmcontrol-setresethaltreq}, or {dmcontrol-clrresethaltreq}. | |
The exception to this rule is when 0 is written to {dmcontrol-dmactive}. In that case the DM is reset, and the other values written to {dm-dmcontrol} are ignored. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed.
… is high With the clarification, it's obvious that the DM can be reset without knowing the `hartsel`. Fixes riscv#1021
6a08d8c
to
8f8bd09
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change looks good to me.
Tim: I wonder if it also needs a line in the definition of dmactive that makes it clear that when 0 is written to dmactive that all other dmcontrol bits are ignored.
I would be in favor of adding this, too.
This is not backwards compatible, and the issue is not severe enough to warrant a backwards-incompatible change. |
With the clarification, it's obvious that the DM can be reset without knowing the
hartsel
.Fixes #1021