aboutsummaryrefslogtreecommitdiff
path: root/doc/opal-api/return-codes.html
blob: ff923fa8f41b0c9e8df699901e16c1eb8430979e (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>OPAL API Return Codes &#8212; skiboot 4d27f03
 documentation</title>
    <link rel="stylesheet" href="../_static/classic.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/language_data.js"></script>
    
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="Release Notes" href="../release-notes/index.html" />
    <link rel="prev" title="POWER9 Changes to OPAL API" href="power9-changes.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../release-notes/index.html" title="Release Notes"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="power9-changes.html" title="POWER9 Changes to OPAL API"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">skiboot 4d27f03
 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">OPAL API Documentation</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="opal-api-return-codes">
<h1>OPAL API Return Codes<a class="headerlink" href="#opal-api-return-codes" title="Permalink to this headline"></a></h1>
<p>All OPAL calls return an integer relaying the success/failure of the OPAL
call.</p>
<p>Success is typically indicated by OPAL_SUCCESS. Failure is always indicated
by a negative return code.</p>
<p>Conforming host Operating Systems MUST handle return codes other than those
listed here. In future OPAL versions, additional return codes may be added.</p>
<p>In the reference implementation (skiboot) these are all in <a class="reference external" href="https://github.com/open-power/skiboot/blob/master/include/opal-api.h">include/opal-api.h</a></p>
<p>There have been additions to the return codes from OPAL over time. A conforming
host OS should gracefully handle receiving a new error code for existing calls.</p>
<p>An OS running on a POWER8 system only has to know about error codes that existed
when POWER8 with OPAL was introduced (indicated by YES in the POWER8 column below).
Additional OPAL error codes <em>may be returned on POWER8 systems</em> and as such OSs
need to gracefully handle unknown error codes.</p>
<p>An OS running on POWER9 or above must handle all error codes as they were when
POWER9 was introduced. We use the placeholder “v1.0” version for
“since the dawn of time” even though there never was a skiboot v1.0</p>
<table border="1" class="docutils">
<colgroup>
<col width="30%" />
<col width="17%" />
<col width="10%" />
<col width="10%" />
<col width="32%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Name</td>
<td>Return Code</td>
<td>POWER8 GA</td>
<td>POWER9 GA</td>
<td>skiboot version where introduced</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#opal-success"><span class="std std-ref">OPAL_SUCCESS</span></a></td>
<td>0</td>
<td>YES</td>
<td>YES</td>
<td>v1.0 (initial release)</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#opal-parameter"><span class="std std-ref">OPAL_PARAMETER</span></a></td>
<td>-1</td>
<td>YES</td>
<td>YES</td>
<td>v1.0 (initial release)</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#opal-busy"><span class="std std-ref">OPAL_BUSY</span></a></td>
<td>-2</td>
<td>YES</td>
<td>YES</td>
<td>v1.0 (initial release)</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#opal-partial"><span class="std std-ref">OPAL_PARTIAL</span></a></td>
<td>-3</td>
<td>YES</td>
<td>YES</td>
<td>v1.0 (initial release)</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#opal-constrained"><span class="std std-ref">OPAL_CONSTRAINED</span></a></td>
<td>-4</td>
<td>YES</td>
<td>YES</td>
<td>v1.0 (initial release)</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#opal-closed"><span class="std std-ref">OPAL_CLOSED</span></a></td>
<td>-5</td>
<td>YES</td>
<td>YES</td>
<td>v1.0 (initial release)</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#opal-hardware"><span class="std std-ref">OPAL_HARDWARE</span></a></td>
<td>-6</td>
<td>YES</td>
<td>YES</td>
<td>v1.0 (initial release)</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#opal-unsupported"><span class="std std-ref">OPAL_UNSUPPORTED</span></a></td>
<td>-7</td>
<td>YES</td>
<td>YES</td>
<td>v1.0 (initial release)</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#opal-permission"><span class="std std-ref">OPAL_PERMISSION</span></a></td>
<td>-8</td>
<td>YES</td>
<td>YES</td>
<td>v1.0 (initial release)</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#opal-no-mem"><span class="std std-ref">OPAL_NO_MEM</span></a></td>
<td>-9</td>
<td>YES</td>
<td>YES</td>
<td>v1.0 (initial release)</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#opal-resource"><span class="std std-ref">OPAL_RESOURCE</span></a></td>
<td>-10</td>
<td>YES</td>
<td>YES</td>
<td>v1.0 (initial release)</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#opal-internal-error"><span class="std std-ref">OPAL_INTERNAL_ERROR</span></a></td>
<td>-11</td>
<td>YES</td>
<td>YES</td>
<td>v1.0 (initial release)</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#opal-busy-event"><span class="std std-ref">OPAL_BUSY_EVENT</span></a></td>
<td>-12</td>
<td>YES</td>
<td>YES</td>
<td>v1.0 (initial release)</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#opal-hardware-frozen"><span class="std std-ref">OPAL_HARDWARE_FROZEN</span></a></td>
<td>-13</td>
<td>YES</td>
<td>YES</td>
<td>v1.0 (initial release)</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#opal-wrong-state"><span class="std std-ref">OPAL_WRONG_STATE</span></a></td>
<td>-14</td>
<td>YES</td>
<td>YES</td>
<td>v1.0 (initial release)</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#opal-async-completion"><span class="std std-ref">OPAL_ASYNC_COMPLETION</span></a></td>
<td>-15</td>
<td>YES</td>
<td>YES</td>
<td>v1.0 (initial release)</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#opal-empty"><span class="std std-ref">OPAL_EMPTY</span></a></td>
<td>-16</td>
<td>NO</td>
<td>YES</td>
<td>v4.0</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#opal-i2c-timeout"><span class="std std-ref">OPAL_I2C_TIMEOUT</span></a></td>
<td>-17</td>
<td>NO</td>
<td>YES</td>
<td><a class="reference internal" href="../release-notes/skiboot-5.1.0.html#skiboot-5-1-0"><span class="std std-ref">skiboot-5.1.0</span></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#opal-i2c-invalid-cmd"><span class="std std-ref">OPAL_I2C_INVALID</span></a></td>
<td>-18</td>
<td>NO</td>
<td>YES</td>
<td><a class="reference internal" href="../release-notes/skiboot-5.1.0.html#skiboot-5-1-0"><span class="std std-ref">skiboot-5.1.0</span></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#opal-i2c-lbus-parity"><span class="std std-ref">OPAL_I2C_LBUS_PARITY</span></a></td>
<td>-19</td>
<td>NO</td>
<td>YES</td>
<td><a class="reference internal" href="../release-notes/skiboot-5.1.0.html#skiboot-5-1-0"><span class="std std-ref">skiboot-5.1.0</span></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#opal-i2c-bkend-overrun"><span class="std std-ref">OPAL_I2C_BKEND_OVERRUN</span></a></td>
<td>-20</td>
<td>NO</td>
<td>YES</td>
<td><a class="reference internal" href="../release-notes/skiboot-5.1.0.html#skiboot-5-1-0"><span class="std std-ref">skiboot-5.1.0</span></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#opal-i2c-bkend-access"><span class="std std-ref">OPAL_I2C_BKEND_ACCESS</span></a></td>
<td>-21</td>
<td>NO</td>
<td>YES</td>
<td><a class="reference internal" href="../release-notes/skiboot-5.1.0.html#skiboot-5-1-0"><span class="std std-ref">skiboot-5.1.0</span></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#opal-i2c-arbt-lost"><span class="std std-ref">OPAL_I2C_ARBT_LOST</span></a></td>
<td>-22</td>
<td>NO</td>
<td>YES</td>
<td><a class="reference internal" href="../release-notes/skiboot-5.1.0.html#skiboot-5-1-0"><span class="std std-ref">skiboot-5.1.0</span></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#opal-i2c-nack-rcvd"><span class="std std-ref">OPAL_I2C_NACK_RCVD</span></a></td>
<td>-23</td>
<td>NO</td>
<td>YES</td>
<td><a class="reference internal" href="../release-notes/skiboot-5.1.0.html#skiboot-5-1-0"><span class="std std-ref">skiboot-5.1.0</span></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#opal-i2c-stop-err"><span class="std std-ref">OPAL_I2C_STOP_ERR</span></a></td>
<td>-24</td>
<td>NO</td>
<td>YES</td>
<td><a class="reference internal" href="../release-notes/skiboot-5.1.0.html#skiboot-5-1-0"><span class="std std-ref">skiboot-5.1.0</span></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#opal-xscom-busy"><span class="std std-ref">OPAL_XSCOM_BUSY</span></a></td>
<td>OPAL_BUSY</td>
<td>NO</td>
<td>YES</td>
<td><a class="reference internal" href="../release-notes/skiboot-5.4.0.html#skiboot-5-4-0"><span class="std std-ref">skiboot-5.4.0</span></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#opal-xscom-chiplet-off"><span class="std std-ref">OPAL_XSCOM_CHIPLET_OFF</span></a></td>
<td>OPAL_WRONG_STATE</td>
<td>NO</td>
<td>YES</td>
<td><a class="reference internal" href="../release-notes/skiboot-5.4.0.html#skiboot-5-4-0"><span class="std std-ref">skiboot-5.4.0</span></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#opal-xscom-partial-good"><span class="std std-ref">OPAL_XSCOM_PARTIAL_GOOD</span></a></td>
<td>-25</td>
<td>NO</td>
<td>YES</td>
<td><a class="reference internal" href="../release-notes/skiboot-5.4.0.html#skiboot-5-4-0"><span class="std std-ref">skiboot-5.4.0</span></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#opal-xscom-addr-error"><span class="std std-ref">OPAL_XSCOM_ADDR_ERROR</span></a></td>
<td>-26</td>
<td>NO</td>
<td>YES</td>
<td><a class="reference internal" href="../release-notes/skiboot-5.4.0.html#skiboot-5-4-0"><span class="std std-ref">skiboot-5.4.0</span></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#opal-xscom-clock-error"><span class="std std-ref">OPAL_XSCOM_CLOCK_ERROR</span></a></td>
<td>-27</td>
<td>NO</td>
<td>YES</td>
<td><a class="reference internal" href="../release-notes/skiboot-5.4.0.html#skiboot-5-4-0"><span class="std std-ref">skiboot-5.4.0</span></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#opal-xscom-parity-error"><span class="std std-ref">OPAL_XSCOM_PARITY_ERROR</span></a></td>
<td>-28</td>
<td>NO</td>
<td>YES</td>
<td><a class="reference internal" href="../release-notes/skiboot-5.4.0.html#skiboot-5-4-0"><span class="std std-ref">skiboot-5.4.0</span></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#opal-xscom-timeout"><span class="std std-ref">OPAL_XSCOM_TIMEOUT</span></a></td>
<td>-29</td>
<td>NO</td>
<td>YES</td>
<td><a class="reference internal" href="../release-notes/skiboot-5.4.0.html#skiboot-5-4-0"><span class="std std-ref">skiboot-5.4.0</span></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#opal-xscom-ctr-offlined"><span class="std std-ref">OPAL_XSCOM_CTR_OFFLINED</span></a></td>
<td>-30</td>
<td>NO</td>
<td>YES</td>
<td><a class="reference internal" href="../release-notes/skiboot-5.4.0.html#skiboot-5-4-0"><span class="std std-ref">skiboot-5.4.0</span></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#opal-xive-provisioning"><span class="std std-ref">OPAL_XIVE_PROVISIONING</span></a></td>
<td>-31</td>
<td>NO</td>
<td>YES</td>
<td><a class="reference internal" href="../release-notes/skiboot-5.5.0.html#skiboot-5-5-0"><span class="std std-ref">skiboot-5.5.0</span></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#opal-xive-free-active"><span class="std std-ref">OPAL_XIVE_FREE_ACTIVE</span></a></td>
<td>-32</td>
<td>NO</td>
<td>YES</td>
<td><a class="reference internal" href="../release-notes/skiboot-5.5.0.html#skiboot-5-5-0"><span class="std std-ref">skiboot-5.5.0</span></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#opal-timeout"><span class="std std-ref">OPAL_TIMEOUT</span></a></td>
<td>-33</td>
<td>NO</td>
<td>YES</td>
<td><a class="reference internal" href="../release-notes/skiboot-5.8.html#skiboot-5-8"><span class="std std-ref">skiboot-5.8</span></a></td>
</tr>
</tbody>
</table>
<p>The core set of return codes are:</p>
<div class="section" id="opal-success">
<span id="id1"></span><h2>OPAL_SUCCESS<a class="headerlink" href="#opal-success" title="Permalink to this headline"></a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_SUCCESS           0</span>
</pre></div>
</div>
<p>Success!</p>
</div>
<div class="section" id="opal-parameter">
<span id="id2"></span><h2>OPAL_PARAMETER<a class="headerlink" href="#opal-parameter" title="Permalink to this headline"></a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_PARAMETER         -1</span>
</pre></div>
</div>
<p>A parameter was invalid. This will also be returned if you call an
invalid OPAL call. To determine if a specific OPAL call is supported
or not, OPAL_CHECK_TOKEN should be called rather than relying on
OPAL_PARAMETER being returned for an invalid token.</p>
</div>
<div class="section" id="opal-busy">
<span id="id3"></span><h2>OPAL_BUSY<a class="headerlink" href="#opal-busy" title="Permalink to this headline"></a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_BUSY            -2</span>
</pre></div>
</div>
<p>Try again later. Related to <cite>OPAL_BUSY_EVENT</cite>, but <cite>OPAL_BUSY</cite> indicates that the
caller need not call <cite>OPAL_POLL_EVENTS</cite> itself. <strong>TODO</strong> Clarify current situation.</p>
</div>
<div class="section" id="opal-partial">
<span id="id4"></span><h2>OPAL_PARTIAL<a class="headerlink" href="#opal-partial" title="Permalink to this headline"></a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_PARTIAL         -3</span>
</pre></div>
</div>
<p>The operation partially succeeded.</p>
</div>
<div class="section" id="opal-constrained">
<span id="id5"></span><h2>OPAL_CONSTRAINED<a class="headerlink" href="#opal-constrained" title="Permalink to this headline"></a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_CONSTRAINED     -4</span>
</pre></div>
</div>
<p><strong>FIXME</strong></p>
</div>
<div class="section" id="opal-closed">
<span id="id6"></span><h2>OPAL_CLOSED<a class="headerlink" href="#opal-closed" title="Permalink to this headline"></a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_CLOSED          -5</span>
</pre></div>
</div>
<p><strong>FIXME</strong> document these</p>
</div>
<div class="section" id="opal-hardware">
<span id="id7"></span><h2>OPAL_HARDWARE<a class="headerlink" href="#opal-hardware" title="Permalink to this headline"></a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_HARDWARE                -6</span>
</pre></div>
</div>
<p><strong>FIXME</strong> document these</p>
</div>
<div class="section" id="opal-unsupported">
<span id="id8"></span><h2>OPAL_UNSUPPORTED<a class="headerlink" href="#opal-unsupported" title="Permalink to this headline"></a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_UNSUPPORTED     -7</span>
</pre></div>
</div>
<p>Unsupported operation. Non-fatal.</p>
</div>
<div class="section" id="opal-permission">
<span id="id9"></span><h2>OPAL_PERMISSION<a class="headerlink" href="#opal-permission" title="Permalink to this headline"></a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_PERMISSION              -8</span>
</pre></div>
</div>
<p>Inadequate permission to perform the operation.</p>
</div>
<div class="section" id="opal-no-mem">
<span id="id10"></span><h2>OPAL_NO_MEM<a class="headerlink" href="#opal-no-mem" title="Permalink to this headline"></a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_NO_MEM          -9</span>
</pre></div>
</div>
<p>Indicates a temporary or permanent lack of adequate memory to perform the
operation. Ideally, this should never happen. Skiboot reserves a small amount
of memory for its heap and some operations (such as I2C requests) are allocated
from this heap.</p>
<p>If this is ever hit, you should likely file a bug.</p>
</div>
<div class="section" id="opal-resource">
<span id="id11"></span><h2>OPAL_RESOURCE<a class="headerlink" href="#opal-resource" title="Permalink to this headline"></a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_RESOURCE                -10</span>
</pre></div>
</div>
<p>When trying to use a limited resource, OPAL found that there were none free.
While OPAL_BUSY indicates that OPAL may soon be able to proces the requent,
OPAL_RESOURCE is a more permanent error and while the resource <em>may</em> become
available again in the future, it is not certain that it will.</p>
</div>
<div class="section" id="opal-internal-error">
<span id="id12"></span><h2>OPAL_INTERNAL_ERROR<a class="headerlink" href="#opal-internal-error" title="Permalink to this headline"></a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_INTERNAL_ERROR  -11</span>
</pre></div>
</div>
<p>Something has gone wrong inside OPAL. This is likely a bug somewhere and we
return OPAL_INTERNAL_ERROR for safety.</p>
</div>
<div class="section" id="opal-busy-event">
<span id="id13"></span><h2>OPAL_BUSY_EVENT<a class="headerlink" href="#opal-busy-event" title="Permalink to this headline"></a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_BUSY_EVENT              -12</span>
</pre></div>
</div>
<p>The same as <cite>OPAL_BUSY</cite> but signals that the OS should call <cite>OPAL_POLL_EVENTS</cite> as
that may be required to get into a state where the call will succeed.</p>
</div>
<div class="section" id="opal-hardware-frozen">
<span id="id14"></span><h2>OPAL_HARDWARE_FROZEN<a class="headerlink" href="#opal-hardware-frozen" title="Permalink to this headline"></a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_HARDWARE_FROZEN -13</span>
</pre></div>
</div>
</div>
<div class="section" id="opal-wrong-state">
<span id="id15"></span><h2>OPAL_WRONG_STATE<a class="headerlink" href="#opal-wrong-state" title="Permalink to this headline"></a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_WRONG_STATE     -14</span>
</pre></div>
</div>
<p>The requested operation requires a (hardware or software) component to be in
a different state. For example, you cannot call OPAL_START_CPU on a CPU that
is not currently in OPAL.</p>
</div>
<div class="section" id="opal-async-completion">
<span id="id16"></span><h2>OPAL_ASYNC_COMPLETION<a class="headerlink" href="#opal-async-completion" title="Permalink to this headline"></a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_ASYNC_COMPLETION        -15</span>
</pre></div>
</div>
<p>For asynchronous calls, successfully queueing/starting executing the
command is indicated by the OPAL_ASYNC_COMPLETION return code.
pseudo-code for an async call:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">token</span> <span class="o">=</span> <span class="n">opal_async_get_token</span><span class="p">();</span>
<span class="n">rc</span> <span class="o">=</span> <span class="n">opal_async_example</span><span class="p">(</span><span class="n">foo</span><span class="p">,</span> <span class="n">token</span><span class="p">);</span>
<span class="k">if</span> <span class="p">(</span><span class="n">rc</span> <span class="o">!=</span> <span class="n">OPAL_ASYNC_COMPLETION</span><span class="p">)</span>
    <span class="n">handle_error</span><span class="p">(</span><span class="n">rc</span><span class="p">);</span>
<span class="n">rc</span> <span class="o">=</span> <span class="n">opal_async_wait</span><span class="p">(</span><span class="n">token</span><span class="p">);</span>
<span class="o">//</span> <span class="n">handle</span> <span class="n">result</span> <span class="n">here</span>
</pre></div>
</div>
</div>
<div class="section" id="opal-empty">
<span id="id17"></span><h2>OPAL_EMPTY<a class="headerlink" href="#opal-empty" title="Permalink to this headline"></a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_EMPTY           -16</span>
</pre></div>
</div>
<p>The call was successful and the correct result is empty. For example, the
OPAL_IPMI_RECV call can succeed and return that there is no waiting IPMI
message.</p>
</div>
<div class="section" id="opal-i2c-timeout">
<span id="id18"></span><h2>OPAL_I2C_TIMEOUT<a class="headerlink" href="#opal-i2c-timeout" title="Permalink to this headline"></a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_I2C_TIMEOUT      -17</span>
</pre></div>
</div>
</div>
<div class="section" id="opal-i2c-invalid">
<span id="opal-i2c-invalid-cmd"></span><h2>OPAL_I2C_INVALID<a class="headerlink" href="#opal-i2c-invalid" title="Permalink to this headline"></a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_I2C_INVALID_CMD  -18</span>
</pre></div>
</div>
</div>
<div class="section" id="opal-i2c-lbus-parity">
<span id="id19"></span><h2>OPAL_I2C_LBUS_PARITY<a class="headerlink" href="#opal-i2c-lbus-parity" title="Permalink to this headline"></a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_I2C_LBUS_PARITY  -19</span>
</pre></div>
</div>
</div>
<div class="section" id="opal-i2c-bkend-overrun">
<span id="id20"></span><h2>OPAL_I2C_BKEND_OVERRUN<a class="headerlink" href="#opal-i2c-bkend-overrun" title="Permalink to this headline"></a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_I2C_BKEND_OVERRUN        -20</span>
</pre></div>
</div>
</div>
<div class="section" id="opal-i2c-bkend-access">
<span id="id21"></span><h2>OPAL_I2C_BKEND_ACCESS<a class="headerlink" href="#opal-i2c-bkend-access" title="Permalink to this headline"></a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_I2C_BKEND_ACCESS -21</span>
</pre></div>
</div>
</div>
<div class="section" id="opal-i2c-arbt-lost">
<span id="id22"></span><h2>OPAL_I2C_ARBT_LOST<a class="headerlink" href="#opal-i2c-arbt-lost" title="Permalink to this headline"></a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_I2C_ARBT_LOST    -22</span>
</pre></div>
</div>
</div>
<div class="section" id="opal-i2c-nack-rcvd">
<span id="id23"></span><h2>OPAL_I2C_NACK_RCVD<a class="headerlink" href="#opal-i2c-nack-rcvd" title="Permalink to this headline"></a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_I2C_NACK_RCVD    -23</span>
</pre></div>
</div>
</div>
<div class="section" id="opal-i2c-stop-err">
<span id="id24"></span><h2>OPAL_I2C_STOP_ERR<a class="headerlink" href="#opal-i2c-stop-err" title="Permalink to this headline"></a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_I2C_STOP_ERR     -24</span>
</pre></div>
</div>
</div>
<div class="section" id="opal-xscom-busy">
<span id="id25"></span><h2>OPAL_XSCOM_BUSY<a class="headerlink" href="#opal-xscom-busy" title="Permalink to this headline"></a></h2>
<p>An alias for <a class="reference internal" href="#opal-busy"><span class="std std-ref">OPAL_BUSY</span></a></p>
</div>
<div class="section" id="opal-xscom-chiplet-off">
<span id="id26"></span><h2>OPAL_XSCOM_CHIPLET_OFF<a class="headerlink" href="#opal-xscom-chiplet-off" title="Permalink to this headline"></a></h2>
<p>An alias for <a class="reference internal" href="#opal-wrong-state"><span class="std std-ref">OPAL_WRONG_STATE</span></a></p>
</div>
<div class="section" id="opal-xscom-partial-good">
<span id="id27"></span><h2>OPAL_XSCOM_PARTIAL_GOOD<a class="headerlink" href="#opal-xscom-partial-good" title="Permalink to this headline"></a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_XSCOM_PARTIAL_GOOD -25</span>
</pre></div>
</div>
</div>
<div class="section" id="opal-xscom-addr-error">
<span id="id28"></span><h2>OPAL_XSCOM_ADDR_ERROR<a class="headerlink" href="#opal-xscom-addr-error" title="Permalink to this headline"></a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_XSCOM_ADDR_ERROR -26</span>
</pre></div>
</div>
</div>
<div class="section" id="opal-xscom-clock-error">
<span id="id29"></span><h2>OPAL_XSCOM_CLOCK_ERROR<a class="headerlink" href="#opal-xscom-clock-error" title="Permalink to this headline"></a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_XSCOM_CLOCK_ERROR       -27</span>
</pre></div>
</div>
</div>
<div class="section" id="opal-xscom-parity-error">
<span id="id30"></span><h2>OPAL_XSCOM_PARITY_ERROR<a class="headerlink" href="#opal-xscom-parity-error" title="Permalink to this headline"></a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_XSCOM_PARITY_ERROR      -28</span>
</pre></div>
</div>
</div>
<div class="section" id="opal-xscom-timeout">
<span id="id31"></span><h2>OPAL_XSCOM_TIMEOUT<a class="headerlink" href="#opal-xscom-timeout" title="Permalink to this headline"></a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_XSCOM_TIMEOUT   -29</span>
</pre></div>
</div>
</div>
<div class="section" id="opal-xscom-ctr-offlined">
<span id="id32"></span><h2>OPAL_XSCOM_CTR_OFFLINED<a class="headerlink" href="#opal-xscom-ctr-offlined" title="Permalink to this headline"></a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_XSCOM_CTR_OFFLINED      -30</span>
</pre></div>
</div>
</div>
<div class="section" id="opal-xive-provisioning">
<span id="id33"></span><h2>OPAL_XIVE_PROVISIONING<a class="headerlink" href="#opal-xive-provisioning" title="Permalink to this headline"></a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_XIVE_PROVISIONING       -31</span>
</pre></div>
</div>
</div>
<div class="section" id="opal-xive-free-active">
<span id="id34"></span><h2>OPAL_XIVE_FREE_ACTIVE<a class="headerlink" href="#opal-xive-free-active" title="Permalink to this headline"></a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_XIVE_FREE_ACTIVE        -32</span>
</pre></div>
</div>
</div>
<div class="section" id="opal-timeout">
<span id="id35"></span><h2>OPAL_TIMEOUT<a class="headerlink" href="#opal-timeout" title="Permalink to this headline"></a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_TIMEOUT         -33</span>
</pre></div>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../index.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">OPAL API Return Codes</a><ul>
<li><a class="reference internal" href="#opal-success">OPAL_SUCCESS</a></li>
<li><a class="reference internal" href="#opal-parameter">OPAL_PARAMETER</a></li>
<li><a class="reference internal" href="#opal-busy">OPAL_BUSY</a></li>
<li><a class="reference internal" href="#opal-partial">OPAL_PARTIAL</a></li>
<li><a class="reference internal" href="#opal-constrained">OPAL_CONSTRAINED</a></li>
<li><a class="reference internal" href="#opal-closed">OPAL_CLOSED</a></li>
<li><a class="reference internal" href="#opal-hardware">OPAL_HARDWARE</a></li>
<li><a class="reference internal" href="#opal-unsupported">OPAL_UNSUPPORTED</a></li>
<li><a class="reference internal" href="#opal-permission">OPAL_PERMISSION</a></li>
<li><a class="reference internal" href="#opal-no-mem">OPAL_NO_MEM</a></li>
<li><a class="reference internal" href="#opal-resource">OPAL_RESOURCE</a></li>
<li><a class="reference internal" href="#opal-internal-error">OPAL_INTERNAL_ERROR</a></li>
<li><a class="reference internal" href="#opal-busy-event">OPAL_BUSY_EVENT</a></li>
<li><a class="reference internal" href="#opal-hardware-frozen">OPAL_HARDWARE_FROZEN</a></li>
<li><a class="reference internal" href="#opal-wrong-state">OPAL_WRONG_STATE</a></li>
<li><a class="reference internal" href="#opal-async-completion">OPAL_ASYNC_COMPLETION</a></li>
<li><a class="reference internal" href="#opal-empty">OPAL_EMPTY</a></li>
<li><a class="reference internal" href="#opal-i2c-timeout">OPAL_I2C_TIMEOUT</a></li>
<li><a class="reference internal" href="#opal-i2c-invalid">OPAL_I2C_INVALID</a></li>
<li><a class="reference internal" href="#opal-i2c-lbus-parity">OPAL_I2C_LBUS_PARITY</a></li>
<li><a class="reference internal" href="#opal-i2c-bkend-overrun">OPAL_I2C_BKEND_OVERRUN</a></li>
<li><a class="reference internal" href="#opal-i2c-bkend-access">OPAL_I2C_BKEND_ACCESS</a></li>
<li><a class="reference internal" href="#opal-i2c-arbt-lost">OPAL_I2C_ARBT_LOST</a></li>
<li><a class="reference internal" href="#opal-i2c-nack-rcvd">OPAL_I2C_NACK_RCVD</a></li>
<li><a class="reference internal" href="#opal-i2c-stop-err">OPAL_I2C_STOP_ERR</a></li>
<li><a class="reference internal" href="#opal-xscom-busy">OPAL_XSCOM_BUSY</a></li>
<li><a class="reference internal" href="#opal-xscom-chiplet-off">OPAL_XSCOM_CHIPLET_OFF</a></li>
<li><a class="reference internal" href="#opal-xscom-partial-good">OPAL_XSCOM_PARTIAL_GOOD</a></li>
<li><a class="reference internal" href="#opal-xscom-addr-error">OPAL_XSCOM_ADDR_ERROR</a></li>
<li><a class="reference internal" href="#opal-xscom-clock-error">OPAL_XSCOM_CLOCK_ERROR</a></li>
<li><a class="reference internal" href="#opal-xscom-parity-error">OPAL_XSCOM_PARITY_ERROR</a></li>
<li><a class="reference internal" href="#opal-xscom-timeout">OPAL_XSCOM_TIMEOUT</a></li>
<li><a class="reference internal" href="#opal-xscom-ctr-offlined">OPAL_XSCOM_CTR_OFFLINED</a></li>
<li><a class="reference internal" href="#opal-xive-provisioning">OPAL_XIVE_PROVISIONING</a></li>
<li><a class="reference internal" href="#opal-xive-free-active">OPAL_XIVE_FREE_ACTIVE</a></li>
<li><a class="reference internal" href="#opal-timeout">OPAL_TIMEOUT</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="power9-changes.html"
                        title="previous chapter">POWER9 Changes to OPAL API</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="../release-notes/index.html"
                        title="next chapter">Release Notes</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../_sources/opal-api/return-codes.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    </div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../release-notes/index.html" title="Release Notes"
             >next</a> |</li>
        <li class="right" >
          <a href="power9-changes.html" title="POWER9 Changes to OPAL API"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">skiboot 4d27f03
 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="index.html" >OPAL API Documentation</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2016-2017, IBM, others.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.8.5.
    </div>
  </body>
</html>