NVIDIA DRIVE OS Linux SDK API Reference

5.2.6 Release
For Test and Development only
GPLIB::User Interface

Detailed Description

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...
 

Macro Definition Documentation

◆ TEEC_PARAM_TYPE_GET

#define TEEC_PARAM_TYPE_GET (   t,
 
)    (((t) >> (i*4)) & 0xF)

Helper macro to get GP param based on index.

Definition at line 213 of file tee_client_functions.h.

◆ TEEC_PARAM_TYPES

#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.

Function Documentation

◆ TEEC_CloseSession()

void TEEC_CloseSession ( TEEC_Session session)

closes a Session which has been opened with a Trusted Application

Parameters
[in]sessiona pointer to a Session structure to close
Returns
void
Precondition
Invocation of TEEC_OpenSession() must be successfull
Note
  • Allowed context for the API call
    • Interrupt : No
    • Signal handler: Yes
    • Thread : Yes
  • Is thread safe : Yes
  • Required Privileges(QNX): None
  • API Group
    • Initialization : No
    • Run time : No
    • De-initialization: Yes

swud: QNXBSP-GPLIB-05

◆ TEEC_FinalizeContext()

void TEEC_FinalizeContext ( TEEC_Context context)

Finalize TEEC context This is Dummy function.

It always returns success

Parameters
[in]contextPointer to context an initialized TEEC_Context structure which is to be finalized
Returns
void
Precondition
NA
Note
  • Allowed context for the API call
    • Interrupt : Yes
    • Signal handler: Yes
    • Thread : Yes
  • Is thread safe : Yes
  • Required Privileges(QNX): None
  • API Group
    • Initialization : No
    • Run time : No
    • De-initialization: Yes

swud: QNXBSP-GPLIB-03

◆ TEEC_InitializeContext()

TEEC_Result TEEC_InitializeContext ( const char *  name,
TEEC_Context context 
)

Initilize TEEC context This is Dummy function.

It always returns success.

Parameters
[in]namePointer to name a zero-terminated string that describes the TEE to connect to
[in]contextPointer to context a TEEC_Context pointer to be initialized
Return values
TEEC_SUCCESSOn successful initialization
Precondition
NA
Note
  • Allowed context for the API call
    • Interrupt : Yes
    • Signal handler: Yes
    • Thread : Yes
  • Is thread safe : Yes
  • Required Privileges(QNX): None
  • API Group
    • Initialization : Yes
    • Run time : No
    • De-initialization: No

swud: QNXBSP-GPLIB-02

◆ TEEC_InvokeCommand()

TEEC_Result TEEC_InvokeCommand ( TEEC_Session session,
uint32_t  commandID,
TEEC_Operation operation,
uint32_t *  returnOrigin 
)

invokes a Command within the specified Session

Parameters
[in]sessionthe open Session in which the command will be invoked. Session variable should be same aspassed with TEEC_OpenSession call.
[in]commandIDthe identifier of the Command within the Trusted Application to invoke. Command id can be any 32 bit number.
[in]operationa 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]returnOrigina pointer to a variable which will contain the return origin of return code
Return values
TEEC_SUCCESSOn successful initialization
TEEC_ERROR_GENERICIn case of failure to open session due to failure in TOS driver or failure from TEE
TEEC_ERROR_BAD_PARAMETERSIn case of invalid parameters
Precondition
Invocation of TEEC_OpenSession() must be successfull
Note
  • Allowed context for the API call
    • Interrupt : No
    • Signal handler: Yes
    • Thread : Yes
  • Is thread safe : Yes
  • Required Privileges(QNX): None
  • API Group
    • Initialization : No
    • Run time : Yes
    • De-initialization: No

swud: QNXBSP-GPLIB-06

◆ TEEC_OpenSession()

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

Parameters
[in]contexta pointer to an initialized TEE Context
[in]sessiona 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]destinationa pointer to a structure containing the UUID of the destination Trusted Application.UUID should be agreed 32 bit number with destination trusted application
[in]connectionMethodA pointer to the method of connection to use It should be null.
[in]connectionDataA pointer to necessary data required to support the connection method chosen. This variable is not in use. It should be null.
[in]operationa 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]returnOrigina pointer to a variable which will contain the origin of return code
Return values
TEEC_SUCCESSOn successful initialization
TEEC_ERROR_GENERICIn case of failure to open session due to failure in TOS driver or failure from TEE.
TEEC_ERROR_BAD_PARAMETERSIn case of invalid parameters.
Precondition
NA
Note
  • Allowed context for the API call
    • Interrupt : No
    • Signal handler: Yes
    • Thread : Yes
  • Is thread safe : Yes
  • Required Privileges(QNX) API should be called with GID:gp_lib and TA it is accessing Group innformation is defined in qnx/src/bsp/armv8/src/hardware/startup/boards/nvidia-t18x/vcm31t186/group
  • API Group
    • Initialization : Yes
    • Run time : No
    • De-initialization: No

swud: QNXBSP-GPLIB-04