diff mbox series

[v4,8/8] Add Documenation for opal_slw_set_reg

Message ID 1505460876-7303-9-git-send-email-akshay.adiga@linux.vnet.ibm.com
State Superseded
Headers show
Series Enable stop4 idle state | expand

Commit Message

Akshay Adiga Sept. 15, 2017, 7:34 a.m. UTC
Signed-off-by: Akshay Adiga <akshay.adiga@linux.vnet.ibm.com>
---
 doc/opal-api/opal-slw-set-reg-100.rst | 46 +++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 doc/opal-api/opal-slw-set-reg-100.rst

Comments

Vaidyanathan Srinivasan Sept. 15, 2017, 8:40 a.m. UTC | #1
* Akshay Adiga <akshay.adiga@linux.vnet.ibm.com> [2017-09-15 13:04:36]:

> Signed-off-by: Akshay Adiga <akshay.adiga@linux.vnet.ibm.com>

Reviewed-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>


> ---
>  doc/opal-api/opal-slw-set-reg-100.rst | 46 +++++++++++++++++++++++++++++++++++
>  1 file changed, 46 insertions(+)
>  create mode 100644 doc/opal-api/opal-slw-set-reg-100.rst
> 
> diff --git a/doc/opal-api/opal-slw-set-reg-100.rst b/doc/opal-api/opal-slw-set-reg-100.rst
> new file mode 100644
> index 0000000..64ecdee
> --- /dev/null
> +++ b/doc/opal-api/opal-slw-set-reg-100.rst
> @@ -0,0 +1,46 @@
> +OPAL_SLW_SET_REG
> +==============================
> +::
> +
> +    int64_t opal_slw_set_reg(uint64_t cpu_pir, uint64_t sprn, uint64_t val)
> +
> +
> +OPAL_SLW_SET_REG is used to inform low-level firmware to restore a
> +given value of SPR when there is a state loss.  The actual set of SPR
> +that is supported is platform dependent.
> +
> +
> +In Power 8, it uses p8_pore_gen_cpufreq_fixed(), api provided by pore engine,
> +to inform the spr with their corresponding values with which they
> +must be restored.
> +
> +
> +In Power 9, it uses p9_stop_save_cpureg(), api provided by self restore code,
> +to inform the spr with their corresponding values with which they
> +must be restored.
> +
> +
> +Parameters
> +----------
> +
> +``uint64_t cpu_pir``
> +This parameter specifies the pir of the cpu for which the call is being made.
> +
> +``uint64_t sprn``
> +This parameter specifies the spr number as mentioned in p9_stop_api.H for
> +Power9 and p8_pore_table_gen_api.H for Power8.
> +
> +``uint64_t val``
> +This parameter specifices value with which the spr should be restored.
> +
> +Returns
> +-------
> +
> +``OPAL_INTERNAL_ERROR``
> +On failure. The actual error code from the platform specific code is logged in the OPAL logs
> +
> +``OPAL_UNSUPPORTED``
> +In power8 only, if spr restore is not supported by pore engine.

If the low-level firmware does not support this feature or the given SPR is not supported by the pore engine or stop api. 

> +
> +``OPAL_SUCCESS``
> +On success
> -- 
> 2.5.5
>
diff mbox series

Patch

diff --git a/doc/opal-api/opal-slw-set-reg-100.rst b/doc/opal-api/opal-slw-set-reg-100.rst
new file mode 100644
index 0000000..64ecdee
--- /dev/null
+++ b/doc/opal-api/opal-slw-set-reg-100.rst
@@ -0,0 +1,46 @@ 
+OPAL_SLW_SET_REG
+==============================
+::
+
+    int64_t opal_slw_set_reg(uint64_t cpu_pir, uint64_t sprn, uint64_t val)
+
+
+OPAL_SLW_SET_REG is used to inform low-level firmware to restore a
+given value of SPR when there is a state loss.  The actual set of SPR
+that is supported is platform dependent.
+
+
+In Power 8, it uses p8_pore_gen_cpufreq_fixed(), api provided by pore engine,
+to inform the spr with their corresponding values with which they
+must be restored.
+
+
+In Power 9, it uses p9_stop_save_cpureg(), api provided by self restore code,
+to inform the spr with their corresponding values with which they
+must be restored.
+
+
+Parameters
+----------
+
+``uint64_t cpu_pir``
+This parameter specifies the pir of the cpu for which the call is being made.
+
+``uint64_t sprn``
+This parameter specifies the spr number as mentioned in p9_stop_api.H for
+Power9 and p8_pore_table_gen_api.H for Power8.
+
+``uint64_t val``
+This parameter specifices value with which the spr should be restored.
+
+Returns
+-------
+
+``OPAL_INTERNAL_ERROR``
+On failure. The actual error code from the platform specific code is logged in the OPAL logs
+
+``OPAL_UNSUPPORTED``
+In power8 only, if spr restore is not supported by pore engine.
+
+``OPAL_SUCCESS``
+On success