10#include <__cheri_sealed.h>
383 uint32_t rawPermissions,
384 bool checkStackNeeded);
CHERISealingType
Sealing types.
@ CheriSealTypeReturnSentryDisabling
Return sentry that disables interrupts on return.
@ CheriSealTypeSealedImportTableEntries
The sealing type used for sealed export table entries.
@ CheriSealTypeReturnSentryEnabling
Return sentry that enables interrupts on return.
@ CheriSealTypeSealedTrustedStacks
The compartment switcher has a sealing type for the trusted stack.
@ CheriSealTypeSentryEnabling
Sentry that enables interrupts on calls.
@ CheriSealTypeStaticToken
The loader reserves a sealing type for the software sealing mechanism.
@ CheriSealTypeSentryInheriting
Sentry that inherits interrupt status.
@ CheriSealTypeFirstDataSealingType
Marker for the first sealing type that's valid for data capabilities.
@ CheriSealTypeFirstDynamicSoftware
The first sealing key in the space that the allocator will dynamically allocate for sealing types.
@ CheriSealTypeAllocator
The allocator has a sealing type for the software sealing mechanism with dynamically allocated object...
@ CheriSealTypeFirstStaticSoftware
The first sealing key that is reserved for use by the allocator's software sealing mechanism and used...
@ CheriSealTypeSentryDisabling
Sentry that disables interrupts on calls.
@ CheriSealTypeUnsealed
0 represents unsealed.
CHERIPermission
The complete set of architectural permissions.
@ CheriPermissionStore
Capability may be used to store.
@ CheriPermissionGlobal
Capability refers to global memory (this capability may be stored anywhere).
@ CheriPermissionStoreLocal
This capability may be used to store capabilities that do not have Global permission.
@ CheriPermissionLoadStoreCapability
Any load and store permissions on this capability convey the right to load or store capabilities in a...
@ CheriPermissionUnseal
This capability may be used to unseal other capabilities.
@ CheriPermissionUser0
Software defined permission bit, no architectural meaning.
@ CheriPermissionLoadGlobal
Global capabilities can be loaded through this capability.
@ CheriPermissionExecute
This capability may be used as a jump target and used to execute instructions.
@ CheriPermissionAccessSystemRegisters
If installed as the program counter capability, running code may access privileged system registers.
@ CheriPermissionSeal
This capability may be used to seal other capabilities.
@ CheriPermissionLoad
This capability can be used to load.
@ CheriPermissionLoadMutable
Capabilities with store permission may be loaded through this capability.
CHERIRegisterNumber
Register numbers as reported in cap idx field of mtval CSR when a CHERI exception is taken.
@ CheriRegisterNumberMepcc
Machine-mode Exception Program Counter Capability.
@ CheriRegisterNumberCgp
$c3 / $cgp used by the ABI as the global pointer.
@ CheriRegisterNumberCsp
$c2 / $csp used by the ABI as the stack pointer.
@ CheriRegisterNumberCT0
$c5 / $ct0 used by the ABI as temporary register.
@ CheriRegisterNumberCS0
$c8 / $cs0 used by the ABI as a callee-saved register.
@ CheriRegisterNumberCA2
$c12 / $ca2 used by the ABI as an argument register.
@ CheriRegisterNumberCT2
$c7 / $ct2 used by the ABI as temporary register.
@ CheriRegisterNumberCT1
$c6 / $ct1 used by the ABI as temporary register.
@ CheriRegisterNumberCA1
$c11 / $ca1 used by the ABI as an argument register.
@ CheriRegisterNumberCA4
$c14 / $ca4 used by the ABI as an argument register.
@ CheriRegisterNumberInvalid
Indicates a value that is not used by the hardware to refer to a register.
@ CheriRegisterNumberCA3
$c13 / $ca3 used by the ABI as an argument register.
@ CheriRegisterNumberMScratchC
Machine-mode Scratch Capability.
@ CheriRegisterNumberCtp
$c4 / $ctp used by the ABI as the thread pointer.
@ CheriRegisterNumberMtdc
Machine-mode Tusted Data Capability.
@ CheriRegisterNumberCS1
$c9 / $cs1 used by the ABI as a callee-saved register.
@ CheriRegisterNumberCra
$c1 / $cra used by the ABI as the return address.
@ CheriRegisterNumberCA5
$c15 / $ca5 used by the ABI as an argument register.
@ CheriRegisterNumberCA0
$c10 / $ca0 used by the ABI as an argument register.
@ CheriRegisterNumberCzr
The zero register, which always contains the NULL capability.
@ CheriRegisterNumberPcc
The Program Counter Capability.
@ CheriRegisterNumberMtcc
Machine-mode Trap Code Capability.
bool __cheri_libcall check_pointer(const volatile void *ptr, size_t space, uint32_t rawPermissions, bool checkStackNeeded)
Checks that ptr is valid, unsealed, has at least rawPermissions, and has at least space bytes after t...
CHERICauseCode
The codes used in the cause field of the mtval CSR when the processor takes a CHERI exception.
@ CheriCauseCodePermitStoreCapabilityViolation
Attempted to store a tagged capability via a capability without Permission::LoadStoreCapability.
@ CheriCauseCodePermitStoreLocalCapabilityViolation
Attempted to store a tagged capability without Permission::Global via capability without Permission::...
@ CheriCauseCodePermitExecuteViolation
Attempted to jump to a capability without Permission::Execute.
@ CheriCauseCodePermitAccessSystemRegistersViolation
Attempted to access a restricted CSR or SCR with PCC without Permission::AccessSystemRegisters.
@ CheriCauseCodeBoundsViolation
Attempted to use a capability outside its bounds.
@ CheriCauseCodePermitLoadViolation
Attempted to load via a capability without Permission::Load.
@ CheriCauseCodeSealViolation
Attempted to use a sealed capability to authorize something.
@ CheriCauseCodeNone
No exception.
@ CheriCauseCodeInvalid
Used to represent a value that has no valid meaning in hardware.
@ CheriCauseCodeTagViolation
Attempted to use an untagged capability to authorize something.
@ CheriCauseCodePermitStoreViolation
Attempted to store via a capability without Permission::Store.
Macros for interacting with the compartmentalisation model in CHERIoT.
Structure representing a timeout.