Skip to content

Commit de0a91d

Browse files
committed
[CHERIoT] Add LoadGlobal permission encoding to cheriot_mmio and cheriot_shared_object attributes
1 parent fe4af84 commit de0a91d

File tree

5 files changed

+405
-284
lines changed

5 files changed

+405
-284
lines changed

clang/include/clang/Basic/AttrDocs.td

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1486,7 +1486,7 @@ qualifiers.
14861486
of the MMIO-bound device. An example of this is ``"uart"``. The
14871487
``"<permissions_encoding>"`` indicates the permissions of the capability
14881488
resulting from the import. The permissions encoding is a string of variable
1489-
length. The symbols allowed in the string are ``R``, ``W``, ``c`` and ``m``,
1489+
length. The symbols allowed in the string are ``R``, ``W``, ``c``, ``m`` and ``g``,
14901490
whose meaning is explained in the table below.
14911491

14921492

@@ -1496,13 +1496,14 @@ whose meaning is explained in the table below.
14961496
"``R``","Load (Read)", "May be used to read.",""
14971497
"``W``","Store (Write)", "May be used to write.",""
14981498
"``c``","Load / Store Capability", "May be used to load or store capabilities as well as non-capability data.","``R`` or ``W``"
1499-
"``m``","Load Mutable", "May be used to load capabilities with write permission.","``R``"
1499+
"``m``","Load Mutable", "May be used to load capabilities with write permission.","``R`` and ``c``"
1500+
"``g``","Load Global", " May be used to load capabilities with the global permission.","``R`` and ``c``"
15001501

15011502
Examples of valid encodings are: ``"RWcm"`` (all permissions), ``"R"`` (read
15021503
only), etc. Note that the order in which symbols appear is not relevant: for
15031504
example, `"RWcm"` and `"mcWR"` are both valid and entail the same permissions.
15041505

1505-
**Warning**: The ``<permissions_encoding>`` parameter is optional, and if no encoding is given ``"RWcm"`` is assumed.
1506+
**Warning**: The ``<permissions_encoding>`` parameter is optional, and if no encoding is given ``"RWcmg"`` is assumed.
15061507
}];
15071508
}
15081509

@@ -1521,7 +1522,7 @@ cross-compartment shared object. The target global must have the `extern` and
15211522
of the shared object. The ``"<permissions_encoding>"`` indicates the permissions
15221523
of the capability resulting from the import. The permissions encoding is a
15231524
string of variable length. The symbols allowed in the string are ``R``, ``W``,
1524-
``c`` and ``m``, whose meaning is explained in the table below.
1525+
``c``, ``m`` and ``g``, whose meaning is explained in the table below.
15251526

15261527

15271528
.. csv-table:: Supported Syntaxes
@@ -1530,13 +1531,14 @@ string of variable length. The symbols allowed in the string are ``R``, ``W``,
15301531
"``R``","Load (Read)", "May be used to read.",""
15311532
"``W``","Store (Write)", "May be used to write.",""
15321533
"``c``","Load / Store Capability", "May be used to load or store capabilities as well as non-capability data.","``R`` or ``W``"
1533-
"``m``","Load Mutable", "May be used to load capabilities with write permission.","``R``"
1534+
"``m``","Load Mutable", "May be used to load capabilities with write permission.","``R`` and ``c``"
1535+
"``g``","Load Global", " May be used to load capabilities with the global permission.","``R`` and ``c``"
15341536

15351537
Examples of valid encodings are: ``"RWcm"`` (all permissions), ``"R"`` (read
15361538
only), etc. Note that the order in which symbols appear is not relevant: for
15371539
example, `"RWcm"` and `"mcWR"` are both valid and entail the same permissions.
15381540

1539-
**Warning**: The ``<permissions_encoding>`` parameter is optional, and if no encoding is given ``"RWcm"`` is assumed.
1541+
**Warning**: The ``<permissions_encoding>`` parameter is optional, and if no encoding is given ``"RWcmg"`` is assumed.
15401542
}];
15411543
}
15421544

0 commit comments

Comments
 (0)