Skip to content

Commit

Permalink
Add CL rules for CBLD and SCSS (#437)
Browse files Browse the repository at this point in the history
Fixes #434
  • Loading branch information
tariqkurd-repo authored Oct 29, 2024
1 parent 170e32a commit cd01404
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 2 additions & 0 deletions src/insns/cbld_32bit.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Copy `cs2` to `cd` and set `cd.tag` to 1 if
. `cs1` 's permissions could have been legally produced by <<ACPERM>>, and
. `cs1` is not sealed, and
. `cs2` 's permissions and bounds are equal to or a subset of `cs1` 's, and
. `cs2` 's <<section_cap_level>> is equal to or lower than `cs1` 's, and
.. _This is only relevant if {cheri_levels_ext_name} is implemented._
. `cs2` 's bounds are not <<section_cap_malformed,malformed>>, and all reserved fields are zero, and
. `cs2` 's permissions could have been legally produced by <<ACPERM>>, and
. All reserved bits in `cs2` 's metadata are 0;
Expand Down
18 changes: 11 additions & 7 deletions src/insns/scss_32bit.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ endif::[]
include::new_encoding_note.adoc[]

Synopsis::
Capability test subset
Set Capability Subset

Mnemonic::
`scss rd, cs1, cs2`
Expand All @@ -23,12 +23,16 @@ Encoding::
include::wavedrom/scss.adoc[]

Description::
`rd` is set to 1 if the tag of capabilities `cs1` and `cs2` are equal and the
bounds and permissions of `cs2` are a subset of those of `cs1`. Output 0 to
`rd` if either `cs1` or `cs2`:
. Have bounds which are <<section_cap_malformed,malformed>>, or
. Have any bits set in reserved fields, or
. Have permissions that could not have been legally produced by <<ACPERM>>
`rd` is set to 1 if:
. the tag of capabilities `cs1` and `cs2` are equal, and
. the bounds and permissions of `cs2` are a subset of those of `cs1`, and
. `cs2` 's <<section_cap_level>> is equal to or lower than `cs1` 's
.. _This is only relevant if {cheri_levels_ext_name} is implemented._
. neither `cs1` or `cs2` have bounds which are <<section_cap_malformed,malformed>>, and
. neither `cs1` or `cs2` have any bits set in reserved fields, and
. neither `cs1` or `cs2` have permissions that could not have been legally produced by <<ACPERM>>
Otherwise set `rd` to 0.
NOTE: The implementation of this instruction is similar to <<CBLD>>, although
<<SCSS>> does not include the sealed bit in the check.
Expand Down

0 comments on commit cd01404

Please sign in to comment.