NVIDIA DRIVE OS Linux API Reference

5.1.0.2 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages

Detailed Description

Defines common functions for Trusted Little Kernel (TLK).

Functions

te_error_t te_open_session (te_session_t *session, te_service_id_t *service, te_operation_t *operation)
 Opens a session to a TLK secure service. More...
 
void te_close_session (te_session_t *session)
 Closes an existing open session to a TLK secure service. More...
 
te_operation_tte_create_operation (void)
 Dynamically creates a new TLK secure service operation object. More...
 
void te_init_operation (te_operation_t *te_op)
 Initializes a TLK operation object. More...
 
void te_deinit_operation (te_operation_t *teOp)
 Deinitializes an existing TLK operation object. More...
 
te_error_t te_launch_operation (te_session_t *session, te_operation_t *te_op)
 Sends an existing TLK operation object. More...
 
void te_oper_set_command (te_operation_t *te_op, uint32_t command)
 Sets a command to a TLK secure service operation object. More...
 
void te_oper_set_param_int_ro (te_operation_t *te_op, uint32_t index, uint32_t Int)
 Adds a read-only integer parameter to a TLK operation object. More...
 
void te_oper_set_param_int_rw (te_operation_t *te_op, uint32_t index, uint32_t Int)
 Adds a read-write integer parameter to a TLK operation object. More...
 
void te_oper_set_param_mem_ro (te_operation_t *te_op, uint32_t index, const void *base, uint32_t len)
 Adds a read-only buffer parameter to the operation object. More...
 
void te_oper_set_param_mem_rw (te_operation_t *te_op, uint32_t index, void *base, uint32_t len)
 Adds a read-write buffer parameter to the operation object. More...
 
void te_oper_set_param_persist_mem_ro (te_operation_t *te_op, uint32_t index, const void *base, uint32_t len)
 Adds a persistent read-only buffer parameter to the operation object. More...
 
void te_oper_set_param_persist_mem_rw (te_operation_t *te_op, uint32_t index, void *base, uint32_t len)
 Adds a persistent read-write buffer parameter to the operation object. More...
 
uint32_t te_oper_get_command (te_operation_t *te_op)
 Gets a TLK command from an operation object. More...
 
uint32_t te_oper_get_num_params (te_operation_t *te_op)
 Gets the number of parameters from an operation object. More...
 
te_error_t te_oper_get_param_type (te_operation_t *te_op, uint32_t index, te_oper_param_type_t *type)
 Gets the parameter type of a parameter. More...
 
te_error_t te_oper_get_param_int (te_operation_t *te_op, uint32_t index, uint32_t *Int)
 Gets an integer parameter from a given TLK operation object. More...
 
te_error_t te_oper_get_param_mem (te_operation_t *te_op, uint32_t index, void **base, uint32_t *len)
 Gets a memory buffer parameter from a given TLK operation object. More...
 
te_error_t te_oper_get_param_mem_ro (te_operation_t *te_op, uint32_t index, const void **base, uint32_t *len)
 Get a mem parameter. More...
 
te_error_t te_oper_get_param_mem_rw (te_operation_t *te_op, uint32_t index, void **base, uint32_t *len)
 Get a mem parameter. More...
 
te_error_t te_oper_get_param_persist_mem_ro (te_operation_t *te_op, uint32_t index, const void **base, uint32_t *len)
 Get a mem parameter. More...
 
te_error_t te_oper_get_param_persist_mem_rw (te_operation_t *te_op, uint32_t index, void **base, uint32_t *len)
 Get a mem parameter. More...
 
void te_operation_reset (te_operation_t *te_op)
 Resets the data in an operation object. More...
 

Function Documentation

void te_close_session ( te_session_t session)

Closes an existing open session to a TLK secure service.

Parameters
[in]sessionA pointer to a TLK secure service session.
te_operation_t* te_create_operation ( void  )

Dynamically creates a new TLK secure service operation object.

This function creates a new te_operation_t object on the heap, and then initializes it.

Returns
A pointer to a TLK secure service operation object that was allocated on the stack and initialized.
void te_deinit_operation ( te_operation_t teOp)

Deinitializes an existing TLK operation object.

Frees internal memory used by an existing TLK operation object.

Parameters
[in]teOpA pointer to a TLK secure service operation object.
void te_init_operation ( te_operation_t te_op)

Initializes a TLK operation object.

