From: Brian Masney <bmasney@redhat.com>
To: Mukesh Ojha <quic_mojha@quicinc.com>
Cc: agross@kernel.org, andersson@kernel.org,
konrad.dybcio@linaro.org, keescook@chromium.org,
tony.luck@intel.com, gpiccoli@igalia.com,
catalin.marinas@arm.com, will@kernel.org,
linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC PATCH 0/6] Add basic Minidump kernel driver support
Date: Tue, 7 Mar 2023 12:27:56 -0500 [thread overview]
Message-ID: <ZAd0HPHtSEs+XX7P@x1> (raw)
In-Reply-To: <14b11c3c-353c-50f9-f9a4-837fc5d06fa4@quicinc.com>
On Mon, Feb 27, 2023 at 03:45:31PM +0530, Mukesh Ojha wrote:
>
>
> On 2/25/2023 12:36 AM, Brian Masney wrote:
> > Hi Mukesh,
> >
> > On Fri, Feb 24, 2023 at 04:10:42PM +0530, Mukesh Ojha wrote:
> > > On 2/23/2023 6:07 PM, Brian Masney wrote:
> > > > I'd like to test this series plus your series that sets the multiple
> > > > download modes.
> > >
> > > Sure, you are welcome, but for that you need a device running with Qualcomm
> > > SoC and if it has a upstream support.
> >
> > I will be testing this series on a sa8540p (QDrive3 Automotive
> > Development Board), which has the sc8280xp SoC with good upstream
> > support. This is also the same board that I have a reliable way to
> > make the board crash due to a known firmware bug.
> >
>
>
> Can you try below patch to just select minidump download mode and make the
> device crash ?
>
> --------------------------------------->8-------------------------------
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> index 0d02599..bd8e1a8 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> @@ -280,6 +280,7 @@
> firmware {
> scm: scm {
> compatible = "qcom,scm-sc8280xp", "qcom,scm";
> + qcom,dload-mode = <&tcsr 0x13000>;
> };
> };
>
> diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c
> index cdbfe54..e1539a2 100644
> --- a/drivers/firmware/qcom_scm.c
> +++ b/drivers/firmware/qcom_scm.c
> @@ -20,7 +20,7 @@
>
> #include "qcom_scm.h"
>
> -static bool download_mode =
> IS_ENABLED(CONFIG_QCOM_SCM_DOWNLOAD_MODE_DEFAULT);
> +static bool download_mode = true;
> module_param(download_mode, bool, 0);
>
> #define SCM_HAS_CORE_CLK BIT(0)
> @@ -427,7 +427,7 @@ static void qcom_scm_set_download_mode(bool enable)
> ret = __qcom_scm_set_dload_mode(__scm->dev, enable);
> } else if (__scm->dload_mode_addr) {
> ret = qcom_scm_io_writel(__scm->dload_mode_addr,
> - enable ? QCOM_SCM_BOOT_SET_DLOAD_MODE : 0);
> + enable ? 0x20 : 0);
> } else {
> dev_err(__scm->dev,
> "No available mechanism for setting download
> mode\n");
Hi Mukesh,
I tried to test this series but I don't know how to actually use the
minidump feature that's in this series. Some more documentation is
needed.
I added this series, plus your other series that adds the download modes
to the SCM driver to my tree, along with your changes above. I
downgraded the firmware on my sa8540p and I have my reproducible crash.
Linux immediately loses control and the board firmware takes over.
I assumed that I'd need to do a warm reboot so that DDR contents are
still present so Linux can grab the memory contents on next reboot.
However, 'fastboot devices' shows no devices so I can't reboot that
way. I can do a cold boot but the DDR contents will be lost.
Also this series needs to be rebased against 6.3rc1.
Brian
WARNING: multiple messages have this Message-ID (diff)
From: Brian Masney <bmasney@redhat.com>
To: Mukesh Ojha <quic_mojha@quicinc.com>
Cc: agross@kernel.org, andersson@kernel.org,
konrad.dybcio@linaro.org, keescook@chromium.org,
tony.luck@intel.com, gpiccoli@igalia.com,
catalin.marinas@arm.com, will@kernel.org,
linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC PATCH 0/6] Add basic Minidump kernel driver support
Date: Tue, 7 Mar 2023 12:27:56 -0500 [thread overview]
Message-ID: <ZAd0HPHtSEs+XX7P@x1> (raw)
In-Reply-To: <14b11c3c-353c-50f9-f9a4-837fc5d06fa4@quicinc.com>
On Mon, Feb 27, 2023 at 03:45:31PM +0530, Mukesh Ojha wrote:
>
>
> On 2/25/2023 12:36 AM, Brian Masney wrote:
> > Hi Mukesh,
> >
> > On Fri, Feb 24, 2023 at 04:10:42PM +0530, Mukesh Ojha wrote:
> > > On 2/23/2023 6:07 PM, Brian Masney wrote:
> > > > I'd like to test this series plus your series that sets the multiple
> > > > download modes.
> > >
> > > Sure, you are welcome, but for that you need a device running with Qualcomm
> > > SoC and if it has a upstream support.
> >
> > I will be testing this series on a sa8540p (QDrive3 Automotive
> > Development Board), which has the sc8280xp SoC with good upstream
> > support. This is also the same board that I have a reliable way to
> > make the board crash due to a known firmware bug.
> >
>
>
> Can you try below patch to just select minidump download mode and make the
> device crash ?
>
> --------------------------------------->8-------------------------------
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> index 0d02599..bd8e1a8 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> @@ -280,6 +280,7 @@
> firmware {
> scm: scm {
> compatible = "qcom,scm-sc8280xp", "qcom,scm";
> + qcom,dload-mode = <&tcsr 0x13000>;
> };
> };
>
> diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c
> index cdbfe54..e1539a2 100644
> --- a/drivers/firmware/qcom_scm.c
> +++ b/drivers/firmware/qcom_scm.c
> @@ -20,7 +20,7 @@
>
> #include "qcom_scm.h"
>
> -static bool download_mode =
> IS_ENABLED(CONFIG_QCOM_SCM_DOWNLOAD_MODE_DEFAULT);
> +static bool download_mode = true;
> module_param(download_mode, bool, 0);
>
> #define SCM_HAS_CORE_CLK BIT(0)
> @@ -427,7 +427,7 @@ static void qcom_scm_set_download_mode(bool enable)
> ret = __qcom_scm_set_dload_mode(__scm->dev, enable);
> } else if (__scm->dload_mode_addr) {
> ret = qcom_scm_io_writel(__scm->dload_mode_addr,
> - enable ? QCOM_SCM_BOOT_SET_DLOAD_MODE : 0);
> + enable ? 0x20 : 0);
> } else {
> dev_err(__scm->dev,
> "No available mechanism for setting download
> mode\n");
Hi Mukesh,
I tried to test this series but I don't know how to actually use the
minidump feature that's in this series. Some more documentation is
needed.
I added this series, plus your other series that adds the download modes
to the SCM driver to my tree, along with your changes above. I
downgraded the firmware on my sa8540p and I have my reproducible crash.
Linux immediately loses control and the board firmware takes over.
I assumed that I'd need to do a warm reboot so that DDR contents are
still present so Linux can grab the memory contents on next reboot.
However, 'fastboot devices' shows no devices so I can't reboot that
way. I can do a cold boot but the DDR contents will be lost.
Also this series needs to be rebased against 6.3rc1.
Brian
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-03-07 17:33 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-21 11:25 [RFC PATCH 0/6] Add basic Minidump kernel driver support Mukesh Ojha
2023-02-21 11:25 ` Mukesh Ojha
2023-02-21 11:25 ` [RFC PATCH 1/6] remoteproc: qcom: Expand MD_* as MINIDUMP_* Mukesh Ojha
2023-02-21 11:25 ` Mukesh Ojha
2023-02-21 11:25 ` [RFC PATCH 2/6] remoteproc: qcom: Move minidump specific data to qcom_minidump.h Mukesh Ojha
2023-02-21 11:25 ` Mukesh Ojha
2023-02-21 11:25 ` [RFC PATCH 3/6] soc: qcom: Add Qualcomm minidump kernel driver Mukesh Ojha
2023-02-21 11:25 ` Mukesh Ojha
2023-03-08 20:22 ` Srinivas Kandagatla
2023-03-08 20:22 ` Srinivas Kandagatla
2023-03-08 20:50 ` Konrad Dybcio
2023-03-08 20:50 ` Konrad Dybcio
2023-03-15 15:23 ` Mukesh Ojha
2023-03-15 15:23 ` Mukesh Ojha
2023-03-15 15:09 ` Mukesh Ojha
2023-03-15 15:09 ` Mukesh Ojha
2023-02-21 11:25 ` [RFC PATCH 4/6] arm64: defconfig: Enable Qualcomm minidump driver Mukesh Ojha
2023-02-21 11:25 ` Mukesh Ojha
2023-02-21 11:25 ` [RFC PATCH 5/6] remoterproc: qcom: refactor to leverage exported minidump symbol Mukesh Ojha
2023-02-21 11:25 ` Mukesh Ojha
2023-02-21 11:25 ` [RFC PATCH 6/6] pstore/ram: Register context with minidump Mukesh Ojha
2023-02-21 11:25 ` Mukesh Ojha
2023-02-23 19:43 ` Kees Cook
2023-02-23 19:43 ` Kees Cook
2023-02-24 10:23 ` Mukesh Ojha
2023-02-24 10:23 ` Mukesh Ojha
2023-03-21 16:13 ` Mukesh Ojha
2023-03-21 16:13 ` Mukesh Ojha
2023-02-23 12:37 ` [RFC PATCH 0/6] Add basic Minidump kernel driver support Brian Masney
2023-02-23 12:37 ` Brian Masney
2023-02-24 10:40 ` Mukesh Ojha
2023-02-24 10:40 ` Mukesh Ojha
2023-02-24 17:14 ` Trilok Soni
2023-02-24 17:14 ` Trilok Soni
2023-02-24 19:06 ` Brian Masney
2023-02-24 19:06 ` Brian Masney
2023-02-27 10:15 ` Mukesh Ojha
2023-02-27 10:15 ` Mukesh Ojha
2023-03-07 17:27 ` Brian Masney [this message]
2023-03-07 17:27 ` Brian Masney
2023-03-06 15:28 ` Mukesh Ojha
2023-03-06 15:28 ` Mukesh Ojha
2023-03-06 18:10 ` Greg KH
2023-03-06 18:10 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZAd0HPHtSEs+XX7P@x1 \
--to=bmasney@redhat.com \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=gpiccoli@igalia.com \
--cc=keescook@chromium.org \
--cc=konrad.dybcio@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=quic_mojha@quicinc.com \
--cc=tony.luck@intel.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.