Home
last modified time | relevance | path

Searched +full:op +full:- +full:tee (Results 1 – 25 of 31) sorted by relevance

12

/Linux-v5.15/Documentation/staging/
Dtee.rst2 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-v5.15/drivers/tee/optee/
DKconfig1 # 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)
17 used by OP-TEE TEE driver.
Dcall.c1 // SPDX-License-Identifier: GPL-2.0-only
5 #include <linux/arm-smccc.h>
36 mutex_lock(&cq->mutex); in optee_cq_wait_init()
44 init_completion(&w->c); in optee_cq_wait_init()
45 list_add_tail(&w->list_node, &cq->waiters); in optee_cq_wait_init()
47 mutex_unlock(&cq->mutex); in optee_cq_wait_init()
53 wait_for_completion(&w->c); in optee_cq_wait_for_completion()
55 mutex_lock(&cq->mutex); in optee_cq_wait_for_completion()
58 list_del(&w->list_node); in optee_cq_wait_for_completion()
59 reinit_completion(&w->c); in optee_cq_wait_for_completion()
[all …]
Dshm_pool.c1 // SPDX-License-Identifier: GPL-2.0-only
7 #include <linux/dma-buf.h>
24 return -ENOMEM; in pool_op_alloc()
26 shm->kaddr = page_address(page); in pool_op_alloc()
27 shm->paddr = page_to_phys(page); in pool_op_alloc()
28 shm->size = PAGE_SIZE << order; in pool_op_alloc()
31 * Shared memory private to the OP-TEE driver doesn't need in pool_op_alloc()
32 * to be registered with OP-TEE. in pool_op_alloc()
34 if (!(shm->flags & TEE_SHM_PRIV)) { in pool_op_alloc()
40 rc = -ENOMEM; in pool_op_alloc()
[all …]
Doptee_msg.h1 /* 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
46 * Pointer to a list of pages used to register user-defined SHM buffer.
49 * list of page addresses. OP-TEE core can reconstruct contiguous buffer from
61 * uint64_t pages_array[OPTEE_MSG_NONCONTIG_PAGE_SIZE/sizeof(uint64_t) - 1];
85 * Same values as TEE_LOGIN_* from TEE Internal API
95 * Page size used in non-contiguous buffer entries
[all …]
Doptee_smc.h1 /* 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 …]
Dcore.c1 // SPDX-License-Identifier: GPL-2.0-only
8 #include <linux/arm-smccc.h>
31 * optee_from_msg_param() - convert from OPTEE_MSG parameters to
49 u32 attr = mp->attr & OPTEE_MSG_ATTR_TYPE_MASK; in optee_from_msg_param()
53 p->attr = TEE_IOCTL_PARAM_ATTR_TYPE_NONE; in optee_from_msg_param()
54 memset(&p->u, 0, sizeof(p->u)); in optee_from_msg_param()
59 p->attr = TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INPUT + in optee_from_msg_param()
60 attr - OPTEE_MSG_ATTR_TYPE_VALUE_INPUT; in optee_from_msg_param()
61 p->u.value.a = mp->u.value.a; in optee_from_msg_param()
62 p->u.value.b = mp->u.value.b; in optee_from_msg_param()
[all …]
Drpc.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2015-2016, Linaro Limited
25 mutex_init(&priv->mu); in optee_wait_queue_init()
26 INIT_LIST_HEAD(&priv->db); in optee_wait_queue_init()
31 mutex_destroy(&priv->mu); in optee_wait_queue_exit()
38 if (arg->num_params != 1) in handle_rpc_func_cmd_get_time()
40 if ((arg->params[0].attr & OPTEE_MSG_ATTR_TYPE_MASK) != in handle_rpc_func_cmd_get_time()
45 arg->params[0].u.value.a = ts.tv_sec; in handle_rpc_func_cmd_get_time()
46 arg->params[0].u.value.b = ts.tv_nsec; in handle_rpc_func_cmd_get_time()
48 arg->ret = TEEC_SUCCESS; in handle_rpc_func_cmd_get_time()
[all …]
Ddevice.c1 // SPDX-License-Identifier: GPL-2.0
16 if (ver->impl_id == TEE_IMPL_ID_OPTEE) in optee_ctx_match()
48 return -EINVAL; in get_devices()
70 return -ENOMEM; in optee_register_device()
72 optee_device->dev.bus = &tee_bus_type; in optee_register_device()
73 optee_device->dev.release = optee_release_device; in optee_register_device()
74 if (dev_set_name(&optee_device->dev, "optee-ta-%pUb", device_uuid)) { in optee_register_device()
76 return -ENOMEM; in optee_register_device()
78 uuid_copy(&optee_device->id.uuid, device_uuid); in optee_register_device()
80 rc = device_register(&optee_device->dev); in optee_register_device()
[all …]
/Linux-v5.15/Documentation/devicetree/bindings/arm/firmware/
Dlinaro,optee-tz.yaml1 # 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
30 The method of calling the OP-TEE Trusted OS depending on smc or hvc
35 register assignments are specified in drivers/tee/optee/optee_smc.h
[all …]
/Linux-v5.15/drivers/firmware/broadcom/
Dtee_bnxt_fw.c1 // 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-v5.15/drivers/tee/amdtee/
Damdtee_if.h1 /* 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 …]
Dcall.c1 // 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-v5.15/Documentation/ABI/testing/
Dsysfs-bus-optee-devices1 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-v5.15/drivers/char/hw_random/
Doptee-rng.c1 // 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 …]
DKconfig1 # SPDX-License-Identifier: GPL-2.0-only
13 module will be called rng-core. This provides a device
28 This driver provides kernel-side support for a generic Random
31 the default FPGA bitstream on the TS-7800 has such functionality.
34 module will be called timeriomem-rng.
43 This driver provides kernel-side support for the Random Number
44 Generator hardware found on Intel i8xx-based motherboards.
47 module will be called intel-rng.
56 This driver provides kernel-side support for the Random Number
57 Generator hardware found on AMD 76x-based motherboards.
[all …]
/Linux-v5.15/arch/arm/mach-omap2/
Domap-secure.c1 // 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.
94 * If this platform has OP-TEE installed we use ARM SMC calls in omap_smc1()
148 * Return the non-zero error value on failure.
159 param[0] = nargs+1; /* RX-51 needs number of arguments + 1 */ in rx51_secure_dispatcher()
[all …]
Dpm33xx-core.c1 // 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-v5.15/Documentation/security/keys/
Dtrusted-encrypted.rst33 (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.
44 (2) TEE
61 (2) TEE
64 be extended with TEE based measured boot process.
70 TPMs have well-documented, standardized interfaces and APIs.
72 (2) TEE
74 TEEs have well-documented, standardized client interface and APIs. For
75 more details refer to ``Documentation/staging/tee.rst``.
[all …]
/Linux-v5.15/include/uapi/linux/
Dtee.h2 * 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_IOCTL_SHM_DMA_BUF 0x2 /* dma-buf handle on shared memory */
51 #define TEE_GEN_CAP_GP (1 << 0)/* GlobalPlatform compliant TEE */
56 #define TEE_MEMREF_NULL (__u64)(-1) /* NULL MemRef Buffer */
59 * 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-v5.15/drivers/tee/
Dtee_core.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2015-2016, Linaro Limited
27 * TEE Client UUID name space identifier (UUIDv4)
30 * forming Client UUID's for TEE environment using UUIDv5 scheme.
52 return ERR_PTR(-EINVAL); in teedev_open()
56 rc = -ENOMEM; in teedev_open()
60 kref_init(&ctx->refcount); in teedev_open()
61 ctx->teedev = teedev; in teedev_open()
62 rc = teedev->desc->ops->open(ctx); in teedev_open()
76 if (ctx->releasing) in teedev_ctx_get()
[all …]
/Linux-v5.15/fs/
Dsplice.c1 // SPDX-License-Identifier: GPL-2.0-only
6 * an arbitrary in-memory buffer. Think of a pipe as a small kernel
16 * Copyright (C) 2005-2006 Jens Axboe <axboe@kernel.dk>
17 * Copyright (C) 2005-2006 Linus Torvalds <torvalds@osdl.org>
49 struct page *page = buf->page; in page_cache_pipe_buf_try_steal()
77 buf->flags |= PIPE_BUF_FLAG_LRU; in page_cache_pipe_buf_try_steal()
94 put_page(buf->page); in page_cache_pipe_buf_release()
95 buf->flags &= ~PIPE_BUF_FLAG_LRU; in page_cache_pipe_buf_release()
105 struct page *page = buf->page; in page_cache_pipe_buf_confirm()
112 * Page got truncated/unhashed. This will cause a 0-byte in page_cache_pipe_buf_confirm()
[all …]
/Linux-v5.15/arch/arm64/boot/dts/hisilicon/
Dhi6220-hikey.dts1 // SPDX-License-Identifier: GPL-2.0
9 /dts-v1/;
11 #include "hikey-pinctrl.dtsi"
12 #include <dt-bindings/gpio/gpio.h>
16 compatible = "hisilicon,hi6220-hikey", "hisilicon,hi6220";
26 stdout-path = "serial3:115200n8";
32 * 0x05e0,0000 - 0x05ef,ffff: MCU firmware runtime using
33 * 0x05f0,1000 - 0x05f0,1fff: Reboot reason
34 * 0x06df,f000 - 0x06df,ffff: Mailbox message data
35 * 0x0740,f000 - 0x0740,ffff: MCU firmware section
[all …]
/Linux-v5.15/arch/arm64/boot/dts/ti/
Dk3-am642-sk.dts1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2021 Texas Instruments Incorporated - https://www.ti.com/
6 /dts-v1/;
8 #include <dt-bindings/mux/ti-serdes.h>
9 #include <dt-bindings/phy/phy.h>
10 #include <dt-bindings/gpio/gpio.h>
11 #include <dt-bindings/net/ti-dp83867.h>
12 #include "k3-am642.dtsi"
15 compatible = "ti,am642-sk", "ti,am642";
19 stdout-path = "serial2:115200n8";
[all …]
Dk3-am654-base-board.dts1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2016-2020 Texas Instruments Incorporated - https://www.ti.com/
6 /dts-v1/;
8 #include "k3-am654.dtsi"
9 #include <dt-bindings/input/input.h>
10 #include <dt-bindings/net/ti-dp83867.h>
13 compatible = "ti,am654-evm", "ti,am654";
17 stdout-path = "serial2:115200n8";
28 reserved-memory {
29 #address-cells = <2>;
[all …]

12