TianoCore EDK2 master
Loading...
Searching...
No Matches
XenBus.h
Go to the documentation of this file.
1
17#ifndef __PROTOCOL_XENBUS_H__
18#define __PROTOCOL_XENBUS_H__
19
20#define XENBUS_PROTOCOL_GUID \
21 {0x3d3ca290, 0xb9a5, 0x11e3, {0xb7, 0x5d, 0xb8, 0xac, 0x6f, 0x7d, 0x65, 0xe6}}
22
27
28typedef enum xenbus_state XenBusState;
29
30typedef struct {
31 UINT32 Id;
33
34#define XST_NIL ((XENSTORE_TRANSACTION *) NULL)
35
36typedef enum {
37 XENSTORE_STATUS_SUCCESS = 0,
38 XENSTORE_STATUS_FAIL,
39 XENSTORE_STATUS_EINVAL,
40 XENSTORE_STATUS_EACCES,
41 XENSTORE_STATUS_EEXIST,
42 XENSTORE_STATUS_EISDIR,
43 XENSTORE_STATUS_ENOENT,
44 XENSTORE_STATUS_ENOMEM,
45 XENSTORE_STATUS_ENOSPC,
46 XENSTORE_STATUS_EIO,
47 XENSTORE_STATUS_ENOTEMPTY,
48 XENSTORE_STATUS_ENOSYS,
49 XENSTORE_STATUS_EROFS,
50 XENSTORE_STATUS_EBUSY,
51 XENSTORE_STATUS_EAGAIN,
52 XENSTORE_STATUS_EISCONN,
53 XENSTORE_STATUS_E2BIG
54} XENSTORE_STATUS;
55
56#include <IndustryStandard/Xen/grant_table.h>
57#include <IndustryStandard/Xen/event_channel.h>
58
62
78typedef
79XENSTORE_STATUS
80(EFIAPI *XENBUS_XS_READ)(
81 IN XENBUS_PROTOCOL *This,
83 IN CONST CHAR8 *Node,
84 OUT VOID **Result
85 );
86
102typedef
103XENSTORE_STATUS
104(EFIAPI *XENBUS_XS_BACKEND_READ)(
105 IN XENBUS_PROTOCOL *This,
107 IN CONST CHAR8 *Node,
108 OUT VOID **Result
109 );
110
124typedef
125XENSTORE_STATUS
126(EFIAPI *XENBUS_XS_PRINTF)(
127 IN XENBUS_PROTOCOL *This,
129 IN CONST CHAR8 *Directory,
130 IN CONST CHAR8 *Node,
131 IN CONST CHAR8 *Format,
132 ...
133 );
134
146typedef
147XENSTORE_STATUS
148(EFIAPI *XENBUS_XS_REMOVE)(
149 IN XENBUS_PROTOCOL *This,
151 IN CONST CHAR8 *Node
152 );
153
167typedef
168XENSTORE_STATUS
170 IN XENBUS_PROTOCOL *This,
172 );
173
185typedef
186XENSTORE_STATUS
188 IN XENBUS_PROTOCOL *This,
190 IN BOOLEAN Abort
191 );
192
203typedef
204XENSTORE_STATUS
205(EFIAPI *XENBUS_SET_STATE)(
206 IN XENBUS_PROTOCOL *This,
208 IN XenBusState State
209 );
210
220typedef
222(EFIAPI *XENBUS_GRANT_ACCESS)(
223 IN XENBUS_PROTOCOL *This,
224 IN domid_t DomainId,
225 IN UINTN Frame,
226 IN BOOLEAN ReadOnly,
227 OUT grant_ref_t *refp
228 );
229
237typedef
240 IN XENBUS_PROTOCOL *This,
241 IN grant_ref_t Ref
242 );
243
254typedef
255UINT32
257 IN XENBUS_PROTOCOL *This,
258 IN domid_t DomainId,
259 OUT evtchn_port_t *Port
260 );
261
270typedef
271UINT32
273 IN XENBUS_PROTOCOL *This,
274 IN evtchn_port_t Port
275 );
276
285typedef
286UINT32
288 IN XENBUS_PROTOCOL *This,
289 IN evtchn_port_t Port
290 );
291
307typedef
308XENSTORE_STATUS
309(EFIAPI *XENBUS_REGISTER_WATCH)(
310 IN XENBUS_PROTOCOL *This,
311 IN CONST CHAR8 *Node,
312 OUT VOID **Token
313 );
314
330typedef
331XENSTORE_STATUS
333 IN XENBUS_PROTOCOL *This,
334 IN CONST CHAR8 *Node,
335 OUT VOID **Token
336 );
337
345typedef
346VOID
348 IN XENBUS_PROTOCOL *This,
349 IN VOID *Token
350 );
351
362typedef
363XENSTORE_STATUS
364(EFIAPI *XENBUS_WAIT_FOR_WATCH)(
365 IN XENBUS_PROTOCOL *This,
366 IN VOID *Token
367 );
368
376 XENBUS_XS_READ XsRead;
377 XENBUS_XS_BACKEND_READ XsBackendRead;
378 XENBUS_XS_PRINTF XsPrintf;
379 XENBUS_XS_REMOVE XsRemove;
380 XENBUS_XS_TRANSACTION_START XsTransactionStart;
381 XENBUS_XS_TRANSACTION_END XsTransactionEnd;
382 XENBUS_SET_STATE SetState;
383
384 XENBUS_GRANT_ACCESS GrantAccess;
385 XENBUS_GRANT_END_ACCESS GrantEndAccess;
386
387 XENBUS_EVENT_CHANNEL_ALLOCATE EventChannelAllocate;
388 XENBUS_EVENT_CHANNEL_NOTIFY EventChannelNotify;
389 XENBUS_EVENT_CHANNEL_CLOSE EventChannelClose;
390
391 XENBUS_REGISTER_WATCH RegisterWatch;
392 XENBUS_REGISTER_WATCH_BACKEND RegisterWatchBackend;
393 XENBUS_UNREGISTER_WATCH UnregisterWatch;
394 XENBUS_WAIT_FOR_WATCH WaitForWatch;
395 //
396 // Protocol data fields
397 //
398 CONST CHAR8 *Type;
399 UINT16 DeviceId;
400 CONST CHAR8 *Node;
401 CONST CHAR8 *Backend;
402};
403
404extern EFI_GUID gXenBusProtocolGuid;
405
406#endif
UINT64 UINTN
XENSTORE_STATUS(EFIAPI * XENBUS_XS_TRANSACTION_END)(IN XENBUS_PROTOCOL *This, IN CONST XENSTORE_TRANSACTION *Transaction, IN BOOLEAN Abort)
Definition: XenBus.h:187
XENSTORE_STATUS(EFIAPI * XENBUS_XS_READ)(IN XENBUS_PROTOCOL *This, IN CONST XENSTORE_TRANSACTION *Transaction, IN CONST CHAR8 *Node, OUT VOID **Result)
Definition: XenBus.h:80
XENSTORE_STATUS(EFIAPI * XENBUS_REGISTER_WATCH)(IN XENBUS_PROTOCOL *This, IN CONST CHAR8 *Node, OUT VOID **Token)
Definition: XenBus.h:309
UINT32(EFIAPI * XENBUS_EVENT_CHANNEL_ALLOCATE)(IN XENBUS_PROTOCOL *This, IN domid_t DomainId, OUT evtchn_port_t *Port)
Definition: XenBus.h:256
EFI_STATUS(EFIAPI * XENBUS_GRANT_ACCESS)(IN XENBUS_PROTOCOL *This, IN domid_t DomainId, IN UINTN Frame, IN BOOLEAN ReadOnly, OUT grant_ref_t *refp)
Definition: XenBus.h:222
EFI_STATUS(EFIAPI * XENBUS_GRANT_END_ACCESS)(IN XENBUS_PROTOCOL *This, IN grant_ref_t Ref)
Definition: XenBus.h:239
UINT32(EFIAPI * XENBUS_EVENT_CHANNEL_CLOSE)(IN XENBUS_PROTOCOL *This, IN evtchn_port_t Port)
Definition: XenBus.h:287
XENSTORE_STATUS(EFIAPI * XENBUS_XS_BACKEND_READ)(IN XENBUS_PROTOCOL *This, IN CONST XENSTORE_TRANSACTION *Transaction, IN CONST CHAR8 *Node, OUT VOID **Result)
Definition: XenBus.h:104
VOID(EFIAPI * XENBUS_UNREGISTER_WATCH)(IN XENBUS_PROTOCOL *This, IN VOID *Token)
Definition: XenBus.h:347
XENSTORE_STATUS(EFIAPI * XENBUS_WAIT_FOR_WATCH)(IN XENBUS_PROTOCOL *This, IN VOID *Token)
Definition: XenBus.h:364
XENSTORE_STATUS(EFIAPI * XENBUS_XS_TRANSACTION_START)(IN XENBUS_PROTOCOL *This, OUT XENSTORE_TRANSACTION *Transaction)
Definition: XenBus.h:169
UINT32(EFIAPI * XENBUS_EVENT_CHANNEL_NOTIFY)(IN XENBUS_PROTOCOL *This, IN evtchn_port_t Port)
Definition: XenBus.h:272
XENSTORE_STATUS(EFIAPI * XENBUS_XS_REMOVE)(IN XENBUS_PROTOCOL *This, IN CONST XENSTORE_TRANSACTION *Transaction, IN CONST CHAR8 *Node)
Definition: XenBus.h:148
XENSTORE_STATUS(EFIAPI * XENBUS_SET_STATE)(IN XENBUS_PROTOCOL *This, IN CONST XENSTORE_TRANSACTION *Transaction, IN XenBusState State)
Definition: XenBus.h:205
XENSTORE_STATUS(EFIAPI * XENBUS_REGISTER_WATCH_BACKEND)(IN XENBUS_PROTOCOL *This, IN CONST CHAR8 *Node, OUT VOID **Token)
Definition: XenBus.h:332
XENSTORE_STATUS(EFIAPI * XENBUS_XS_PRINTF)(IN XENBUS_PROTOCOL *This, IN CONST XENSTORE_TRANSACTION *Transaction, IN CONST CHAR8 *Directory, IN CONST CHAR8 *Node, IN CONST CHAR8 *Format,...)
Definition: XenBus.h:126
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
EFI_STATUS EFIAPI Transaction(IN CONST EFI_SPI_IO_PROTOCOL *This, IN EFI_SPI_TRANSACTION_TYPE TransactionType, IN BOOLEAN DebugTransaction, IN UINT32 ClockHz OPTIONAL, IN UINT32 BusWidth, IN UINT32 FrameSize, IN UINT32 WriteBytes, IN UINT8 *WriteBuffer, IN UINT32 ReadBytes, OUT UINT8 *ReadBuffer)
Definition: SpiBus.c:231
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
Definition: Base.h:213