1 // SPDX-License-Identifier: BSD-2-Clause
2 /*
3 * Copyright (c) 2015, Linaro Limited
4 * All rights reserved.
5 */
6
7 #include <tee_ta_api.h>
8
9 #include <storage_benchmark.h>
10 #include <ta_storage_benchmark.h>
11
12 /*
13 * Trusted Application Entry Points
14 */
15
16 /* Called each time a new instance is created */
TA_CreateEntryPoint(void)17 TEE_Result TA_CreateEntryPoint(void)
18 {
19 return TEE_SUCCESS;
20 }
21
22 /* Called each time an instance is destroyed */
TA_DestroyEntryPoint(void)23 void TA_DestroyEntryPoint(void)
24 {
25 }
26
27 /* Called each time a session is opened */
TA_OpenSessionEntryPoint(uint32_t nParamTypes,TEE_Param pParams[4],void ** ppSessionContext)28 TEE_Result TA_OpenSessionEntryPoint(uint32_t nParamTypes,
29 TEE_Param pParams[4],
30 void **ppSessionContext)
31 {
32 (void)nParamTypes;
33 (void)pParams;
34 (void)ppSessionContext;
35 return TEE_SUCCESS;
36 }
37
38 /* Called each time a session is closed */
TA_CloseSessionEntryPoint(void * pSessionContext)39 void TA_CloseSessionEntryPoint(void *pSessionContext)
40 {
41 (void)pSessionContext;
42 }
43
44 /* Called when a command is invoked */
TA_InvokeCommandEntryPoint(void * pSessionContext,uint32_t nCommandID,uint32_t nParamTypes,TEE_Param pParams[4])45 TEE_Result TA_InvokeCommandEntryPoint(void *pSessionContext,
46 uint32_t nCommandID, uint32_t nParamTypes,
47 TEE_Param pParams[4])
48 {
49 (void)pSessionContext;
50
51 return ta_storage_benchmark_cmd_handler(nCommandID, nParamTypes, pParams);
52 }
53