NVIDIA DRIVE OS Linux API Reference

5.1.0.2 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ote_command.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013-2017, NVIDIA CORPORATION. All rights reserved
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining
5  * a copy of this software and associated documentation files
6  * (the "Software"), to deal in the Software without restriction,
7  * including without limitation the rights to use, copy, modify, merge,
8  * publish, distribute, sublicense, and/or sell copies of the Software,
9  * and to permit persons to whom the Software is furnished to do so,
10  * subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be
13  * included in all copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 */
23 
40 #ifndef __OTE_COMMAND_H
41 #define __OTE_COMMAND_H
42 
43 #include <stdint.h>
44 #include <common/ote_common.h>
45 #include <common/ote_error.h>
46 
63 
68 void te_close_session(te_session_t *session);
69 
79 
89 
97 
110 
119 void te_oper_set_command(te_operation_t *te_op, uint32_t command);
120 
127 void te_oper_set_param_int_ro(te_operation_t *te_op, uint32_t index,
128  uint32_t Int);
129 
136 void te_oper_set_param_int_rw(te_operation_t *te_op, uint32_t index,
137  uint32_t Int);
138 
147 void te_oper_set_param_mem_ro(te_operation_t *te_op, uint32_t index,
148  const void *base, uint32_t len);
149 
158 void te_oper_set_param_mem_rw(te_operation_t *te_op, uint32_t index,
159  void *base, uint32_t len);
160 
169 void te_oper_set_param_persist_mem_ro(te_operation_t *te_op, uint32_t index,
170  const void *base, uint32_t len);
171 
180 void te_oper_set_param_persist_mem_rw(te_operation_t *te_op, uint32_t index,
181  void *base, uint32_t len);
182 
189 uint32_t te_oper_get_command(te_operation_t *te_op);
190 
197 uint32_t te_oper_get_num_params(te_operation_t *te_op);
198 
212 te_error_t te_oper_get_param_type(te_operation_t *te_op, uint32_t index,
213  te_oper_param_type_t *type);
214 
227 te_error_t te_oper_get_param_int(te_operation_t *te_op, uint32_t index,
228  uint32_t *Int);
229 
242 te_error_t te_oper_get_param_mem(te_operation_t *te_op, uint32_t index,
243  void **base, uint32_t *len);
244 
257 te_error_t te_oper_get_param_mem_ro(te_operation_t *te_op, uint32_t index,
258  const void **base, uint32_t *len);
259 
272 te_error_t te_oper_get_param_mem_rw(te_operation_t *te_op, uint32_t index,
273  void **base, uint32_t *len);
274 
289  uint32_t index, const void **base, uint32_t *len);
290 
305  uint32_t index, void **base, uint32_t *len);
306 
318 
321 #endif
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.
te_operation_t operation
Definition: ote_client.h:115
te_error_t te_launch_operation(te_session_t *session, te_operation_t *te_op)
Sends an existing TLK operation object.
Holds operation object information that is to be delivered to the TLK Secure Service.
Definition: ote_common.h:178
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.
void te_close_session(te_session_t *session)
Closes an existing open session to a TLK secure service.
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.
uint32_t te_oper_get_command(te_operation_t *te_op)
Gets a TLK command from an operation object.
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.
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.
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.
NVIDIA Trusted Little Kernel Interface: Common Declarations
te_oper_param_type_t
Specifies the operation object's parameter types.
Definition: ote_common.h:123
NVIDIA Trusted Little Kernel Interface: Error Handling
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.
void te_deinit_operation(te_operation_t *teOp)
Deinitializes an existing TLK operation object.
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.
Defines a unique 16-byte ID for each TLK service.
Definition: ote_common.h:102
Holds session information.
Definition: ote_common.h:140
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.
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.
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.
void te_oper_set_command(te_operation_t *te_op, uint32_t command)
Sets a command to a TLK secure service operation object.
te_error_t
Defines Open Trusted Environment (OTE) error codes.
Definition: ote_error.h:45
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.
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.
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.
void te_operation_reset(te_operation_t *te_op)
Resets the data in an operation object.
void te_init_operation(te_operation_t *te_op)
Initializes a TLK operation object.
te_operation_t * te_create_operation(void)
Dynamically creates a new TLK secure service operation object.
uint32_t te_oper_get_num_params(te_operation_t *te_op)
Gets the number of parameters from an operation object.