/* * Header files for basic KREE functions. */ #ifndef __KREE_H__ #define __KREE_H__ #if defined(CONFIG_MTK_IN_HOUSE_TEE_SUPPORT) || defined(CONFIG_TRUSTY) #include "trustzone/tz_cross/trustzone.h" /* / KREE session handle type. */ typedef uint32_t KREE_SESSION_HANDLE; typedef uint32_t KREE_SHAREDMEM_HANDLE; /* Session Management */ /** * Create a new TEE sesssion * * @param ta_uuid UUID of the TA to connect to. * @param pHandle Handle for the new session. Return KREE_SESSION_HANDLE_FAIL if fail. * @return return code */ TZ_RESULT KREE_CreateSession(const char *ta_uuid, KREE_SESSION_HANDLE *pHandle); /** * Close TEE session * * @param handle Handle for session to close. * @return return code */ TZ_RESULT KREE_CloseSession(KREE_SESSION_HANDLE handle); /** * Make a TEE service call * * @param handle Session handle to make the call * @param command The command to call. * @param paramTypes Types for the parameters, use TZ_ParamTypes() to consturct. * @param param The parameters to pass to TEE. Maximum 4 params. * @return Return value from TEE service. */ TZ_RESULT KREE_TeeServiceCall(KREE_SESSION_HANDLE handle, uint32_t command, uint32_t paramTypes, MTEEC_PARAM param[4]); #endif /* CONFIG_MTK_IN_HOUSE_TEE_SUPPORT || CONFIG_TRUSTY */ #endif /* __KREE_H__ */