| /linux/Documentation/tee/ |
| H A D | op-tee.rst | 1 .. SPDX-License-Identifier: GPL-2.0 4 OP-TEE (Open Portable Trusted Execution Environment) 7 The OP-TEE driver handles OP-TEE [1] based TEEs. Currently it is only the ARM 8 TrustZone based OP-TEE solution that is supported. 10 Lowest level of communication with OP-TEE builds on ARM SMC Calling 11 Convention (SMCCC) [2], which is the foundation for OP-TEE's SMC interface 12 [3] used internally by the driver. Stacked on top of that is OP-TEE Message 15 OP-TEE SMC interface provides the basic functions required by SMCCC and some 16 additional functions specific for OP-TEE. The most interesting functions are: 18 - OPTEE_SMC_FUNCID_CALLS_UID (part of SMCCC) returns the version information [all …]
|
| /linux/Documentation/ABI/testing/ |
| H A 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. 10 What: /sys/bus/tee/devices/optee-ta-<uuid>/need_supplicant 13 Contact: op-tee@lists.trustedfirmware.org 15 Allows to distinguish whether an OP-TEE based TA/device requires user-space 16 tee-supplicant to function properly or not. This attribute will be present for 17 devices which depend on tee-supplicant to be running.
|
| H A D | sysfs-class-tee | 1 What: /sys/class/tee/tee{,priv}X/rpmb_routing_model 4 Contact: op-tee@lists.trustedfirmware.org 7 user-space daemon tee-supplicant or the RPMB subsystem 11 subsystem without assistance from tee-supplicant. It 15 tee-supplicant is needed in the early boot with initramfs.
|
| /linux/drivers/nvmem/ |
| H A D | stm32-bsec-optee-ta.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 3 * OP-TEE STM32MP BSEC PTA interface, used by STM32 ROMEM driver 5 * Copyright (C) 2022, STMicroelectronics - All Rights Reserved 10 * stm32_bsec_optee_ta_open() - initialize the STM32 BSEC TA 11 * @ctx: the OP-TEE context on success 14 * On success, 0. On failure, -errno. 19 * stm32_bsec_optee_ta_close() - release the STM32 BSEC TA 20 * @ctx: the OP-TEE context 22 * This function used to clean the OP-TEE resources initialized in 29 * stm32_bsec_optee_ta_read() - nvmem read access using TA client driver [all …]
|
| H A D | stm32-bsec-optee-ta.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * OP-TEE STM32MP BSEC PTA interface, used by STM32 ROMEM driver 5 * Copyright (C) 2022, STMicroelectronics - All Rights Reserved 10 #include "stm32-bsec-optee-ta.h" 21 * TEE_SUCCESS - Invoke command success 22 * TEE_ERROR_BAD_PARAMETERS - Incorrect input param 23 * TEE_ERROR_ACCESS_DENIED - OTP not accessible by caller 36 * TEE_SUCCESS - Invoke command success 37 * TEE_ERROR_BAD_PARAMETERS - Incorrect input param 38 * TEE_ERROR_ACCESS_DENIED - OTP not accessible by caller [all …]
|
| H A D | stm32-romem.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * STM32 Factory-programmed memory read access driver 5 * Copyright (C) 2017, STMicroelectronics - All Rights Reserved 9 #include <linux/arm-smccc.h> 12 #include <linux/nvmem-provider.h> 18 #include "stm32-bsec-optee-ta.h" 20 /* BSEC secure service access from non-secure */ 51 *buf8++ = readb_relaxed(priv->base + i); in stm32_romem_read() 56 static int stm32_bsec_smc(u8 op, u32 otp, u32 data, u32 *result) in stm32_bsec_smc() argument 61 arm_smccc_smc(STM32_SMC_BSEC, op, otp, data, 0, 0, 0, 0, &res); in stm32_bsec_smc() [all …]
|
| /linux/arch/arm/mach-at91/ |
| H A 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()
|
| H A 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/drivers/firmware/broadcom/ |
| H A 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/drivers/tee/amdtee/ |
| H A 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 …]
|
| H A D | call.c | 1 // SPDX-License-Identifier: MIT 7 #include <linux/tee.h> 9 #include <linux/psp-tee.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() 31 return -EINVAL; in tee_params_to_amd_params() [all …]
|
| /linux/drivers/tee/qcomtee/ |
| H A D | call.c | 1 // SPDX-License-Identifier: GPL-2.0-only 9 #include <linux/tee.h> 22 *object = idr_find(&ctxdata->qtee_objects_idr, id); in find_qtee_object() 24 err = -EINVAL; in find_qtee_object() 34 scoped_guard(mutex, &ctxdata->qtee_lock) in del_qtee_object() 35 object = idr_remove(&ctxdata->qtee_objects_idr, id); in del_qtee_object() 41 * qcomtee_context_add_qtee_object() - Add a QTEE object to the context. 42 * @param: TEE parameter representing @object. 56 struct qcomtee_context_data *ctxdata = ctx->data; in qcomtee_context_add_qtee_object() 58 scoped_guard(mutex, &ctxdata->qtee_lock) in qcomtee_context_add_qtee_object() [all …]
|
| H A D | core.c | 1 // SPDX-License-Identifier: GPL-2.0-only 46 (p)->object_type = (type); \ 47 (p)->info.qtee_id = (unsigned long)(optr); \ 54 struct qcomtee *qcomtee = tee_get_drvdata(oic->ctx->teedev); in qcomtee_qtee_object_alloc() 61 /* If failed, "no-name". */ in qcomtee_qtee_object_alloc() 62 object->name = kasprintf(GFP_KERNEL, "qcomtee-%u", object_id); in qcomtee_qtee_object_alloc() 64 kref_init(&object->refcount); in qcomtee_qtee_object_alloc() 66 object->info.qcomtee_async_ctx = qcomtee->ctx; in qcomtee_qtee_object_alloc() 67 teedev_ctx_get(object->info.qcomtee_async_ctx); in qcomtee_qtee_object_alloc() 75 teedev_ctx_put(object->info.qcomtee_async_ctx); in qcomtee_qtee_object_free() [all …]
|
| /linux/Documentation/devicetree/bindings/arm/firmware/ |
| H A 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 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 either a per-cpu interrupt or an 32 edge-triggered peripheral interrupt. [all …]
|
| /linux/drivers/char/hw_random/ |
| H A 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/include/uapi/linux/ |
| H A 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 */ 53 #define TEE_MEMREF_NULL ((__u64)(-1)) /* NULL MemRef Buffer */ 54 #define TEE_OBJREF_NULL ((__u64)(-1)) /* NULL ObjRef Object */ 57 * TEE Implementation ID 65 * OP-TEE specific capabilities 70 * struct tee_ioctl_version_data - TEE version 71 * @impl_id: [out] TEE implementation id [all …]
|
| /linux/drivers/firmware/arm_scmi/transports/ |
| H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 62 in atomic context too, at the price of using a number of busy-waiting 66 tristate "SCMI transport based on OP-TEE service" 73 This enables the OP-TEE service based transport for SCMI. 76 transport based on OP-TEE SCMI service, answer Y. 120 in atomic context too, at the price of using a number of busy-waiting
|
| /linux/arch/arm/mach-omap2/ |
| H A 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() 50 * omap_secure_dispatcher - Routine to dispatch low power secure 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() 150 * Return the non-zero error value on failure. [all …]
|
| /linux/drivers/tee/optee/ |
| H A D | ffa_abi.c | 1 // SPDX-License-Identifier: GPL-2.0-only 22 * This file implement the FF-A ABI used when communicating with secure world 23 * OP-TEE OS via FF-A. 25 * 1. Maintain a hash table for lookup of a global FF-A memory handle 34 * 1. Maintain a hash table for lookup of a global FF-A memory handle 36 * FF-A assigns a global memory handle for each piece shared memory. 65 mutex_lock(&optee->ffa.mutex); in optee_shm_from_ffa_handle() 66 r = rhashtable_lookup_fast(&optee->ffa.global_ids, &global_id, in optee_shm_from_ffa_handle() 69 shm = r->shm; in optee_shm_from_ffa_handle() 70 mutex_unlock(&optee->ffa.mutex); in optee_shm_from_ffa_handle() [all …]
|
| H A D | device.c | 1 // SPDX-License-Identifier: GPL-2.0 16 if (ver->impl_id == TEE_IMPL_ID_OPTEE) in optee_ctx_match() 52 return -ENODEV; in get_devices() 55 return -EINVAL; in get_devices() 86 return -ENOMEM; in optee_register_device() 88 optee_device->dev.bus = &tee_bus_type; in optee_register_device() 89 optee_device->dev.release = optee_release_device; in optee_register_device() 90 if (dev_set_name(&optee_device->dev, "optee-ta-%pUb", device_uuid)) { in optee_register_device() 92 return -ENOMEM; in optee_register_device() 94 uuid_copy(&optee_device->id.uuid, device_uuid); in optee_register_device() [all …]
|
| H A D | call.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (c) 2015-2021, 2023 Linaro Limited 34 * (optee->rpc_param_count). 44 mutex_init(&cq->mutex); in optee_cq_init() 45 INIT_LIST_HEAD(&cq->waiters); in optee_cq_init() 48 * If cq->total_thread_count is 0 then we're not trying to keep in optee_cq_init() 53 cq->total_thread_count = thread_count; in optee_cq_init() 54 cq->free_thread_count = thread_count; in optee_cq_init() 73 mutex_lock(&cq->mutex); in optee_cq_wait_init() 81 init_completion(&w->c); in optee_cq_wait_init() [all …]
|
| /linux/drivers/firmware/efi/stmm/ |
| H A D | mm_communication.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 4 * in OP-TEE. Most of the structs and defines resemble the EDK2 naming. 16 * Secure Partition running at Secure-EL0 22 * Defined in OP-TEE, thi [all...] |
| H A D | tee_stmm_efi.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * EFI variable service via TEE 11 #include <linux/tee.h> 38 /* currently only OP-TEE is supported as a communication path */ in tee_ctx_match() 39 if (ver->impl_id == TEE_IMPL_ID_OPTEE) in tee_ctx_match() 46 * tee_mm_communicate() - Pass a buffer to StandaloneMM running in TEE 65 buf_size = mm_hdr->message_len + sizeof(efi_guid_t) + sizeof(size_t); in tee_mm_communicate() 117 * mm_communicate() - Adjust the communication buffer to StandAlonneMM and send 118 * it to TEE 135 var_hdr = (struct smm_variable_communicate_header *)mm_hdr->data; in mm_communicate() [all …]
|
| /linux/drivers/rtc/ |
| H A D | rtc-optee.c | 1 // SPDX-License-Identifier: GPL-2.0 20 /* PTA_CMD_RTC_GET_INFO - Get RTC information 27 * PTA_CMD_RTC_GET_TIME - Get time from RTC 34 * PTA_CMD_RTC_SET_TIME - Set time from RTC 42 * PTA_CMD_RTC_GET_OFFSET - Get RTC offset 49 * PTA_CMD_RTC_SET_OFFSET - Set RTC offset 56 * PTA_CMD_RTC_READ_ALARM - Read RTC alarm 63 * PTA_CMD_RTC_SET_ALARM - Set RTC alarm 71 * PTA_CMD_RTC_ENABLE_ALARM - Enable Alarm 78 * PTA_CMD_RTC_WAIT_ALARM - Get alarm event [all …]
|
| /linux/Documentation/security/keys/ |
| H A D | trusted-encrypted.rst | 15 It is the secure way of keeping the keys in the kernel key-ring as Trusted-Key, 18 - Key-blob, an encrypted key-data, created to be stored, loaded and seen by 20 - Key-data, the plain-key text in the system memory, to be used by 23 Though key-data is not accessible to the user-space in plain-text, but it is in 24 plain-text in system memory, when used in kernel space. Even though kernel-space 25 attracts small surface attack, but with compromised kernel or side-channel 29 In order to protect the key in kernel space, the concept of "protected-keys" is 30 introduced which will act as an added layer of protection. The key-data of the 31 protected keys is encrypted with Key-Encryption-Key(KEK), and decrypted inside 32 the trust source boundary. The plain-key text never available out-side in the [all …]
|