summaryrefslogtreecommitdiff
path: root/lib/libutee/tee_api_private.h
blob: 91518878c4c6eb682d1ff6a75194141346eaa452 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/* SPDX-License-Identifier: BSD-2-Clause */
/*
 * Copyright (c) 2015-2020, Linaro Limited
 */
#ifndef TEE_API_PRIVATE
#define TEE_API_PRIVATE

#include <tee_api_types.h>
#include <utee_types.h>


void __utee_from_attr(struct utee_attribute *ua, const TEE_Attribute *attrs,
			uint32_t attr_count);

TEE_Result __utee_entry(unsigned long func, unsigned long session_id,
			struct utee_params *up, unsigned long cmd_id);


#if defined(CFG_TA_GPROF_SUPPORT)
void __utee_gprof_init(void);
void __utee_gprof_fini(void);
#else
static inline void __utee_gprof_init(void) {}
static inline void __utee_gprof_fini(void) {}
#endif

/*
 * The functions help checking that the pointers comply with the parameters
 * annotation as described in the spec. Any descrepency results in a panic
 * of the TA.
 */
void __utee_check_out_annotation(void *buf, const size_t len);
void __utee_check_inout_annotation(void *buf, const size_t len);
void __utee_check_attr_in_annotation(const TEE_Attribute *attr, size_t count);
void __utee_check_outbuf_annotation(void *buf, uint32_t *len);
void __utee_check_instring_annotation(const char *buf);
void __utee_check_outstring_annotation(char *buf, uint32_t *len);

#endif /*TEE_API_PRIVATE*/