NVIDIA DRIVE OS Linux SDK API Reference

5.2.6 Release
For Test and Development only

Detailed Description

Describes TEE internal TA interface.

Functions

TEE_Result TA_CreateEntryPoint (void)
 The function TA_CreateEntryPoint is the TA’s second initialization function, called by the framework when the single thread starts execution. More...
 
TEE_Result TA_OpenSessionEntryPoint (uint32_t paramTypes, TEE_Param params[4], void **sessionContext)
 The framework calls the function TA_OpenSessionEntryPoint when a client requests to open a session with the TA. More...
 
void TA_CloseSessionEntryPoint (void *sessionContext)
 The framework calls the function TA_CloseSessionEntryPoint to close a client session. More...
 
TEE_Result TA_InvokeCommandEntryPoint (void *sessionContext, uint32_t commandID, uint32_t paramTypes, TEE_Param params[4])
 The framework calls the function TA_InvokeCommandEntryPoint when the client invokes a command within the given session. More...
 

Function Documentation

◆ TA_CloseSessionEntryPoint()

void TA_CloseSessionEntryPoint ( void *  sessionContext)

The framework calls the function TA_CloseSessionEntryPoint to close a client session.

(QNX PDK Only) Error behavior: implementation-defined

(QNX PDK Only) Side effects: the TA implementation is responsible for freeing any resources consumed by the session. Note that the TA cannot refuse to close a session, but can hold the closing until it returns from TA_CloseSessionEntryPoint. This is why this function cannot return an error code.

Parameters
[in]sessionContextThe value of the void* opaque data pointer set by the TA in the function TA_OpenSessionEntryPoint for this session.

◆ TA_CreateEntryPoint()

TEE_Result TA_CreateEntryPoint ( void  )

The function TA_CreateEntryPoint is the TA’s second initialization function, called by the framework when the single thread starts execution.

It is called after main().

(QNX PDK Only) Error behavior: implementation-defined

(QNX PDK Only) Side effects: implementation-defined. Global data can be initialized.

Returns
Whether the TA is successfully initialized.
Return values
TEE_SUCCESSthe TA is successfully initialized.
impl_definedthe TA cannot be be initialized.

◆ TA_InvokeCommandEntryPoint()

TEE_Result TA_InvokeCommandEntryPoint ( void *  sessionContext,
uint32_t  commandID,
uint32_t  paramTypes,
TEE_Param  params[4] 
)

The framework calls the function TA_InvokeCommandEntryPoint when the client invokes a command within the given session.

The TA can access the parameters sent by the client through the paramTypes and params arguments. It can also use these arguments to transfer response data back to the client.

If the function returns any error, the return origin is then set to TEE_ORIGIN_TRUSTED_APP.

(QNX PDK Only) Error behavior: implementation-defined

(QNX PDK Only) Side effects: implementation-defined. Resources might be updated.

Parameters
[in]sessionContextThe value of the void* opaque data pointer set by the TA in the function TA_OpenSessionEntryPoint.
[in]commandIDA TA-specific code that identifies the command to be invoked.
[in]paramTypesThe types of the four parameters.
[in,out]paramsA pointer to an array of four parameters.
Returns
if the session is successfully opened
Return values
TEE_SUCCESSthe session is successfully opened
impl_definedthe session could not be opened

◆ TA_OpenSessionEntryPoint()

TEE_Result TA_OpenSessionEntryPoint ( uint32_t  paramTypes,
TEE_Param  params[4],
void **  sessionContext 
)

The framework calls the function TA_OpenSessionEntryPoint when a client requests to open a session with the TA.

The client can specify parameters in an open operation which are passed to the TA instance in the arguments paramTypes and params. These arguments can also be used by the TA instance to transfer response data back to the client.

If this function returns TEE_SUCCESS, the client is connected to a TA instance and can invoke TA commands. When the client disconnects, the framework eventually calls the TA_CloseSessionEntryPoint entry point. If the function returns any error, the framework rejects the connection and returns the error code to the client. The return origin is then set to TEE_ORIGIN_TRUSTED_APP.

The TA instance can register a session data pointer by setting *sessionContext. The value of this pointer is not interpreted by the framework, and is simply passed back to TA_InvokeCommandEntryPoint and TA_CloseSessionEntryPoint functions within this session. Note that *sessionContext may be set with a pointer to a memory allocated by the trusted application instance or with anything else, such as an integer, a handle, etc. The framework does not automatically free *sessionContext when the session is closed; the TA instance is responsible for freeing memory if required. If the call to open session returns TEE_SUCCESS, the client must consider the session as successfully opened and explicitly close it if necessary.

(QNX PDK Only) Error behavior: implementation-defined

(QNX PDK Only) Side effects: implementation-defined. Resources might be allocated.

Parameters
[in]paramTypesThe types of the four parameters.
[in,out]paramsA pointer to an array of four parameters.
[out]sessionContextA pointer to a variable that can be filled by the TA instance with an opaque void* data pointer.
Returns
if the session is successfully opened
Return values
TEE_SUCCESSthe session is successfully opened
impl_definedthe session could not be opened