The Intel(R) SGX trusted runtime system (tRTS) is a key component of the Intel(R) Software Guard Extensions SDK. It provides the enclave entry point logic as well as other functions to be used by enclave developers.
Intel(R) Software Guard Extensions Helper Functions
The tRTS provides the helper functions for you to determine whether a given address is within or outside enclave memory.
The tRTS provides a wrapper to the RDRAND instruction to generate a true random number from hardware. enclave developers should use the rsgx_read_rand function to get true random numbers.
The Intel(R) Software Guard Extensions SDK provides an API to allow you to register functions, or exception handlers, to handle a limited set of hardware exceptions. When one of the enclave supported hardware exceptions occurs within the enclave, the registered exception handlers will be called in a specific order until an exception handler reports that it has handled the exception. For example, issuing a CPUID instruction inside an Enclave will result in a #UD fault (Invalid Opcode Exception). ISV enclave code can call rsgx_register_exception_handler to register a function of type sgx_exception_handler_t to respond to this exception. To check a list of enclave supported exceptions, see Intel(R) Software Guard Extensions Programming Reference.
Custom exception handling is only supported in HW mode. Although the exception handlers can be registered in simulation mode, the exceptions cannot be caught and handled within the enclave.
OCALLs are not allowed in the exception handler.
Custom exception handing only saves general purpose registers in sgx_ exception_info_t. You should be careful when touching other registers in the exception handlers.
If the exception handlers can not handle the exceptions, abort() is called. abort() makes the enclave unusable and generates another exception.
Operations on ASCII strings and characters.
Get the metadata of the current enclave.
This mod provides the interface connecting Rust's memory management system to the Intel's SGX SDK's malloc system.
Comparing buffer contents in constant time.
global_ctors_object is the base macro of implementing constructors.