2022-05-24 13:53:56

by Sibi Sankar

[permalink] [raw]
Subject: [V4 0/2] Add modem debug features

The series adds support for the following modem debug features:
* Pass on MBA log info to imem
* Add panic handler for mss

V4:
* Restart the update mba info to imem patch that was dropped from V2
* Add panic handler for mss driver
* Drop patches that have already landed

V3:
* Drop mba text log extraction support since its already
picked up by Bjorn
* Fix dp_fw leak and create a separate func for dp load [Bjorn]
* Reset dp_size on mba_reclaim
* 2 new patches are included they validate mba/modem blob size
before load

V2:
* Use request_firmware_direct [Bjorn]
* Use Bjorn's template to show if debug policy is present
* Add size check to prevent memcpy out of bounds [Bjorn]
* Don't dump logs in mba_reclaim path [Bjorn]
* Move has_mba_logs check to q6v5_dump_mba_logs [Bjorn]
* SDM845 mss was incorrectly marked to support mba logs
* Drop patch 3 where mba text logs are added to imem

Sibi Sankar (2):
remoteproc: qcom_q6v5_mss: Update MBA log info
remoteproc: qcom_q6v5: Introduce panic handler for MSS

drivers/remoteproc/qcom_q6v5_mss.c | 11 +++++++++++
1 file changed, 11 insertions(+)

--
2.7.4



2022-05-25 08:22:41

by Sibi Sankar

[permalink] [raw]
Subject: [V4 2/2] remoteproc: qcom_q6v5: Introduce panic handler for MSS

Make the MSS q6v5 remoteproc drivers implement the panic handler
that will invoke a stop to prepare the remoteprocs for post mortem
debugging.

Signed-off-by: Sibi Sankar <[email protected]>
---
drivers/remoteproc/qcom_q6v5_mss.c | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
index 46ca841371c8..8a66e70e3bfd 100644
--- a/drivers/remoteproc/qcom_q6v5_mss.c
+++ b/drivers/remoteproc/qcom_q6v5_mss.c
@@ -1623,11 +1623,19 @@ static int qcom_q6v5_register_dump_segments(struct rproc *rproc,
return ret;
}

+static unsigned long q6v5_panic(struct rproc *rproc)
+{
+ struct q6v5 *qproc = (struct q6v5 *)rproc->priv;
+
+ return qcom_q6v5_panic(&qproc->q6v5);
+}
+
static const struct rproc_ops q6v5_ops = {
.start = q6v5_start,
.stop = q6v5_stop,
.parse_fw = qcom_q6v5_register_dump_segments,
.load = q6v5_load,
+ .panic = q6v5_panic,
};

static void qcom_msa_handover(struct qcom_q6v5 *q6v5)
--
2.7.4


2022-05-26 00:19:46

by Sibi Sankar

[permalink] [raw]
Subject: [V4 1/2] remoteproc: qcom_q6v5_mss: Update MBA log info

Update MBA text logs location/size in IMEM to aid tools extract
them after ramdump collection. The size of the MBA text logs is
pre-determined and limited to 4K.

Signed-off-by: Sibi Sankar <[email protected]>
---

We update the imem only for remoteprocs that support mba logging
otherwise the post mortem tools will show garbled data while
reading the first 4K region from MBA on unsupported SoCs.
(MBA logs are officially supported on SC7180/SC7280 SoCs only)

drivers/remoteproc/qcom_q6v5_mss.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
index 4b37e11fbb03..46ca841371c8 100644
--- a/drivers/remoteproc/qcom_q6v5_mss.c
+++ b/drivers/remoteproc/qcom_q6v5_mss.c
@@ -1128,6 +1128,9 @@ static int q6v5_mba_load(struct q6v5 *qproc)
if (ret)
goto reclaim_mba;

+ if (qproc->has_mba_logs)
+ qcom_pil_info_store("mba", qproc->mba_phys, MBA_LOG_SIZE);
+
ret = q6v5_rmb_mba_wait(qproc, 0, 5000);
if (ret == -ETIMEDOUT) {
dev_err(qproc->dev, "MBA boot timed out\n");
--
2.7.4


2022-05-27 07:58:46

by Sibi Sankar

[permalink] [raw]
Subject: Re: [V4 0/2] Add modem debug features



On 5/26/22 4:38 PM, Pavel Machek wrote:
> Hi!
>
>> The series adds support for the following modem debug features:
>> * Pass on MBA log info to imem
>> * Add panic handler for mss
>
> Can I get you to cc phone-devel mailing list?

Pavel,
I picked up the series when I noticed one of the patch had fallen
through the cracks. IIRC you had already requested for the cc before
as well, will make sure I cc the group if there is a re-spin.

-Sibi

>
> Thanks,
> Pavel
>
>

2022-05-28 20:45:04

by Pavel Machek

[permalink] [raw]
Subject: Re: [V4 0/2] Add modem debug features

Hi!

> The series adds support for the following modem debug features:
> * Pass on MBA log info to imem
> * Add panic handler for mss

Can I get you to cc phone-devel mailing list?

Thanks,
Pavel


2022-07-18 23:02:18

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [V4 0/2] Add modem debug features

On Tue, 24 May 2022 18:15:33 +0530, Sibi Sankar wrote:
> The series adds support for the following modem debug features:
> * Pass on MBA log info to imem
> * Add panic handler for mss
>
> V4:
> * Restart the update mba info to imem patch that was dropped from V2
> * Add panic handler for mss driver
> * Drop patches that have already landed
>
> [...]

Applied, thanks!

[1/2] remoteproc: qcom_q6v5_mss: Update MBA log info
commit: 347c51ba5e49e35c5f4ee78f8664f08429b52b6d
[2/2] remoteproc: qcom_q6v5: Introduce panic handler for MSS
commit: 3b1d265a846292464f6716b8c3a546252f73a7d7

Best regards,
--
Bjorn Andersson <[email protected]>