Lines Matching +full:shared +full:- +full:memory
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (c) 2015-2022 Linaro Limited
23 #define TEE_SHM_DYNAMIC BIT(0) /* Dynamic shared memory registered */
25 #define TEE_SHM_USER_MAPPED BIT(1) /* Memory mapped in user space */
26 #define TEE_SHM_POOL BIT(2) /* Memory allocated from pool */
27 #define TEE_SHM_PRIV BIT(3) /* Memory private to TEE driver */
35 * struct tee_context - driver specific context on file pointer data
37 * @list_shm: List of shared memory object owned by this context
42 * shared memory release.
44 * wait for tee-supplicant daemon to be started if not present
47 * non-blocking in nature.
48 * @cap_memref_null: flag indicating if the TEE Client support shared
49 * memory buffer with a NULL pointer.
81 * struct tee_driver_ops - driver operations vtable
91 * @shm_register: register shared memory buffer in TEE
92 * @shm_unregister: unregister shared memory buffer in TEE
118 * struct tee_desc - Describes the TEE driver to the subsystem
133 * tee_device_alloc() - Allocate a new struct tee_device instance
136 * @pool: Shared memory pool, NULL if not used
150 * tee_device_register() - Registers a TEE device
161 * tee_device_unregister() - Removes a TEE device
171 * tee_session_calc_client_uuid() - Calculates client UUID for session
187 * struct tee_shm - shared memory object
189 * @paddr: physical address of the shared memory
190 * @kaddr: virtual address of the shared memory
191 * @size: size of shared memory
197 * @id: unique id of a shared memory object on this device, shared
200 * secure world assigned id of this shared memory object, not
221 * struct tee_shm_pool - shared memory pool
223 * @private_data: private data for the shared memory manager
231 * struct tee_shm_pool_ops - shared memory pool operations
232 * @alloc: called when allocating shared memory
233 * @free: called when freeing shared memory
244 * tee_shm_pool_alloc_res_mem() - Create a shm manager for reserved memory
256 * tee_shm_pool_free() - Free a shared memory pool
257 * @pool: The shared memory pool to free
259 * The must be no remaining shared memory allocated from this pool when
264 pool->ops->destroy_pool(pool); in tee_shm_pool_free()
268 * tee_get_drvdata() - Return driver_data pointer
280 * tee_shm_is_dynamic() - Check if shared memory object is of the dynamic kind
281 * @shm: Shared memory handle
282 * @returns true if object is dynamic shared memory
286 return shm && (shm->flags & TEE_SHM_DYNAMIC); in tee_shm_is_dynamic()
290 * tee_shm_free() - Free shared memory
291 * @shm: Handle to shared memory to free
296 * tee_shm_put() - Decrease reference count on a shared memory handle
297 * @shm: Shared memory handle
302 * tee_shm_get_va() - Get virtual address of a shared memory plus an offset
303 * @shm: Shared memory handle
304 * @offs: Offset from start of this shared memory
305 * @returns virtual address of the shared memory + offs if offs is within
306 * the bounds of this shared memory, else an ERR_PTR
311 * tee_shm_get_pa() - Get physical address of a shared memory plus an offset
312 * @shm: Shared memory handle
313 * @offs: Offset from start of this shared memory
315 * @returns 0 if offs is within the bounds of this shared memory, else an
321 * tee_shm_get_size() - Get size of shared memory buffer
322 * @shm: Shared memory handle
323 * @returns size of shared memory
327 return shm->size; in tee_shm_get_size()
331 * tee_shm_get_pages() - Get list of pages that hold shared buffer
332 * @shm: Shared memory handle
339 *num_pages = shm->num_pages; in tee_shm_get_pages()
340 return shm->pages; in tee_shm_get_pages()
344 * tee_shm_get_page_offset() - Get shared buffer offset from page start
345 * @shm: Shared memory handle
346 * @returns page offset of shared buffer
350 return shm->offset; in tee_shm_get_page_offset()
354 * tee_shm_get_id() - Get id of a shared memory object
355 * @shm: Shared memory handle
360 return shm->id; in tee_shm_get_id()
364 * tee_shm_get_from_id() - Find shared memory object and increase reference
366 * @ctx: Context owning the shared memory
367 * @id: Id of shared memory object
373 * tee_client_open_context() - Open a TEE context
392 * tee_client_close_context() - Close a TEE context
401 * tee_client_get_version() - Query version of TEE
409 * tee_client_open_session() - Open a session to a Trusted Application
415 * Returns < 0 on error else see @arg->ret for result. If @arg->ret
416 * is TEEC_SUCCESS the session identifier is available in @arg->session.
423 * tee_client_close_session() - Close a session to a Trusted Application
433 * tee_client_invoke_func() - Invoke a function in a Trusted Application
439 * Returns < 0 on error else see @arg->ret for result.
446 * tee_client_cancel_req() - Request cancellation of the previous open-session
447 * or invoke-command operations in a Trusted Application
459 switch (param->attr & TEE_IOCTL_PARAM_ATTR_TYPE_MASK) { in tee_param_is_memref()
472 * struct tee_client_device - tee based device
484 * struct tee_client_driver - tee client driver
497 * teedev_open() - Open a struct tee_device
505 * teedev_close_context() - closes a struct tee_context