Commit f489f6c6 authored by Qingqing Zhou's avatar Qingqing Zhou Committed by Bjorn Andersson
Browse files

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: 178e19c0 ("firmware: qcom: scm: add support for SHM bridge operations")
Signed-off-by: default avatarQingqing Zhou <quic_qqzhou@quicinc.com>
Co-developed-by: default avatarKuldeep Singh <quic_kuldsing@quicinc.com>
Signed-off-by: default avatarKuldeep Singh <quic_kuldsing@quicinc.com>
Reviewed-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: default avatarMukesh Ojha <quic_mojha@quicinc.com>
Link: https://lore.kernel.org/r/20241022192148.1626633-1-quic_kuldsing@quicinc.com


Signed-off-by: default avatarBjorn Andersson <andersson@kernel.org>
parent 0a97195d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment