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 sysparams for details).

Currently only implemented on FSP based systems.

OPAL_GET_PARAM

#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 sysparams for details).

Returns

OPAL_HARDWARE

Hardware issue prevents retreiving parameter. e.g. FSP is offline or absent.

OPAL_PARAMETER

Invalid param_id

OPAL_PERMISSION

Not allowed to read parameter.

OPAL_NO_MEM

Not enough free memory in OPAL to process request.

OPAL_INTERNAL_ERROR

Other internal OPAL error

OPAL_ASYNC_COMPLETION

Request is submitted.

OPAL_SET_PARAM

#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 sysparams for details).

Returns

OPAL_HARDWARE

Hardware issue prevents retreiving parameter. e.g. FSP is offline or absent.

OPAL_PARAMETER

Invalid param_id

OPAL_PERMISSION

Not allowed to write parameter.

OPAL_NO_MEM

Not enough free memory in OPAL to process request.

OPAL_INTERNAL_ERROR

Other internal OPAL error

OPAL_ASYNC_COMPLETION

Request is submitted.