From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 AF46C286AC; Mon, 6 Apr 2026 15:09:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775488174; cv=none; b=hU6FrpTc/nuRG6gj9q91EvbnCPwZw0DIh732cyUGB4H1kNRmD7v7g8DaN5S+VgswDGe1YCtbxDD4za3tautndc0PyBcfOoe9nUUEeFWYqe/DLzAGNSQMLuzLqOYjsbOua2z5uxJEnScYC4q10w3S1XKbvqAxEefbw7xtoyRQnZg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775488174; c=relaxed/simple; bh=O0tCVCwItPdB09X25AtxkzJho55vhQaNrcXsCz+9/zo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZY8+6/BINGToA3Jm+F0WJsyFjJ0xgpaZ/6OB38pet85Msb/ukc0Psm3ZQit8WxPv0EUUdYvoIH+6b3aO7eHiVzp5JrIcTmSUXATl/d6T2HtLGNjajc1ZD3mZnv29bEUkw50xkPBvuMIm3Ha74RJdaWzSp8dLur7LGfHI2kUOBCg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=o/y8R8bc; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="o/y8R8bc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 68937C4CEF7; Mon, 6 Apr 2026 15:09:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1775488174; bh=O0tCVCwItPdB09X25AtxkzJho55vhQaNrcXsCz+9/zo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=o/y8R8bcEVTlTvK0zRqe4ZRyaVIKSa6J42j2BUFXyoXgcPkklW46Kgoxtfq3xc4VM UnpDKxOQHOgziuOFJafVPT/kkbzrMn0NTyIHGXhq1nhmibXsG8CRQn8fW9Z5xRvm6r jqbHL9x5r5Re4AXMglM3CIl2xrFIMtiWjQzb95Mf/YTxAHvxiUElkEENbA+NjWVumE djcnwUWumiNfqD7GNRjNdQK0j1EhLLJLaAR8g+BpR2pb6B3c/12zU6X3ceiH2mcr1E fGcgsON4etNkPZgmJXUa9y1CvfU2gSqfHWb0MkfGujSgNjES2IhSKNrLQUBf4k+ARS yDiUwKrLlpipw== Date: Mon, 6 Apr 2026 10:09:27 -0500 From: Bjorn Andersson To: Sumit Garg Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-media@vger.kernel.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, ath12k@lists.infradead.org, linux-remoteproc@vger.kernel.org, konradybcio@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, robin.clark@oss.qualcomm.com, sean@poorly.run, akhilpo@oss.qualcomm.com, lumag@kernel.org, abhinav.kumar@linux.dev, jesszhan0024@gmail.com, marijn.suijten@somainline.org, airlied@gmail.com, simona@ffwll.ch, vikash.garodia@oss.qualcomm.com, dikshita.agarwal@oss.qualcomm.com, bod@kernel.org, mchehab@kernel.org, elder@kernel.org, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, jjohnson@kernel.org, mathieu.poirier@linaro.org, trilokkumar.soni@oss.qualcomm.com, mukesh.ojha@oss.qualcomm.com, pavan.kondeti@oss.qualcomm.com, jorge.ramirez@oss.qualcomm.com, tonyh@qti.qualcomm.com, vignesh.viswanathan@oss.qualcomm.com, srinivas.kandagatla@oss.qualcomm.com, amirreza.zarrabi@oss.qualcomm.com, jens.wiklander@linaro.org, op-tee@lists.trustedfirmware.org, apurupa@qti.qualcomm.com, skare@qti.qualcomm.com, harshal.dev@oss.qualcomm.com, linux-kernel@vger.kernel.org, Sumit Garg Subject: Re: [PATCH v3 00/15] firmware: qcom: Add OP-TEE PAS service support Message-ID: References: <20260327131043.627120-1-sumit.garg@kernel.org> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260327131043.627120-1-sumit.garg@kernel.org> On Fri, Mar 27, 2026 at 06:40:28PM +0530, Sumit Garg wrote: > From: Sumit Garg > > Qcom platforms has the legacy of using non-standard SCM calls > splintered over the various kernel drivers. These SCM calls aren't > compliant with the standard SMC calling conventions which is a > prerequisite to enable migration to the FF-A specifications from Arm. > Please get our colleagues involved in this discussion, because this non-SCM interface does not match the direction we are taking. Regards, Bjorn > OP-TEE as an alternative trusted OS to Qualcomm TEE (QTEE) can't > support these non-standard SCM calls. And even for newer architectures > using S-EL2 with Hafnium support, QTEE won't be able to support SCM > calls either with FF-A requirements coming in. And with both OP-TEE > and QTEE drivers well integrated in the TEE subsystem, it makes further > sense to reuse the TEE bus client drivers infrastructure. > > The added benefit of TEE bus infrastructure is that there is support > for discoverable/enumerable services. With that client drivers don't > have to manually invoke a special SCM call to know the service status. > > So enable the generic Peripheral Authentication Service (PAS) provided > by the firmware. It acts as the common layer with different TZ > backends plugged in whether it's an SCM implementation or a proper > TEE bus based PAS service implementation. > > The TEE PAS service ABI is designed to be extensible with additional API > as PTA_QCOM_PAS_CAPABILITIES. This allows to accommodate any future > extensions of the PAS service needed while still maintaining backwards > compatibility. > > Currently OP-TEE support is being added to provide the backend PAS > service implementation which can be found as part of this PR [1]. > This implementation has been tested on Kodiak/RB3Gen2 board with lemans > EVK board being the next target. In addition to that WIN/IPQ targets > planning to use OP-TEE will use this service too. Surely the backwards > compatibility is maintained and tested for SCM backend. > > Patch summary: > - Patch #1: adds Kodiak EL2 overlay since boot stack with TF-A/OP-TEE > only allow UEFI and Linux to boot in EL2. > - Patch #2: adds generic PAS service. > - Patch #3: migrates SCM backend to generic PAS service. > - Patch #4: adds TEE/OP-TEE backend for generic PAS service. > - Patch #5-#13: migrates all client drivers to generic PAS service. > - Patch #14: drops legacy PAS SCM exported APIs. > > The patch-set is based on v7.0-rc5 tag and can be found in git tree here > [2]. > > Merge strategy: > > It is expected due to APIs dependency, the entire patch-set to go via > the Qcom tree. All other subsystem maintainers, it will be great if I > can get acks for the corresponding subsystem patches. > > [1] https://github.com/OP-TEE/optee_os/pull/7721 > [2] https://git.kernel.org/pub/scm/linux/kernel/git/sumit.garg/linux.git/log/?h=qcom-pas-v3 > > --- > Changes in v3: > - Incorporated some style and misc. comments for patch #2, #3 and #4. > - Add QCOM_PAS Kconfig dependency for various subsystems. > - Switch from pseudo TA to proper TA invoke commands. > > Changes in v2: > - Fixed kernel doc warnings. > - Polish commit message and comments for patch #2. > - Pass proper PAS ID in set_remote_state API for media firmware drivers. > - Added Maintainer entry and dropped MODULE_AUTHOR. > > Mukesh Ojha (1): > arm64: dts: qcom: kodiak: Add EL2 overlay > > Sumit Garg (14): > firmware: qcom: Add a generic PAS service > firmware: qcom_scm: Migrate to generic PAS service > firmware: qcom: Add a PAS TEE service > remoteproc: qcom_q6v5_pas: Switch over to generic PAS TZ APIs > remoteproc: qcom_q6v5_mss: Switch to generic PAS TZ APIs > soc: qcom: mdtloader: Switch to generic PAS TZ APIs > remoteproc: qcom_wcnss: Switch to generic PAS TZ APIs > remoteproc: qcom: Select QCOM_PAS generic service > drm/msm: Switch to generic PAS TZ APIs > media: qcom: Switch to generic PAS TZ APIs > net: ipa: Switch to generic PAS TZ APIs > wifi: ath12k: Switch to generic PAS TZ APIs > firmware: qcom_scm: Remove SCM PAS wrappers > MAINTAINERS: Add maintainer entry for Qualcomm PAS TZ service > > MAINTAINERS | 9 + > arch/arm64/boot/dts/qcom/Makefile | 2 + > arch/arm64/boot/dts/qcom/kodiak-el2.dtso | 35 ++ > drivers/firmware/qcom/Kconfig | 19 + > drivers/firmware/qcom/Makefile | 2 + > drivers/firmware/qcom/qcom_pas.c | 288 +++++++++++ > drivers/firmware/qcom/qcom_pas.h | 50 ++ > drivers/firmware/qcom/qcom_pas_tee.c | 478 ++++++++++++++++++ > drivers/firmware/qcom/qcom_scm.c | 302 ++++------- > drivers/gpu/drm/msm/Kconfig | 1 + > drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 4 +- > drivers/gpu/drm/msm/adreno/adreno_gpu.c | 11 +- > drivers/media/platform/qcom/iris/Kconfig | 25 +- > .../media/platform/qcom/iris/iris_firmware.c | 9 +- > drivers/media/platform/qcom/venus/Kconfig | 1 + > drivers/media/platform/qcom/venus/firmware.c | 11 +- > drivers/net/ipa/Kconfig | 2 +- > drivers/net/ipa/ipa_main.c | 13 +- > drivers/net/wireless/ath/ath12k/Kconfig | 2 +- > drivers/net/wireless/ath/ath12k/ahb.c | 8 +- > drivers/remoteproc/Kconfig | 1 + > drivers/remoteproc/qcom_q6v5_mss.c | 5 +- > drivers/remoteproc/qcom_q6v5_pas.c | 51 +- > drivers/remoteproc/qcom_wcnss.c | 12 +- > drivers/soc/qcom/mdt_loader.c | 12 +- > include/linux/firmware/qcom/qcom_pas.h | 43 ++ > include/linux/firmware/qcom/qcom_scm.h | 29 -- > include/linux/soc/qcom/mdt_loader.h | 6 +- > 28 files changed, 1114 insertions(+), 317 deletions(-) > create mode 100644 arch/arm64/boot/dts/qcom/kodiak-el2.dtso > create mode 100644 drivers/firmware/qcom/qcom_pas.c > create mode 100644 drivers/firmware/qcom/qcom_pas.h > create mode 100644 drivers/firmware/qcom/qcom_pas_tee.c > create mode 100644 include/linux/firmware/qcom/qcom_pas.h > > -- > 2.51.0 >