| /Linux-v6.1/Documentation/staging/ |
| D | tee.rst | 2 TEE subsystem 5 This document describes the TEE subsystem in Linux. 7 A TEE (Trusted Execution Environment) is a trusted OS running in some 9 secure co-processor etc. A TEE driver handles the details needed to 10 communicate with the TEE. 14 - Registration of TEE drivers 16 - Managing shared memory between Linux and the TEE 18 - Providing a generic API to the TEE 20 The TEE interface 23 include/uapi/linux/tee.h defines the generic interface to a TEE. [all …]
|
| /Linux-v6.1/drivers/firmware/arm_scmi/ |
| D | optee.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) 2019-2021 Linaro Ltd. 15 #include <uapi/linux/tee.h> 23 * PTA_SCMI_CMD_CAPABILITIES - Get channel capabilities 31 * PTA_SCMI_CMD_PROCESS_SMT_CHANNEL - Process SCMI message in SMT buffer 37 * and SCMI server (OP-TEE) parts. 38 * The memory uses SMT header to carry SCMI meta-data (protocol ID and 44 * PTA_SCMI_CMD_PROCESS_SMT_CHANNEL_MESSAGE - Process SMT/SCMI message 52 * The memory uses SMT header to carry SCMI meta-data (protocol ID and 58 * PTA_SCMI_CMD_GET_CHANNEL - Get channel handle [all …]
|
| D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 9 set of operating system-independent software interfaces that are 11 interfaces for: Discovery and self-description of the interfaces 13 a given device or domain into the various power-saving states that 58 bool "SCMI transport based on OP-TEE service" 65 This enables the OP-TEE service based transport for SCMI. 68 transport based on OP-TEE SCMI service, answer Y. 93 in atomic context too, at the price of using a number of busy-waiting 134 in atomic context too, at the price of using a number of busy-waiting
|
| /Linux-v6.1/drivers/tee/optee/ |
| D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 2 # OP-TEE Trusted Execution Environment Configuration 4 tristate "OP-TEE" 8 This implements the OP-TEE Trusted Execution Environment (TEE)
|
| D | smc_abi.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (c) 2015-2021, Linaro Limited 9 #include <linux/arm-smccc.h> 35 * OP-TEE OS via raw SMCs. 46 * A typical OP-TEE private shm allocation is 224 bytes (argument struct 69 p->attr = TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT + in from_msg_param_tmp_mem() 70 attr - OPTEE_MSG_ATTR_TYPE_TMEM_INPUT; in from_msg_param_tmp_mem() 71 p->u.memref.size = mp->u.tmem.size; in from_msg_param_tmp_mem() 72 shm = (struct tee_shm *)(unsigned long)mp->u.tmem.shm_ref; in from_msg_param_tmp_mem() 74 p->u.memref.shm_offs = 0; in from_msg_param_tmp_mem() [all …]
|
| D | optee_private.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 3 * Copyright (c) 2015-2021, Linaro Limited 9 #include <linux/arm-smccc.h> 73 * struct optee_supp - supplicant synchronization struct 79 * communication, else -1 105 * struct optee_ffa_data - FFA communication struct 107 * OP-TEE in secure world 110 * @global_ids FF-A shared memory global handle translation 122 * struct optee_ops - OP-TEE driver internal operations 123 * @do_call_with_arg: enters OP-TEE in secure world [all …]
|
| D | ffa_abi.c | 1 // SPDX-License-Identifier: GPL-2.0-only 21 * This file implement the FF-A ABI used when communicating with secure world 22 * OP-TEE OS via FF-A. 24 * 1. Maintain a hash table for lookup of a global FF-A memory handle 33 * 1. Maintain a hash table for lookup of a global FF-A memory handle 35 * FF-A assigns a global memory handle for each piece shared memory. 64 mutex_lock(&optee->ffa.mutex); in optee_shm_from_ffa_handle() 65 r = rhashtable_lookup_fast(&optee->ffa.global_ids, &global_id, in optee_shm_from_ffa_handle() 68 shm = r->shm; in optee_shm_from_ffa_handle() 69 mutex_unlock(&optee->ffa.mutex); in optee_shm_from_ffa_handle() [all …]
|
| D | core.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (c) 2015-2021, Linaro Limited 39 return -ENOMEM; in optee_pool_op_alloc_helper() 41 shm->kaddr = page_address(page); in optee_pool_op_alloc_helper() 42 shm->paddr = page_to_phys(page); in optee_pool_op_alloc_helper() 43 shm->size = PAGE_SIZE << order; in optee_pool_op_alloc_helper() 51 rc = -ENOMEM; in optee_pool_op_alloc_helper() 58 rc = shm_register(shm->ctx, shm, pages, nr_pages, in optee_pool_op_alloc_helper() 59 (unsigned long)shm->kaddr); in optee_pool_op_alloc_helper() 68 free_pages((unsigned long)shm->kaddr, order); in optee_pool_op_alloc_helper() [all …]
|
| D | optee_ffa.h | 1 /* SPDX-License-Identifier: BSD-2-Clause */ 3 * Copyright (c) 2019-2021, Linaro Limited 7 * This file is exported by OP-TEE and is kept in sync between secure world 8 * and normal world drivers. We're using ARM FF-A 1.0 specification. 23 * defined in FF-A specification: 27 * w3-w7: Implementation defined, free to be used below 38 * Returns the API version implemented, currently follows the FF-A version. 41 * w4-w7: Not used (MBZ) 46 * w5-w7: Not used (MBZ) 51 * Returns the revision of OP-TEE. [all …]
|
| D | optee_smc.h | 1 /* SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) */ 3 * Copyright (c) 2015-2021, Linaro Limited 8 #include <linux/arm-smccc.h> 28 * Normal cached memory (write-back), shareable for SMP systems and not 36 * 32-bit registers. 44 * 384fb3e0-e7f8-11e3-af63-0002a5d5c51b. 75 * Used by non-secure world to figure out which Trusted OS is installed. 78 * Returns UUID in a0-4 in the same way as OPTEE_SMC_CALLS_UID 88 * Used by non-secure world to figure out which version of the Trusted OS 92 * Returns revision in a0-1 in the same way as OPTEE_SMC_CALLS_REVISION [all …]
|
| D | optee_msg.h | 1 /* SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) */ 3 * Copyright (c) 2015-2021, Linaro Limited 12 * This file defines the OP-TEE message protocol (ABI) used to communicate 13 * with an instance of OP-TEE running in secure world. 21 * Part 1 - formatting of messages 49 * Pointer to a list of pages used to register user-defined SHM buffer. 52 * list of page addresses. OP-TEE core can reconstruct contiguous buffer from 64 * uint64_t pages_array[OPTEE_MSG_NONCONTIG_PAGE_SIZE/sizeof(uint64_t) - 1]; 88 * Same values as TEE_LOGIN_* from TEE Internal API 98 * Page size used in non-contiguous buffer entries [all …]
|
| /Linux-v6.1/arch/arm/mach-at91/ |
| D | sam_secure.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 #include <linux/arm-smccc.h> 19 struct arm_smccc_res res = {.a0 = -1}; in sam_smccc_call() 41 * We only check that the OP-TEE node is present and available. The in sam_secure_init() 42 * OP-TEE kernel driver is not needed for the type of interaction made in sam_secure_init() 43 * with OP-TEE here so the driver's status is not checked. in sam_secure_init() 51 pr_info("Running under OP-TEE firmware\n"); in sam_secure_init()
|
| D | sama5.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 12 #include <asm/hardware/cache-l2x0.h> 23 /* OP-TEE configures the L2 cache and does not allow modifying it yet */ in sama5_l2c310_write_sec()
|
| /Linux-v6.1/drivers/firmware/broadcom/ |
| D | tee_bnxt_fw.c | 1 // SPDX-License-Identifier: GPL-2.0 21 * TA_CMD_BNXT_FASTBOOT - boot bnxt device by copying f/w into sram 29 * TEE_SUCCESS - Invoke command success 30 * TEE_ERROR_ITEM_NOT_FOUND - Corrupt f/w image found on memory 35 * TA_CMD_BNXT_COPY_COREDUMP - copy the core dump into shm 37 * param[0] (inout memref) - Coredump buffer memory reference 38 * param[1] (in value) - value.a: offset, data to be copied from 44 * TEE_SUCCESS - Invoke command success 45 * TEE_ERROR_BAD_PARAMETERS - Incorrect input param 46 * TEE_ERROR_ITEM_NOT_FOUND - Corrupt core dump [all …]
|
| /Linux-v6.1/Documentation/devicetree/bindings/arm/firmware/ |
| D | linaro,optee-tz.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/arm/firmware/linaro,optee-tz.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: OP-TEE Device Tree Bindings 10 - Jens Wiklander <jens.wiklander@linaro.org> 13 OP-TEE is a piece of software using hardware features to provide a Trusted 25 const: linaro,optee-tz 31 software is expected to be edge-triggered. 36 The method of calling the OP-TEE Trusted OS depending on smc or hvc [all …]
|
| /Linux-v6.1/drivers/tee/amdtee/ |
| D | amdtee_if.h | 1 /* SPDX-License-Identifier: MIT */ 8 * This file has definitions related to Host and AMD-TEE Trusted OS interface. 9 * These definitions must match the definitions on the TEE side. 18 ** TEE Param 23 * struct memref - memory reference structure 52 /* Must be same as in GP TEE specification */ 67 ** TEE Commands 72 * non-contiguous. Below structures are meant to describe a shared memory region 77 * struct tee_sg_desc - sg descriptor for a physically contiguous buffer 89 * struct tee_sg_list - structure describing a scatter/gather list [all …]
|
| D | call.c | 1 // SPDX-License-Identifier: MIT 7 #include <linux/tee.h> 9 #include <linux/psp-tee.h> 11 #include <linux/psp-sev.h> 15 static int tee_params_to_amd_params(struct tee_param *tee, u32 count, in tee_params_to_amd_params() argument 24 if (!tee || !amd || count > TEE_MAX_PARAMS) in tee_params_to_amd_params() 25 return -EINVAL; in tee_params_to_amd_params() 27 amd->param_types = 0; in tee_params_to_amd_params() 29 /* AMD TEE does not support meta parameter */ in tee_params_to_amd_params() 30 if (tee[i].attr > TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INOUT) in tee_params_to_amd_params() [all …]
|
| /Linux-v6.1/Documentation/ABI/testing/ |
| D | sysfs-bus-optee-devices | 1 What: /sys/bus/tee/devices/optee-ta-<uuid>/ 4 Contact: op-tee@lists.trustedfirmware.org 6 OP-TEE bus provides reference to registered drivers under this directory. The <uuid> 8 are free to create needed API under optee-ta-<uuid> directory.
|
| /Linux-v6.1/drivers/char/hw_random/ |
| D | optee-rng.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) 2018-2019 Linaro Ltd. 15 #define DRIVER_NAME "optee-rng" 20 * TA_CMD_GET_ENTROPY - Get Entropy from RNG 22 * param[0] (inout memref) - Entropy buffer memory reference 28 * TEE_SUCCESS - Invoke command success 29 * TEE_ERROR_BAD_PARAMETERS - Incorrect input param 30 * TEE_ERROR_NOT_SUPPORTED - Requested entropy size greater than size of pool 31 * TEE_ERROR_HEALTH_TEST_FAIL - Continuous health testing failed 36 * TA_CMD_GET_RNG_INFO - Get RNG information [all …]
|
| /Linux-v6.1/drivers/rtc/ |
| D | rtc-optee.c | 1 // SPDX-License-Identifier: GPL-2.0 40 * struct optee_rtc - OP-TEE RTC private data 41 * @dev: OP-TEE based RTC device. 42 * @ctx: OP-TEE context handler. 64 inv_arg.session = priv->session_id; in optee_rtc_readtime() 69 param[0].u.memref.shm = priv->shm; in optee_rtc_readtime() 72 ret = tee_client_invoke_func(priv->ctx, &inv_arg, param); in optee_rtc_readtime() 74 return ret ? ret : -EPROTO; in optee_rtc_readtime() 76 optee_tm = tee_shm_get_va(priv->shm, 0); in optee_rtc_readtime() 81 return -EPROTO; in optee_rtc_readtime() [all …]
|
| /Linux-v6.1/arch/arm/mach-omap2/ |
| D | omap-secure.c | 1 // SPDX-License-Identifier: GPL-2.0-only 11 #include <linux/arm-smccc.h> 23 #include "omap-secure.h" 39 * We only check that the OP-TEE node is present and available. The in omap_optee_init_check() 40 * OP-TEE kernel driver is not needed for the type of interaction made in omap_optee_init_check() 41 * with OP-TEE here so the driver's status is not checked. in omap_optee_init_check() 57 * Return the non-zero error value on failure. 101 * If this platform has OP-TEE installed we use ARM SMC calls in omap_smc1() 155 * Return the non-zero error value on failure. 166 param[0] = nargs+1; /* RX-51 needs number of arguments + 1 */ in rx51_secure_dispatcher() [all …]
|
| D | pm33xx-core.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (C) 2016-2018 Texas Instruments Incorporated - https://www.ti.com/ 18 #include <linux/platform_data/gpio-omap.h> 34 #include "omap-secure.h" 53 return -ENOMEM; in am43xx_map_scu() 61 pr_warn("WARNING: This platform does not support off-mode, entering DeepSleep suspend.\n"); in am33xx_check_off_mode_enable() 70 * Check for am437x-gp-evm which has the right Hardware design to in am43xx_check_off_mode_enable() 73 if (of_machine_is_compatible("ti,am437x-gp-evm") && enable_off_mode) in am43xx_check_off_mode_enable() 76 pr_warn("WARNING: This platform does not support off-mode, entering DeepSleep suspend.\n"); in am43xx_check_off_mode_enable() 88 return -ENODEV; in amx3_common_init() [all …]
|
| /Linux-v6.1/Documentation/security/keys/ |
| D | trusted-encrypted.rst | 33 (2) TEE (Trusted Execution Environment: OP-TEE based on Arm TrustZone) 35 Rooted to Hardware Unique Key (HUK) which is generally burnt in on-chip 36 fuses and is accessible to TEE only. 41 mode, trust is rooted to the OTPMK, a never-disclosed 256-bit key 51 (2) TEE 72 (2) TEE 75 be extended with TEE based measured boot process. 86 TPMs have well-documented, standardized interfaces and APIs. 88 (2) TEE 90 TEEs have well-documented, standardized client interface and APIs. For [all …]
|
| /Linux-v6.1/include/uapi/linux/ |
| D | tee.h | 2 * Copyright (c) 2015-2016, Linaro Limited 35 * This file describes the API provided by a TEE driver to user space. 37 * Each TEE driver defines a TEE specific protocol which is used for the 47 #define TEE_GEN_CAP_GP (1 << 0)/* GlobalPlatform compliant TEE */ 52 #define TEE_MEMREF_NULL (__u64)(-1) /* NULL MemRef Buffer */ 55 * TEE Implementation ID 61 * OP-TEE specific capabilities 66 * struct tee_ioctl_version_data - TEE version 67 * @impl_id: [out] TEE implementation id 71 * Identifies the TEE implementation, @impl_id is one of TEE_IMPL_ID_* above. [all …]
|
| /Linux-v6.1/Documentation/devicetree/bindings/firmware/ |
| D | arm,scmi.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 4 --- 6 $schema: http://devicetree.org/meta-schemas/core.yaml# 11 - Sudeep Holla <sudeep.holla@arm.com> 31 - description: SCMI compliant firmware with mailbox transport 33 - const: arm,scmi 34 - description: SCMI compliant firmware with ARM SMC/HVC transport 36 - const: arm,scmi-smc 37 - description: SCMI compliant firmware with SCMI Virtio transport. 40 - const: arm,scmi-virtio [all …]
|