Manages interactions with Trusted applications (TA) running under secure world.
Modules | |
GPLIB::Constants | |
Constants for the GP Client Library. | |
GPLIB::Datatypes | |
Datatypes for the GP Client Library. | |
Macros | |
#define | TEEC_PARAM_TYPES(t0, t1, t2, t3) (((uint32_t)t0) | (((uint32_t)t1) << 4U) | (((uint32_t)t2) << 8U) | (((uint32_t)t3) << 12U)) |
Helper macro to construct param type. More... | |
#define | TEEC_PARAM_TYPE_GET(t, i) (((t) >> (i*4)) & 0xF) |
Helper macro to get GP param based on index. More... | |
Functions | |
TEEC_Result | TEEC_InitializeContext (const char *name, TEEC_Context *context) |
Initilize TEEC context This is Dummy function. More... | |
void | TEEC_FinalizeContext (TEEC_Context *context) |
Finalize TEEC context This is Dummy function. More... | |
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) |
This function opens a new Session between the Client Application and the specified Trusted Application. More... | |
void | TEEC_CloseSession (TEEC_Session *session) |
closes a Session which has been opened with a Trusted Application More... | |
TEEC_Result | TEEC_InvokeCommand (TEEC_Session *session, uint32_t commandID, TEEC_Operation *operation, uint32_t *returnOrigin) |
invokes a Command within the specified Session More... | |
#define TEEC_PARAM_TYPE_GET | ( | t, | |
i | |||
) | (((t) >> (i*4)) & 0xF) |
Helper macro to get GP param based on index.
Definition at line 213 of file tee_client_functions.h.
#define TEEC_PARAM_TYPES | ( | t0, | |
t1, | |||
t2, | |||
t3 | |||
) | (((uint32_t)t0) | (((uint32_t)t1) << 4U) | (((uint32_t)t2) << 8U) | (((uint32_t)t3) << 12U)) |
Helper macro to construct param type.
Definition at line 207 of file tee_client_functions.h.
void TEEC_CloseSession | ( | TEEC_Session * | session | ) |
closes a Session which has been opened with a Trusted Application
[in] | session | a pointer to a Session structure to close |
swud: QNXBSP-GPLIB-05
void TEEC_FinalizeContext | ( | TEEC_Context * | context | ) |
Finalize TEEC context This is Dummy function.
It always returns success
[in] | context | Pointer to context an initialized TEEC_Context structure which is to be finalized |
swud: QNXBSP-GPLIB-03
TEEC_Result TEEC_InitializeContext | ( | const char * | name, |
TEEC_Context * | context | ||
) |
Initilize TEEC context This is Dummy function.
It always returns success.
[in] | name | Pointer to name a zero-terminated string that describes the TEE to connect to |
[in] | context | Pointer to context a TEEC_Context pointer to be initialized |
TEEC_SUCCESS | On successful initialization |
swud: QNXBSP-GPLIB-02
TEEC_Result TEEC_InvokeCommand | ( | TEEC_Session * | session, |
uint32_t | commandID, | ||
TEEC_Operation * | operation, | ||
uint32_t * | returnOrigin | ||
) |
invokes a Command within the specified Session
[in] | session | the open Session in which the command will be invoked. Session variable should be same aspassed with TEEC_OpenSession call. |
[in] | commandID | the identifier of the Command within the Trusted Application to invoke. Command id can be any 32 bit number. |
[in] | operation | a pointer to a Client Application initialized TEEC_Operation structure, or NULL if there is no payload to send. Operation can be type of value orpointer to be buffer shared with trusted application. |
[in] | returnOrigin | a pointer to a variable which will contain the return origin of return code |
TEEC_SUCCESS | On successful initialization |
TEEC_ERROR_GENERIC | In case of failure to open session due to failure in TOS driver or failure from TEE |
TEEC_ERROR_BAD_PARAMETERS | In case of invalid parameters |
swud: QNXBSP-GPLIB-06
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 | ||
) |
This function opens a new Session between the Client Application and the specified Trusted Application.
The target Trusted Application is identified by a UUID passed in the parameter destination
[in] | context | a pointer to an initialized TEE Context |
[in] | session | a pointer to a Session structure to open. session structure consists of fd, magic number,UUID, and 32 bit session id. Fd can be any positive number, seesion id can be any 32 bit number, magic number is fixed and can not be updated by user. |
[in] | destination | a pointer to a structure containing the UUID of the destination Trusted Application.UUID should be agreed 32 bit number with destination trusted application |
[in] | connectionMethod | A pointer to the method of connection to use It should be null. |
[in] | connectionData | A pointer to necessary data required to support the connection method chosen. This variable is not in use. It should be null. |
[in] | operation | a pointer to an Operation containing a set of Parameters to exchange with the Trusted Application, or NULL if no Parameters are to be exchanged. Operation can be type of value or pointer to be buffer shared with trusted application. |
[in] | returnOrigin | a pointer to a variable which will contain the origin of return code |
TEEC_SUCCESS | On successful initialization |
TEEC_ERROR_GENERIC | In case of failure to open session due to failure in TOS driver or failure from TEE. |
TEEC_ERROR_BAD_PARAMETERS | In case of invalid parameters. |
swud: QNXBSP-GPLIB-04