aboutsummaryrefslogtreecommitdiff
path: root/doc/opal-api/opal-poll-events.rst
blob: 71ca21bfc3a4037a9bc148b3d0d9fd2d0af307f8 (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
.. _OPAL_POLL_EVENTS:

OPAL_POLL_EVENTS
================

Poll for outstanding events.

Fills in a bitmask of pending events.

Current events are:

OPAL_EVENT_OPAL_INTERNAL = 0x1
------------------------------
Currently unused.


OPAL_EVENT_NVRAM = 0x2
----------------------
Unused


OPAL_EVENT_RTC = 0x4
--------------------
**TODO**: clean this up, this is just copied from hw/fsp/fsp-rtc.c: ::

 * Because the RTC calls can be pretty slow, these functions will shoot
 * an asynchronous request to the FSP (if none is already pending)
 *
 * The requests will return OPAL_BUSY_EVENT as long as the event has
 * not been completed.
 *
 * WARNING: An attempt at doing an RTC write while one is already pending
 * will simply ignore the new arguments and continue returning
 * OPAL_BUSY_EVENT. This is to be compatible with existing Linux code.
 *
 * Completion of the request will result in an event OPAL_EVENT_RTC
 * being signaled, which will remain raised until a corresponding call
 * to opal_rtc_read() or opal_rtc_write() finally returns OPAL_SUCCESS,
 * at which point the operation is complete and the event cleared.
 *
 * If we end up taking longer than rtc_read_timeout_ms millieconds waiting
 * for the response from a read request, we simply return a cached value (plus
 * an offset calculated from the timebase. When the read request finally
 * returns, we update our cache value accordingly.
 *
 * There is two separate set of state for reads and writes. If both are
 * attempted at the same time, the event bit will remain set as long as either
 * of the two has a pending event to signal.

OPAL_EVENT_CONSOLE_OUTPUT = 0x8
-------------------------------
TODO

OPAL_EVENT_CONSOLE_INPUT = 0x10
-------------------------------
TODO

OPAL_EVENT_ERROR_LOG_AVAIL = 0x20
---------------------------------
TODO

OPAL_EVENT_ERROR_LOG = 0x40
---------------------------
TODO

OPAL_EVENT_EPOW = 0x80
----------------------
TODO

OPAL_EVENT_LED_STATUS = 0x100
-----------------------------
TODO

OPAL_EVENT_PCI_ERROR = 0x200
----------------------------
TODO

OPAL_EVENT_DUMP_AVAIL = 0x400
-----------------------------
Signifies that there is a pending system dump available. See OPAL_DUMP suite
of calls for details. ::

  OPAL_EVENT_MSG_PENDING = 0x800,