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

Pratik Rajesh Sampat psampat at linux.ibm.com
Wed Feb 12 21:36:40 AEDT 2020


v3: https://lists.ozlabs.org/pipermail/skiboot/2020-February/016377.html
Changelog
v3 --> v4
Based on Oliver's comments:
1. Removed "active" property for self-save and self-restore
2. Updated documentation for power-management.rst and device tree nodes
3. Fixed bitmask endianess so that both BE and LE skiboot populate
correctly to the device-tree.
4. Moved slw related changes from patch 4/4 to patch 3/4 and reordered
patch 3/4 and 4/4.

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 has the attribute:
sprn-bitmask = bitmask where each bit signifies the presence of a SPR

Patch1:
Commit adds support calling into the self save firmware API.
Also adds abstraction for making platform agnostic calls.

Patch2:
Commit adds wrappers for the Self Save API for which an OPAL call can be
made.

Patch3:
Commit adds API to determine the version of the STOP API. This helps to
identify support for self save in the firmware

Patch4:
Commit adds device tree attributes to advertise self save and self
restore functionality along with the register set as a bitmask currently
supported in the firmware. It also uses the versioning API to determine
support for the self-save feature as a whole.

Pratik Rajesh Sampat (2):
  Self save API integration
  Advertise the self-save and self-restore attributes in the device tree

Prem Shanker Jha (2):
  Self Save: Introducing Support for SPR Self Save
  API to verify the STOP API and image compatibility

 .../ibm,opal/power-mgt/self-restore.rst       |  25 +
 .../ibm,opal/power-mgt/self-save.rst          |  25 +
 doc/opal-api/opal-slw-self-save-reg-181.rst   |  49 +
 doc/opal-api/opal-slw-set-reg-100.rst         |   5 +
 doc/power-management.rst                      |  23 +
 hw/slw.c                                      | 201 ++++
 include/opal-api.h                            |   3 +-
 include/p9_stop_api.H                         | 122 ++-
 include/skiboot.h                             |   4 +
 libpore/p8_pore_table_gen_api.H               |   1 +
 libpore/p9_cpu_reg_restore_instruction.H      |  11 +-
 libpore/p9_hcd_memmap_base.H                  |   7 +
 libpore/p9_stop_api.C                         | 964 ++++++++++--------
 libpore/p9_stop_api.H                         | 141 ++-
 libpore/p9_stop_data_struct.H                 |   4 +-
 libpore/p9_stop_util.H                        |  27 +-
 16 files changed, 1180 insertions(+), 432 deletions(-)
 create mode 100644 doc/device-tree/ibm,opal/power-mgt/self-restore.rst
 create mode 100644 doc/device-tree/ibm,opal/power-mgt/self-save.rst
 create mode 100644 doc/opal-api/opal-slw-self-save-reg-181.rst

-- 
2.24.1



More information about the Skiboot mailing list