#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include <limits.h>
#include "tee-common.h"
Go to the source code of this file.
|
| TEEC_Result | TEEC_InitializeContext (const char *name, TEEC_Context *context) |
| |
| void | TEEC_FinalizeContext (TEEC_Context *context) |
| |
| TEEC_Result | TEEC_OpenSession (TEEC_Context *context, TEEC_Session *session, const TEEC_UUID *destination, uint32_t connectionMethod, const void *connectionData, TEEC_Operation *operation, uint32_t *returnOrigin) |
| |
| void | TEEC_CloseSession (TEEC_Session *session) |
| |
| TEEC_Result | TEEC_InvokeCommand (TEEC_Session *session, uint32_t commandID, TEEC_Operation *operation, uint32_t *returnOrigin) |
| |
| TEEC_Result | TEEC_RegisterSharedMemory (TEEC_Context *context, TEEC_SharedMemory *sharedMem) |
| |
| TEEC_Result | TEEC_AllocateSharedMemory (TEEC_Context *context, TEEC_SharedMemory *sharedMem) |
| |
| void | TEEC_ReleaseSharedMemory (TEEC_SharedMemory *sharedMemory) |
| |
| void | TEEC_RequestCancellation (TEEC_Operation *operation) |
| |
◆ TEEC_Result
◆ TEEC_AllocateSharedMemory()
TEEC_AllocateSharedMemory() - Allocate shared memory for TEE.
- Parameters
-
| context | The initialized TEE context structure in which scope to open the session. |
| sharedMem | Pointer to the allocated shared memory. |
- Returns
- TEEC_SUCCESS The registration was successful.
-
TEEC_ERROR_OUT_OF_MEMORY Memory exhaustion.
-
TEEC_Result Something failed.
◆ TEEC_CloseSession()
TEEC_CloseSession() - Closes the session which has been opened with the specific trusted application.
- Parameters
-
| session | The opened session to close. |
◆ TEEC_FinalizeContext()
TEEC_FinalizeContext() - Destroys a context holding connection information on the specific TEE.
This function destroys an initialized TEE context, closing the connection between the client application and the TEE. This function must only be called when all sessions related to this TEE context have been closed and all shared memory blocks have been released.
- Parameters
-
| context | The context to be destroyed. |
TEEC_FinalizeContext() - Destroys a context holding connection information on the specific TEE.
This function finalizes an initialized TEE context, closing the connection between the client application and the TEE. This function must only be called when all sessions related to this TEE context have been closed and all shared memory blocks have been released.
- Parameters
-
| context | The context to be finalized. |
◆ TEEC_InitializeContext()
TEEC_InitializeContext() - Initializes a context holding connection information on the specific TEE, designated by the name string.
- Parameters
-
| name | A zero-terminated string identifying the TEE to connect to. If name is set to NULL, the default TEE is connected to. NULL is the only supported value in this version of the API implementation. |
| context | The context structure which is to be initialized. |
- Returns
- TEEC_SUCCESS The initialization was successful.
-
TEEC_Result Something failed.
◆ TEEC_InvokeCommand()
TEEC_InvokeCommand() - Executes a command in the specified trusted application.
- Parameters
-
| session | A handle to an open connection to the trusted application. |
| commandID | Identifier of the command in the trusted application to invoke. |
| operation | An operation structure to use in the invoke command. May be set to NULL to signify no operation structure needed. |
| returnOrigin | A parameter which will hold the error origin if this function returns any value other than TEEC_SUCCESS. |
- Returns
- TEEC_SUCCESS OpenSession successfully opened a new session.
-
TEEC_Result Something failed.
◆ TEEC_OpenSession()
TEEC_OpenSession() - Opens a new session with the specified trusted application.
- Parameters
-
| context | The initialized TEE context structure in which scope to open the session. |
| session | The session to initialize. |
| destination | A structure identifying the trusted application with which to open a session. |
| connectionMethod | The connection method to use. |
| connectionData | Any data necessary to connect with the chosen connection method. Not supported, should be set to NULL. |
| operation | An operation structure to use in the session. May be set to NULL to signify no operation structure needed. |
| returnOrigin | A parameter which will hold the error origin if this function returns any value other than TEEC_SUCCESS. |
- Returns
- TEEC_SUCCESS OpenSession successfully opened a new session.
-
TEEC_Result Something failed.
◆ TEEC_RegisterSharedMemory()
TEEC_RegisterSharedMemory() - Register a block of existing memory as a shared block within the scope of the specified context.
- Parameters
-
| context | The initialized TEE context structure in which scope to open the session. |
| sharedMem | pointer to the shared memory structure to register. |
- Returns
- TEEC_SUCCESS The registration was successful.
-
TEEC_ERROR_OUT_OF_MEMORY Memory exhaustion.
-
TEEC_Result Something failed.
◆ TEEC_ReleaseSharedMemory()
◆ TEEC_RequestCancellation()
TEEC_RequestCancellation() - Request the cancellation of a pending open session or command invocation.
- Parameters
-
| operation | Pointer to an operation previously passed to open session or invoke. |