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

Pratik Rajesh Sampat psampat at linux.ibm.com
Fri Feb 7 15:20:04 AEDT 2020


v2: https://lists.ozlabs.org/pipermail/skiboot/2020-January/016234.html
Changelog
v2 --> v3
1. Updated documentation for the OPAL_SLW_SELF_SAVE_REG based on
suggestions from Stewart Smith

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.

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 device tree attributes to advertise self save and self
restore functionality along with the register set as a bitmask currently
supported in the firmware

Patch4:
Commit helps determine the version of the STOP API. This helps to
identify support for self save in the firmware and in case the version
is lesser, then we can cut support for the feature from the device tree.

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

 doc/opal-api/opal-slw-self-save-reg-181.rst |  49 +
 doc/opal-api/opal-slw-set-reg-100.rst       |   5 +
 hw/slw.c                                    | 190 ++++
 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                       | 966 +++++++++++---------
 libpore/p9_stop_api.H                       | 141 ++-
 libpore/p9_stop_data_struct.H               |   4 +-
 libpore/p9_stop_util.H                      |   7 +-
 13 files changed, 1088 insertions(+), 422 deletions(-)
 create mode 100644 doc/opal-api/opal-slw-self-save-reg-181.rst

-- 
2.24.1



More information about the Skiboot mailing list