Skip to content
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

Add support for Smdbltrp. #998

Merged
merged 5 commits into from
May 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 50 additions & 2 deletions xml/core_registers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,52 @@ same project unless stated otherwise.
available version of this spec.
</value>
</field>
<field name="0" bits="27:18" access="R" reset="0" />
<field name="0" bits="27" access="R" reset="0" />
<field name="extcause" bits="26:24" access="R" reset="0">
When {dcsr-cause} is 7, this optional field contains the value of a
more specific halt reason than "other." Otherwise it contains 0.

<value v="0" name="critical error">
The hart entered a critical error state, as defined in the
((Smdbltrp)) extension.
</value>

All other values are reserved for future versions of this spec, or
for use by other RISC-V extensions.
</field>
<field name="0" bits="23:20" access="R" reset="0" />
<field name="cetrig" bits="19" access="R/W" reset="0">
This bit is part of ((Smdbltrp)) and only exists when that extension
is implemented.

<value v="0" name="disabled">
A hart in a critical error state does not enter Debug Mode but
instead asserts the critical-error signal to the platform.
</value>

<value v="1" name="enabled">
A hart in a critical error state enters Debug Mode instead of
asserting the critical-error signal to the platform. Upon such
entry into Debug Mode, the cause field is set to 7, and the
extcause field is set to 0, indicating a critical error
triggered the Debug Mode entry. This cause has the highest
priority among all reasons for entering Debug Mode. Resuming
from Debug Mode following an entry from the critical error state
returns the hart to the critical error state.
</value>

[NOTE]
====
When {dcsr-cetrig} is 1, resuming from Debug Mode
following an entry due to a critical error will result in an
immediate re-entry into Debug Mode due to the critical error.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The debugger may resume with cetrig set to 0 to allow the platform defined actions on critical-error signal to occur. Other possible actions include initiating a hart or platform reset using the Debug Module reset control.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

The debugger may resume with {dcsr-cetrig} set to 0 to allow the
platform defined actions on critical-error signal to occur.
Other possible actions include initiating a hart or platform
reset using the Debug Module reset control.
====
</field>
<field name="0" bits="18" access="R" reset="0" />
<field name="ebreakvs" bits="17" access="WARL" reset="0">
<value v="0" name="exception">
`ebreak` instructions in VS-mode behave as described in the
Expand Down Expand Up @@ -212,7 +257,10 @@ same project unless stated otherwise.
Harts may report 3 for this cause instead.
</value>

Other values are reserved for future use.
<value v="7" name="other">
The hart halted for a reason other than the ones mentioned above.
{dcsr-extcause} may contain a more specific reason.
</value>
</field>
<field name="v" bits="5" access="WARL" reset="0">
Extends the prv field with the virtualization mode the hart was operating
Expand Down
Loading