2 * Header files for basic KREE functions.
8 #ifdef CONFIG_MTK_IN_HOUSE_TEE_SUPPORT
10 #include "trustzone/tz_cross/trustzone.h"
12 /// KREE session handle type.
13 typedef void* KREE_SESSION_HANDLE
;
15 typedef uint32_t KREE_SHAREDMEM_HANDLE
;
18 /* Session Management */
20 * Create a new TEE sesssion
22 * @param ta_uuid UUID of the TA to connect to.
23 * @param pHandle Handle for the new session. Return KREE_SESSION_HANDLE_FAIL if fail.
26 TZ_RESULT
KREE_CreateSession(const char *ta_uuid
, KREE_SESSION_HANDLE
*pHandle
);
31 * @param handle Handle for session to close.
34 TZ_RESULT
KREE_CloseSession(KREE_SESSION_HANDLE handle
);
38 * Make a TEE service call
40 * @param handle Session handle to make the call
41 * @param command The command to call.
42 * @param paramTypes Types for the parameters, use TZ_ParamTypes() to consturct.
43 * @param param The parameters to pass to TEE. Maximum 4 params.
44 * @return Return value from TEE service.
46 TZ_RESULT
KREE_TeeServiceCall(KREE_SESSION_HANDLE handle
, uint32_t command
,
47 uint32_t paramTypes
, MTEEC_PARAM param
[4]);
49 #endif /* CONFIG_MTK_IN_HOUSE_TEE_SUPPORT */
50 #endif /* __KREE_H__ */