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

Split CRG functionality for U and S-modes #491

Merged
merged 13 commits into from
Jan 15, 2025
8 changes: 5 additions & 3 deletions src/cheri-pte-ext.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ NOTE: There is no explicit mechanism for enabling or disabling {cheri_pte_ext_na

NOTE: A future version of this specification may include kernel revocation which may require an <<sstatusreg_pte,sstatus>>.SCRG bit.

The remainder of this chapter specifies the behavior of PTE.CW, PTE.CRG and <<sstatusreg_pte,sstatus>>.UCRG.
The remainder of this chapter jointly specifies the behavior of PTE.CW, PTE.CRG and <<sstatusreg_pte,sstatus>>.UCRG.

If {cheri_pte_ext_name} is _not_ implemented then PTE.CRG and <<sstatusreg_pte,sstatus>>.UCRG are considered to exist but to be read-only-zero for the purpose of the specification, however a CHERI-aware hart running a VM-enabled OS is strongly recommended to support {cheri_pte_ext_name}.
NOTE: The description below assumes that {cheri_pte_ext_name} has been implemented.
If that is _not_ the case then PTE.CRG and <<sstatusreg_pte,sstatus>>.UCRG should be taken as read-only-zero for purpose of the description in the remainder of this chapter only.
tariqkurd-repo marked this conversation as resolved.
Show resolved Hide resolved
PTE.CRG and <<sstatusreg_pte,sstatus>>.UCRG remain reserved in this case.

The minimum level of PTE support is to set CW to 1 in all PTEs intended for storing capabilities (i.e. anonymous mappings) and leave <<sstatusreg_pte,sstatus>>.UCRG and CRG in all PTEs set to 0, which will allow capabilities with their tags set to be loaded and stored successfully.
tariqkurd-repo marked this conversation as resolved.
Show resolved Hide resolved

Expand Down Expand Up @@ -202,7 +204,7 @@ When V=1 <<vsstatusreg_pte,vsstatus>>.UCRG is in effect.

<<mstatusreg_pte,mstatus>>.UCRG also exists. Reading or writing it is equivalent to reading or writing <<sstatusreg_pte,sstatus>>.UCRG.

NOTE: As there is no M-mode translation available in RISC-V, there is no current software use for <<mstatusreg_pte,mstatus>>.UCRG or an M-mode equivalent bit in the future.
NOTE: There is no current software use for <<mstatusreg_pte,mstatus>>.UCRG.
tariqkurd-repo marked this conversation as resolved.
Show resolved Hide resolved
It is _only_ included not to break the rule that <<sstatusreg_pte,sstatus>> is required to be a subset of <<mstatusreg_pte,mstatus>>.


Expand Down
Loading