[Skiboot] [RESEND PATCH v2 0/4] Support for Self Save API in OPAL

Nicholas Piggin npiggin at gmail.com
Tue Jan 28 12:13:43 AEDT 2020


Pratik Rajesh Sampat's on January 10, 2020 9:50 pm:
> RESEND changes:
> 1. Added Signoff for author in Patch1
> 2. Fixed a compilation error in Patch1
> 
> v1: https://lists.ozlabs.org/pipermail/skiboot/2019-October/015541.html
> Changelog
> v1 --> v2
> 1. Addressed comments from Oliver O'Halloran
> 2. Added interface for stop API versioning and use it to identify
> support for self save earlier during boot and cut support from the
> device tree instead of handling the error later when the OPAL call
> fails
> 
> Currently the stop API supports a mechanism called as self-restore
> which allows us to restore the values of certain SPRs on wakeup from a
> deep-stop state to a desired value. To use this, the Kernel makes an
> OPAL call passing the PIR of the CPU, the SPR number and the value to
> which the SPR should be restored when that CPU wakes up from a deep
> stop state.
> 
> Recently, a new feature, named self-save has been enabled in the
> stop API, which is an alternative mechanism to do the same, except
> that self-save will save the current content of the SPR before
> entering a deep stop state and also restore the content back on
> waking up from a deep stop state.
> 
> This patch series aims to add support for the Self saving of registers
> and advertises the support for self save and restore along with the list
> of SPRs it supports to the device tree.
> 
> The node for self-save or self-restore have the following attributes:
> 1. sprn-bitmask = bitmask where each bit signifies the presence of a SPR
> 2. status = indicates if the feature is enabled or disabled
> 
> Consider the following scenario for the "status" attribute to be
> necessary to indicate support for the feature instead of just not
> putting the node to indicate non-support:
> In the case we are running an older firmware on a newer kernel, we would
> want legacy self restore to work as-is. However, if we remove the status
> attribute, the node will be absent which will make Operating System
> strip this feature away even when legacy firmwares are known to support
> this.

What is the advantage of this API?

The OS has to know about the SPRs it wants to save and restore, and if
so, then it can save and restore them itself. What would be the benfit
of using this self-save instead?

Thanks,
Nick



More information about the Skiboot mailing list