2 * Copyright (c) 2014, STMicroelectronics International N.V.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License Version 2 as
6 * published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
16 #include <linux/tee_client_api.h>
23 * struct tee_cmd_io - The command sent to an open tee device.
24 * @err: Error code (as in Global Platform TEE Client API spec)
25 * @origin: Origin for the error code (also from spec).
26 * @cmd: The command to be executed in the trusted application.
27 * @uuid: The uuid for the trusted application.
28 * @data: The trusted application or memory block.
29 * @data_size: The size of the trusted application or memory block.
30 * @op: The cmd payload operation for the trusted application.
32 * This structure is mainly used in the Linux kernel for communication
33 * with the user space.
39 TEEC_UUID __user *uuid;
42 TEEC_Operation __user *op;
57 #define TEE_OPEN_SESSION_IOC _IOWR('t', 161, struct tee_cmd_io)
58 #define TEE_INVOKE_COMMAND_IOC _IOWR('t', 163, struct tee_cmd_io)
59 #define TEE_REQUEST_CANCELLATION_IOC _IOWR('t', 164, struct tee_cmd_io)
60 #define TEE_ALLOC_SHM_IOC _IOWR('t', 165, struct tee_shm_io)
61 #define TEE_GET_FD_FOR_RPC_SHM_IOC _IOWR('t', 167, struct tee_shm_io)
63 #endif /* _TEE_IOC_H */