diff options
author | Trusted Logic <smc_support@trusted-logic.com> | 2012-01-27 14:23:54 -0600 |
---|---|---|
committer | Mike J. Chen <mjchen@google.com> | 2012-10-16 17:53:25 -0700 |
commit | 2359fe0a36452d2f29087fa0284d9fc777fafb37 (patch) | |
tree | 648fab5f2666b3cbb23881db800f8a49db366c46 /security | |
parent | 6367979fd27d4861f58bcc4d792a2d3eeb875c2c (diff) | |
download | omap4-aah-2359fe0a36452d2f29087fa0284d9fc777fafb37.tar.gz |
Security: tee_client_api: Update to 1.06e1
The TEE Client API defines a communications API for connecting
Client Applications running in a rich operating environment with
the Secure Services running inside the Trusted Foundations execution
environment.
The TEE Client API is a static library that must be linked with the
calling application or library.
The TEE Client API is used to implement higher-level APIs, such as
cryptography or secure storage.
(cherry picked from commit ccc83471b660f62b65fbc8f566e8a7e404c64540)
Change-Id: I4f1d40ddf8fb9eec0b62e2982fc0e25db36ce6a0
Signed-off-by: Bryan Buckley <bryan.buckley@ti.com>
Signed-off-by: Yong Zhi <y-zhi@ti.com>
Signed-off-by: Jorge E. Solano <x0062302@ti.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/tee_client_api/Android.mk | 5 | ||||
-rw-r--r-- | security/tee_client_api/s_version.h | 10 | ||||
-rw-r--r-- | security/tee_client_api/schannel6_protocol.h | 20 | ||||
-rw-r--r-- | security/tee_client_api/tee_client_api_linux_driver.c | 10 |
4 files changed, 26 insertions, 19 deletions
diff --git a/security/tee_client_api/Android.mk b/security/tee_client_api/Android.mk index bfd92f4..e7e0909 100644 --- a/security/tee_client_api/Android.mk +++ b/security/tee_client_api/Android.mk @@ -9,13 +9,12 @@ LOCAL_ARM_MODE := arm LOCAL_SRC_FILES:= \ tee_client_api_linux_driver.c -LOCAL_CFLAGS += -DLINUX -LOCAL_CFLAGS += -D__ANDROID32__ - ifdef S_VERSION_BUILD LOCAL_CFLAGS += -DS_VERSION_BUILD=$(S_VERSION_BUILD) endif +LOCAL_CFLAGS += -DLINUX +LOCAL_LDFLAGS += -llog LOCAL_CFLAGS += -I $(LOCAL_PATH)/../tf_sdk/include/ LOCAL_MODULE:= libtee_client_api_driver diff --git a/security/tee_client_api/s_version.h b/security/tee_client_api/s_version.h index d112ea0..dd43c6a 100644 --- a/security/tee_client_api/s_version.h +++ b/security/tee_client_api/s_version.h @@ -58,15 +58,15 @@ /* * This version number must be updated for each new release */ -#define S_VERSION_MAIN "01.04" -#define S_VERSION_RESOURCE 1,4,0,S_VERSION_BUILD +#define S_VERSION_MAIN "01.06" +#define S_VERSION_RESOURCE 1,6,0,S_VERSION_BUILD /* * If this is a patch or engineering version use the following * defines to set the version number. Else set these values to 0. */ -#define S_VERSION_PATCH 11 -#define S_VERSION_ENG 0 +#define S_VERSION_ENG 1 +#define S_VERSION_PATCH 0 #ifdef S_VERSION_BUILD /* TRICK: detect if S_VERSION is defined but empty */ @@ -105,8 +105,8 @@ S_VERSION_OS \ S_VERSION_PLATFORM \ S_VERSION_MAIN \ - _S_VERSION_PATCH \ _S_VERSION_ENG \ + _S_VERSION_PATCH \ "." __STRINGIFY2(S_VERSION_BUILD) " " \ S_VERSION_VARIANT diff --git a/security/tee_client_api/schannel6_protocol.h b/security/tee_client_api/schannel6_protocol.h index 66ed12c..81769be 100644 --- a/security/tee_client_api/schannel6_protocol.h +++ b/security/tee_client_api/schannel6_protocol.h @@ -34,15 +34,6 @@ #include "s_type.h" /** - * This header file defines some structures needed for the secure channel - * protocol. See your Product Reference Manual for a specification of the - * SChannel protocol. - */ -// jroux to do : remove -#undef SMC_PROTOCOL_VERSION -#define SMC_PROTOCOL_VERSION 0x06000000 - -/** * Time representation. */ typedef uint64_t SCTIME; @@ -106,6 +97,15 @@ typedef uint64_t SCTIME; */ #include "schannel6_logins.h" +/* + * Limits and sizes + */ + +/* Maximum number of L1 descriptors covered by a registered shared memory block. + Must be kept in synch with TF_MAX_COARSE_PAGES in tf_protocol.h + in the Linux kernel driver. */ +#define SCHANNEL6_MAX_DESCRIPTORS_PER_REGISTERED_SHARED_MEM 128 + /** * Command parameters. */ @@ -217,7 +217,7 @@ typedef struct uint32_t nBlockID; uint32_t nSharedMemSize; uint32_t nSharedMemStartOffset; - uint32_t nSharedMemDescriptors[8]; + uint32_t nSharedMemDescriptors[SCHANNEL6_MAX_DESCRIPTORS_PER_REGISTERED_SHARED_MEM]; }SCHANNEL6_REGISTER_SHARED_MEMORY_COMMAND; diff --git a/security/tee_client_api/tee_client_api_linux_driver.c b/security/tee_client_api/tee_client_api_linux_driver.c index 08a8210..584eea2 100644 --- a/security/tee_client_api/tee_client_api_linux_driver.c +++ b/security/tee_client_api/tee_client_api_linux_driver.c @@ -96,6 +96,13 @@ typedef struct #define TRACE_WARNING(...) #define TRACE_INFO(...) #else +#if defined ANDROID +#define LOG_TAG "TEE" +#include <android/log.h> +#define TRACE_INFO(format, ...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, format, __VA_ARGS__) +#define TRACE_ERROR(format, ...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, format, __VA_ARGS__) +#define TRACE_WARNING(format, ...) __android_log_print(TRACE_WARNING, LOG_TAG, format, __VA_ARGS__) +#else static void TRACE_ERROR(const char* format, ...) { va_list ap; @@ -125,6 +132,7 @@ static void TRACE_INFO(const char* format, ...) fprintf(stderr, "\n"); va_end(ap); } +#endif /* ANDROID */ #endif /* NDEBUG */ @@ -784,7 +792,7 @@ TEEC_Result TEEC_OpenSessionEx ( if (connectionData != NULL) { *(uint32_t*)sCommand.sOpenClientSession.sLoginData = *(uint32_t*)connectionData; - sCommand.sHeader.nMessageSize += sizeof(uint32_t); + sCommand.sHeader.nMessageSize += 1; } } sCommand.sOpenClientSession.nCancellationID = (uint32_t)operation; // used for TEEC_RequestCancellation |