From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8B1B33D891F for ; Tue, 6 Oct 2026 11:34:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791286471; cv=none; b=OmDIohS4Zfp8yQ9ccBM6yV3Lg43M8ibBJcWgr5lr5nQkAq6enEKYY4ZQ8jx6zBEmKqmMdrdHAXO3KJ6KLfFJupgyqzMCQkIjwpHMfb9Xp3LDY5/jykHpmrXqORNrW++q+jm9ejw4Tdslr0epUXdDErFcS0y3CU1Hk+tQkNmjNtg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791286471; c=relaxed/simple; bh=g7TKIDQ7wd3sOvRr35lEot/KjYrlsV1dyNZ6GlMcRJY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=sUGmWHby7BGsyeLRGOiz/68t7i062SbZRvHKDFBtHA0d7X+UDyCxBhiUe93gV0WQZoYNyRZA2u1gZRMr9Q+9gUzJIpkqqVDdzoG/MY3Vn9Mma9FqqbYRthp6vuMLpCbpcesUIxMK9dmtNA3qu9pbsJ7T+xYodf1BHKrgZwjczJo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=JLg/XMyP; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=gSoMKu8Y; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="JLg/XMyP"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="gSoMKu8Y" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 696BPZYo334470 for ; Tue, 6 Oct 2026 11:34:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= gNECpDUvfDFQ7Vcv29PShK9Ck0wrYCXcDsLiPwdsW7k=; b=JLg/XMyP5SBFODM7 upQGZdsCZxgxT+TSH83/TyqISkBHciGojhZtJihxy/tFlxwzo7VmtfxbYUzhLAEb LkkDgAPDvJXkiYGUaLvTi9Iy8ch5STb4PBKK5ZMdb2O1xSqLSCd2Si5r0ksoX1uT HfWh5hLXfOazvIsjuHe313jHP0K4n4+7EqTinywvmaApdQOKHU7InlBeMbC1rkqU zai3TtH4GD4eziLFhYqlsMpR6WSx4VE3bkhRsmQqIhDoJ7ZPgr2ync05D3msUAzF 5Ny2Oa4cHREFvPXu80CZP/mmduJ/+fwhW3MyL0iwelPxJuGcXpWRJvsYmwfCualB E7A9ug== Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4h4xdu8d6j-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 06 Oct 2026 11:34:27 +0000 (GMT) Received: by mail-pg1-f198.google.com with SMTP id 41be03b00d2f7-cb48f41343aso570495a12.1 for ; Tue, 06 Oct 2026 04:34:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1791286467; x=1791891267; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=gNECpDUvfDFQ7Vcv29PShK9Ck0wrYCXcDsLiPwdsW7k=; b=gSoMKu8YOZw1pcit9ck+Y4MQGRUPyPwuZIkQSz0kTFFysq/kcvWhAT0AJHyNOPvGbB MGPpdu22a5FKboVjdvMzS8JSGahQ0O0zSYKDssFbo0js18k1Ly/4XK4kFJLOSuOzwWcD DUqudm02cL6lb2yo2AGHpRWHvyLdpaoYEDpPrDYS4AtL1T4aYcU0VofrbJo3rUFaxcNl dnydULGrJVXQIucT5pTyASIPjyD6R4uSzF/XcknOLw9En2p9A/mgsGnUedHtl3z0HZV9 UtRzKgPVsdnvcJOMxEinzr0NEKRrQEK8Zag5GU6cqjk8okNYFkpCbB7nMpFkJfniGkIo ep9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791286467; x=1791891267; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=gNECpDUvfDFQ7Vcv29PShK9Ck0wrYCXcDsLiPwdsW7k=; b=i/jA3h8cov3W8GD/e9SHBggVLOeqkux9XjHAUuL4pAkUX1QwADBNhzWPhpPxQF9avD VIWadpyZ5TNWxvQgw0X8g5qOnmcBsocwZZFdIaDDryWHuWofpJZOGtu2bfqbgovyZRvC pCHtpJIub0KoUxb7XZE+IEL0g2moNfX4p7HRh6CouhV4XsOHfQqoqFW5HC/eq641Mhm8 0F1/IjRPIw47DFgfD8CirzGQaApqrB5wt7Lxjx5DVr9utEq8xOvzskRXjXVY2Lagp19Z rLtlI0umwn7eVcSxE9ICI83+CkJEW8Lv13myd1Wz4hG4vFk/MFYeZet+q28vka2eLHmR +KcA== X-Forwarded-Encrypted: i=1; AKwUvBz9C+6iEVQ6iaKk6a1U0uJ3SooPNOVVxeF54lWpxBxJrIdTT5DOl0xjp6q8aCegjIVcyL7c5oVl2/3+ngo=@vger.kernel.org X-Gm-Message-State: AFq9FYKKfGVTz8ifxzfAVmsm6stMRVb02X9lxSYj/xrIhrS5oqLiWgg1 9HG5AAMEPo/QAp1HugrAS8J5slQm8aT2A4IRF5Kc0+akQ4fbxXsKTgPgzSxVLFUkmpGSsBAkDad ivfQ7BQ0Tk7RrnzWhqOy3uP21NLjjp47AUq7rzHpnXoscz7Ih8ZdkuagLsvb6b5ueXwM= X-Gm-Gg: AYBFou1drOUPEqZ66V/pUUXO5XJPALD/IqwVLMfbAiLobWvdgouelk8lyGAIuiYlFox YHLkxXq5sZXz6Gm87Zcafiz45gLeAldm8RHL1Oid0HGeL2TSFkoOXeLcGQ46UlKV0k8ozNE62lz ujgxpEKkJwo4+6GM7ZkJ2Bfol40/wUtDEYH/hu1w5w0qoZxo4sWtE/eirxWtUC8l8hsw1JANjPG H1qC3RNDLwHNy+cJmg5SHJY1oniT7/p30o7b3hF7kFz6lTllC59Oq9Ljv6ilA59G0bzIfwLMk05 R++c4/sN3Dj0GUUlFVTeKjfFvVEj8EaRpqur3FOygcAVxocao/UwuAypFuuNWR/3jW0q31VGirC h6eW9YhGN/Za8oKiNWoOvRZKR X-Received: by 2002:a17:90b:2f05:b0:3a0:c85a:ee12 with SMTP id 98e67ed59e1d1-3a87381f68bmr539699a91.41.1791286466777; Tue, 06 Oct 2026 04:34:26 -0700 (PDT) X-Received: by 2002:a17:90b:2f05:b0:3a0:c85a:ee12 with SMTP id 98e67ed59e1d1-3a87381f68bmr539674a91.41.1791286466244; Tue, 06 Oct 2026 04:34:26 -0700 (PDT) Received: from hu-hdev-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3a709a4e80bsm9330092a91.4.2026.10.06.04.34.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Oct 2026 04:34:25 -0700 (PDT) From: Harshal Dev Date: Tue, 06 Oct 2026 17:03:26 +0530 Subject: [PATCH v4 5/7] tee: qcomtee: Add support for registering QTEE services on TEE bus Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20261006-qcom_uefisecapp_migrate_qcomtee-v4-5-bf1c8e2a64ab@oss.qualcomm.com> References: <20261006-qcom_uefisecapp_migrate_qcomtee-v4-0-bf1c8e2a64ab@oss.qualcomm.com> In-Reply-To: <20261006-qcom_uefisecapp_migrate_qcomtee-v4-0-bf1c8e2a64ab@oss.qualcomm.com> To: Jens Wiklander , Sumit Garg , Amirreza Zarrabi , Bjorn Andersson , Konrad Dybcio , Dmitry Baryshkov , Krzysztof Kozlowski Cc: Kuldeep Singh , Basant Kumar , Apurupa Pattapu , Arun Kumar Neelakantam , op-tee@lists.trustedfirmware.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Harshal Dev X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1791286430; l=10148; i=harshal.dev@oss.qualcomm.com; s=20251124; h=from:subject:message-id; bh=g7TKIDQ7wd3sOvRr35lEot/KjYrlsV1dyNZ6GlMcRJY=; b=C19gBCRfhALRW9beckjU3Ug8rCq6PA0ZjascKDpT2YnStmcuuRSwXkAgTTGvo+ih1p7aF3C0W PttrV+jwEQrDoOFhTXe4QKiu2cyOCes3n/wlWqKChBajUswthUIIRs0 X-Developer-Key: i=harshal.dev@oss.qualcomm.com; a=ed25519; pk=SHJ8K4SglF5t7KmfMKXl6Mby40WczSeLs4Qus7yFO7c= X-Proofpoint-Spam-Info: AW1haW4tMjYxMDA2MDA0NSBTYWx0ZWRfXx/dANoTvMvb3 SWBnfqcge1GVOBKmQMjBnSHV+sp7xw4zYQwCIZlm7HvDr+zuqtYV43hO0lPe9aznnpps2fluNQu WrCL86d7H+jKoFVkkoByWh30Oo5dn68= X-Authority-Analysis: v=2.4 cv=NshE4MdJ c=1 sm=1 tr=0 ts=6ac4dcc3 cx=c_pps a=Qgeoaf8Lrialg5Z894R3/Q==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=EUspDBNiAAAA:8 a=nsqFTM80TsG4aMfu2G4A:9 a=QEXdDO2ut3YA:10 a=x9snwWr2DeNwDh03kgHS:22 X-Proofpoint-GUID: Hw0kP6gJiKNEJNVmcLOWR_mzcsK-naTp X-Proofpoint-ORIG-GUID: Hw0kP6gJiKNEJNVmcLOWR_mzcsK-naTp X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDA2MDA0NSBTYWx0ZWRfX69E4RHkRb1PZ QGJAxx8f8seueY8BVXDdOjyHGnZIzLJita1hVTJvH1XXNNqRzFjldo66YnXK1mDg/zWe6WCE6Fl RDuRH5ML88VWGHIn1fDd7jjlWmTN4aTnaxyyWytqbGjdRS+qz0kJpKEXPPlRhzRvQPGtSXV/8Xa 5wl7aKkT78LpE4EuZZmef7aYeIe20GrVP7m3AmZGm/GV+9wb/8xvOGoNmp+XA7JAkh/h3heAkkx gwzC8wujlhGrwPYhUoV0iOmNDKg/u2YqMV/tXitHUs92mrbLZ+gPhKqeH/7+zkHPAaj9VlDWfgP x2jAjW6UTSIUu2CE304cS+MZhRG6h5kpb3hC5sLGz08HvD66XvgjBe5gHqVKx55HVjqkEPU0Mg9 rMakIGmHvrKwlEWGTfnG/x9jXZxg/wUVyfLX6wHzqABnZxHK/ho6vsDRWdn5ffqykUOmX+7ZwyT TQaGoagjBWyF+CLfWtQ== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-10-06_03,2026-10-06_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 suspectscore=0 malwarescore=0 phishscore=0 impostorscore=0 spamscore=0 clxscore=1015 priorityscore=1501 bulkscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2609040000 definitions=main-2610060045 QTEE exposes certain secure services implemented either within the QTEE kernel or via pre-loaded Trusted Applications (TAs). Such always-available services can be readily accessed by TEE client drivers via QTEE's object-IPC protocol if the service is registered as a device on the TEE bus. One such service is the EFI-variables service, implemented by the uefisecapp TA which enables kernel clients to access EFI variables at runtime. Maintain a static list of such always-available secure services and add support for the QCOMTEE driver to register these services as devices on the TEE bus during probe. Signed-off-by: Harshal Dev --- drivers/tee/qcomtee/call.c | 161 ++++++++++++++++++++++++++++++++++- drivers/tee/qcomtee/core.c | 9 +- drivers/tee/qcomtee/qcomtee.h | 12 +++ drivers/tee/qcomtee/qcomtee_msg.h | 1 + drivers/tee/qcomtee/qcomtee_object.h | 3 +- 5 files changed, 179 insertions(+), 7 deletions(-) diff --git a/drivers/tee/qcomtee/call.c b/drivers/tee/qcomtee/call.c index c97afaa1b4aa..3061bcbd15ab 100644 --- a/drivers/tee/qcomtee/call.c +++ b/drivers/tee/qcomtee/call.c @@ -676,9 +676,13 @@ static void qcomtee_get_qtee_feature_list(struct tee_context *ctx, u32 id, /* Get ''FeatureVersions Service'' object. */ service = qcomtee_object_get_service(oic, client_env, - QCOMTEE_FEATURE_VER_UID); - if (service == NULL_QCOMTEE_OBJECT) + QCOMTEE_FEATURE_VER_UID, + &result); + if (service == NULL_QCOMTEE_OBJECT) { + if (result) + pr_err("FeatureVersions Service unavailable (%d)\n", result); goto out_failed; + } /* IB: Feature to query. */ u[0].b.addr = &id; @@ -698,6 +702,156 @@ static void qcomtee_get_qtee_feature_list(struct tee_context *ctx, u32 id, qcomtee_object_put(client_env); } +/** + * is_qcomtee_service_available() - Check if the QTEE service identified by the UID + * is available + * @oic: context to use for the current invocation. + * @client_env: Client environment object. + * @service_name: Name of the QTEE service. + * @uid: 32-bit UID of the service. + * + * Returns true if the service exists and is available. + * Returns false if a service is not exposed by QTEE. + */ +static bool is_qcomtee_service_available(struct qcomtee_object_invoke_ctx *oic, + struct qcomtee_object *client_env, + const char *service_name, u32 uid) +{ + struct qcomtee_object *service; + int error = 0; + bool ret = false; + + /* Get service object corresponding to the uid. */ + service = qcomtee_object_get_service(oic, client_env, uid, &error); + if (service != NULL_QCOMTEE_OBJECT) { + qcomtee_object_put(service); + ret = true; + } + + /* When we fail to get the service, QTEE provides the reason. */ + if (error) + pr_debug("%s is unavailable (%d)\n", service_name, error); + + return ret; +} + +/* + * QTEE Service UUID name space identifier + * + * A random UUID that is allocated as a name space identifier for forming UUID's + * representing secure services exposed by QTEE. + */ +static const uuid_t qtee_service_uuid_ns = UUID_INIT(0xe1b48857, 0x6154, 0x49f9, + 0x93, 0x4e, 0xa2, 0xf2, + 0x0a, 0xba, 0x98, 0x42); + +static const struct qtee_service qtee_services[] = { + { "qcom.tz.uefisecapp", + QCOMTEE_UEFI_SEC_UID } +}; + +static void qtee_release_service(struct device *dev) +{ + struct tee_client_device *qtee_service = to_tee_client_device(dev); + + kfree(qtee_service); +} + +/** + * qtee_register_service() - Register a given QTEE service on the TEE bus as a + * TEE client device + * @oic: context to use for the current invocation. + * @client_env: Client environment object. + * @service_name: Name of the QTEE service to be enumerated. + * @uid: 32-bit UID used by QTEE to identify the service. + * + * Returns 0 on success and < 0 on failure. + */ +static int qtee_register_service(struct qcomtee_object_invoke_ctx *oic, + struct qcomtee_object *client_env, + const char *service_name, + const u32 uid) +{ + struct tee_client_device *qtee_service; + uuid_t service_uuid; + int rc; + + if (!is_qcomtee_service_available(oic, client_env, service_name, uid)) + return -EOPNOTSUPP; + + tee_generate_uuid_v5(&service_uuid, &qtee_service_uuid_ns, service_name, + strlen(service_name)); + + qtee_service = kzalloc_obj(*qtee_service); + if (!qtee_service) + return -ENOMEM; + + qtee_service->dev.bus = &tee_bus_type; + qtee_service->dev.release = qtee_release_service; + if (dev_set_name(&qtee_service->dev, "qtee-svc-%pUb", &service_uuid)) { + kfree(qtee_service); + return -ENOMEM; + } + uuid_copy(&qtee_service->id.uuid, &service_uuid); + + rc = device_register(&qtee_service->dev); + if (rc) { + pr_err("QTEE service registration failed, err: %d\n", rc); + put_device(&qtee_service->dev); + return rc; + } + + return 0; +} + +/** + * qtee_register_services() - Enumerate all the secure services exposed by QTEE + * from the static 'qtee_services' list and register them on the TEE bus as + * TEE client devices. + * + * Not all versions of QTEE support a given service. Hence, we try to + * enumerate as many services from the 'qtee_services' list as possible. + * Not being able to enumerate a service shouldn't cause the driver probe + * to fail since none of the services in the list are mandatory for + * establishing communication with QTEE. + * @ctx: TEE context. + */ +static void qtee_register_services(struct tee_context *ctx) +{ + u32 idx; + struct qcomtee_object *client_env; + + struct qcomtee_object_invoke_ctx *oic __free(kfree) = + qcomtee_object_invoke_ctx_alloc(ctx, true); + if (!oic) + return; + + client_env = qcomtee_object_get_client_env(oic); + if (client_env == NULL_QCOMTEE_OBJECT) + return; + + for (idx = 0; idx < ARRAY_SIZE(qtee_services); idx++) + qtee_register_service(oic, client_env, + qtee_services[idx].name, + qtee_services[idx].uid); + + qcomtee_object_put(client_env); +} + +static int qtee_unregister_service(struct device *dev, void *data) +{ + if (!strncmp(dev_name(dev), "qtee-svc", strlen("qtee-svc"))) + device_unregister(dev); + + return 0; +} + +static void qtee_unregister_services(void) +{ + bus_for_each_dev(&tee_bus_type, NULL, NULL, + qtee_unregister_service); +} + static const struct tee_driver_ops qcomtee_ops = { .get_version = qcomtee_get_version, .open = qcomtee_open, @@ -779,6 +933,8 @@ static int qcomtee_probe(struct platform_device *pdev) QTEE_VERSION_GET_MINOR(qcomtee->qtee_version), QTEE_VERSION_GET_PATCH(qcomtee->qtee_version)); + qtee_register_services(qcomtee->ctx); + return 0; err_dest_wq: @@ -808,6 +964,7 @@ static void qcomtee_remove(struct platform_device *pdev) { struct qcomtee *qcomtee = platform_get_drvdata(pdev); + qtee_unregister_services(); teedev_close_context(qcomtee->ctx); /* Wait for RELEASE operations to be processed for QTEE objects. */ tee_device_unregister(qcomtee->teedev); diff --git a/drivers/tee/qcomtee/core.c b/drivers/tee/qcomtee/core.c index 60fe3b5776e3..4a523a95bf0e 100644 --- a/drivers/tee/qcomtee/core.c +++ b/drivers/tee/qcomtee/core.c @@ -898,19 +898,20 @@ qcomtee_object_get_client_env(struct qcomtee_object_invoke_ctx *oic) struct qcomtee_object * qcomtee_object_get_service(struct qcomtee_object_invoke_ctx *oic, - struct qcomtee_object *client_env, u32 uid) + struct qcomtee_object *client_env, u32 uid, + int *result) { struct qcomtee_arg u[3] = { 0 }; - int ret, result; + int ret; u[0].b.addr = &uid; u[0].b.size = sizeof(uid); u[0].type = QCOMTEE_ARG_TYPE_IB; u[1].type = QCOMTEE_ARG_TYPE_OO; ret = qcomtee_object_do_invoke(oic, client_env, QCOMTEE_CLIENT_ENV_OPEN, - u, &result); + u, result); - if (ret || result) + if (ret || *result) return NULL_QCOMTEE_OBJECT; return u[1].o; diff --git a/drivers/tee/qcomtee/qcomtee.h b/drivers/tee/qcomtee/qcomtee.h index f39bf63fd1c2..66d305a46c0a 100644 --- a/drivers/tee/qcomtee/qcomtee.h +++ b/drivers/tee/qcomtee/qcomtee.h @@ -17,6 +17,8 @@ #define QCOMTEE_OBJREF_FLAG_USER BIT(1) #define QCOMTEE_OBJREF_FLAG_MEM BIT(2) +#define QTEE_UUID_NS_NAME_SIZE 128 + /** * struct qcomtee - Main service struct. * @teedev: client device. @@ -39,6 +41,16 @@ struct qcomtee { u32 qtee_version; }; +/** + * struct qtee_service - A secure service exposed by QTEE identified by a 32-bit UID. + * @name: Name of the QTEE service. + * @uid: 32-bit UID used by QTEE to identify the service. + */ +struct qtee_service { + const char *name; + const u32 uid; +}; + void qcomtee_fetch_async_reqs(struct qcomtee_object_invoke_ctx *oic); struct qcomtee_object *qcomtee_idx_erase(struct qcomtee_object_invoke_ctx *oic, u32 idx); diff --git a/drivers/tee/qcomtee/qcomtee_msg.h b/drivers/tee/qcomtee/qcomtee_msg.h index 5d7b21fdd368..9278a361dc70 100644 --- a/drivers/tee/qcomtee/qcomtee_msg.h +++ b/drivers/tee/qcomtee/qcomtee_msg.h @@ -105,6 +105,7 @@ union qcomtee_msg_arg { #define QTEE_VERSION_GET_MINOR(x) (((x) >> 12) & 0xffU) #define QTEE_VERSION_GET_PATCH(x) ((x) >> 0 & 0xfffU) +#define QCOMTEE_UEFI_SEC_UID 413 /* Response types as returned from qcomtee_object_invoke_ctx_invoke(). */ /* The message contains a callback request. */ diff --git a/drivers/tee/qcomtee/qcomtee_object.h b/drivers/tee/qcomtee/qcomtee_object.h index d3740099fae0..901ba3565a73 100644 --- a/drivers/tee/qcomtee/qcomtee_object.h +++ b/drivers/tee/qcomtee/qcomtee_object.h @@ -317,6 +317,7 @@ qcomtee_object_get_client_env(struct qcomtee_object_invoke_ctx *oic); struct qcomtee_object * qcomtee_object_get_service(struct qcomtee_object_invoke_ctx *oic, - struct qcomtee_object *client_env, u32 uid); + struct qcomtee_object *client_env, u32 uid, + int *result); #endif /* QCOMTEE_OBJECT_H */ -- 2.34.1