40 #ifndef __OTE_COMMON_H
41 #define __OTE_COMMON_H
58 #define SERVICE_PORT_NAME_PREFIX "com.nvidia.tos"
61 #define UUID_STR_SIZE_BYTES ((2U * sizeof(te_service_id_t)) + 4U)
64 #define MAX_PORT_NAME_LENGTH sizeof(SERVICE_PORT_NAME_PREFIX) + UUID_STR_SIZE_BYTES
68 #define OTE_TASK_NAME_MAX_LENGTH 24
82 #define OTE_TASK_PRIVATE_DATA_LENGTH 20
89 #define TIPC_MAX_CHUNK_SIZE 4040
95 #define TIPC_CHUNK_MSG_ACK 0xcafefeedU
97 #define WORD_SIZE sizeof(uint32_t)
98 #define ROUNDUP(a, b) (((a) + ((b)-1)) & ~((b)-1))
99 #define ROUNDDOWN(a, b) ((a) & ~((b)-1))
106 uint8_t clock_seq_and_node[8];
109 #if !defined(CONFIG_TRUSTY)
224 int te_fprintf(
int fd,
const char *fmt, ...) __PRINTFLIKE(2,3);
225 int te_vfprintf(
int lvl, const
char* fmt, va_list ap);
289 void* base, uint32_t size);
Holds operation object information that is to be delivered to the TLK Secure Service.
bool te_validate_range(void *range_base, uint32_t range_size, void *base, uint32_t size)
Implements a range checker which is free from integer overflow.
int te_fprintf(int fd, const char *fmt,...) __PRINTFLIKE(2
For secure tasks: Redirects prints to Trusted Little Kernel (TLK) writes.
cmnptr_t list_head
Holds pointers to the head/tail of the list of param_t nodes.
te_oper_param_type_t type
te_oper_param_type_t
Specifies the operation object's parameter types.
NVIDIA Trusted Little Kernel Interface: Error Handling
te_error_t tipc_error_to_ote_error(int err_num)
Translates TIPC Error Code to an OTE Error Code.
int int te_vfprintf(int lvl, const char *fmt, va_list ap)
Holds Unique Task identifiers, including uuid and port name.
Defines a unique 16-byte ID for each TLK service.
Holds session information.
uint64_t cmnptr_t
Holds a pointer large enough to support 32- and 64-bit clients.
te_result_origin_t
Defines the origin of an error.
te_error_t te_uuid_to_string(char *ustr, uint32_t ulen, const te_service_id_t *uuid)
Converts UUID to a string format.
te_result_origin_t result_origin
#define MAX_PORT_NAME_LENGTH
uint16_t time_hi_and_version
te_error_t get_port_name_by_uuid(char *path, uint32_t max_len, te_service_id_t *service)
Returns the port name of a secure task.
te_error_t
Defines Open Trusted Environment (OTE) error codes.
te_result_origin_t te_get_result_origin(te_session_t *session)
Returns the origin of a returned result.
const char * te_strerror(te_error_t errcode)
Converts an error code to appropriate string description.
Holds the operation object parameters.