1 /* SPDX-License-Identifier: BSD-2-Clause */ 2 /* 3 * Copyright (c) 2015-2020, Linaro Limited 4 */ 5 #ifndef TEE_API_PRIVATE 6 #define TEE_API_PRIVATE 7 8 #include <tee_api_types.h> 9 #include <utee_types.h> 10 11 12 void __utee_from_attr(struct utee_attribute *ua, const TEE_Attribute *attrs, 13 uint32_t attr_count); 14 void __utee_from_gp11_attr(struct utee_attribute *ua, 15 const __GP11_TEE_Attribute *attrs, 16 uint32_t attr_count); 17 18 TEE_Result __utee_entry(unsigned long func, unsigned long session_id, 19 struct utee_params *up, unsigned long cmd_id); 20 21 22 #if defined(CFG_TA_GPROF_SUPPORT) 23 void __utee_gprof_init(void); 24 void __utee_gprof_fini(void); 25 #else 26 static inline void __utee_gprof_init(void) {} 27 static inline void __utee_gprof_fini(void) {} 28 #endif 29 30 /* 31 * The functions help checking that the pointers comply with the parameters 32 * annotation as described in the spec. Any descrepency results in a panic 33 * of the TA. 34 */ 35 void __utee_check_out_annotation(void *buf, const size_t len); 36 void __utee_check_inout_annotation(void *buf, const size_t len); 37 void __utee_check_attr_in_annotation(const TEE_Attribute *attr, size_t count); 38 void __utee_check_gp11_attr_in_annotation(const __GP11_TEE_Attribute *attr, 39 size_t count); 40 void __utee_check_outbuf_annotation(void *buf, size_t *len); 41 void __utee_check_gp11_outbuf_annotation(void *buf, uint32_t *len); 42 void __utee_check_instring_annotation(const char *buf); 43 void __utee_check_outstring_annotation(char *buf, size_t *len); 44 void __utee_check_gp11_outstring_annotation(char *buf, uint32_t *len); 45 46 #endif /*TEE_API_PRIVATE*/ 47