Skip to content

Commit

Permalink
Update references to CHERI exceptions
Browse files Browse the repository at this point in the history
Issue: eng/toolchain/gnat#1082
  • Loading branch information
damaki committed Oct 11, 2024
1 parent aacdcf5 commit 3ff4a2e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
16 changes: 8 additions & 8 deletions aarch64/morello/README
Original file line number Diff line number Diff line change
Expand Up @@ -277,14 +277,14 @@ processor exceptions when a run-time check fails. The Morello runtimes handle
these exceptions and raise one of the following Ada exceptions in response at
the source location where the exception occurred:

* `Interfaces.CHERI.Capability_Bound_Error` is raised when an out-of-bounds
access was attempted.
* `Interfaces.CHERI.Capability_Permission_Error` is raised when an attempted
access exceeds the permissions granted by a capability.
* `Interfaces.CHERI.Capability_Sealed_Error` is raised when a sealed capability
was dereferenced.
* `Interfaces.CHERI.Capability_Tag_Error` is raised when an invalid capability
was dereferenced.
* `Interfaces.CHERI.Exceptions.Capability_Bound_Error` is raised when an
out-of-bounds access was attempted.
* `Interfaces.CHERI.Exceptions.Capability_Permission_Error` is raised when an
attempted access exceeds the permissions granted by a capability.
* `Interfaces.CHERI.Exceptions.Capability_Sealed_Error` is raised when a sealed
capability was dereferenced.
* `Interfaces.CHERI.Exceptions.Capability_Tag_Error` is raised when an invalid
capability was dereferenced.

The embedded runtimes support exception propagation and allow these exceptions
to be caught and handled like regular Ada exceptions. The light and
Expand Down
1 change: 1 addition & 0 deletions src/s-bbcppr__morello.adb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ with System.BB.Board_Support;
with Interfaces;
with Interfaces.AArch64; use Interfaces.AArch64;
with Interfaces.CHERI; use Interfaces.CHERI;
with Interfaces.CHERI.Exceptions; use Interfaces.CHERI.Exceptions;

package body System.BB.CPU_Primitives is
use System.BB.Threads;
Expand Down
6 changes: 5 additions & 1 deletion support/rts_sources/sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,11 @@
},
"common/cheri": {
"conditions": ["Has_CHERI:yes"],
"srcs": ["libgnat/i-cheri.ads", "libgnat/i-cheri.adb"],
"srcs": [
"libgnat/i-cheri.ads",
"libgnat/i-cheri.adb",
"libgnat/i-cheri-exceptions.ads",
],
},
"light": {
"conditions": ["RTS_Profile:light,light-tasking,cert"],
Expand Down

0 comments on commit 3ff4a2e

Please sign in to comment.