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

controlling the cheri mode to enter when entering debug mode #370

Merged
merged 8 commits into from
Sep 23, 2024
5 changes: 5 additions & 0 deletions src/debug-integration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,11 @@ The reset value is the <<infinite-cap>> capability with the <<m_bit>> set to {CA
regardless of whether {cheri_default_ext_name} (see xref:section-cheri-execution-mode[xrefstyle=short])
is implemented:

The current CHERI execution mode can be determined in debug mode by reading <<dinfc>>, as the
<<m_bit>> is updated by the hardware. The value of the <<m_bit>> when the core is not in debug
mode is either the reset value or the value of the <<m_bit>> in debug mode when the core last
resumed execution.

<<dinfc>> is read/write but with no writeable fields, and so writes are
ignored.

Expand Down
15 changes: 13 additions & 2 deletions src/riscv-hybrid-integration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,20 @@ shown in xref:default-csrnames-added[xrefstyle=short].

{cheri_default_ext_name} optionally allows <<MODESW>> to execute in debug mode.

When entering debug mode, the core always enters {cheri_cap_mode_name}.
When entering debug mode, whether the core enters {cheri_int_mode_name} or
tariqkurd-repo marked this conversation as resolved.
Show resolved Hide resolved
{cheri_cap_mode_name} is UNSPECIFIED.
tariqkurd-repo marked this conversation as resolved.
Show resolved Hide resolved
tariqkurd-repo marked this conversation as resolved.
Show resolved Hide resolved
Implementations may optionally support switching CHERI execution mode by
executing the <<MODESW>> from the program buffer.
executing <<MODESW>> from the program buffer.
tariqkurd-repo marked this conversation as resolved.
Show resolved Hide resolved

The current mode can be read from <<dinfc>>.
tariqkurd-repo marked this conversation as resolved.
Show resolved Hide resolved

NOTE: Entering debug mode in {cheri_int_mode_name} allows non-CHERI aware debuggers
the ability to connect to, and debug, CHERI cores without any software
change. Entering in {cheri_cap_mode_name} allows CHERI aware debuggers to
connect directly and make use of the CHERI features without needing to
switch modes. It is anticipated that, over time, debuggers will move to
being updated to talk to CHERI cores, allowing {cheri_cap_mode_name} to
become to obvious mode to switch to when entering debug mode.

ifdef::cheri_v9_annotations[]
NOTE: *CHERI v9 Note:* The mode change instruction <<MODESW>> is new
Expand Down
2 changes: 1 addition & 1 deletion src/trigger-integration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ shown in xref:trigger-exception-priority[xrefstyle=short].
.Synchronous exception priority (including triggers) in decreasing priority order. Entries added in {cheri_base_ext_name} are in *bold*
[%autowidth,float="center",align="center",cols="<,>,<,<",options="header"]
|===
|Priority |Exc.Code |Description |Trigger
|Priority |Exc. Code |Description |Trigger
|_Highest_ |3 +
3 +
3 +
Expand Down
Loading