Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/linux
File: tee.h
/*
[0] Fix | Delete
* Copyright (c) 2015-2016, Linaro Limited
[1] Fix | Delete
* All rights reserved.
[2] Fix | Delete
*
[3] Fix | Delete
* Redistribution and use in source and binary forms, with or without
[4] Fix | Delete
* modification, are permitted provided that the following conditions are met:
[5] Fix | Delete
*
[6] Fix | Delete
* 1. Redistributions of source code must retain the above copyright notice,
[7] Fix | Delete
* this list of conditions and the following disclaimer.
[8] Fix | Delete
*
[9] Fix | Delete
* 2. Redistributions in binary form must reproduce the above copyright notice,
[10] Fix | Delete
* this list of conditions and the following disclaimer in the documentation
[11] Fix | Delete
* and/or other materials provided with the distribution.
[12] Fix | Delete
*
[13] Fix | Delete
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
[14] Fix | Delete
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
[15] Fix | Delete
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
[16] Fix | Delete
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
[17] Fix | Delete
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
[18] Fix | Delete
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
[19] Fix | Delete
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
[20] Fix | Delete
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
[21] Fix | Delete
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
[22] Fix | Delete
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
[23] Fix | Delete
* POSSIBILITY OF SUCH DAMAGE.
[24] Fix | Delete
*/
[25] Fix | Delete
[26] Fix | Delete
#ifndef __TEE_H
[27] Fix | Delete
#define __TEE_H
[28] Fix | Delete
[29] Fix | Delete
#include <linux/ioctl.h>
[30] Fix | Delete
#include <linux/types.h>
[31] Fix | Delete
[32] Fix | Delete
/*
[33] Fix | Delete
* This file describes the API provided by a TEE driver to user space.
[34] Fix | Delete
*
[35] Fix | Delete
* Each TEE driver defines a TEE specific protocol which is used for the
[36] Fix | Delete
* data passed back and forth using TEE_IOC_CMD.
[37] Fix | Delete
*/
[38] Fix | Delete
[39] Fix | Delete
/* Helpers to make the ioctl defines */
[40] Fix | Delete
#define TEE_IOC_MAGIC 0xa4
[41] Fix | Delete
#define TEE_IOC_BASE 0
[42] Fix | Delete
[43] Fix | Delete
/* Flags relating to shared memory */
[44] Fix | Delete
#define TEE_IOCTL_SHM_MAPPED 0x1 /* memory mapped in normal world */
[45] Fix | Delete
#define TEE_IOCTL_SHM_DMA_BUF 0x2 /* dma-buf handle on shared memory */
[46] Fix | Delete
[47] Fix | Delete
#define TEE_MAX_ARG_SIZE 1024
[48] Fix | Delete
[49] Fix | Delete
#define TEE_GEN_CAP_GP (1 << 0)/* GlobalPlatform compliant TEE */
[50] Fix | Delete
#define TEE_GEN_CAP_PRIVILEGED (1 << 1)/* Privileged device (for supplicant) */
[51] Fix | Delete
#define TEE_GEN_CAP_REG_MEM (1 << 2)/* Supports registering shared memory */
[52] Fix | Delete
#define TEE_GEN_CAP_MEMREF_NULL (1 << 3)/* NULL MemRef support */
[53] Fix | Delete
[54] Fix | Delete
#define TEE_MEMREF_NULL (__u64)(-1) /* NULL MemRef Buffer */
[55] Fix | Delete
[56] Fix | Delete
/*
[57] Fix | Delete
* TEE Implementation ID
[58] Fix | Delete
*/
[59] Fix | Delete
#define TEE_IMPL_ID_OPTEE 1
[60] Fix | Delete
[61] Fix | Delete
/*
[62] Fix | Delete
* OP-TEE specific capabilities
[63] Fix | Delete
*/
[64] Fix | Delete
#define TEE_OPTEE_CAP_TZ (1 << 0)
[65] Fix | Delete
[66] Fix | Delete
/**
[67] Fix | Delete
* struct tee_ioctl_version_data - TEE version
[68] Fix | Delete
* @impl_id: [out] TEE implementation id
[69] Fix | Delete
* @impl_caps: [out] Implementation specific capabilities
[70] Fix | Delete
* @gen_caps: [out] Generic capabilities, defined by TEE_GEN_CAPS_* above
[71] Fix | Delete
*
[72] Fix | Delete
* Identifies the TEE implementation, @impl_id is one of TEE_IMPL_ID_* above.
[73] Fix | Delete
* @impl_caps is implementation specific, for example TEE_OPTEE_CAP_*
[74] Fix | Delete
* is valid when @impl_id == TEE_IMPL_ID_OPTEE.
[75] Fix | Delete
*/
[76] Fix | Delete
struct tee_ioctl_version_data {
[77] Fix | Delete
__u32 impl_id;
[78] Fix | Delete
__u32 impl_caps;
[79] Fix | Delete
__u32 gen_caps;
[80] Fix | Delete
};
[81] Fix | Delete
[82] Fix | Delete
/**
[83] Fix | Delete
* TEE_IOC_VERSION - query version of TEE
[84] Fix | Delete
*
[85] Fix | Delete
* Takes a tee_ioctl_version_data struct and returns with the TEE version
[86] Fix | Delete
* data filled in.
[87] Fix | Delete
*/
[88] Fix | Delete
#define TEE_IOC_VERSION _IOR(TEE_IOC_MAGIC, TEE_IOC_BASE + 0, \
[89] Fix | Delete
struct tee_ioctl_version_data)
[90] Fix | Delete
[91] Fix | Delete
/**
[92] Fix | Delete
* struct tee_ioctl_shm_alloc_data - Shared memory allocate argument
[93] Fix | Delete
* @size: [in/out] Size of shared memory to allocate
[94] Fix | Delete
* @flags: [in/out] Flags to/from allocation.
[95] Fix | Delete
* @id: [out] Identifier of the shared memory
[96] Fix | Delete
*
[97] Fix | Delete
* The flags field should currently be zero as input. Updated by the call
[98] Fix | Delete
* with actual flags as defined by TEE_IOCTL_SHM_* above.
[99] Fix | Delete
* This structure is used as argument for TEE_IOC_SHM_ALLOC below.
[100] Fix | Delete
*/
[101] Fix | Delete
struct tee_ioctl_shm_alloc_data {
[102] Fix | Delete
__u64 size;
[103] Fix | Delete
__u32 flags;
[104] Fix | Delete
__s32 id;
[105] Fix | Delete
};
[106] Fix | Delete
[107] Fix | Delete
/**
[108] Fix | Delete
* TEE_IOC_SHM_ALLOC - allocate shared memory
[109] Fix | Delete
*
[110] Fix | Delete
* Allocates shared memory between the user space process and secure OS.
[111] Fix | Delete
*
[112] Fix | Delete
* Returns a file descriptor on success or < 0 on failure
[113] Fix | Delete
*
[114] Fix | Delete
* The returned file descriptor is used to map the shared memory into user
[115] Fix | Delete
* space. The shared memory is freed when the descriptor is closed and the
[116] Fix | Delete
* memory is unmapped.
[117] Fix | Delete
*/
[118] Fix | Delete
#define TEE_IOC_SHM_ALLOC _IOWR(TEE_IOC_MAGIC, TEE_IOC_BASE + 1, \
[119] Fix | Delete
struct tee_ioctl_shm_alloc_data)
[120] Fix | Delete
[121] Fix | Delete
/**
[122] Fix | Delete
* struct tee_ioctl_buf_data - Variable sized buffer
[123] Fix | Delete
* @buf_ptr: [in] A pointer to a buffer
[124] Fix | Delete
* @buf_len: [in] Length of the buffer above
[125] Fix | Delete
*
[126] Fix | Delete
* Used as argument for TEE_IOC_OPEN_SESSION, TEE_IOC_INVOKE,
[127] Fix | Delete
* TEE_IOC_SUPPL_RECV, and TEE_IOC_SUPPL_SEND below.
[128] Fix | Delete
*/
[129] Fix | Delete
struct tee_ioctl_buf_data {
[130] Fix | Delete
__u64 buf_ptr;
[131] Fix | Delete
__u64 buf_len;
[132] Fix | Delete
};
[133] Fix | Delete
[134] Fix | Delete
/*
[135] Fix | Delete
* Attributes for struct tee_ioctl_param, selects field in the union
[136] Fix | Delete
*/
[137] Fix | Delete
#define TEE_IOCTL_PARAM_ATTR_TYPE_NONE 0 /* parameter not used */
[138] Fix | Delete
[139] Fix | Delete
/*
[140] Fix | Delete
* These defines value parameters (struct tee_ioctl_param_value)
[141] Fix | Delete
*/
[142] Fix | Delete
#define TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INPUT 1
[143] Fix | Delete
#define TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_OUTPUT 2
[144] Fix | Delete
#define TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT 3 /* input and output */
[145] Fix | Delete
[146] Fix | Delete
/*
[147] Fix | Delete
* These defines shared memory reference parameters (struct
[148] Fix | Delete
* tee_ioctl_param_memref)
[149] Fix | Delete
*/
[150] Fix | Delete
#define TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT 5
[151] Fix | Delete
#define TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT 6
[152] Fix | Delete
#define TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INOUT 7 /* input and output */
[153] Fix | Delete
[154] Fix | Delete
/*
[155] Fix | Delete
* Mask for the type part of the attribute, leaves room for more types
[156] Fix | Delete
*/
[157] Fix | Delete
#define TEE_IOCTL_PARAM_ATTR_TYPE_MASK 0xff
[158] Fix | Delete
[159] Fix | Delete
/* Meta parameter carrying extra information about the message. */
[160] Fix | Delete
#define TEE_IOCTL_PARAM_ATTR_META 0x100
[161] Fix | Delete
[162] Fix | Delete
/* Mask of all known attr bits */
[163] Fix | Delete
#define TEE_IOCTL_PARAM_ATTR_MASK \
[164] Fix | Delete
(TEE_IOCTL_PARAM_ATTR_TYPE_MASK | TEE_IOCTL_PARAM_ATTR_META)
[165] Fix | Delete
[166] Fix | Delete
/*
[167] Fix | Delete
* Matches TEEC_LOGIN_* in GP TEE Client API
[168] Fix | Delete
* Are only defined for GP compliant TEEs
[169] Fix | Delete
*/
[170] Fix | Delete
#define TEE_IOCTL_LOGIN_PUBLIC 0
[171] Fix | Delete
#define TEE_IOCTL_LOGIN_USER 1
[172] Fix | Delete
#define TEE_IOCTL_LOGIN_GROUP 2
[173] Fix | Delete
#define TEE_IOCTL_LOGIN_APPLICATION 4
[174] Fix | Delete
#define TEE_IOCTL_LOGIN_USER_APPLICATION 5
[175] Fix | Delete
#define TEE_IOCTL_LOGIN_GROUP_APPLICATION 6
[176] Fix | Delete
[177] Fix | Delete
/**
[178] Fix | Delete
* struct tee_ioctl_param - parameter
[179] Fix | Delete
* @attr: attributes
[180] Fix | Delete
* @a: if a memref, offset into the shared memory object, else a value parameter
[181] Fix | Delete
* @b: if a memref, size of the buffer, else a value parameter
[182] Fix | Delete
* @c: if a memref, shared memory identifier, else a value parameter
[183] Fix | Delete
*
[184] Fix | Delete
* @attr & TEE_PARAM_ATTR_TYPE_MASK indicates if memref or value is used in
[185] Fix | Delete
* the union. TEE_PARAM_ATTR_TYPE_VALUE_* indicates value and
[186] Fix | Delete
* TEE_PARAM_ATTR_TYPE_MEMREF_* indicates memref. TEE_PARAM_ATTR_TYPE_NONE
[187] Fix | Delete
* indicates that none of the members are used.
[188] Fix | Delete
*
[189] Fix | Delete
* Shared memory is allocated with TEE_IOC_SHM_ALLOC which returns an
[190] Fix | Delete
* identifier representing the shared memory object. A memref can reference
[191] Fix | Delete
* a part of a shared memory by specifying an offset (@a) and size (@b) of
[192] Fix | Delete
* the object. To supply the entire shared memory object set the offset
[193] Fix | Delete
* (@a) to 0 and size (@b) to the previously returned size of the object.
[194] Fix | Delete
*
[195] Fix | Delete
* A client may need to present a NULL pointer in the argument
[196] Fix | Delete
* passed to a trusted application in the TEE.
[197] Fix | Delete
* This is also a requirement in GlobalPlatform Client API v1.0c
[198] Fix | Delete
* (section 3.2.5 memory references), which can be found at
[199] Fix | Delete
* http://www.globalplatform.org/specificationsdevice.asp
[200] Fix | Delete
*
[201] Fix | Delete
* If a NULL pointer is passed to a TA in the TEE, the (@c)
[202] Fix | Delete
* IOCTL parameters value must be set to TEE_MEMREF_NULL indicating a NULL
[203] Fix | Delete
* memory reference.
[204] Fix | Delete
*/
[205] Fix | Delete
struct tee_ioctl_param {
[206] Fix | Delete
__u64 attr;
[207] Fix | Delete
__u64 a;
[208] Fix | Delete
__u64 b;
[209] Fix | Delete
__u64 c;
[210] Fix | Delete
};
[211] Fix | Delete
[212] Fix | Delete
#define TEE_IOCTL_UUID_LEN 16
[213] Fix | Delete
[214] Fix | Delete
/**
[215] Fix | Delete
* struct tee_ioctl_open_session_arg - Open session argument
[216] Fix | Delete
* @uuid: [in] UUID of the Trusted Application
[217] Fix | Delete
* @clnt_uuid: [in] UUID of client
[218] Fix | Delete
* @clnt_login: [in] Login class of client, TEE_IOCTL_LOGIN_* above
[219] Fix | Delete
* @cancel_id: [in] Cancellation id, a unique value to identify this request
[220] Fix | Delete
* @session: [out] Session id
[221] Fix | Delete
* @ret: [out] return value
[222] Fix | Delete
* @ret_origin [out] origin of the return value
[223] Fix | Delete
* @num_params [in] number of parameters following this struct
[224] Fix | Delete
*/
[225] Fix | Delete
struct tee_ioctl_open_session_arg {
[226] Fix | Delete
__u8 uuid[TEE_IOCTL_UUID_LEN];
[227] Fix | Delete
__u8 clnt_uuid[TEE_IOCTL_UUID_LEN];
[228] Fix | Delete
__u32 clnt_login;
[229] Fix | Delete
__u32 cancel_id;
[230] Fix | Delete
__u32 session;
[231] Fix | Delete
__u32 ret;
[232] Fix | Delete
__u32 ret_origin;
[233] Fix | Delete
__u32 num_params;
[234] Fix | Delete
/* num_params tells the actual number of element in params */
[235] Fix | Delete
struct tee_ioctl_param params[];
[236] Fix | Delete
};
[237] Fix | Delete
[238] Fix | Delete
/**
[239] Fix | Delete
* TEE_IOC_OPEN_SESSION - opens a session to a Trusted Application
[240] Fix | Delete
*
[241] Fix | Delete
* Takes a struct tee_ioctl_buf_data which contains a struct
[242] Fix | Delete
* tee_ioctl_open_session_arg followed by any array of struct
[243] Fix | Delete
* tee_ioctl_param
[244] Fix | Delete
*/
[245] Fix | Delete
#define TEE_IOC_OPEN_SESSION _IOR(TEE_IOC_MAGIC, TEE_IOC_BASE + 2, \
[246] Fix | Delete
struct tee_ioctl_buf_data)
[247] Fix | Delete
[248] Fix | Delete
/**
[249] Fix | Delete
* struct tee_ioctl_invoke_func_arg - Invokes a function in a Trusted
[250] Fix | Delete
* Application
[251] Fix | Delete
* @func: [in] Trusted Application function, specific to the TA
[252] Fix | Delete
* @session: [in] Session id
[253] Fix | Delete
* @cancel_id: [in] Cancellation id, a unique value to identify this request
[254] Fix | Delete
* @ret: [out] return value
[255] Fix | Delete
* @ret_origin [out] origin of the return value
[256] Fix | Delete
* @num_params [in] number of parameters following this struct
[257] Fix | Delete
*/
[258] Fix | Delete
struct tee_ioctl_invoke_arg {
[259] Fix | Delete
__u32 func;
[260] Fix | Delete
__u32 session;
[261] Fix | Delete
__u32 cancel_id;
[262] Fix | Delete
__u32 ret;
[263] Fix | Delete
__u32 ret_origin;
[264] Fix | Delete
__u32 num_params;
[265] Fix | Delete
/* num_params tells the actual number of element in params */
[266] Fix | Delete
struct tee_ioctl_param params[];
[267] Fix | Delete
};
[268] Fix | Delete
[269] Fix | Delete
/**
[270] Fix | Delete
* TEE_IOC_INVOKE - Invokes a function in a Trusted Application
[271] Fix | Delete
*
[272] Fix | Delete
* Takes a struct tee_ioctl_buf_data which contains a struct
[273] Fix | Delete
* tee_invoke_func_arg followed by any array of struct tee_param
[274] Fix | Delete
*/
[275] Fix | Delete
#define TEE_IOC_INVOKE _IOR(TEE_IOC_MAGIC, TEE_IOC_BASE + 3, \
[276] Fix | Delete
struct tee_ioctl_buf_data)
[277] Fix | Delete
[278] Fix | Delete
/**
[279] Fix | Delete
* struct tee_ioctl_cancel_arg - Cancels an open session or invoke ioctl
[280] Fix | Delete
* @cancel_id: [in] Cancellation id, a unique value to identify this request
[281] Fix | Delete
* @session: [in] Session id, if the session is opened, else set to 0
[282] Fix | Delete
*/
[283] Fix | Delete
struct tee_ioctl_cancel_arg {
[284] Fix | Delete
__u32 cancel_id;
[285] Fix | Delete
__u32 session;
[286] Fix | Delete
};
[287] Fix | Delete
[288] Fix | Delete
/**
[289] Fix | Delete
* TEE_IOC_CANCEL - Cancels an open session or invoke
[290] Fix | Delete
*/
[291] Fix | Delete
#define TEE_IOC_CANCEL _IOR(TEE_IOC_MAGIC, TEE_IOC_BASE + 4, \
[292] Fix | Delete
struct tee_ioctl_cancel_arg)
[293] Fix | Delete
[294] Fix | Delete
/**
[295] Fix | Delete
* struct tee_ioctl_close_session_arg - Closes an open session
[296] Fix | Delete
* @session: [in] Session id
[297] Fix | Delete
*/
[298] Fix | Delete
struct tee_ioctl_close_session_arg {
[299] Fix | Delete
__u32 session;
[300] Fix | Delete
};
[301] Fix | Delete
[302] Fix | Delete
/**
[303] Fix | Delete
* TEE_IOC_CLOSE_SESSION - Closes a session
[304] Fix | Delete
*/
[305] Fix | Delete
#define TEE_IOC_CLOSE_SESSION _IOR(TEE_IOC_MAGIC, TEE_IOC_BASE + 5, \
[306] Fix | Delete
struct tee_ioctl_close_session_arg)
[307] Fix | Delete
[308] Fix | Delete
/**
[309] Fix | Delete
* struct tee_iocl_supp_recv_arg - Receive a request for a supplicant function
[310] Fix | Delete
* @func: [in] supplicant function
[311] Fix | Delete
* @num_params [in/out] number of parameters following this struct
[312] Fix | Delete
*
[313] Fix | Delete
* @num_params is the number of params that tee-supplicant has room to
[314] Fix | Delete
* receive when input, @num_params is the number of actual params
[315] Fix | Delete
* tee-supplicant receives when output.
[316] Fix | Delete
*/
[317] Fix | Delete
struct tee_iocl_supp_recv_arg {
[318] Fix | Delete
__u32 func;
[319] Fix | Delete
__u32 num_params;
[320] Fix | Delete
/* num_params tells the actual number of element in params */
[321] Fix | Delete
struct tee_ioctl_param params[];
[322] Fix | Delete
};
[323] Fix | Delete
[324] Fix | Delete
/**
[325] Fix | Delete
* TEE_IOC_SUPPL_RECV - Receive a request for a supplicant function
[326] Fix | Delete
*
[327] Fix | Delete
* Takes a struct tee_ioctl_buf_data which contains a struct
[328] Fix | Delete
* tee_iocl_supp_recv_arg followed by any array of struct tee_param
[329] Fix | Delete
*/
[330] Fix | Delete
#define TEE_IOC_SUPPL_RECV _IOR(TEE_IOC_MAGIC, TEE_IOC_BASE + 6, \
[331] Fix | Delete
struct tee_ioctl_buf_data)
[332] Fix | Delete
[333] Fix | Delete
/**
[334] Fix | Delete
* struct tee_iocl_supp_send_arg - Send a response to a received request
[335] Fix | Delete
* @ret: [out] return value
[336] Fix | Delete
* @num_params [in] number of parameters following this struct
[337] Fix | Delete
*/
[338] Fix | Delete
struct tee_iocl_supp_send_arg {
[339] Fix | Delete
__u32 ret;
[340] Fix | Delete
__u32 num_params;
[341] Fix | Delete
/* num_params tells the actual number of element in params */
[342] Fix | Delete
struct tee_ioctl_param params[];
[343] Fix | Delete
};
[344] Fix | Delete
[345] Fix | Delete
/**
[346] Fix | Delete
* TEE_IOC_SUPPL_SEND - Receive a request for a supplicant function
[347] Fix | Delete
*
[348] Fix | Delete
* Takes a struct tee_ioctl_buf_data which contains a struct
[349] Fix | Delete
* tee_iocl_supp_send_arg followed by any array of struct tee_param
[350] Fix | Delete
*/
[351] Fix | Delete
#define TEE_IOC_SUPPL_SEND _IOR(TEE_IOC_MAGIC, TEE_IOC_BASE + 7, \
[352] Fix | Delete
struct tee_ioctl_buf_data)
[353] Fix | Delete
[354] Fix | Delete
/**
[355] Fix | Delete
* struct tee_ioctl_shm_register_data - Shared memory register argument
[356] Fix | Delete
* @addr: [in] Start address of shared memory to register
[357] Fix | Delete
* @length: [in/out] Length of shared memory to register
[358] Fix | Delete
* @flags: [in/out] Flags to/from registration.
[359] Fix | Delete
* @id: [out] Identifier of the shared memory
[360] Fix | Delete
*
[361] Fix | Delete
* The flags field should currently be zero as input. Updated by the call
[362] Fix | Delete
* with actual flags as defined by TEE_IOCTL_SHM_* above.
[363] Fix | Delete
* This structure is used as argument for TEE_IOC_SHM_REGISTER below.
[364] Fix | Delete
*/
[365] Fix | Delete
struct tee_ioctl_shm_register_data {
[366] Fix | Delete
__u64 addr;
[367] Fix | Delete
__u64 length;
[368] Fix | Delete
__u32 flags;
[369] Fix | Delete
__s32 id;
[370] Fix | Delete
};
[371] Fix | Delete
[372] Fix | Delete
/**
[373] Fix | Delete
* TEE_IOC_SHM_REGISTER - Register shared memory argument
[374] Fix | Delete
*
[375] Fix | Delete
* Registers shared memory between the user space process and secure OS.
[376] Fix | Delete
*
[377] Fix | Delete
* Returns a file descriptor on success or < 0 on failure
[378] Fix | Delete
*
[379] Fix | Delete
* The shared memory is unregisterred when the descriptor is closed.
[380] Fix | Delete
*/
[381] Fix | Delete
#define TEE_IOC_SHM_REGISTER _IOWR(TEE_IOC_MAGIC, TEE_IOC_BASE + 9, \
[382] Fix | Delete
struct tee_ioctl_shm_register_data)
[383] Fix | Delete
/*
[384] Fix | Delete
* Five syscalls are used when communicating with the TEE driver.
[385] Fix | Delete
* open(): opens the device associated with the driver
[386] Fix | Delete
* ioctl(): as described above operating on the file descriptor from open()
[387] Fix | Delete
* close(): two cases
[388] Fix | Delete
* - closes the device file descriptor
[389] Fix | Delete
* - closes a file descriptor connected to allocated shared memory
[390] Fix | Delete
* mmap(): maps shared memory into user space using information from struct
[391] Fix | Delete
* tee_ioctl_shm_alloc_data
[392] Fix | Delete
* munmap(): unmaps previously shared memory
[393] Fix | Delete
*/
[394] Fix | Delete
[395] Fix | Delete
#endif /*__TEE_H*/
[396] Fix | Delete
[397] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function