[PATCH v13 07/10] firmware: psci: Implement vendor-specific resets as reboot-mode

André Draszik andre.draszik at linaro.org
Thu Jul 31 04:05:13 PDT 2025


On Wed, 2025-07-30 at 19:31 +0200, Arnd Bergmann wrote:
> On Wed, Jul 30, 2025, at 17:23, André Draszik wrote:
> > On Wed, 2025-07-30 at 18:33 +0530, Shivendra Pratap wrote:
> > > On 7/30/2025 2:14 PM, André Draszik wrote:
> 
> > > 1. For this, both commands will be defined in the psci->reboot-mode DT Node with the arguments that
> > >    are defined and supported by the firmware.
> > > 2. Further, such requirement will now be taken care by the underlying firmware that supports
> > >    PSCI vendor-specific reset. When we call into firmware with vendor specific reset arguments,
> > >    firmware will take care of the defined HW writes and warm/cold reset as per the mapping of the
> > >    defined arguments. Firmware and the Linux kernel here are in agreement for executing the
> > >    vendor-specific resets.
> > 
> > So that means
> > 
> >     echo warm > /sys/kernel/reboot/mode
> >     reboot bootloader
> > 
> > and
> > 
> >     echo cold > /sys/kernel/reboot/mode
> >     reboot bootloader
> > 
> > can not be distinguished.
> > 
> > The firmware can not know whether or not cold or warm reboot was
> > requested in this case by the user.
> 
> My feeling is that this is fine: the /sys/kernel/reboot/mode
> interface is not really used on anything other than 32-bit
> arm and x86 machines, and the way it is specific as
> cold/warm/hard/soft/gpio is not that useful.

Currently, reboot_mode as such is also used by gs101 and later, we do
distinguish between the reboot_modes (cold/hard and warm/soft), although
generally not via sysfs indeed. And yes, gpio is a strangely specific
one.

I don't have insight into newer SoCs / board designs in that family,
but my understanding is that newer SoCs use PSCI for reboot as well
and I do believe being able to do cold reboot by default and warm
reboot in some cases (crash handling in particular) to still be a
valid use-case.

> I think for the purpose of the new code here, we should talk
> about reboot "commands" instead of "modes" to avoid confusing
> between the global "enum reboot_mode" variable and the
> firmware interface for reboot modes as listed in DT.

+1 It should really have been added as reboot command or reboot target
in the first place.

A.



More information about the linux-arm-kernel mailing list