generated from riscv/docs-spec-template
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from rsahita/topic/extdbg
Address external debug issue #11
- Loading branch information
Showing
6 changed files
with
67 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[[chapter8]] | ||
[[Smsdedbg]] | ||
== `Smsdedbg`: Supervisor Domain External Debug | ||
|
||
The <<MSDCFG>> CSR contains the `sdedbgalw` bit that controls whether the | ||
current scheduled SD is allowed to be external-debugged. This bit is context | ||
switched (along with rest of the `msdcfg`) per SD. | ||
|
||
=== `Smsdedbg` interaction with external debug security controls (Informative) | ||
|
||
[caption="Figure {counter:image}: ", reftext="Figure {image}"] | ||
[title= "External Debug for Supervisor Domain", id=Smsdedbg_img] | ||
image::Smsdedbg.png[] | ||
|
||
This section will be moved into the non-ISA specification for external debug | ||
security. It is described here as informational. | ||
|
||
The `medbgen` is an enable control for external debug for the M-mode driven by | ||
the debug module and is expected to be established by the RoT (following RISC-V | ||
Security Model recommendation SR_GEN_007 and SR_GEN_012). When privilege is `M`, | ||
the `medbgen` gates the `haltreq` from the debug module and if is 0 prevents | ||
the hart from entering external debug mode. When privilege is less than `M`, the | ||
OR of the `MSDCFG.sdedbgalw` and `medbgen` gates the `haltreq` from the debug | ||
module and the hart will enter external debug mode if either is 1. | ||
|
||
The configuration for `MSDCFG.sdedbgalw` may be obtained from the manifest/ | ||
configuration of the supervisoer domain and should be managed by the M-mode root | ||
security manager using secure memory. | ||
|
||
When `medbgen` is 1, there are no restrictions. When `medbgen` is 0 but | ||
`MSDCFG.sdedbgalw` is 1, then the external debug mode may be entered but has | ||
to have restrictions such as `M-mode` -privileged CSR accesses are prohibited | ||
and Memory accesses by instructions executed in external debug mode cannot | ||
use `M` privilege. When `medbgen` is 0 and `MSDCFG.sdedbgalw` is also 0, then | ||
the rules around triggers configured with action = 1 that may fire - such as | ||
always cause breakpoint exception. The external debug security extension TG | ||
will need to define the rules around what is allowed in external debug mode. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.