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
15 TEE_Result __utee_entry(unsigned long func, unsigned long session_id,
16 struct utee_params *up, unsigned long cmd_id);
17
18
19 #if defined(CFG_TA_GPROF_SUPPORT)
20 void __utee_gprof_init(void);
21 void __utee_gprof_fini(void);
22 #else
__utee_gprof_init(void)23 static inline void __utee_gprof_init(void) {}
__utee_gprof_fini(void)24 static inline void __utee_gprof_fini(void) {}
25 #endif
26
27 /*
28 * The functions help checking that the pointers comply with the parameters
29 * annotation as described in the spec. Any descrepency results in a panic
30 * of the TA.
31 */
32 void __utee_check_out_annotation(void *buf, const size_t len);
33 void __utee_check_inout_annotation(void *buf, const size_t len);
34 void __utee_check_attr_in_annotation(const TEE_Attribute *attr, size_t count);
35 void __utee_check_outbuf_annotation(void *buf, uint32_t *len);
36 void __utee_check_instring_annotation(const char *buf);
37 void __utee_check_outstring_annotation(char *buf, uint32_t *len);
38
39 #endif /*TEE_API_PRIVATE*/
40