NVIDIA DRIVE OS Linux API Reference5.1.0.2 Release |
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_t * | te_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... | |
void te_close_session | ( | te_session_t * | session | ) |
Closes an existing open session to a TLK secure service.
[in] | session | A 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.
void te_deinit_operation | ( | te_operation_t * | teOp | ) |
Deinitializes an existing TLK operation object.
Frees internal memory used by an existing TLK operation object.
[in] | teOp | A 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.
[in,out] | te_op | A 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.
[in] | session | A pointer to an established TLK service session. |
[in,out] | te_op | A te_operation_t object with proper parameters set up and a command ID. |
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.
[out] | session | A pointer to a TLK secure service session to be initialized by this function. |
[in] | service | The UUID/Service ID of the TLK service to which the caller wants to connect. |
[in,out] | operation | A pointer to parameters that are expected by the TLK service. |
uint32_t te_oper_get_command | ( | te_operation_t * | te_op | ) |
Gets a TLK command from an operation object.
[in] | te_op | A pointer to a TLK operation object. |
uint32_t te_oper_get_num_params | ( | te_operation_t * | te_op | ) |
Gets the number of parameters from an operation object.
[in] | te_op | A pointer to a TLK 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.
[in] | te_op | A pointer to a TLK operation object. |
[in] | index | An index value used to retrieve the parameter. |
[out] | Int | A pointer to an integer value. |
OTE_SUCCESS | Indicates the te_op parameter was found and the Int parameter was returned. |
OTE_ERROR_ITEM_NOT_FOUND | Indicates 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.
[in] | te_op | A pointer to a TLK operation object. |
[in] | index | An index value used to retrieve the parameter. |
[out] | base | The base address of buffer. |
[out] | len | The length of memory buffer. |
OTE_SUCCESS | Indicates the te_op parameter was found and the index was returned. |
OTE_ERROR_ITEM_NOT_FOUND | Indicates 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
[in] | te_op | A valid te_operation_t pointer |
[in] | index | A index value used to retrieve the parameter |
[out] | base | The base address of buffer |
[out] | len | The length of 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
[in] | te_op | A valid te_operation_t pointer |
[in] | index | A index value used to retrieve the parameter |
[out] | base | The base address of buffer |
[out] | len | The length of 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
[in] | te_op | A valid te_operation_t pointer |
[in] | index | A index value used to retrieve the parameter |
[out] | base | The base address of buffer |
[out] | len | The length of 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
[in] | te_op | A valid te_operation_t pointer |
[in] | index | A index value used to retrieve the parameter |
[out] | base | The base address of buffer |
[out] | len | The length of 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.
[in] | te_op | A pointer to a TLK operation object. |
[in] | index | An index value used to retrieve the parameter. |
[out] | type | The type of parameter. |
OTE_SUCCESS | Indicates the te_op parameter was found and the type parameter was returned. |
OTE_ERROR_ITEM_NOT_FOUND | Indicates 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.
[in] | te_op | A pointer to a TLK operation object. |
[in] | command | A 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.
[in] | te_op | A pointer to a TLK operation object. |
[in] | index | An index value used to retrieve the parameter. |
[in] | Int | An 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.
[in] | te_op | A pointer to a TLK operation object. |
[in] | index | An index value used to retrieve the parameter. |
[in] | Int | An 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.
[in] | te_op | A pointer to a TLK operation object. |
[in] | index | An index value used to retrieve the parameter. |
[in] | base | The base address to the memory buffer. |
[in] | len | The 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.
[in] | te_op | A pointer to a TLK operation object. |
[in] | index | An index value used to retrieve the parameter. |
[in] | base | The base address to the memory buffer. |
[in] | len | The 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.
[in] | te_op | A pointer to a TLK operation object. |
[in] | index | An index value used to retrieve the parameter. |
[in] | base | The base address to the memory buffer. |
[in] | len | The 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.
[in] | te_op | A pointer to a TLK operation object. |
[in] | index | An index value used to retrieve the parameter. |
[in] | base | The base address to the memory buffer. |
[in] | len | The 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.
[in] | te_op | A pointer to a TLK operation object. |