-
Notifications
You must be signed in to change notification settings - Fork 93
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
Update resume from Debug Mode behavior with Smdbltrp #1051
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 see. MRET/SRET clear MDT so that you won't get a critical error on the next trap from U mode (or whatever). Resuming should clear it for the same reason.
This is very slightly different than the MRET/SRET requirements in the priv spec because you are able to go back to M mode with MDT=1 (whereas MRET to M would clear MDT). But we don't want to clear MDT in that case because the debugger needs to be allowed to resume to the critical part of the M mode handler where another trap should be a critical error. So this all makes sense.
Additionally, debug mode can resume to S with |
@pdonahue-ventana - I had missed qualifying the |
It's not entirely clear that the third sentence has the same Ssdbltrp condition as the second sentence. It really depends on both H and Ssdbltrp because (for obvious reasons) Ssdbltrp only adds the vsstatus bit if H is implemented. |
I placed the second and third sentence in a separate list item to avoid confusion that sentence 3 is not related to Ssdbltrp. I dont say "if H is implemented" as it is implied by VU mode which is provided only when H is implemented. |
A separate bullet is perfect. |
Sdext.adoc
Outdated
. If the Smdbltrp extension is implemented and the new privilege mode is not M, | ||
then the `MDT` bit is set to 0. | ||
. If the Ssdbltrp extension is implemented and the new privilege mode is U, VS, | ||
or VU, then `sstatus.SDT` is also set to 0. Additionally, if it is VU, then |
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.
or VU, then `sstatus.SDT` is also set to 0. Additionally, if it is VU, then | |
or VU, then `sstatus.SDT` is set to 0. Additionally, if it is VU, then |
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.
Updated.
@pdonahue-ventana @rtwfroody |
The cetrig change looks good. |
No description provided.