| /kernel/linux/linux-6.6/drivers/tee/optee/ |
| D | notif.c | 21 static bool have_key(struct optee *optee, u_int key) in have_key() argument 25 list_for_each_entry(entry, &optee->notif.db, link) in have_key() 32 int optee_notif_wait(struct optee *optee, u_int key) in optee_notif_wait() argument 38 if (key > optee->notif.max_key) in optee_notif_wait() 47 spin_lock_irqsave(&optee->notif.lock, flags); in optee_notif_wait() 53 if (test_bit(key, optee->notif.bitmap)) { in optee_notif_wait() 54 clear_bit(key, optee->notif.bitmap); in optee_notif_wait() 62 if (have_key(optee, key)) { in optee_notif_wait() 67 list_add_tail(&entry->link, &optee->notif.db); in optee_notif_wait() 72 spin_unlock_irqrestore(&optee->notif.lock, flags); in optee_notif_wait() [all …]
|
| D | ffa_abi.c | 58 static struct tee_shm *optee_shm_from_ffa_handle(struct optee *optee, in optee_shm_from_ffa_handle() argument 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() 69 mutex_unlock(&optee->ffa.mutex); in optee_shm_from_ffa_handle() 74 static int optee_shm_add_ffa_handle(struct optee *optee, struct tee_shm *shm, in optee_shm_add_ffa_handle() argument 86 mutex_lock(&optee->ffa.mutex); in optee_shm_add_ffa_handle() 87 rc = rhashtable_lookup_insert_fast(&optee->ffa.global_ids, &r->linkage, in optee_shm_add_ffa_handle() 89 mutex_unlock(&optee->ffa.mutex); in optee_shm_add_ffa_handle() 97 static int optee_shm_rem_ffa_handle(struct optee *optee, u64 global_id) in optee_shm_rem_ffa_handle() argument 102 mutex_lock(&optee->ffa.mutex); in optee_shm_rem_ffa_handle() [all …]
|
| D | smc_abi.c | 131 * @optee: main service struct 137 static int optee_from_msg_param(struct optee *optee, struct tee_param *params, in optee_from_msg_param() argument 221 * @optee: main service struct 227 static int optee_to_msg_param(struct optee *optee, in optee_to_msg_param() argument 279 * @optee: main service struct 281 static void optee_enable_shm_cache(struct optee *optee) in optee_enable_shm_cache() argument 286 optee_cq_wait_init(&optee->call_queue, &w); in optee_enable_shm_cache() 290 optee->smc.invoke_fn(OPTEE_SMC_ENABLE_SHM_CACHE, in optee_enable_shm_cache() 294 optee_cq_wait_for_completion(&optee->call_queue, &w); in optee_enable_shm_cache() 296 optee_cq_wait_final(&optee->call_queue, &w); in optee_enable_shm_cache() [all …]
|
| D | core.c | 91 struct optee *optee = tee_get_drvdata(teedev); in optee_open() local 97 if (teedev == optee->supp_teedev) { in optee_open() 100 mutex_lock(&optee->supp.mutex); in optee_open() 101 if (!optee->supp.ctx) { in optee_open() 103 optee->supp.ctx = ctx; in optee_open() 105 mutex_unlock(&optee->supp.mutex); in optee_open() 111 if (!optee->scan_bus_done) { in optee_open() 112 INIT_WORK(&optee->scan_bus_work, optee_bus_scan); in optee_open() 113 optee->scan_bus_wq = create_workqueue("optee_bus_scan"); in optee_open() 114 if (!optee->scan_bus_wq) { in optee_open() [all …]
|
| D | optee_private.h | 16 #define DRIVER_NAME "optee" 99 * @optee optee device reference 102 struct optee *optee; member 106 * struct optee_smc - optee smc communication struct 112 * @optee_pcpu per_cpu optee instance for per cpu work or NULL 143 struct optee; 158 int (*to_msg_param)(struct optee *optee, 161 int (*from_msg_param)(struct optee *optee, struct tee_param *params, 167 * struct optee - main service struct 181 * @scan_bus_wq workqueue to scan optee bus and register optee drivers [all …]
|
| D | call.c | 34 * (optee->rpc_param_count). 135 void optee_shm_arg_cache_init(struct optee *optee, u32 flags) in optee_shm_arg_cache_init() argument 137 INIT_LIST_HEAD(&optee->shm_arg_cache.shm_args); in optee_shm_arg_cache_init() 138 mutex_init(&optee->shm_arg_cache.mutex); in optee_shm_arg_cache_init() 139 optee->shm_arg_cache.flags = flags; in optee_shm_arg_cache_init() 142 void optee_shm_arg_cache_uninit(struct optee *optee) in optee_shm_arg_cache_uninit() argument 144 struct list_head *head = &optee->shm_arg_cache.shm_args; in optee_shm_arg_cache_uninit() 147 mutex_destroy(&optee->shm_arg_cache.mutex); in optee_shm_arg_cache_uninit() 187 struct optee *optee = tee_get_drvdata(ctx->teedev); in optee_get_msg_arg() local 188 size_t sz = optee_msg_arg_size(optee->rpc_param_count); in optee_get_msg_arg() [all …]
|
| D | rpc.c | 39 struct optee *optee = tee_get_drvdata(ctx->teedev); in handle_rpc_func_cmd_i2c_transfer() local 64 if (optee->ops->from_msg_param(optee, params, arg->num_params, in handle_rpc_func_cmd_i2c_transfer() 108 if (optee->ops->to_msg_param(optee, arg->params, in handle_rpc_func_cmd_i2c_transfer() 130 static void handle_rpc_func_cmd_wq(struct optee *optee, in handle_rpc_func_cmd_wq() argument 142 if (optee_notif_wait(optee, arg->params[0].u.value.b)) in handle_rpc_func_cmd_wq() 146 if (optee_notif_send(optee, arg->params[0].u.value.b)) in handle_rpc_func_cmd_wq() 181 static void handle_rpc_supp_cmd(struct tee_context *ctx, struct optee *optee, in handle_rpc_supp_cmd() argument 195 if (optee->ops->from_msg_param(optee, params, arg->num_params, in handle_rpc_supp_cmd() 203 if (optee->ops->to_msg_param(optee, arg->params, arg->num_params, in handle_rpc_supp_cmd() 214 struct optee *optee = tee_get_drvdata(ctx->teedev); in optee_rpc_cmd_alloc_suppl() local [all …]
|
| D | Makefile | 2 obj-$(CONFIG_OPTEE) += optee.o 3 optee-objs += core.o 4 optee-objs += call.o 5 optee-objs += notif.o 6 optee-objs += rpc.o 7 optee-objs += supp.o 8 optee-objs += device.o 9 optee-objs += smc_abi.o 10 optee-objs += ffa_abi.o
|
| D | supp.c | 80 struct optee *optee = tee_get_drvdata(ctx->teedev); in optee_supp_thrd_req() local 81 struct optee_supp *supp = &optee->supp; in optee_supp_thrd_req() 233 struct optee *optee = tee_get_drvdata(teedev); in optee_supp_recv() local 234 struct optee_supp *supp = &optee->supp; in optee_supp_recv() 342 struct optee *optee = tee_get_drvdata(teedev); in optee_supp_send() local 343 struct optee_supp *supp = &optee->supp; in optee_supp_send()
|
| D | Kconfig | 3 config OPTEE config 14 depends on OPTEE && ARM64
|
| /kernel/linux/linux-5.10/drivers/tee/optee/ |
| D | core.c | 26 #define DRIVER_NAME "optee" 206 struct optee *optee = tee_get_drvdata(teedev); in optee_get_version() local 208 if (optee->sec_caps & OPTEE_SMC_SEC_CAP_DYNAMIC_SHM) in optee_get_version() 210 if (optee->sec_caps & OPTEE_SMC_SEC_CAP_MEMREF_NULL) in optee_get_version() 224 struct optee *optee = tee_get_drvdata(teedev); in optee_open() local 230 if (teedev == optee->supp_teedev) { in optee_open() 233 mutex_lock(&optee->supp.mutex); in optee_open() 234 if (!optee->supp.ctx) { in optee_open() 236 optee->supp.ctx = ctx; in optee_open() 238 mutex_unlock(&optee->supp.mutex); in optee_open() [all …]
|
| D | Makefile | 2 obj-$(CONFIG_OPTEE) += optee.o 3 optee-objs += core.o 4 optee-objs += call.o 5 optee-objs += rpc.o 6 optee-objs += supp.o 7 optee-objs += shm_pool.o 8 optee-objs += device.o
|
| D | call.c | 128 struct optee *optee = tee_get_drvdata(ctx->teedev); in optee_do_call_with_arg() local 137 optee_cq_wait_init(&optee->call_queue, &w); in optee_do_call_with_arg() 141 optee->invoke_fn(param.a0, param.a1, param.a2, param.a3, in optee_do_call_with_arg() 150 optee_cq_wait_for_completion(&optee->call_queue, &w); in optee_do_call_with_arg() 170 optee_cq_wait_final(&optee->call_queue, &w); in optee_do_call_with_arg() 395 * @optee: main service struct 397 void optee_enable_shm_cache(struct optee *optee) in optee_enable_shm_cache() argument 402 optee_cq_wait_init(&optee->call_queue, &w); in optee_enable_shm_cache() 406 optee->invoke_fn(OPTEE_SMC_ENABLE_SHM_CACHE, 0, 0, 0, 0, 0, 0, in optee_enable_shm_cache() 410 optee_cq_wait_for_completion(&optee->call_queue, &w); in optee_enable_shm_cache() [all …]
|
| D | optee_private.h | 70 * struct optee - main service struct 84 * @scan_bus_wq workqueue to scan optee bus and register optee drivers 85 * @scan_bus_work workq to scan optee bus and register optee drivers 87 struct optee { struct 162 void optee_enable_shm_cache(struct optee *optee); 163 void optee_disable_shm_cache(struct optee *optee); 164 void optee_disable_unmapped_shm_cache(struct optee *optee);
|
| D | rpc.c | 187 static void handle_rpc_func_cmd_wq(struct optee *optee, in handle_rpc_func_cmd_wq() argument 199 wq_sleep(&optee->wait_queue, arg->params[0].u.value.b); in handle_rpc_func_cmd_wq() 202 wq_wakeup(&optee->wait_queue, arg->params[0].u.value.b); in handle_rpc_func_cmd_wq() 267 struct optee *optee = tee_get_drvdata(ctx->teedev); in cmd_alloc_suppl() local 279 mutex_lock(&optee->supp.mutex); in cmd_alloc_suppl() 281 shm = tee_shm_get_from_id(optee->supp.ctx, param.u.value.c); in cmd_alloc_suppl() 282 mutex_unlock(&optee->supp.mutex); in cmd_alloc_suppl() 287 struct optee *optee, in handle_rpc_func_cmd_shm_alloc() argument 317 shm = tee_shm_alloc(optee->ctx, sz, in handle_rpc_func_cmd_shm_alloc() 451 static void handle_rpc_func_cmd(struct tee_context *ctx, struct optee *optee, in handle_rpc_func_cmd() argument [all …]
|
| D | supp.c | 80 struct optee *optee = tee_get_drvdata(ctx->teedev); in optee_supp_thrd_req() local 81 struct optee_supp *supp = &optee->supp; in optee_supp_thrd_req() 233 struct optee *optee = tee_get_drvdata(teedev); in optee_supp_recv() local 234 struct optee_supp *supp = &optee->supp; in optee_supp_recv() 342 struct optee *optee = tee_get_drvdata(teedev); in optee_supp_send() local 343 struct optee_supp *supp = &optee->supp; in optee_supp_send()
|
| D | Kconfig | 3 config OPTEE config 14 depends on OPTEE
|
| /kernel/linux/linux-6.6/Documentation/devicetree/bindings/arm/firmware/ |
| D | linaro,optee-tz.yaml | 4 $id: http://devicetree.org/schemas/arm/firmware/linaro,optee-tz.yaml# 22 const: optee 25 const: linaro,optee-tz 42 register assignments are specified in drivers/tee/optee/optee_smc.h 54 optee { 55 compatible = "linaro,optee-tz"; 63 optee { 64 compatible = "linaro,optee-tz";
|
| /kernel/linux/linux-5.10/Documentation/devicetree/bindings/arm/firmware/ |
| D | linaro,optee-tz.txt | 12 - compatible : should contain "linaro,optee-tz" 18 in drivers/tee/optee/optee_smc.h 21 in drivers/tee/optee/optee_smc.h 27 optee { 28 compatible = "linaro,optee-tz";
|
| /kernel/linux/linux-6.6/arch/arm/boot/dts/st/ |
| D | stm32mp15-scmi.dtsi | 9 optee: optee { label 10 compatible = "linaro,optee-tz"; 15 compatible = "linaro,scmi-optee"; 18 linaro,optee-channel-id = <0>;
|
| /kernel/linux/linux-6.6/Documentation/devicetree/bindings/firmware/ |
| D | arm,scmi.yaml | 47 - const: linaro,scmi-optee 122 linaro,optee-channel-id: 275 linaro,optee-channel-id: 319 const: linaro,scmi-optee 322 - linaro,optee-channel-id 450 compatible = "linaro,scmi-optee"; 451 linaro,optee-channel-id = <0>; 458 linaro,optee-channel-id = <1>; 482 cpu_optee_lpri0: optee-sram-section@0 {
|
| /kernel/linux/linux-5.10/Documentation/ABI/testing/ |
| D | sysfs-bus-optee-devices | 1 What: /sys/bus/tee/devices/optee-ta-<uuid>/ 8 are free to create needed API under optee-ta-<uuid> directory. 10 What: /sys/bus/tee/devices/optee-ta-<uuid>/need_supplicant
|
| /kernel/linux/linux-6.6/Documentation/ABI/testing/ |
| D | sysfs-bus-optee-devices | 1 What: /sys/bus/tee/devices/optee-ta-<uuid>/ 8 are free to create needed API under optee-ta-<uuid> directory. 10 What: /sys/bus/tee/devices/optee-ta-<uuid>/need_supplicant
|
| /kernel/linux/common_modules/tzdriver/core/ |
| D | Kconfig | 66 bool "Compatible with OPTEE" 70 Compatible with OPTEE
|
| /kernel/linux/linux-6.6/arch/arm/mach-at91/ |
| D | sam_secure.c | 32 /* If optee has been detected, then we are running in normal world */ in sam_linux_is_optee_available() 45 np = of_find_node_by_path("/firmware/optee"); in sam_secure_init()
|