aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/tee.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/uapi/linux/tee.h')
-rw-r--r--include/uapi/linux/tee.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/include/uapi/linux/tee.h b/include/uapi/linux/tee.h
index 688782e90140..4b9eb064d7e7 100644
--- a/include/uapi/linux/tee.h
+++ b/include/uapi/linux/tee.h
@@ -50,6 +50,7 @@
50 50
51#define TEE_GEN_CAP_GP (1 << 0)/* GlobalPlatform compliant TEE */ 51#define TEE_GEN_CAP_GP (1 << 0)/* GlobalPlatform compliant TEE */
52#define TEE_GEN_CAP_PRIVILEGED (1 << 1)/* Privileged device (for supplicant) */ 52#define TEE_GEN_CAP_PRIVILEGED (1 << 1)/* Privileged device (for supplicant) */
53#define TEE_GEN_CAP_REG_MEM (1 << 2)/* Supports registering shared memory */
53 54
54/* 55/*
55 * TEE Implementation ID 56 * TEE Implementation ID
@@ -154,6 +155,13 @@ struct tee_ioctl_buf_data {
154 */ 155 */
155#define TEE_IOCTL_PARAM_ATTR_TYPE_MASK 0xff 156#define TEE_IOCTL_PARAM_ATTR_TYPE_MASK 0xff
156 157
158/* Meta parameter carrying extra information about the message. */
159#define TEE_IOCTL_PARAM_ATTR_META 0x100
160
161/* Mask of all known attr bits */
162#define TEE_IOCTL_PARAM_ATTR_MASK \
163 (TEE_IOCTL_PARAM_ATTR_TYPE_MASK | TEE_IOCTL_PARAM_ATTR_META)
164
157/* 165/*
158 * Matches TEEC_LOGIN_* in GP TEE Client API 166 * Matches TEEC_LOGIN_* in GP TEE Client API
159 * Are only defined for GP compliant TEEs 167 * Are only defined for GP compliant TEEs
@@ -332,6 +340,35 @@ struct tee_iocl_supp_send_arg {
332#define TEE_IOC_SUPPL_SEND _IOR(TEE_IOC_MAGIC, TEE_IOC_BASE + 7, \ 340#define TEE_IOC_SUPPL_SEND _IOR(TEE_IOC_MAGIC, TEE_IOC_BASE + 7, \
333 struct tee_ioctl_buf_data) 341 struct tee_ioctl_buf_data)
334 342
343/**
344 * struct tee_ioctl_shm_register_data - Shared memory register argument
345 * @addr: [in] Start address of shared memory to register
346 * @length: [in/out] Length of shared memory to register
347 * @flags: [in/out] Flags to/from registration.
348 * @id: [out] Identifier of the shared memory
349 *
350 * The flags field should currently be zero as input. Updated by the call
351 * with actual flags as defined by TEE_IOCTL_SHM_* above.
352 * This structure is used as argument for TEE_IOC_SHM_REGISTER below.
353 */
354struct tee_ioctl_shm_register_data {
355 __u64 addr;
356 __u64 length;
357 __u32 flags;
358 __s32 id;
359};
360
361/**
362 * TEE_IOC_SHM_REGISTER - Register shared memory argument
363 *
364 * Registers shared memory between the user space process and secure OS.
365 *
366 * Returns a file descriptor on success or < 0 on failure
367 *
368 * The shared memory is unregisterred when the descriptor is closed.
369 */
370#define TEE_IOC_SHM_REGISTER _IOWR(TEE_IOC_MAGIC, TEE_IOC_BASE + 9, \
371 struct tee_ioctl_shm_register_data)
335/* 372/*
336 * Five syscalls are used when communicating with the TEE driver. 373 * Five syscalls are used when communicating with the TEE driver.
337 * open(): opens the device associated with the driver 374 * open(): opens the device associated with the driver