From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Robert Marko <robimarko@gmail.com>,
Guru Das Srinagesh <linux@gurudas.dev>
Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/4] firmware: qcom: scm: Add minidump SRAM support
Date: Thu, 21 May 2026 12:21:03 +0200 [thread overview]
Message-ID: <1f8f46c7-8332-44ee-992e-0b9ca1c0ffef@oss.qualcomm.com> (raw)
In-Reply-To: <20260519171442.1582987-4-mukesh.ojha@oss.qualcomm.com>
On 5/19/26 7:14 PM, Mukesh Ojha wrote:
> On most Qualcomm SoCs where minidump is supported, a word in always-on
> SRAM is shared between the kernel and boot firmware. Before DDR is
> initialised on the warm reset following a crash, firmware reads this
> word to decide if minidump is enabled and collect a minidump and where
> to deliver it (USB upload to a host, or save to local storage).
>
> The SRAM region is described by a 'sram' phandle on the SCM DT node.
> If the property is absent the feature is silently disabled, keeping
> existing SoCs unaffected.
>
> Expose a 'minidump_dest' module parameter (default: usb) so the user can
> select the destination. Only the string names "usb" or "storage" are
> accepted; an invalid value is rejected with -EINVAL. Changing the
> destination while minidump mode is already active updates SRAM immediately.
>
> Signed-off-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
> ---
[...]
> +static int qcom_scm_map_minidump_sram(struct device *dev, void __iomem **out)
> +{
> + struct device_node *np = dev->of_node;
> + struct device_node *sram_np;
> + struct resource res;
> + int ret;
> +
> + if (!of_property_present(np, "sram"))
> + return 0;
I think of_parse_phandle() calls this indirectly already
> +
> + sram_np = of_parse_phandle(np, "sram", 0);
> + if (!sram_np)
> + return -EINVAL;
> +
> + ret = of_address_to_resource(sram_np, 0, &res);
> + of_node_put(sram_np);
> + if (ret)
> + return ret;
> +
> + if (resource_size(&res) < sizeof(u32)) {
> + dev_err(dev, "minidump SRAM region too small\n");
> + return -EINVAL;
I don't know if this is possible in practice
Konrad
next prev parent reply other threads:[~2026-05-21 10:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-19 17:14 [PATCH v2 0/4] firmware: qcom: scm: Add minidump SRAM destination support Mukesh Ojha
2026-05-19 17:14 ` [PATCH v2 1/4] dt-bindings: firmware: qcom,scm: Add minidump SRAM property Mukesh Ojha
2026-05-19 17:34 ` sashiko-bot
2026-05-20 10:17 ` Krzysztof Kozlowski
2026-05-22 7:52 ` Mukesh Ojha
2026-05-22 9:15 ` Krzysztof Kozlowski
2026-05-22 15:43 ` Mukesh Ojha
2026-05-19 17:14 ` [PATCH v2 2/4] firmware: qcom: scm: use dev_err_probe() for dload address failure Mukesh Ojha
2026-05-19 17:14 ` [PATCH v2 3/4] firmware: qcom: scm: Add minidump SRAM support Mukesh Ojha
2026-05-19 18:04 ` sashiko-bot
2026-05-21 10:21 ` Konrad Dybcio [this message]
2026-05-22 15:58 ` Mukesh Ojha
2026-05-21 10:21 ` Konrad Dybcio
2026-05-22 15:56 ` Mukesh Ojha
2026-05-19 17:14 ` [PATCH v2 4/4] arm64: dts: qcom: kaanapali: Add minidump SRAM config to SCM node Mukesh Ojha
2026-05-21 10:16 ` Konrad Dybcio
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=1f8f46c7-8332-44ee-992e-0b9ca1c0ffef@oss.qualcomm.com \
--to=konrad.dybcio@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@gurudas.dev \
--cc=mukesh.ojha@oss.qualcomm.com \
--cc=robh@kernel.org \
--cc=robimarko@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox