11bb92983SJerome Forissier /* SPDX-License-Identifier: BSD-2-Clause */ 2e86f1266SJens Wiklander /* 36915bbbbSJens Wiklander * Copyright (c) 2015-2020, Linaro Limited 4e86f1266SJens Wiklander */ 5e86f1266SJens Wiklander #ifndef TEE_API_PRIVATE 6e86f1266SJens Wiklander #define TEE_API_PRIVATE 7e86f1266SJens Wiklander 8e86f1266SJens Wiklander #include <tee_api_types.h> 9e86f1266SJens Wiklander #include <utee_types.h> 10e86f1266SJens Wiklander 11e86f1266SJens Wiklander 12e86f1266SJens Wiklander void __utee_from_attr(struct utee_attribute *ua, const TEE_Attribute *attrs, 13e86f1266SJens Wiklander uint32_t attr_count); 14*4f4374c8SJens Wiklander void __utee_from_gp11_attr(struct utee_attribute *ua, 15*4f4374c8SJens Wiklander const __GP11_TEE_Attribute *attrs, 16*4f4374c8SJens Wiklander uint32_t attr_count); 17e86f1266SJens Wiklander 18fde3a7f2SSumit Garg TEE_Result __utee_entry(unsigned long func, unsigned long session_id, 192f04385cSJens Wiklander struct utee_params *up, unsigned long cmd_id); 20e86f1266SJens Wiklander 21e86f1266SJens Wiklander 22883c4be3SJerome Forissier #if defined(CFG_TA_GPROF_SUPPORT) 23883c4be3SJerome Forissier void __utee_gprof_init(void); 24883c4be3SJerome Forissier void __utee_gprof_fini(void); 25883c4be3SJerome Forissier #else 26883c4be3SJerome Forissier static inline void __utee_gprof_init(void) {} 27883c4be3SJerome Forissier static inline void __utee_gprof_fini(void) {} 28883c4be3SJerome Forissier #endif 29883c4be3SJerome Forissier 306915bbbbSJens Wiklander /* 316915bbbbSJens Wiklander * The functions help checking that the pointers comply with the parameters 326915bbbbSJens Wiklander * annotation as described in the spec. Any descrepency results in a panic 336915bbbbSJens Wiklander * of the TA. 346915bbbbSJens Wiklander */ 356915bbbbSJens Wiklander void __utee_check_out_annotation(void *buf, const size_t len); 366915bbbbSJens Wiklander void __utee_check_inout_annotation(void *buf, const size_t len); 376915bbbbSJens Wiklander void __utee_check_attr_in_annotation(const TEE_Attribute *attr, size_t count); 38*4f4374c8SJens Wiklander void __utee_check_gp11_attr_in_annotation(const __GP11_TEE_Attribute *attr, 39*4f4374c8SJens Wiklander size_t count); 406915bbbbSJens Wiklander void __utee_check_outbuf_annotation(void *buf, uint32_t *len); 416915bbbbSJens Wiklander void __utee_check_instring_annotation(const char *buf); 426915bbbbSJens Wiklander void __utee_check_outstring_annotation(char *buf, uint32_t *len); 43e86f1266SJens Wiklander 446915bbbbSJens Wiklander #endif /*TEE_API_PRIVATE*/ 45