From ec219598580570ffaec6472e3b0394ac4c5abfa8 Mon Sep 17 00:00:00 2001 From: Pascal Brand Date: Wed, 13 Aug 2014 10:47:41 +0200 Subject: Remove core dependencies from generic part This concerns: - Communication Non-Secure <--> Secure - sys/types.h contains some types not defined on all compilers Signed-off-by: Pascal Brand --- core/tee/tee_time_generic.c | 64 +-------------------------------------------- 1 file changed, 1 insertion(+), 63 deletions(-) (limited to 'core/tee/tee_time_generic.c') diff --git a/core/tee/tee_time_generic.c b/core/tee/tee_time_generic.c index 4e1d4110..608858cb 100644 --- a/core/tee/tee_time_generic.c +++ b/core/tee/tee_time_generic.c @@ -24,74 +24,12 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ -#include #include #include -#include #include #include -#include -#include -#include - -/* - * tee_time_get_ree_time(): this function implements the GP Internal API - * function TEE_GetREETime() - * Goal is to get the time of the Rich Execution Environment - * This is why this time is provided through the supplicant - */ -TEE_Result tee_time_get_ree_time(TEE_Time *time) -{ - TEE_Result res = TEE_ERROR_BAD_PARAMETERS; - struct teesmc32_arg *arg; - struct teesmc32_param *params; - paddr_t pharg = 0; - paddr_t phpayload = 0; - paddr_t cookie = 0; - TEE_Time *payload; - - if (!time) - goto exit; - - pharg = thread_rpc_alloc_arg(TEESMC32_GET_ARG_SIZE(1)); - if (!pharg) - goto exit; - thread_st_rpc_alloc_payload(sizeof(TEE_Time), &phpayload, &cookie); - if (!phpayload) - goto exit; - - if (!TEE_ALIGNMENT_IS_OK(pharg, struct teesmc32_arg) || - !TEE_ALIGNMENT_IS_OK(phpayload, TEE_Time)) - goto exit; - - if (core_pa2va(pharg, (uint32_t *)&arg) || - core_pa2va(phpayload, (uint32_t *)&payload)) - goto exit; - - arg->cmd = TEE_RPC_GET_TIME; - arg->ret = TEE_ERROR_GENERIC; - arg->num_params = 1; - params = TEESMC32_GET_PARAMS(arg); - params[0].attr = TEESMC_ATTR_TYPE_MEMREF_OUTPUT | - (TEESMC_ATTR_CACHE_I_WRITE_THR | - TEESMC_ATTR_CACHE_O_WRITE_THR) << - TEESMC_ATTR_CACHE_SHIFT; - params[0].u.memref.buf_ptr = phpayload; - params[0].u.memref.size = sizeof(TEE_Time); - - thread_rpc_cmd(pharg); - res = arg->ret; - if (res != TEE_SUCCESS) - goto exit; - - *time = *payload; - -exit: - thread_rpc_free_arg(pharg); - thread_st_rpc_free_payload(cookie); - return res; -} +#include struct tee_ta_time_offs { TEE_UUID uuid; -- cgit v1.2.3