Skip to content

7.2 optee - #1019

Open
Salendarsingh Gaud (sgaud-quic) wants to merge 15 commits into
qualcomm-linux:qcom-next-stagingfrom
sgaud-quic:7.2-optee
Open

7.2 optee#1019
Salendarsingh Gaud (sgaud-quic) wants to merge 15 commits into
qualcomm-linux:qcom-next-stagingfrom
sgaud-quic:7.2-optee

Conversation

@sgaud-quic

Copy link
Copy Markdown
Contributor

Optee changes on top of kernel v7.2

Sumit Garg (b49020)and others added 15 commits August 26, 2026 19:46
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>
@qcomlnxci

Copy link
Copy Markdown

Test Matrix

Test Caseglymur-crd-multimediahamoa-iot-evk-multimediakaanapali-mtp-multimedialemans-evk-multimediamonaco-evk-multimediapurwa-iot-evk-multimediaqcs615-ride-multimediaqcs6490-rb3gen2-multimediaqcs8300-ride-multimediaqcs9100-ride-r3-multimediashikra-iqs-evk-multimediasm8750-mtp-multimedia
Audio_Card_Registration✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass⚠️ skip✅ Pass⚠️ skip⚠️ skip⚠️ skip✅ Pass
BT_FW_KMD_Service✅ Pass✅ Pass❌ Fail✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass❌ Fail
BT_ON_OFF✅ Pass✅ Pass⚠️ skip✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass⚠️ skip
BT_SCAN✅ Pass✅ Pass⚠️ skip✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass⚠️ skip
CPUFreq_Validation✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass
CPU_affinity✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass
DSP_AudioPD✅ Pass✅ Pass⚠️ skip✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass⚠️ skip✅ Pass
Ethernet_Basic_Validation⚠️ skip⚠️ skip⚠️ skip✅ Pass✅ Pass⚠️ skip⚠️ skip⚠️ skip❌ Fail❌ Fail⚠️ skip⚠️ skip
Freq_Scaling✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass❌ Fail✅ Pass✅ Pass✅ Pass✅ Pass
GIC✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass❌ Fail✅ Pass✅ Pass❌ Fail✅ Pass
IPA✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass
Interrupts✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass
KVM_Driver✅ Pass❌ Fail❌ Fail✅ Pass✅ Pass❌ Fail❌ Fail❌ Fail❌ Fail❌ Fail❌ Fail❌ Fail
KVM_EL2_DTB✅ Pass❌ Fail❌ Fail✅ Pass✅ Pass❌ Fail❌ Fail❌ Fail❌ Fail❌ Fail❌ Fail❌ Fail
KVM_Infra✅ Pass❌ Fail❌ Fail✅ Pass✅ Pass❌ Fail❌ Fail❌ Fail❌ Fail❌ Fail❌ Fail❌ Fail
OpenCV✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass◻️✅ Pass
PCIe✅ Pass✅ Pass❌ Fail✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass❌ Fail✅ Pass❌ Fail❌ Fail
Probe_Failure_Check❌ Fail❌ Fail✅ Pass❌ Fail❌ Fail❌ Fail❌ Fail❌ Fail❌ Fail❌ Fail❌ Fail✅ Pass
RMNET✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass
UFS_Validation⚠️ skip✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass⚠️ skip✅ Pass
USBHost❌ Fail✅ Pass❌ Fail✅ Pass❌ Fail✅ Pass✅ Pass❌ Fail❌ Fail❌ Fail❌ Fail❌ Fail
WiFi_Firmware_Driver✅ Pass✅ Pass❌ Fail✅ Pass❌ Fail✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass
WiFi_OnOff✅ Pass✅ Pass⚠️ skip✅ Pass❌ Fail✅ Pass✅ Pass✅ Pass⚠️ skip✅ Pass⚠️ skip⚠️ skip
adsp_remoteproc✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass⚠️ skip✅ Pass
cdsp_remoteproc✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass
gpdsp_remoteproc⚠️ skip⚠️ skip⚠️ skip✅ Pass✅ Pass⚠️ skip⚠️ skip⚠️ skip✅ Pass✅ Pass⚠️ skip⚠️ skip
hotplug✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass
irq✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass
kaslr✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass
pinctrl✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass
qcom_hwrng✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass◻️✅ Pass
rngtest✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass
shmbridge✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass
smmu❌ Fail❌ Fail✅ Pass❌ Fail❌ Fail❌ Fail❌ Fail✅ Pass❌ Fail❌ Fail✅ Pass✅ Pass
watchdog✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass
wpss_remoteproc✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass✅ Pass

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

@sgaud-quic@qcomlnxci@b49020@ldts