OPAL API Documentation¶
The OPAL API is the interface between an Operating System and OPAL.
Name |
API Token ID |
Introduced |
Required as of |
Notes |
0 |
v1.0 (Initial Release) |
POWER8 |
||
1 |
v1.0 (Initial Release) |
POWER8 |
||
2 |
v1.0 (Initial Release) |
POWER8 |
||
3 |
v1.0 (Initial Release) |
POWER8 |
||
4 |
v1.0 (Initial Release) |
POWER8 |
||
5 |
v1.0 (Initial Release) |
POWER8 |
||
6 |
v1.0 (Initial Release) |
POWER8 |
||
7 |
v1.0 (Initial Release) |
POWER8 |
||
8 |
v1.0 (Initial Release) |
POWER8 |
||
9 |
v1.0 (Initial Release) |
POWER8 |
||
10 |
v1.0 (Initial Release) |
POWER8 |
||
11 |
N/A Present only on internal systems. |
Was POWER7 p5ioc specific. No use outside IBM development |
||
12 |
N/A Present only on internal systems. |
Was POWER7 p5ioc specific. No use outside IBM development |
||
13 |
v1.0 (Initial Release) |
POWER8 |
||
14 |
v1.0 (Initial Release) |
POWER8 |
||
15 |
v1.0 (Initial Release) |
POWER8 |
||
16 |
v1.0 (Initial Release) |
POWER8 |
||
17 |
v1.0 (Initial Release) |
POWER8 |
||
18 |
v1.0 (Initial Release) |
POWER8 |
||
19 |
v1.0 (Initial Release) |
POWER8 |
||
20 |
v1.0 (Initial Release) |
POWER8 |
||
21 |
Never |
Never Implemented |
||
22 |
v1.0 (Initial Release) |
Removed |
||
23 |
v1.0 (Initial Release) |
POWER8 |
||
24 |
Never |
POWER8 |
Never Implemented |
|
25 |
v1.0 (Initial Release) |
POWER8 |
||
26 |
v1.0 (Initial Release) |
POWER8 |
||
27 |
v1.0 (Initial Release) |
POWER8 |
||
28 |
v1.0 (Initial Release) |
POWER8 |
||
29 |
v1.0 (Initial Release) |
POWER8 |
||
30 |
Never |
POWER8 |
Never used or Implemented |
|
31 |
v1.0 (Initial Release) |
POWER8 |
||
32 |
v1.0 (Initial Release) |
POWER8 |
||
35 |
Never |
Never used or Implemented |
||
36 |
Never |
Never used or Implemented |
||
37 |
v1.0 (Initial Release) |
POWER8 |
||
38 |
v1.0 (Initial Release) |
POWER8 |
Never used, now removed. |
|
39 |
v1.0 (Initial Release) |
POWER8 |
||
40 |
v1.0 (Initial Release) |
POWER8 |
||
41 |
v1.0 (Initial Release) |
POWER8 |
||
42 |
v1.0 (Initial Release) |
POWER8 |
||
43 |
v1.0 (Initial Release) |
POWER8 |
unimplemented |
|
44 |
v1.0 (Initial Release) |
POWER8 |
||
45 |
v1.0 (Initial Release) |
POWER8 |
||
Never used |
46 |
|||
Never used |
47 |
|||
Never used |
48 |
|||
49 |
v1.0 (Initial Release) |
POWER8 |
||
50 |
v1.0 (Initial Release) |
POWER8 |
||
51 |
N/A |
Only implemented prior to public release. |
||
52 |
Never |
Never implemented |
||
53 |
v1.0 (Initial Release) |
POWER8 |
||
54 |
Never |
Never implemented |
||
55 |
Never |
Never implemented |
||
56 |
v1.0 (Initial Release) |
POWER8 |
||
57 |
Never |
Never implemented |
||
58 |
Never |
Never implemented |
||
59 |
Never |
Never implemented |
||
60 |
v1.0 (Initial Release) |
POWER8 |
||
61 |
v1.0 (Initial Release) |
POWER8 |
Removed, never used! |
|
62 |
v1.0 (Initial Release) |
POWER8 |
||
63 |
v1.0 (Initial Release) |
POWER8 |
||
64 |
v1.0 (Initial Release) |
POWER8 |
||
65 |
v1.0 (Initial Release) |
POWER8 |
||
66 |
v1.0 (Initial Release) |
POWER8 |
||
67 |
v1.0 (Initial Release) |
POWER8 |
||
68 |
v1.0 (Initial Release) |
POWER8 |
||
69 |
v1.0 (Initial Release) |
POWER8 |
||
70 |
v1.0 (Initial Release) |
POWER8 |
||
71 |
v1.0 (Initial Release) |
POWER8 |
||
72 |
N/A |
Currently unused. |
||
73 |
v1.0 (Initial Release) |
POWER8 |
||
74 |
v1.0 (Initial Release) |
POWER8 |
||
75 |
v1.0 (Initial Release) |
POWER8 |
||
76 |
v1.0 (Initial Release) |
POWER8 |
||
77 |
v1.0 (Initial Release) |
POWER8 |
||
78 |
v1.0 (Initial Release) |
POWER8 |
||
79 |
v1.0 (Initial Release) |
POWER8 |
||
80 |
v1.0 (Initial Release) |
POWER8 |
||
81 |
v1.0 (Initial Release) |
POWER8 |
||
82 |
v1.0 (Initial Release) |
POWER8 |
||
83 |
v1.0 (Initial Release) |
POWER8 |
||
84 |
v1.0 (Initial Release) |
POWER8 |
||
85 |
v1.0 (Initial Release) |
POWER8 |
||
86 |
v1.0 (Initial Release) |
POWER8 |
||
87 |
v1.0 (Initial Release) |
POWER8 |
||
88 |
v1.0 (Initial Release) |
POWER8 |
||
89 |
v1.0 (Initial Release) |
POWER8 |
||
90 |
v1.0 (Initial Release) |
POWER8 |
||
91 |
v1.0 (Initial Release) |
POWER8 |
||
92 |
Never |
Never used |
||
93 |
v1.0 (Initial Release) |
POWER8 |
||
94 |
v1.0 (Initial Release) |
POWER8 |
||
95 |
v1.0 (Initial Release) |
POWER8 |
||
96 |
v1.0 (Initial Release) |
POWER8 |
||
97 |
v1.0 (Initial Release) |
POWER8 |
||
98 |
v1.0 (Initial Release) |
POWER8 |
||
99 |
v1.0 (Initial Release) |
POWER8 |
||
100 |
v1.0 (Initial Release) |
POWER8 |
||
101 |
v1.0 (Initial Release) |
POWER8 |
||
102 |
v1.0 (Initial Release) |
POWER8 |
||
103 |
v1.0 (Initial Release) |
POWER8 |
||
104 |
v1.0 (Initial Release) |
POWER8 |
||
105 |
v1.0 (Initial Release) |
POWER8 |
||
106 |
Introduced and deprecated in skiboot 4.0. Should be completely unused. |
Do not use. |
||
107 |
POWER9 |
|||
108 |
POWER9 |
|||
109 |
POWER9 |
|||
110 |
POWER9 |
|||
111 |
POWER9 |
|||
112 |
POWER9 |
|||
113 |
POWER9 |
|||
114 |
POWER9 |
|||
115 |
POWER9 |
|||
116 |
POWER9 |
|||
117 |
POWER9 |
|||
118 |
POWER9 |
|||
119 |
POWER9 |
|||
120 |
POWER9 |
|||
121 |
POWER9 |
|||
122 |
POWER9 |
|||
123 |
POWER9 |
|||
124 |
POWER9 |
|||
125 |
POWER9 |
|||
126 |
POWER9 |
|||
127 |
POWER9 |
|||
128 |
POWER9 |
|||
129 |
POWER9 |
|||
130 |
POWER9 |
|||
131 |
POWER9 |
|||
132 |
POWER9 |
|||
133 |
POWER9 |
|||
134 |
POWER9 |
|||
135 |
POWER9 |
|||
136 |
POWER9 |
|||
137 |
POWER9 |
|||
138 |
POWER9 |
|||
139 |
POWER9 |
|||
140 |
POWER9 |
|||
141 |
POWER9 |
|||
142 |
POWER9 |
|||
143 |
||||
144 |
||||
145 |
POWER9 |
|||
146 |
POWER9 |
|||
147 |
POWER9 |
|||
148 |
POWER9 |
|||
149 |
POWER9 |
|||
150 |
POWER9 |
|||
151 |
POWER9 |
|||
152 |
POWER9 |
|||
153 |
POWER9 |
|||
154 |
POWER9 |
|||
155 |
POWER9 |
|||
156 |
POWER9 |
|||
157 |
POWER9 |
|||
158 |
POWER9 |
|||
159 |
POWER9 |
|||
160 |
POWER9 |
|||
161 |
POWER9 |
|||
162 |
POWER9 |
|||
163 |
POWER9 |
|||
164 |
POWER9 |
|||
165 |
POWER9 |
|||
166 |
POWER9 |
|||
167 |
||||
168 |
||||
169 |
||||
170 |
||||
171 |
Future, likely 6.4 |
|||
172 |
Future, likely 6.4 |
|||
173 |
Future, likely 6.4 |
POWER9 |
||
174 |
Future, likely 6.4 |
POWER9 |
||
175 |
Future, likely 6.4 |
POWER9 |
||
179 |
Future, likely 6.6 |
POWER9 |
||
180 |
Future, likely 6.6 |
POWER9 |
- OPAL_CEC_POWER_DOWN
- OPAL_CEC_REBOOT and OPAL_CEC_REBOOT2
- OPAL_CHECK_ASYNC_COMPLETION
- OPAL_CHECK_TOKEN
- Code Update on FSP based machine
- OPAL_CONFIG_CPU_IDLE_STATE
- OPAL Console calls
- OPAL Dumps
- OPAL_ELOG: Error logging
- OPAL Flash calls
- OPAL_GET_DEVICE_TREE
- OPAL_GET_EPOW_STATUS
- OPAL_GET_MSG
- OPAL_GET_MSI_32 and OPAL_GET_MSI_64
- OPAL_GET_XIVE
- Hypervisor Maintenance Interrupt (HMI)
- List of errors that causes HMI
- HMI handling
- OPAL_HANDLE_HMI
- OPAL_HANDLE_HMI2
- OPAL_HANDLE_INTERRUPT
- OPAL_I2C_REQUEST
- OPAL_IMC_COUNTERS_INIT
- OPAL_IMC_COUNTERS_START
- OPAL_IMC_COUNTERS_STOP
- OPAL_INT_EOI
- OPAL_INT_GET_XIRR
- OPAL_INT_SET_CPPR
- OPAL_INT_SET_MFRR
- OPAL_INVALID_CALL
- OPAL_IPMI_SEND
- OPAL_IPMI_RECV
- Service Indicators (LEDS)
- OPAL_LPC_READ
- OPAL_LPC_WRITE
- OPAL_MESSAGE
- OPAL MPIPL APIs
- OPAL_MPIPL_UPDATE
- OPAL_MPIPL_REGISTER_TAG
- OPAL_MPIPL_QUERY_TAG
- OPAL_NMMU_SET_PTCR
- OPAL NPU2 calls
- OPAL_NPU_SET_RELAXED_ORDER
- OPAL_NPU_GET_RELAXED_ORDER
- OPAL_NPU_SPA_SETUP
- OPAL_NPU_SPA_CLEAR_CACHE
- OPAL_NPU_TL_SET
- OPAL_NPU_MEM_ALLOC
- OPAL_NPU_MEM_RELEASE
- OPAL NVRAM
- Get/Set System Parameters
- OPAL PCI Config Space Access
- OPAL_PCI_EEH_FREEZE_CLEAR
- OPAL_PCI_EEH_FREEZE_SET
- OPAL_PCI_EEH_FREEZE_STATUS
- OPAL_PCI_EEH_FREEZE_STATUS2
- OPAL_PCI_ERR_INJECT
- OPAL_PCI_GET_HUB_DIAG_DATA
- OPAL_PCI_GET_PHB_DIAG_DATA2
- OPAL_PCI_GET_POWER_STATE
- OPAL_PCI_GET_PRESENCE_STATE
- OPAL_PCI_GET_PBCQ_TUNNEL_BAR
- OPAL_PCI_SET_PBCQ_TUNNEL_BAR
- OPAL_PCI_MAP_PE_DMA_WINDOW
- OPAL_PCI_MAP_PE_DMA_WINDOW_REAL
- OPAL_PCI_MAP_PE_MMIO_WINDOW
- OPAL_PCI_MSI_EOI
- OPAL_PCI_NEXT_ERROR
- OPAL_PCI_PHB_MMIO_ENABLE
- OPAL_PCI_POLL
- OPAL_PCI_REINIT
- OPAL_PCI_RESET
- OPAL_PCI_SET_P2P
- OPAL_PCI_SET_PE
- OPAL_PCI_SET_PELTV
- OPAL_PCI_SET_PHB_CAPI_MODE
- OPAL_PCI_SET_PHB_MEM_WINDOW
- OPAL_PCI_SET_POWER_STATE
- OPAL_PCI_SET_XIVE_PE
- OPAL_PCI_TCE_KILL
- OPAL_PHB_SET_OPTION
- OPAL_PHB_GET_OPTION
- OPAL_POLL_EVENTS
- OPAL Power Shift Ratio
- OPAL Power Caps
- OPAL_PRD_MSG
- OPAL_QUERY_CPU_STATUS
- OPAL_QUIESCE
- OPAL Timed Power On and Delayed Power Off
- OPAL_REINIT_CPUS
- OPAL_RESYNC_TIMEBASE
- OPAL Real Time Clock (RTC) APIs
- OPAL Secure Variable API
- OPAL_SECVAR_GET
- OPAL_SECVAR_GET_NEXT
- OPAL_SECVAR_ENQUEUE_UPDATE
- OPAL Sensor Groups
- OPAL_SENSOR_READ
- OPAL_SENSOR_READ_U64
- OPAL_SET_XIVE
- OPAL_SIGNAL_SYSTEM_RESET
- OPAL_SLW_SET_REG
- Starting and stopping secondary CPUs
- OPAL_SYNC_HOST_REBOOT
- OPAL_TEST
- OPAL_WRITE_OPPANEL_ASYNC
- OPAL_XSCOM_READ
- OPAL_XSCOM_WRITE
- OPAL_NX_COPROC_INIT
- POWER9 Changes to OPAL API
- OPAL API Return Codes
Removed Calls¶
Under very specific and careful circumstances, an OPAL call has been removed and no longer supported.
Name |
API Token |
Introduced |
Removed |
|||
21 |
Never |
|||||
24 |
Never |
|||||
30 |
Never |
|||||
35 |
Never |
|||||
36 |
Never |
|||||
52 |
Never |
|||||
54 |
Never |
|||||
55 |
Never |
|||||
57 |
Never |
|||||
58 |
Never |
|||||
59 |
Never |
|||||
92 |
pre-v1.0 |
pre-v1.0 |
||||
51 |
pre-v1.0 |
pre-v1.0, with last remnants removed in skiboot-6.4 |
||||
38 |
v1.0 Initial Release |
|||||
43 |
pre-v1.0 |
pre-v1.0 |
||||
106 |
v4.0 |
v4.0 |
||||
22 |
v1.0 Initial Release |
|||||
11 |
pre-v1.0 |
|||||
12 |
pre-v1.0 |
|||||
61 |
v1.0 Initial Release |
|||||
33 | v1.0 Initial Release | skiboot-7.1 |
||||||
34 | v1.0 Initial Release | skiboot-7.1 |
OPAL_GET_COMPLETION_TOKEN_STATUS¶
In the before time, long-long ago, there existed something called OPAL before the incarnation we know today. Presumably, this long forgotten incarnation had a call called this.
This call has never been implemented, and never will be.
OPAL_PCI_SHPC¶
A remnant of a long forgotten incarnation of OPAL. Never implemented, never will be.
OPAL_PCI_SET_PHB_TABLE_MEMORY¶
A remnant of an old API design. Never implemented, never used. Only ever returned OPAL_UNSUPPORTED, now the call is not implemented at all.
OPAL_PCI_GET_XIVE_REISSUE¶
A remnant of something prior to OPALv3. Never implemented in skiboot and never used by anyone. Returend OPAL_UNSUPPORTED until skiboot-6.4, where it was removed.
OPAL_PCI_SET_XIVE_REISSUE¶
A remnant of something prior to OPALv3. Never implemented in skiboot and never used by anyone. Returend OPAL_UNSUPPORTED until skiboot-6.4, where it was removed.
OPAL_PCI_FENCE_PHB¶
Never implemented.
OPAL_PCI_MASK_PE_ERROR¶
Never implemented.
OPAL_SET_SLOT_LED_STATUS¶
Never implemented.
OPAL_SET_SYSTEM_ATTENTION_LED¶
Never implemented.
OPAL_RESERVED1¶
Reserved for future use, but never used.
OPAL_RESERVED2¶
Reserved for future use, but never used.
OPAL_ELOG_SEND¶
Brielfy present prior to the first public release of OPAL. Never used in any public kernel tree. If this functionality were to ever be implemented, it’d appear as OPAL_ELOG_WRITE rather than this call.
OPAL_PCI_GET_PHB_DIAG_DATA¶
This call was introduced and functionally removed (all backends for it were) before the first public opal release. It has not been used since Linux 3.11-rc1. Considering the state of EEH in such old kernels and firmware, removing the remnants of this call is considered safe. If for some bizarre reason such an old kernel is run on skiboot-6.4 or later, an OPAL_PARAMETER error will be returned instead of OPAL_UNSUPPORTED.
It is replaced by OPAL_PCI_GET_PHB_DIAG_DATA2 instead.
OPAL_GET_XIVE_SOURCE¶
While this call was technically implemented by skiboot, no code has ever called it, and it was only ever implemented for the p7ioc-phb back-end (i.e. POWER7). Since this call was unused in Linux, and that POWER7 with OPAL was only ever available internally, it was determined that it was safe to remove this call as of skiboot-6.4.
OPAL_WRITE_OPPANEL¶
Never in a released version, use OPAL_WRITE_OPPANEL_ASYNC.
OPAL_OLD_I2C_REQUEST¶
Never used. Only existing briefly in the skiboot 4.0 development cycle.
OPAL_REGISTER_OPAL_EXCEPTION_HANDLER¶
#define OPAL_REGISTER_OPAL_EXCEPTION_HANDLER 22
int64_t opal_register_exc_handler(uint64_t opal_exception __unused,
uint64_t handler_address __unused,
uint64_t glue_cache_line __unused);
This call existed for a very short period of time and only ever worked with Big Endian host operating systems. The idea was that OPAL would handle HMIs and an OS could (if it chose to) register a handler for them. This call is not required since the introduction of OPAL_HANDLE_HMI and all machines that ever shipped without OPAL_HANDLE_HMI have a firmware update that supports it. For IBM Tuleta machines, this was FW810.20 (released Oct 2014) that had OPAL_HANDLE_HMI support.
This call was removed in skiboot 5.0 and now just returns OPAL_UNSUPPORTED.
Use of the OPAL_HANDLE_HMI call was introduced in Linux 3.17.
OPAL_PCI_SET_HUB_TCE_MEMORY¶
#define OPAL_PCI_SET_HUB_TCE_MEMORY 11
int64_t opal_pci_set_hub_tce_memory(uint64_t hub_id,
uint64_t tce_mem_addr __unused,
uint64_t tce_mem_size __unused);
This call was only ever relevant for p5ioc based POWER7 systems. These were never available with OPAL outside of IBM development.
Support for POWER7 systems with p5ioc was dropped in skiboot-5.2.0, and these systems were only ever used with OPAL inside IBM for development and bring-up purposes.
Support for p5ioc was removed from the Linux kernel in v4.6-rc1.
OPAL_PCI_SET_PHB_TCE_MEMORY¶
#define OPAL_PCI_SET_PHB_TCE_MEMORY 12
int64_t opal_pci_set_phb_tce_memory(uint64_t phb_id,
uint64_t tce_mem_addr,
uint64_t tce_mem_size);
This call was only ever relevant for p5ioc based POWER7 systems. These were never available with OPAL outside of IBM development.
Support for POWER7 systems with p5ioc was dropped in skiboot-5.2.0, and these systems were only ever used with OPAL inside IBM for development and bring-up purposes.
Support for p5ioc was removed from the Linux kernel in v4.6-rc1.
OPAL_PCI_SET_MVE¶
Dead code, as the callback did nothing after the P7IOC code was removed in skiboot 6.4. Removed in skiboot-7.1.
OPAL_PCI_SET_MVE_ENABLE¶
Dead code, as the callback did nothing after the P7IOC code was removed in skiboot 6.4. Removed in skiboot-7.1.
Future Calls¶
OPAL_ELOG_WRITE¶
May be implemented in the future to complement the OPAL_ELOG_READ call.