remoteproc: qcom: pas: Print auth error code
Subsystems (2)
PATCH 1/1 remoteproc: qcom: pas: Print auth error code
When a subsystem fails to start, qcom_pas_start() logs "failed to authenticate image and release reset", but drops the error returned by qcom_pas_prepare_and_auth_reset(). That code tells the failures apart:
a negative errno is either a clock, interconnect or SHM bridge failure on the Linux side or the SCM call's own status, remapped by qcom_scm_call(); a positive value is the status the PIL service returned for the request. Without it, finding out which one happened means adding a print and rebuilding the kernel.
Print the error code, for the DTB image as well as the main one.
---
Hello there,
this is a small one: when a remote processor fails to authenticate, qcom_pas_start() says so but drops the error code, and that code is what tells a TrustZone refusal apart from a problem on the Linux side. The patch adds it to both messages, the main image and the DTB one.
I ran into this bringing up the Motorola Moto G 5G Plus (nairo, SM7250), where the compute DSP will not start. With the patch it reports "failed to authenticate image and release reset: -22", which pointed at TrustZone refusing the call rather than at the image. The ADSP and the modem still start as before. I could not test the DTB path, as SM7250 has no DTB images.
It builds without warnings with W=1 (arm64 defconfig), checkpatch --strict is clean, and it applies to rproc-next (82d0bbd67c42). The change and the changelog were written with Claude Opus 5.5 in Claude Code during that bring-up; I tested it on the phone and reviewed it before sending.
Thanks,
Filippo
--- drivers/remoteproc/qcom_q6v5_pas.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/remoteproc/qcom_q6v5_pas.c +3 -2
@@ -346,7 +346,8 @@ static int qcom_pas_start(struct rproc *rproc) ret =qcom_pas_prepare_and_auth_reset (pas->dtb_pas_ctx);if (ret) {dev_err (pas->dev, -"failed to authenticate dtb image and release reset\n" ); +"failed to authenticate dtb image and release reset: %d\n" , + ret); goto unmap_dtb_carveout; } }
@@ -365,7 +366,7 @@ static int qcom_pas_start(struct rproc *rproc) ret =qcom_pas_prepare_and_auth_reset (pas->pas_ctx);if (ret) {dev_err (pas->dev, -"failed to authenticate image and release reset\n" ); +"failed to authenticate image and release reset: %d\n" , ret); goto unmap_carveout; }
---
base-commit: 82d0bbd67c42a44f0e18b0b7b0da0f3ace0c9527
change-id: 20261026-pas-auth-error-e4c490bd1c0e
Best regards,
Signature · 1 line
Filippo Falezza <[email protected]>
Quoted 11 lines · On 10/26/26 7:19 PM, Filippo Falezza via B4 Relay wrote:
From: Filippo Falezza <[email protected]>
When a subsystem fails to start,
qcom_pas_start()logs "failed to authenticate image and release reset", but drops the error returned byqcom_pas_prepare_and_auth_reset(). That code tells the failures apart:
a negative errno is either a clock, interconnect or SHM bridge failure on the Linux side or the SCM call's own status, remapped byqcom_scm_call(); a positive value is the status the PIL service returned for the request. Without it, finding out which one happened means adding a print and rebuilding the kernel.
Quoted 4 lines
Print the error code, for the DTB image as well as the main one.
Signed-off-by Filippo Falezza <[email protected]>---
Konrad