This function initializes a TLK operation object using the TLK operation object pointer parameter passed to it. It is normally called to allocate a TLK operation object on the stack.

Parameters
[in,out]te_opA pointer to a TLK operation object.
te_error_t te_launch_operation ( te_session_t session,
te_operation_t te_op 
)

Sends an existing TLK operation object.

Sends the operation object to the TLK service. The operation object must have the command ID or necessary parameter setup.

Parameters
[in]sessionA pointer to an established TLK service session.
[in,out]te_opA te_operation_t object with proper parameters set up and a command ID.
Returns
The TLK secure service results after it services the command.
te_error_t te_open_session ( te_session_t session,
te_service_id_t service,
te_operation_t operation 
)

Opens a session to a TLK secure service.

Creates a session to a specified TLK secure service. This function must be called from the user side or from another TLK service.

Parameters
[out]sessionA pointer to a TLK secure service session to be initialized by this function.
[in]serviceThe UUID/Service ID of the TLK service to which the caller wants to connect.
[in,out]operationA pointer to parameters that are expected by the TLK service.
Returns
OTE_SUCCESS Indicates the operation was successful.
uint32_t te_oper_get_command ( te_operation_t te_op)

Gets a TLK command from an operation object.

Parameters
[in]te_opA pointer to a TLK operation object.
Returns
The current command ID from the given operation object.
uint32_t te_oper_get_num_params ( te_operation_t te_op)

Gets the number of parameters from an operation object.

Parameters
[in]te_opA pointer to a TLK operation object.
Returns
The number of parameters from the given operation object.
te_error_t te_oper_get_param_int ( te_operation_t te_op,
uint32_t  index,
uint32_t *  Int 
)

Gets an integer parameter from a given TLK operation object.

Parameters
[in]te_opA pointer to a TLK operation object.
[in]indexAn index value used to retrieve the parameter.
[out]IntA pointer to an integer value.
Return values
OTE_SUCCESSIndicates the te_op parameter was found and the Int parameter was returned.
OTE_ERROR_ITEM_NOT_FOUNDIndicates the index was not found or the Int parameter was not an integer.
te_error_t te_oper_get_param_mem ( te_operation_t te_op,
uint32_t  index,
void **  base,
uint32_t *  len 
)

Gets a memory buffer parameter from a given TLK operation object.

Parameters
[in]te_opA pointer to a TLK operation object.
[in]indexAn index value used to retrieve the parameter.
[out]baseThe base address of buffer.
[out]lenThe length of memory buffer.
Return values
OTE_SUCCESSIndicates the te_op parameter was found and the index was returned.
OTE_ERROR_ITEM_NOT_FOUNDIndicates the index was not found or the te_op parameter was not a memory buffer.
te_error_t te_oper_get_param_mem_ro ( te_operation_t te_op,
uint32_t  index,
const void **  base,
uint32_t *  len 
)

Get a mem parameter.

Get a read-only memory buffer parameter from given operation

Parameters
[in]te_opA valid te_operation_t pointer
[in]indexA index value used to retrieve the parameter
[out]baseThe base address of buffer
[out]lenThe length of memory buffer
Returns
Returns OTE_SUCCESS if parameter is found and type is returned. Else return OTE_ERROR_ITEM_NOT_FOUND if index is not found, or paramter not memory buffer.
te_error_t te_oper_get_param_mem_rw ( te_operation_t te_op,
uint32_t  index,
void **  base,
uint32_t *  len 
)

Get a mem parameter.

Get a writeable memory buffer parameter from given operation

Parameters
[in]te_opA valid te_operation_t pointer
[in]indexA index value used to retrieve the parameter
[out]baseThe base address of buffer
[out]lenThe length of memory buffer
Returns
Returns OTE_SUCCESS if parameter is found and type is returned. Else return OTE_ERROR_ITEM_NOT_FOUND if index is not found, or paramter not memory buffer.
te_error_t te_oper_get_param_persist_mem_ro ( te_operation_t te_op,
uint32_t  index,
const void **  base,
uint32_t *  len 
)

Get a mem parameter.

Get a read-only memory buffer parameter from given operation that persists until the session is closed

Parameters
[in]te_opA valid te_operation_t pointer
[in]indexA index value used to retrieve the parameter
[out]baseThe base address of buffer
[out]lenThe length of memory buffer
Returns
Returns OTE_SUCCESS if parameter is found and type is returned. Else return OTE_ERROR_ITEM_NOT_FOUND if index is not found, or paramter not memory buffer.
te_error_t te_oper_get_param_persist_mem_rw ( te_operation_t te_op,
uint32_t  index,
void **  base,
uint32_t *  len 
)

Get a mem parameter.

Get a writeable memory buffer parameter from given operation that persists until the session is closed

Parameters
[in]te_opA valid te_operation_t pointer
[in]indexA index value used to retrieve the parameter
[out]baseThe base address of buffer
[out]lenThe length of memory buffer
Returns
Returns OTE_SUCCESS if parameter is found and type is returned. Else return OTE_ERROR_ITEM_NOT_FOUND if index is not found, or paramter not memory buffer.
te_error_t te_oper_get_param_type ( te_operation_t te_op,
uint32_t  index,
te_oper_param_type_t type 
)

Gets the parameter type of a parameter.

Gets the parameter type of a parameter, given its index and operation object.

Parameters
[in]te_opA pointer to a TLK operation object.
[in]indexAn index value used to retrieve the parameter.
[out]typeThe type of parameter.
Return values
OTE_SUCCESSIndicates the te_op parameter was found and the type parameter was returned.
OTE_ERROR_ITEM_NOT_FOUNDIndicates the te_op parameter was not found or the type parameter was not returned.
void te_oper_set_command ( te_operation_t te_op,
uint32_t  command 
)

Sets a command to a TLK secure service operation object.

Sets the command ID to the operation object that will be sent to the TLK secure service.

Parameters
[in]te_opA pointer to a TLK operation object.
[in]commandA command ID that will be sent to the TLK secure service.
void te_oper_set_param_int_ro ( te_operation_t te_op,
uint32_t  index,
uint32_t  Int 
)

Adds a read-only integer parameter to a TLK operation object.

Parameters
[in]te_opA pointer to a TLK operation object.
[in]indexAn index value used to retrieve the parameter.
[in]IntAn integer value.
void te_oper_set_param_int_rw ( te_operation_t te_op,
uint32_t  index,
uint32_t  Int 
)

Adds a read-write integer parameter to a TLK operation object.

Parameters
[in]te_opA pointer to a TLK operation object.
[in]indexAn index value used to retrieve the parameter.
[in]IntAn integer value.
void te_oper_set_param_mem_ro ( te_operation_t te_op,
uint32_t  index,
const void *  base,
uint32_t  len 
)

Adds a read-only buffer parameter to the operation object.

The buffer is the parameter at the given index in the object.

Parameters
[in]te_opA pointer to a TLK operation object.
[in]indexAn index value used to retrieve the parameter.
[in]baseThe base address to the memory buffer.
[in]lenThe length of the memory buffer.
void te_oper_set_param_mem_rw ( te_operation_t te_op,
uint32_t  index,
void *  base,
uint32_t  len 
)

Adds a read-write buffer parameter to the operation object.

The buffer is the parameter at the given index in the object.

Parameters
[in]te_opA pointer to a TLK operation object.
[in]indexAn index value used to retrieve the parameter.
[in]baseThe base address to the memory buffer.
[in]lenThe length of the memory buffer.
void te_oper_set_param_persist_mem_ro ( te_operation_t te_op,
uint32_t  index,
const void *  base,
uint32_t  len 
)

Adds a persistent read-only buffer parameter to the operation object.

The buffer is the parameter at the given index in the object.

Parameters
[in]te_opA pointer to a TLK operation object.
[in]indexAn index value used to retrieve the parameter.
[in]baseThe base address to the memory buffer.
[in]lenThe length of the memory buffer.
void te_oper_set_param_persist_mem_rw ( te_operation_t te_op,
uint32_t  index,
void *  base,
uint32_t  len 
)

Adds a persistent read-write buffer parameter to the operation object.

The buffer is the parameter at the given index in the object.

Parameters
[in]te_opA pointer to a TLK operation object.
[in]indexAn index value used to retrieve the parameter.
[in]baseThe base address to the memory buffer.
[in]lenThe length of the memory buffer.
void te_operation_reset ( te_operation_t te_op)

Resets the data in an operation object.

When you call functions that set values within an operation object (for example te_oper_set_param_mem_rw()), the TLK interface allocates internal memory for those values. If you need to re-use an operation with new values, call te_operation_reset() before setting the new values.

Parameters
[in]te_opA pointer to a TLK operation object.