1 /* SPDX-License-Identifier: BSD-2-Clause */
2 /*
3  * Texas Instruments K3 Secure Proxy Driver
4  *
5  * Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/
6  *	Manorit Chawdhry <m-chawdhry@ti.com>
7  */
8 
9 #ifndef SEC_PROXY_H
10 #define SEC_PROXY_H
11 
12 #include <stddef.h>
13 #include <stdint.h>
14 #include <tee_api_types.h>
15 
16 #define SEC_PROXY_MAX_MSG_SIZE 60
17 
18 /**
19  * struct k3_sec_proxy_msg - Secure proxy message structure
20  * @len: Length of data in the Buffer
21  * @buf: Buffer pointer
22  *
23  * This is the structure for data used in k3_sec_proxy_{send,recv}()
24  */
25 struct k3_sec_proxy_msg {
26 	size_t len;
27 	uint8_t *buf;
28 };
29 
30 /**
31  * k3_sec_proxy_send() - Send data over a Secure Proxy thread
32  * @msg: Pointer to k3_sec_proxy_msg
33  */
34 TEE_Result k3_sec_proxy_send(const struct k3_sec_proxy_msg *msg);
35 
36 /**
37  * k3_sec_proxy_recv() - Receive data from a Secure Proxy thread
38  * @msg: Pointer to k3_sec_proxy_msg
39  */
40 TEE_Result k3_sec_proxy_recv(struct k3_sec_proxy_msg *msg);
41 
42 /**
43  * k3_sec_proxy_init() - Initialize the secure proxy threads
44  */
45 TEE_Result k3_sec_proxy_init(void);
46 
47 #endif /* __SEC_PROXY_H */
48