Skip to content

Nord: U-boot OPTEE flow changes - #1003

Merged
Shiraz Hashim (shashim-quic) merged 15 commits into
qualcomm-linux:staging/nordfrom
apateriy-qcom:nord-staging-optee
Aug 26, 2026
Merged

Nord: U-boot OPTEE flow changes#1003
Shiraz Hashim (shashim-quic) merged 15 commits into
qualcomm-linux:staging/nordfrom
apateriy-qcom:nord-staging-optee

Conversation

@apateriy-qcom

Copy link
Copy Markdown

Summary

This series consolidates Qualcomm's Peripheral Authentication Service (PAS) infrastructure by introducing a generic PAS service abstraction that supports multiple TEE backends (QTEE via SCM and OP-TEE), then migrating all client drivers to use this unified interface.

Motivation

Qualcomm platforms have historically relied on non-standard SCM calls scattered across various kernel drivers for PAS operations. These calls are not compliant with ARM's standard SMC calling conventions, which blocks migration to FF-A specifications. Additionally, OP-TEE cannot
support these non-standard SCM calls, and newer architectures using S-EL2 with Hafnium will not support QTEE with FF-A requirements.

By leveraging the TEE bus infrastructure (which both OP-TEE and QTEE drivers integrate with), we can provide a discoverable, enumerable PAS service that supports multiple backends while maintaining backwards compatibility.

Changes

Core Infrastructure

  • firmware: qcom: Add a generic PAS service — Introduces the generic PAS service abstraction with TEE bus integration
  • firmware: qcom_scm: Migrate to generic PAS service — Converts SCM PAS calls to a backend service provider
  • firmware: qcom: Add a PAS TEE service — Adds OP-TEE backend support for PAS operations

**Client Driver Migrations **

  • remoteproc: qcom_q6v5_pas — Modem/ADSP remoteproc
  • remoteproc: qcom_q6v5_mss — MSS remoteproc
  • soc: qcom: mdtloader — MDT loader utility
  • remoteproc: qcom_wcnss — WCNSS remoteproc
  • drm/msm — GPU/display drivers
  • media: qcom — Iris video codec driver
  • net: ipa — IPA network driver
  • wifi: ath12k — WiFi driver
  • remoteproc: qcom: Select QCOM_PAS generic service — Kconfig dependency

Cleanup & Maintenance

  • firmware: qcom_scm: Remove SCM PAS wrappers — Removes legacy exported SCM PAS functions after all clients migrated
  • MAINTAINERS: Add maintainer entry for Qualcomm PAS TZ service — Adds Sumit Garg as maintainer

Feature Addition

  • iris: Enable op-tee support — Adds OP-TEE detection to iris driver, treating SCM failures as non-fatal when OP-TEE is active

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.
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.
Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Link: https://lore.kernel.org/all/20260427095603.1157963-5-sumit.garg@kernel.org/
With the availability of generic PAS service, let's add SCM calls as
a backend to keep supporting legacy QTEE interfaces. The exported
qcom_scm* wrappers will get dropped once all the client drivers get
migrated as part of future patches.
Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Link: https://lore.kernel.org/all/20260427095603.1157963-5-sumit.garg@kernel.org/
Add support for Peripheral Authentication Service (PAS) driver based
on TEE bus with OP-TEE providing the backend 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.
Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Link: https://lore.kernel.org/all/20260427095603.1157963-5-sumit.garg@kernel.org/
Switch qcom_q6v5_pas client driver over to generic PAS TZ APIs. Generic PAS
TZ service allows to support multiple TZ implementation backends like QTEE
based SCM PAS service, OP-TEE based PAS service and any further future TZ
backend service.
Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Link: https://lore.kernel.org/all/20260427095603.1157963-5-sumit.garg@kernel.org/
Switch qcom_q6v5_mss client driver over to generic PAS TZ APIs. Generic PAS
TZ service allows to support multiple TZ implementation backends like QTEE
based SCM PAS service, OP-TEE based PAS service and any further future TZ
backend service.
Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Link: https://lore.kernel.org/all/20260427095603.1157963-5-sumit.garg@kernel.org/
Switch mdtloader client driver over to generic PAS TZ APIs. Generic PAS
TZ service allows to support multiple TZ implementation backends like QTEE
based SCM PAS service, OP-TEE based PAS service and any further future TZ
backend service.
Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Link: https://lore.kernel.org/all/20260427095603.1157963-5-sumit.garg@kernel.org/
Switch qcom_wcnss client driver over to generic PAS TZ APIs. Generic PAS
TZ service allows to support multiple TZ implementation backends like QTEE
based SCM PAS service, OP-TEE based PAS service and any further future TZ
backend service.
Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Link: https://lore.kernel.org/all/20260427095603.1157963-5-sumit.garg@kernel.org/
Select PAS generic service driver to enable support for multiple PAS
backends like OP-TEE in addition to SCM.
Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Link: https://lore.kernel.org/all/20260427095603.1157963-5-sumit.garg@kernel.org/
Switch drm/msm client drivers over to generic PAS TZ APIs. Generic PAS
TZ service allows to support multiple TZ implementation backends like QTEE
based SCM PAS service, OP-TEE based PAS service and any further future TZ
backend service.
Acked-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Link: https://lore.kernel.org/all/20260427095603.1157963-5-sumit.garg@kernel.org/
Switch qcom media client drivers over to generic PAS TZ APIs. Generic PAS
TZ service allows to support multiple TZ implementation backends like QTEE
based SCM PAS service, OP-TEE based PAS service and any further future TZ
backend service.
Along with that pass proper PAS ID to set_remote_state API. As per testing
the SCM backend just ignores it while OP-TEE makes use of it to for proper
book keeping purpose.
Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Link: https://lore.kernel.org/all/20260427095603.1157963-5-sumit.garg@kernel.org/
Switch ipa client driver over to generic PAS TZ APIs. Generic PAS TZ
service allows to support multiple TZ implementation backends like QTEE
based SCM PAS service, OP-TEE based PAS service and any further future TZ
backend service.
Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Link: https://lore.kernel.org/all/20260427095603.1157963-5-sumit.garg@kernel.org/
Switch ath12k client driver over to generic PAS TZ APIs. Generic PAS TZ
service allows to support multiple TZ implementation backends like QTEE
based SCM PAS service, OP-TEE based PAS service and any further future TZ
backend service.
Acked-by: Jeff Johnson <jjohnson@kernel.org>
Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Link: https://lore.kernel.org/all/20260427095603.1157963-5-sumit.garg@kernel.org/
Now since all the Qcom SCM client drivers have been migrated over to
generic PAS TZ service, let's drop the exported SCM PAS wrappers.
Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Link: https://lore.kernel.org/all/20260427095603.1157963-5-sumit.garg@kernel.org/
Add Sumit Garg as the maintainer for the Qualcomm generic Peripheral
Authentication Service (PAS) as well as the PAS TEE backend driver.
Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Link: https://lore.kernel.org/all/20260427095603.1157963-5-sumit.garg@kernel.org/
qcom_scm_mem_protect_video_var() is not serviced when PAS is backed by
OP-TEE (the TEE owns secure memory protection), so its failure there is
expected. Add qcom_pas_is_tee_backed() to report when the active PAS
backend is the OP-TEE one, and in iris only treat the SCM failure as fatal
when OP-TEE is not on the bus.
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez.ortiz@gmail.com>
@shashim-quic
Shiraz Hashim (shashim-quic) merged commit fc6284d into qualcomm-linux:staging/nordAug 26, 2026
0 of 2 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@apateriy-qcom@shashim-quic@b49020@ldts