aboutsummaryrefslogtreecommitdiff
path: root/doc/opal-api/opal-phb-flag-set-get-179-180.rst
blob: babc8376f5afaa213d20b8429418db825a0d42ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
.. _OPAL_PHB_SET_OPTION:

OPAL_PHB_SET_OPTION
===================

.. code-block:: c

   #define OPAL_PHB_SET_OPTION			179

   int64_t opal_phb_set_option(uint64_t phb_id, uint64_t opt, uint64_t setting);


This call translate an PHB option to a PHB flag for specific PHB model and
writes it to the hardware.

Supported options are:

.. code-block:: c

   enum OpalPhbOption {
        OPAL_PHB_OPTION_TVE1_4GB = 0x1,
        OPAL_PHB_OPTION_MMIO_EEH_DISABLE = 0x2
   };

OPAL_PHB_OPTION_TVE1_4GB: If set, uses TVE#1 for DMA access above 4GB; allowed setting 0 or 1.

OPAL_PHB_OPTION_MMIO_EEH_DISABLE: Disables EEH for all MMIO commands; allowed setting 0 or 1.

Returns
-------

:ref:`OPAL_SUCCESS`
   Success
:ref:`OPAL_UNSUPPORTED`
   if either the call or the option is not supported
:ref:`OPAL_PARAMETER`
   if PHB is unknown or a new setting is out of range

.. _OPAL_PHB_GET_OPTION:

OPAL_PHB_GET_OPTION
===================

.. code-block:: c

   #define OPAL_PHB_GET_OPTION				180

   int64_t opal_phb_get_option(uint64_t phb_id, uint64_t opt, uint64_t *setting);

This call reads the hardware specific PHB flag and translates to a PHB option.

For the list of supported options refer to OPAL_PHB_SET_OPTION above.

Returns
-------

:ref:`OPAL_SUCCESS`
   Success
:ref:`OPAL_UNSUPPORTED`
   if either the call or the option is not supported
:ref:`OPAL_PARAMETER`
   if PHB is unknown or a new setting is out of range or no memory
   allocated for the return value