From: Umang Chheda <umang.chheda@oss.qualcomm.com>
To: Shivendra Pratap <shivendra.pratap@oss.qualcomm.com>,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>,
Bjorn Andersson <andersson@kernel.org>,
Sebastian Reichel <sre@kernel.org>, Rob Herring <robh@kernel.org>,
Sudeep Holla <sudeep.holla@arm.com>,
Souvik Chakravarty <Souvik.Chakravarty@arm.com>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Andy Yan <andy.yan@rock-chips.com>,
Mark Rutland <mark.rutland@arm.com>,
Lorenzo Pieralisi <lpieralisi@kernel.org>,
Arnd Bergmann <arnd@arndb.de>,
Konrad Dybcio <konradybcio@kernel.org>,
cros-qcom-dts-watchers@chromium.org,
Vinod Koul <vkoul@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Florian Fainelli <florian.fainelli@broadcom.com>,
Moritz Fischer <moritz.fischer@ettus.com>,
John Stultz <john.stultz@linaro.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Krzysztof Kozlowski <krzk@kernel.org>
Cc: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>,
Stephen Boyd <swboyd@chromium.org>,
Andre Draszik <andre.draszik@linaro.org>,
Kathiravan Thirumoorthy
<kathiravan.thirumoorthy@oss.qualcomm.com>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-arm-msm@vger.kernel.org,
Elliot Berman <quic_eberman@quicinc.com>,
Srinivas Kandagatla <srini@kernel.org>
Subject: Re: [PATCH v15 07/14] firmware: psci: Implement vendor-specific resets as reboot-mode
Date: Thu, 9 Oct 2025 09:44:51 +0530 [thread overview]
Message-ID: <9ba7562f-bf6a-4759-b4a3-aaa80c45e247@oss.qualcomm.com> (raw)
In-Reply-To: <20250922-arm-psci-system_reset2-vendor-reboots-v15-7-7ce3a08878f1@oss.qualcomm.com>
On 9/22/2025 7:10 PM, Shivendra Pratap wrote:
> SoC vendors have different types of resets which are controlled
> through various hardware registers. For instance, Qualcomm SoC
> may have a requirement that reboot with “bootloader” command
> should reboot the device to bootloader flashing mode and reboot
> with “edl” should reboot the device into Emergency flashing mode.
> Setting up such reboots on Qualcomm devices can be inconsistent
> across SoC platforms and may require setting different HW
> registers, where some of these registers may not be accessible to
> HLOS. These knobs evolve over product generations and require
> more drivers. PSCI spec defines, SYSTEM_RESET2, vendor-specific
> reset which can help align this requirement. Add support for PSCI
> SYSTEM_RESET2, vendor-specific resets and align the implementation
> to allow user-space initiated reboots to trigger these resets.
>
> Implement the PSCI vendor-specific resets by registering to the
> reboot-mode framework. As psci init is done at early kernel init,
> reboot-mode registration cannot be done at the time of psci init.
> This is because reboot-mode creates a “reboot-mode” class for
> exposing sysfs, which can fail at early kernel init. To overcome
> this, introduce a late_initcall to register PSCI vendor-specific
> resets as reboot modes. Implement a reboot-mode write function
> that sets reset_type and cookie values during the reboot notifier
> callback. Introduce a firmware-based call for SYSTEM_RESET2
> vendor-specific reset in the psci_sys_reset path, using
> reset_type and cookie if supported by secure firmware. Register a
> panic notifier and clear vendor_reset valid status during panic.
> This is needed for any kernel panic that occurs post
> reboot_notifiers.
>
> By using the above implementation, userspace will be able to issue
> such resets using the reboot() system call with the "*arg"
> parameter as a string based command. The commands can be defined
> in PSCI device tree node under “reboot-mode” and are based on the
> reboot-mode based commands.
>
> Signed-off-by: Shivendra Pratap <shivendra.pratap@oss.qualcomm.com>
> ---
> drivers/firmware/psci/Kconfig | 2 +
> drivers/firmware/psci/psci.c | 89 ++++++++++++++++++++++++++++++++++++++++++-
> 2 files changed, 90 insertions(+), 1 deletion(-)
>
Reviewed-by: Umang Chheda <umang.chheda@oss.qualcomm.com>
Thanks,
Umang
next prev parent reply other threads:[~2025-10-09 4:15 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-22 13:40 [PATCH v15 00/14] Implement vendor resets for PSCI SYSTEM_RESET2 Shivendra Pratap
2025-09-22 13:40 ` [PATCH v15 01/14] power: reset: reboot-mode: Synchronize list traversal Shivendra Pratap
2025-09-22 13:40 ` [PATCH v15 02/14] power: reset: reboot-mode: Add device tree node-based registration Shivendra Pratap
2025-09-22 13:40 ` [PATCH v15 03/14] power: reset: reboot-mode: Add support for 64 bit magic Shivendra Pratap
2025-10-09 4:16 ` Umang Chheda
2025-09-22 13:40 ` [PATCH v15 04/14] Documentation: ABI: Add sysfs-class-reboot-mode-reboot_modes Shivendra Pratap
2025-09-22 13:40 ` [PATCH v15 05/14] power: reset: reboot-mode: Expose sysfs for registered reboot_modes Shivendra Pratap
2025-09-22 13:40 ` [PATCH v15 06/14] dt-bindings: arm: Document reboot mode magic Shivendra Pratap
2025-09-22 13:40 ` [PATCH v15 07/14] firmware: psci: Implement vendor-specific resets as reboot-mode Shivendra Pratap
2025-09-30 5:45 ` Kathiravan Thirumoorthy
2025-09-30 11:38 ` Shivendra Pratap
2025-10-09 4:14 ` Umang Chheda [this message]
2025-09-22 13:40 ` [PATCH v15 08/14] arm64: dts: qcom: qcm6490-idp: Add PSCI SYSTEM_RESET2 types Shivendra Pratap
2025-09-22 13:40 ` [PATCH v15 09/14] arm64: dts: qcom: qcs6490-rb3gen2: " Shivendra Pratap
2025-09-22 13:40 ` [PATCH v15 10/14] arm64: dts: qcom: lemans-ride: " Shivendra Pratap
2025-09-22 13:40 ` [PATCH v15 11/14] arm64: dts: qcom: lemans-evk: " Shivendra Pratap
2025-09-22 13:40 ` [PATCH v15 12/14] arm64: dts: qcom: qcs8300-ride: " Shivendra Pratap
2025-09-22 13:40 ` [PATCH v15 13/14] arm64: dts: qcom: monaco-evk: " Shivendra Pratap
2025-09-22 13:40 ` [PATCH v15 14/14] arm64: dts: qcom: qcs615-ride: " Shivendra Pratap
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=9ba7562f-bf6a-4759-b4a3-aaa80c45e247@oss.qualcomm.com \
--to=umang.chheda@oss.qualcomm.com \
--cc=Souvik.Chakravarty@arm.com \
--cc=andersson@kernel.org \
--cc=andre.draszik@linaro.org \
--cc=andy.yan@rock-chips.com \
--cc=arnd@arndb.de \
--cc=bartosz.golaszewski@linaro.org \
--cc=catalin.marinas@arm.com \
--cc=conor+dt@kernel.org \
--cc=cros-qcom-dts-watchers@chromium.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=florian.fainelli@broadcom.com \
--cc=john.stultz@linaro.org \
--cc=kathiravan.thirumoorthy@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mark.rutland@arm.com \
--cc=matthias.bgg@gmail.com \
--cc=moritz.fischer@ettus.com \
--cc=mukesh.ojha@oss.qualcomm.com \
--cc=quic_eberman@quicinc.com \
--cc=robh@kernel.org \
--cc=shivendra.pratap@oss.qualcomm.com \
--cc=sre@kernel.org \
--cc=srini@kernel.org \
--cc=sudeep.holla@arm.com \
--cc=swboyd@chromium.org \
--cc=vkoul@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox