Lines Matching +full:non +full:- +full:shared

4  * SPDX-License-Identifier: Apache-2.0
14 * Copyright (c) 2015-2016, Linaro Limited
54 * It also can be presented as the separate secure co-processors. It allows system
58 * - tee_get_version() to get current TEE capabilities
59 * - tee_open_session() to open new session to the TA
60 * - tee_close_session() to close session to the TA
61 * - tee_cancel() to cancel session or invoke function
62 * - tee_invoke_func() to invoke function to the TA
63 * - tee_shm_register() to register shared memory region
64 * - tee_shm_unregister() to unregister shared memory region
65 * - tee_shm_alloc() to allocate shared memory region
66 * - tee_shm_free() to free shared memory region
76 #define TEE_GEN_CAP_REG_MEM BIT(2) /* Supports registering shared memory */
115 * TEEC_ERROR_GENERIC Non-specific cause.
203 * @brief - Open session argument
223 * Shared memory is allocated with TEE_IOC_SHM_ALLOC which returns an
224 * identifier representing the shared memory object. A memref can reference
225 * a part of a shared memory by specifying an offset (@ref a) and size (@ref b) of
226 * the object. To supply the entire shared memory object set the offset
231 uint64_t a; /**< if a memref, offset into the shared memory object, else a value*/
233 uint64_t c; /**< if a memref, shared memory identifier, else a value parameter */
248 * @brief Tee shared memory structure
252 void *addr; /**< [out] shared buffer pointer */
253 uint64_t size; /**< [out] shared buffer size */
254 uint32_t flags; /**< [out] shared buffer flags */
306 * @brief Callback API to register shared memory
315 * @brief Callback API to unregister shared memory
361 * @retval -ENOSYS If callback was not implemented
369 const struct tee_driver_api *api = (const struct tee_driver_api *)dev->api; in z_impl_tee_get_version()
371 if (!api->get_version) { in z_impl_tee_get_version()
372 return -ENOSYS; in z_impl_tee_get_version()
375 return api->get_version(dev, info); in z_impl_tee_get_version()
389 * @retval -ENOSYS If callback was not implemented
402 const struct tee_driver_api *api = (const struct tee_driver_api *)dev->api; in z_impl_tee_open_session()
404 if (!api->open_session) { in z_impl_tee_open_session()
405 return -ENOSYS; in z_impl_tee_open_session()
408 return api->open_session(dev, arg, num_param, param, session_id); in z_impl_tee_open_session()
419 * @retval -ENOSYS If callback was not implemented
427 const struct tee_driver_api *api = (const struct tee_driver_api *)dev->api; in z_impl_tee_close_session()
429 if (!api->close_session) { in z_impl_tee_close_session()
430 return -ENOSYS; in z_impl_tee_close_session()
433 return api->close_session(dev, session_id); in z_impl_tee_close_session()
445 * @retval -ENOSYS If callback was not implemented
454 const struct tee_driver_api *api = (const struct tee_driver_api *)dev->api; in z_impl_tee_cancel()
456 if (!api->cancel) { in z_impl_tee_cancel()
457 return -ENOSYS; in z_impl_tee_cancel()
460 return api->cancel(dev, session_id, cancel_id); in z_impl_tee_cancel()
473 * @retval -ENOSYS If callback was not implemented
483 const struct tee_driver_api *api = (const struct tee_driver_api *)dev->api; in z_impl_tee_invoke_func()
485 if (!api->invoke_func) { in z_impl_tee_invoke_func()
486 return -ENOSYS; in z_impl_tee_invoke_func()
489 return api->invoke_func(dev, arg, num_param, param); in z_impl_tee_invoke_func()
493 * @brief Helper function to allocate and register shared memory
495 * Allocates and registers shared memory for TEE
498 * @param addr Address of the shared memory
500 * @param size Size of the shared memory region
502 * @param shmp Return shared memory structure
510 * @brief Helper function to remove and unregister shared memory
512 * Removes and unregisters shared memory for TEE
522 * @brief Register shared memory for Trusted Environment
524 * Registers shared memory for TEE
527 * @param addr Address of the shared memory
528 * @param size Size of the shared memory region
530 * @param shm Return shared memory structure
532 * @retval -ENOSYS If callback was not implemented
547 * @brief Unregister shared memory for Trusted Environment
549 * Unregisters shared memory for TEE
552 * @param shm Shared memory structure
554 * @retval -ENOSYS If callback was not implemented
566 * @brief Allocate shared memory region for Trusted Environment
568 * Allocate shared memory for TEE
573 * @param shm Return shared memory structure
575 * @retval -ENOSYS If callback was not implemented
589 * @brief Free shared memory region for Trusted Environment
591 * Frees shared memory for TEE
594 * @param shm Shared memory structure
596 * @retval -ENOSYS If callback was not implemented
615 * @retval -ENOSYS If callback was not implemented
625 const struct tee_driver_api *api = (const struct tee_driver_api *)dev->api; in z_impl_tee_suppl_recv()
627 if (!api->suppl_recv) { in z_impl_tee_suppl_recv()
628 return -ENOSYS; in z_impl_tee_suppl_recv()
631 return api->suppl_recv(dev, func, num_params, param); in z_impl_tee_suppl_recv()
642 * @retval -ENOSYS If callback was not implemented
653 const struct tee_driver_api *api = (const struct tee_driver_api *)dev->api; in z_impl_tee_suppl_send()
655 if (!api->suppl_send) { in z_impl_tee_suppl_send()
656 return -ENOSYS; in z_impl_tee_suppl_send()
659 return api->suppl_send(dev, ret, num_params, param); in z_impl_tee_suppl_send()