aboutsummaryrefslogtreecommitdiffstats
path: root/roms/skiboot/doc/opal-api/opal-param-89-90.rst
diff options
context:
space:
mode:
authorAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
committerAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
commitaf1a266670d040d2f4083ff309d732d648afba2a (patch)
tree2fc46203448ddcc6f81546d379abfaeb323575e9 /roms/skiboot/doc/opal-api/opal-param-89-90.rst
parente02cda008591317b1625707ff8e115a4841aa889 (diff)
Add submodule dependency filesHEADmaster
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'roms/skiboot/doc/opal-api/opal-param-89-90.rst')
-rw-r--r--roms/skiboot/doc/opal-api/opal-param-89-90.rst84
1 files changed, 84 insertions, 0 deletions
diff --git a/roms/skiboot/doc/opal-api/opal-param-89-90.rst b/roms/skiboot/doc/opal-api/opal-param-89-90.rst
new file mode 100644
index 000000000..1d1cedaf6
--- /dev/null
+++ b/roms/skiboot/doc/opal-api/opal-param-89-90.rst
@@ -0,0 +1,84 @@
+.. _opal-sysparams:
+
+=========================
+Get/Set System Parameters
+=========================
+
+The usual way for setting system parameters is via IPMI for things controlled
+by the service processor, or through NVRAM for things controlled by host
+firmware. However, some platforms may have other options not easily (or
+possible to be) exposed over IPMI. These OPAL calls will read (and write)
+these parameters.
+
+The list of parameters is set at boot time, and is represented in the device
+tree (see :ref:`device-tree/ibm,opal/sysparams` for details).
+
+Currently only implemented on FSP based systems.
+
+.. _OPAL_GET_PARAM:
+
+OPAL_GET_PARAM
+==============
+
+.. code-block:: c
+
+ #define OPAL_GET_PARAM 89
+
+ int64_t fsp_opal_get_param(uint64_t async_token, uint32_t param_id,
+ uint64_t buffer, uint64_t length);
+
+Get the current setting of `param_id`. This is an asynchronous call as OPAL may
+need to communicate with a service processor. The `param_id` and `length` are
+described in the device tree for each parameter (see
+:ref:`device-tree/ibm,opal/sysparams` for details).
+
+Returns
+-------
+:ref:`OPAL_HARDWARE`
+ Hardware issue prevents retreiving parameter. e.g. FSP is offline or
+ absent.
+:ref:`OPAL_PARAMETER`
+ Invalid `param_id`
+:ref:`OPAL_PERMISSION`
+ Not allowed to read parameter.
+:ref:`OPAL_NO_MEM`
+ Not enough free memory in OPAL to process request.
+:ref:`OPAL_INTERNAL_ERROR`
+ Other internal OPAL error
+:ref:`OPAL_ASYNC_COMPLETION`
+ Request is submitted.
+
+.. _OPAL_SET_PARAM:
+
+OPAL_SET_PARAM
+==============
+
+.. code-block:: c
+
+ #define OPAL_SET_PARAM 90
+
+ int64_t fsp_opal_set_param(uint64_t async_token, uint32_t param_id,
+ uint64_t buffer, uint64_t length);
+
+
+Write a new setting for `param_id`. This is an asynchronous call as OPAL may
+need to communicate with a service processor. The `param_id` and `length` are
+described in the device tree for each parameter (see
+:ref:`device-tree/ibm,opal/sysparams` for details).
+
+
+Returns
+-------
+:ref:`OPAL_HARDWARE`
+ Hardware issue prevents retreiving parameter. e.g. FSP is offline or
+ absent.
+:ref:`OPAL_PARAMETER`
+ Invalid `param_id`
+:ref:`OPAL_PERMISSION`
+ Not allowed to write parameter.
+:ref:`OPAL_NO_MEM`
+ Not enough free memory in OPAL to process request.
+:ref:`OPAL_INTERNAL_ERROR`
+ Other internal OPAL error
+:ref:`OPAL_ASYNC_COMPLETION`
+ Request is submitted.