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 539D0385D8B for ; Tue, 7 Jul 2026 06:12:02 +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=1783404724; cv=none; b=MOnWjb6rvWVr0d1PIsDNSiNJmqGcOQqE7O2LMkXxdLpQOGBMpKOs+7c5WNvyLC7ns+zGN1wAl3VR3UTncbintRZpmPeLiEs+Jnhfmeu5GftWBWdNybv955NObWQjs5qZGwNxz5efzTyGYHUjGmRf7itsXklAv/KbUuQLB8m9ET8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783404724; c=relaxed/simple; bh=JFXGqCGu2H92EhpiiWXQPFhlBhyUzeEGrMTelGV5S+U=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=uNzTLGTikjb7Gj35yhcP0P0N6GqfduQKbgd0Q9N9ec3v8MhpNMbJ3tAzUdY1V114V6bWHJtUrjTYhgFcqZw5ms6059PeIMTk0ol79ZjYLzv+oU3VY1ZiDZXiKR8mc4dDt21Iy8tG8ra4z/az9osOE4I+DxTDFL++yjFlzeJG24I= 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=cB3CzkSC; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=jCuH01QZ; 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="cB3CzkSC"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="jCuH01QZ" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66749L442676758 for ; Tue, 7 Jul 2026 06:12:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=qcppdkim1; bh=HINMq122UHv1BM0ydfXCtB Iu1L4J+lad+rQZ2QvoAtI=; b=cB3CzkSC6FeLPR1/Mw+Z3rbhUBtZNG0XIUg3Xc HGzNUk4xCM/TPQQxCbaXjXnObCkBCPjWHrPo4Am0TcA+WxwI/zuYKBIL1Rwi2Bxu CUKD8jqHXADvvR1PIo1hgV6uH/YiJLB1LO0an28yf6DxfxJPVQ/QoOAuNJZX13EB N6ZyZ8wKXsClaU28AD+NvVt9gAdjuRjI8OjyLNE7ftDpKNUkNsX3FJXLtKmjDqiY fOu7bczap3xJZiJ492PWSWDYqND/g5I6QZbPNucml7NXNYed0GIQICAv9Q0vPa+V iHp++KGwbA/B+6bLzGVY9Zh+ROGP6Zst7ccans9YqLLvWv4A== Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4f8qj78w5v-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 07 Jul 2026 06:12:01 +0000 (GMT) Received: by mail-pf1-f198.google.com with SMTP id d2e1a72fcca58-8482fd61e83so496870b3a.1 for ; Mon, 06 Jul 2026 23:12:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1783404720; x=1784009520; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=HINMq122UHv1BM0ydfXCtBIu1L4J+lad+rQZ2QvoAtI=; b=jCuH01QZ1S4wkfT+v0ZLvzJPcj6s7zDMdvBHYyyJSCj+4ukr4YXqzZWQTqu8HBIvMn EfzykfsULxWlcAYBkPCkB+3HhN9fD3Xd38SZdxdyWAzJOSdn+WU4aChi9ZX7yXz82wGg bOT3MQdB2uefqpTHxcrztwku8VrGqJd2vNDqOP+U+hV4yZZ+ZUG2amUeVcVASCoYAt6W 0/Nm/PCsJ5U/uxUWPIaDdowypqm64mV+72BqNTlpS1k8OTpX0h0BUHCRQ/Ljh1viVo0X LCu24qyexr4E6eKJjTCTqhv/xpfv8H6CKBgEZJfQM9ILY3crsbB79pDMbn2sCqdPCWC5 j5xQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783404720; x=1784009520; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=HINMq122UHv1BM0ydfXCtBIu1L4J+lad+rQZ2QvoAtI=; b=boFcSPdnFYKaOVPJ8mLt6cL5R+S5UFgo29GA/Nx5+bfnmJUGFDriQw1AfrQHaSNWKk lLtxeCJuw2Jfyf7C6BetcFgaetEh4SQm+w5QOjZE5QIOPg0fuGdMF9lHy+7+xYaqFHTh +18aYPVwqLNTs1Jfe0iBD2TNIHg+zm5CzTBxPqWoK+99/+iFn9whpB44Awo1Y/xLceqD wmAprVt67/ite3V9nkrbjHcks5D4LCjAKwxY8P4eE2IaJUOYp7VQL/HlG9ypON2ZP6dD pwK/X+R4ZwbFAc+KNhTutQ/KXxGv+XsQl5I91hU2nDRfU4wKsGVyoICD4a8QYCg6VziB Fglg== X-Forwarded-Encrypted: i=1; AHgh+RqzJlCHgq5l4co/xnAHMCeFwHHaCxqMQA6z6qEeaqXxVU7ZbKD2jZHfZAVeoB5N/5545q/ysxqYG2T4qKY=@vger.kernel.org X-Gm-Message-State: AOJu0YzNEHOc/+Sj4tp0VcR4wC6BBDCiK/1UGejvAKtqT8mKeBo6X54c 8b+Ms+2MNl0gobJ8yoP2cZ5qP6yQjHqKp/V1rc1taSNz+XPDuerkH14jebLBJoeUNpgfNoOgUvy zAsb4lKo66ACWO8i6Ev+PCgIOsR2nwqAW/4NDjxEQDM7uhyyhvJlm9SbBp6p8b7d293szoaVIA2 Y= X-Gm-Gg: AfdE7cnc9uX1nnsAhNHWqsRE1KD1vsRV/hbrhQFnenpv5wSPCbWGHXfJN8A1bkEIEpQ DNmFBPrzpOdFwSTBo1mRy5brfglabq69kpbnj2eYCQtFFP/JjzE1Bg49PNqNTw9VaIJHjHvH4+k d/ZJPP07dUJTyavoqGJAF0EbjeDzt5Z33AgoaSE7obB895xXfo8R5CEPe0aLgOAuDskIPLEe1QE QtL4sFuloIXcLUenARzhleyshYz0MfU+sF8WhUoBkCzSNvC3ApBi324J9bst+a02s/yQ6B3nAnp RcEc1Oz+IndVO0jCZzXwlbumf/b8DcLK+6ytPm5o33Onz9qCJFVwWx5u2Xjl8sNSWfQ8MEVkMwf KyT7iCyb2p6dPkLmZeQIxOKK2khP1Yf52OKk/ X-Received: by 2002:aa7:888f:0:b0:845:d2e3:263d with SMTP id d2e1a72fcca58-84826e23a4cmr3586094b3a.55.1783404719971; Mon, 06 Jul 2026 23:11:59 -0700 (PDT) X-Received: by 2002:aa7:888f:0:b0:845:d2e3:263d with SMTP id d2e1a72fcca58-84826e23a4cmr3586073b3a.55.1783404719452; Mon, 06 Jul 2026 23:11:59 -0700 (PDT) Received: from hu-hdev-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8480da8bab0sm3299321b3a.8.2026.07.06.23.11.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jul 2026 23:11:59 -0700 (PDT) From: Harshal Dev Subject: [PATCH 0/6] Add TEE based client driver for UEFI Secure Application Date: Tue, 07 Jul 2026 11:41:26 +0530 Message-Id: <20260707-qcom_uefisecapp_migrate_qcomtee-v1-0-f659cbd5d04c@oss.qualcomm.com> 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 X-B4-Tracking: v=1; b=H4sIAI6YTGoC/x2NQQqEMBAEvyJzNpBoFPUrIiHEVuegxkRlQfz7Z vdYTdH1UERgROqyhwJujrxvCVSekVvsNkPwmJgKWdRSy0Ycbl/NhYkjnPXerDwHe8L89hMQqmz qdtQVpNKUXnxI7udf6If3/QL3yLdGcQAAAA== X-Change-ID: 20260408-qcom_uefisecapp_migrate_qcomtee-13869d45e014 To: Jens Wiklander , Sumit Garg , Amirreza Zarrabi , Bjorn Andersson , Konrad Dybcio Cc: 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=1783404715; l=5039; i=harshal.dev@oss.qualcomm.com; s=20251124; h=from:subject:message-id; bh=JFXGqCGu2H92EhpiiWXQPFhlBhyUzeEGrMTelGV5S+U=; b=dVY42OrgfUJyFWtbinXJzW2iuRrRIcONitvA1Il7l21EQnP9ev/NCpeiFZ6MREvVXrIFc6om/ CuZK8NGA7gVDiq2k20hJaE188RBI801eAQdLnpq/dIAWqqE12rbcbSS X-Developer-Key: i=harshal.dev@oss.qualcomm.com; a=ed25519; pk=SHJ8K4SglF5t7KmfMKXl6Mby40WczSeLs4Qus7yFO7c= X-Proofpoint-ORIG-GUID: OMF6b0tpzTpClhRvww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6sEh7Cy8HP 6abFFD5FB1r3WQl4qlZPa4OF+Dgg7/8= X-Proofpoint-GUID: OMF6b0tpzTpClhRvww2C-bcOUa4cJ7Qp X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-07-07_01,2026-07-06_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 clxscore=1015 impostorscore=0 malwarescore=0 adultscore=0 phishscore=0 suspectscore=0 lowpriorityscore=0 spamscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607070056 On Qualcomm SoC based platforms, UEFI stores EFI variables within the Replay Protected Memory Block (RPMB) which is only accessible by the Qualcomm Trusted Execution Environment (QTEE). For Qualcomm platforms without emulated RPMB support, specifically platforms where RPMB is not located within SPI-NOR storage and instead located on UFS/EMMC storage, non-volatile EFI variables can only be set via a callback request from the UEFI Secure Application to the RPMB service running in user-space (within the QTEE supplicant [1]). Unlike the QCOM-TEE driver, the QSEECOM driver (used by the current QSEECOM based uefisecapp) does not support callback requests. And on certain Qualcomm platforms such as the RB3Gen2, attempts to access the QSEECOM interface fail due to lack of support within Qualcomm TEE. On these platforms, a TEE based uefisecapp client driver is required to: 1. Access cached & volatile EFI variables stored in uefisecapp's memory. 2. Ensure persistence of non-volatile EFI variables via writes through the RPMB service hosted in the QTEE supplicant. This series introduces such a uefisecapp TEE client driver for the aforementioned Qualcomm platforms which installs efi-var operations _if_ the QCOMTEE driver registers support for an object-IPC based uefisecapp service on the TEE bus during its probe. Only new QTEE firmware versions available at [2] provide this support. Thus, QCOMTEE now maintains a static list of always-available object-IPC based secure services exposed by QTEE. These services are implemented either within the QTEE kernel or within a pre-loaded Trusted Application (TA) usually loaded by the bootloader. The uefisecapp TA is an example of a preloaded TA loaded by UEFI. A static list is required since QTEE does not yet expose any way to dynamically query and enumerate the services exposed by it. To facilitate object-IPC interactions from the kernel-space, this series also introduces a tee_client_object_invoke_func() to allow invocation of TEE objects similar to the existing tee_client_invoke_func() API exported by the TEE subsystem which allows invocation of TEE functions. Some suporting changes are also introduced to track and handle operations for TEE contexts opened from the kernel-space in the back-end QCOM-TEE driver along with associated changes in user-space libqcomtee via Pull Request [3]. Finally and as previously mentioned, access to the object-IPC based uefisecapp service is restricted on older QTEE firmware versions. A new QTEE firmware release must be picked up from QArtifactory [2] for all upstream supported Qualcomm SoCs to enable access to uefisecapp service via the TEE client driver. This patch series has been validated on Kodiak RB3Gen2 platform with UFS storage by attempting to read/write EFI variables via the efivar tool [4] after mounting the efivarfs filesystem. See [5] for an example. Merge Strategy: This patch series could either be taken from the OP-TEE tree or the QCOM soc tree. I would prefer it to be picked by the OP-TEE tree since all except the uefisecapp TEE client driver patch in this series make changes relevant to the TEE subsystem. It would be great if the QCOM soc tree maintainers can Ack the uefisecapp driver patch. [1] https://github.com/qualcomm/minkipc [2] https://shorturl.at/zQU07 [3] https://github.com/quic/quic-teec/pull/27 [4] https://github.com/rhboot/efivar [5] https://docs.qualcomm.com/doc/80-70020-27/topic/manage_uefi_environment_variables_using_efivar_tool.html Signed-off-by: Harshal Dev --- Amirreza Zarrabi (2): tee: Add kernel client object invoke helper tee: qcomtee: Allow object invokes from kernel clients Harshal Dev (4): tee: qcomtee: Track the object invocation context tee: Export uuidv5 generation for TEE clients tee: qcomtee: Add support for registering QTEE services on TEE bus firmware: qcom: Add support for TEE based EFI-var client driver MAINTAINERS | 7 + drivers/firmware/qcom/Kconfig | 24 ++ drivers/firmware/qcom/Makefile | 1 + drivers/firmware/qcom/qcom_tee_uefisecapp.c | 525 ++++++++++++++++++++++++++++ drivers/firmware/qcom/qcom_tee_uefisecapp.h | 120 +++++++ drivers/tee/qcomtee/call.c | 218 +++++++++++- drivers/tee/qcomtee/core.c | 9 +- drivers/tee/qcomtee/qcomtee.h | 18 + drivers/tee/qcomtee/qcomtee_msg.h | 1 + drivers/tee/qcomtee/qcomtee_object.h | 16 +- drivers/tee/tee_core.c | 26 +- include/linux/tee_core.h | 15 + include/linux/tee_drv.h | 18 +- 13 files changed, 968 insertions(+), 30 deletions(-) --- base-commit: f3e6330d7fe42b204af05a2dbc68b379e0ad179e change-id: 20260408-qcom_uefisecapp_migrate_qcomtee-13869d45e014 Best regards, -- Harshal Dev