Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libteec: Move OP-TEE defined fields into an imp struct #349

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libteec/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project(libteec
VERSION 1.0.0
VERSION 2.0.0
LANGUAGES C)

################################################################################
Expand Down
2 changes: 1 addition & 1 deletion libteec/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ all: libteec
################################################################################
# Teec configuration
################################################################################
MAJOR_VERSION := 1
MAJOR_VERSION := 2
MINOR_VERSION := 0
PATCH_VERSION := 0
LIB_NAME := libteec.so
Expand Down
41 changes: 24 additions & 17 deletions libteec/include/tee_client_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,11 @@ typedef uint32_t TEEC_Result;
*/
typedef struct {
/* Implementation defined */
int fd;
bool reg_mem;
bool memref_null;
struct {
int fd;
bool reg_mem;
bool memref_null;
} imp;
} TEEC_Context;

/**
Expand Down Expand Up @@ -293,16 +295,15 @@ typedef struct {
size_t size;
uint32_t flags;
/*
* Implementation-Defined
* Implementation defined
*/
int id;
size_t alloced_size;
void *shadow_buffer;
int registered_fd;
union {
bool dummy;
uint8_t flags;
} internal;
struct {
int id;
size_t alloced_size;
void *shadow_buffer;
int registered_fd;
uint32_t flags;
} imp;
} TEEC_SharedMemory;

/**
Expand Down Expand Up @@ -384,8 +385,10 @@ typedef union {
*/
typedef struct {
/* Implementation defined */
TEEC_Context *ctx;
uint32_t session_id;
struct {
TEEC_Context *ctx;
uint32_t session_id;
} imp;
} TEEC_Session;

/**
Expand All @@ -398,16 +401,20 @@ typedef struct {
* create the correct flags.
* 0 means TEEC_NONE is passed for all params.
* @param params Array of parameters of type TEEC_Parameter.
* @param session Internal pointer to the last session used by
* @param imp Implementation defined parameter. Here it is a struct
* containing one parameter: session. session is an
* internal pointer to the last session used by
* TEEC_InvokeCommand with this operation.
*
*/
typedef struct {
uint32_t started;
uint32_t paramTypes;
TEEC_Parameter params[TEEC_CONFIG_PAYLOAD_REF_COUNT];
/* Implementation-Defined */
TEEC_Session *session;
/* Implementation defined */
struct {
TEEC_Session *session;
} imp;
} TEEC_Operation;

/**
Expand Down
Loading
Loading