1
linux/drivers/firmware/qcom
Qingqing Zhou f489f6c6eb firmware: qcom: scm: Return -EOPNOTSUPP for unsupported SHM bridge enabling
When enabling SHM bridge, QTEE returns 0 and sets error 4 in result to
qcom_scm for unsupported platforms. Currently, tzmem interprets this as
an unknown error rather than recognizing it as an unsupported platform.

Error log:
[    0.177224] qcom_scm firmware:scm: error (____ptrval____): Failed to enable the TrustZone memory allocator
[    0.177244] qcom_scm firmware:scm: probe with driver qcom_scm failed with error 4

To address this, modify the function call qcom_scm_shm_bridge_enable()
to remap result to indicate an unsupported error. This way, tzmem will
correctly identify it as an unsupported platform case instead of
reporting it as an error.

Fixes: 178e19c0df ("firmware: qcom: scm: add support for SHM bridge operations")
Signed-off-by: Qingqing Zhou <quic_qqzhou@quicinc.com>
Co-developed-by: Kuldeep Singh <quic_kuldsing@quicinc.com>
Signed-off-by: Kuldeep Singh <quic_kuldsing@quicinc.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Mukesh Ojha <quic_mojha@quicinc.com>
Link: https://lore.kernel.org/r/20241022192148.1626633-1-quic_kuldsing@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-10-22 19:05:18 -05:00
..
Kconfig firmware: qcom: scm: Refactor code to support multiple dload mode 2024-08-14 22:14:42 -05:00
Makefile firmware: qcom: add a dedicated TrustZone buffer allocator 2024-06-23 16:08:04 -05:00
qcom_qseecom_uefisecapp.c firmware: qcom: uefisecapp: Fix deadlock in qcuefi_acquire() 2024-08-30 22:17:50 -05:00
qcom_qseecom.c
qcom_scm-legacy.c
qcom_scm-smc.c firmware: qcom: scm: Mark get_wq_ctx() as atomic call 2024-08-14 22:08:28 -05:00
qcom_scm.c firmware: qcom: scm: Return -EOPNOTSUPP for unsupported SHM bridge enabling 2024-10-22 19:05:18 -05:00
qcom_scm.h firmware: qcom: scm: add support for SHM bridge operations 2024-06-23 16:08:20 -05:00
qcom_tzmem.c firmware: qcom: tzmem: disable sdm670 platform 2024-08-21 08:37:37 -05:00
qcom_tzmem.h firmware: qcom: add a dedicated TrustZone buffer allocator 2024-06-23 16:08:04 -05:00