NVIDIA DRIVE OS Linux API Reference

5.1.3.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ote_service_utils.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016-2017 NVIDIA CORPORATION. All rights reserved.
3  *
4  * NVIDIA Corporation and its licensors retain all intellectual property
5  * and proprietary rights in and to this software and related documentation
6  * and any modifications thereto. Any use, reproduction, disclosure or
7  * distribution of this software and related documentation without an express
8  * license agreement from NVIDIA Corporation is strictly prohibited.
9  */
10 #ifndef __OTE_SERVICE_UTILS_H
11 #define __OTE_SERVICE_UTILS_H
12 
13 #include <stddef.h>
14 #include <stdio.h>
15 #include <stdlib.h>
16 #include <string.h>
17 #include <err.h>
18 #include <assert.h>
19 #include <trusty_std.h>
20 #include <errno.h>
21 
22 #include <common/ote_command.h>
23 #include <common/ote_common.h>
24 #include <common/serialization/context.h>
25 
26 /*
27  * With the current architecture, maximum 2 buffers can be exchanged over a
28  * channel at a time. One buffer for OTE header(te_operation_container_t)
29  * and other for actual data.
30  */
31 #define MAX_NUM_RECV_BUFFERS 2
32 
33 /* Need to change if we are passing buffers with size more than one page */
34 #define MAX_RECV_BUFFER_SIZE 4096
35 
36 typedef void (*event_handler_t) (const uevent_t *ev);
37 typedef struct {
39  void* ctx;
41 
42 typedef struct {
43  uint32_t handle;
44  uint32_t num_sessions;
47 } port_state_t;
48 
49 typedef struct {
50  uint32_t handle;
51  void *ctx; /*private context of TA*/
56 } chan_state_t;
57 
70 int tipc_recv_op(int chan_handle, te_operation_t* operation, serialized_context_t *sc, bool ns_client);
71 
82 int tipc_send_op(int chan_handle, te_operation_t* operation, serialized_context_t *sc);
83 
84 #endif
Holds operation object information that is to be delivered to the TLK Secure Service.
Definition: ote_common.h:178
NVIDIA Trusted Little Kernel Interface: Common Commands
int tipc_recv_op(int chan_handle, te_operation_t *operation, serialized_context_t *sc, bool ns_client)
Receives the te_operation object from client.
NVIDIA Trusted Little Kernel Interface: Common Declarations
int tipc_send_op(int chan_handle, te_operation_t *operation, serialized_context_t *sc)
Send the te_operation object to client.
port_state_t * port_state
Defines a unique 16-byte ID for each TLK service.
Definition: ote_common.h:102
event_cookie_t * cookie
uint32_t num_sessions
void(* event_handler_t)(const uevent_t *ev)
#define MAX_PORT_NAME_LENGTH
Definition: ote_common.h:64
te_service_id_t peer_uuid
event_cookie_t * cookie