TianoCore EDK2 master
|
#include <IndustryStandard/Xen/grant_table.h>
#include <IndustryStandard/Xen/event_channel.h>
Go to the source code of this file.
Data Structures | |
struct | XENSTORE_TRANSACTION |
struct | _XENBUS_PROTOCOL |
Macros | |
#define | XENBUS_PROTOCOL_GUID {0x3d3ca290, 0xb9a5, 0x11e3, {0xb7, 0x5d, 0xb8, 0xac, 0x6f, 0x7d, 0x65, 0xe6}} |
#define | XST_NIL ((XENSTORE_TRANSACTION *) NULL) |
Typedefs | |
typedef struct _XENBUS_PROTOCOL | XENBUS_PROTOCOL |
typedef enum xenbus_state | XenBusState |
typedef XENSTORE_STATUS(EFIAPI * | XENBUS_XS_READ) (IN XENBUS_PROTOCOL *This, IN CONST XENSTORE_TRANSACTION *Transaction, IN CONST CHAR8 *Node, OUT VOID **Result) |
typedef XENSTORE_STATUS(EFIAPI * | XENBUS_XS_BACKEND_READ) (IN XENBUS_PROTOCOL *This, IN CONST XENSTORE_TRANSACTION *Transaction, IN CONST CHAR8 *Node, OUT VOID **Result) |
typedef 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,...) |
typedef XENSTORE_STATUS(EFIAPI * | XENBUS_XS_REMOVE) (IN XENBUS_PROTOCOL *This, IN CONST XENSTORE_TRANSACTION *Transaction, IN CONST CHAR8 *Node) |
typedef XENSTORE_STATUS(EFIAPI * | XENBUS_XS_TRANSACTION_START) (IN XENBUS_PROTOCOL *This, OUT XENSTORE_TRANSACTION *Transaction) |
typedef XENSTORE_STATUS(EFIAPI * | XENBUS_XS_TRANSACTION_END) (IN XENBUS_PROTOCOL *This, IN CONST XENSTORE_TRANSACTION *Transaction, IN BOOLEAN Abort) |
typedef XENSTORE_STATUS(EFIAPI * | XENBUS_SET_STATE) (IN XENBUS_PROTOCOL *This, IN CONST XENSTORE_TRANSACTION *Transaction, IN XenBusState State) |
typedef 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) |
typedef EFI_STATUS(EFIAPI * | XENBUS_GRANT_END_ACCESS) (IN XENBUS_PROTOCOL *This, IN grant_ref_t Ref) |
typedef UINT32(EFIAPI * | XENBUS_EVENT_CHANNEL_ALLOCATE) (IN XENBUS_PROTOCOL *This, IN domid_t DomainId, OUT evtchn_port_t *Port) |
typedef UINT32(EFIAPI * | XENBUS_EVENT_CHANNEL_NOTIFY) (IN XENBUS_PROTOCOL *This, IN evtchn_port_t Port) |
typedef UINT32(EFIAPI * | XENBUS_EVENT_CHANNEL_CLOSE) (IN XENBUS_PROTOCOL *This, IN evtchn_port_t Port) |
typedef XENSTORE_STATUS(EFIAPI * | XENBUS_REGISTER_WATCH) (IN XENBUS_PROTOCOL *This, IN CONST CHAR8 *Node, OUT VOID **Token) |
typedef XENSTORE_STATUS(EFIAPI * | XENBUS_REGISTER_WATCH_BACKEND) (IN XENBUS_PROTOCOL *This, IN CONST CHAR8 *Node, OUT VOID **Token) |
typedef VOID(EFIAPI * | XENBUS_UNREGISTER_WATCH) (IN XENBUS_PROTOCOL *This, IN VOID *Token) |
typedef XENSTORE_STATUS(EFIAPI * | XENBUS_WAIT_FOR_WATCH) (IN XENBUS_PROTOCOL *This, IN VOID *Token) |
Variables | |
EFI_GUID | gXenBusProtocolGuid |
XenBus protocol to be used between the XenBus bus driver and Xen PV devices.
DISCLAIMER: the XENBUS_PROTOCOL introduced here is a work in progress, and should not be used outside of the EDK II tree.
This protocol provide the necessary for a Xen PV driver frontend to communicate with the bus driver, and perform several task to initialize/shutdown a PV device and perform IO with a PV backend.
Copyright (C) 2014, Citrix Ltd.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file XenBus.h.
#define XENBUS_PROTOCOL_GUID {0x3d3ca290, 0xb9a5, 0x11e3, {0xb7, 0x5d, 0xb8, 0xac, 0x6f, 0x7d, 0x65, 0xe6}} |
#define XST_NIL ((XENSTORE_TRANSACTION *) NULL) |
typedef UINT32(EFIAPI * XENBUS_EVENT_CHANNEL_ALLOCATE) (IN XENBUS_PROTOCOL *This, IN domid_t DomainId, OUT evtchn_port_t *Port) |
Allocate a port that can be bind from domain DomainId.
This | A pointer to the XENBUS_PROTOCOL. |
DomainId | The domain ID that can bind the newly allocated port. |
Port | A pointer to a evtchn_port_t that will contain the newly allocated port. |
UINT32 | The return value from the hypercall, 0 if success. |
typedef UINT32(EFIAPI * XENBUS_EVENT_CHANNEL_CLOSE) (IN XENBUS_PROTOCOL *This, IN evtchn_port_t Port) |
typedef UINT32(EFIAPI * XENBUS_EVENT_CHANNEL_NOTIFY) (IN XENBUS_PROTOCOL *This, IN evtchn_port_t Port) |
typedef 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) |
Grant access to the page Frame to the domain DomainId.
This | A pointer to XENBUS_PROTOCOL instance. |
DomainId | ID of the domain to grant access to. |
Frame | Frame Number of the page to grant access to. |
ReadOnly | Provide read-only or read-write access. |
RefPtr | Reference number of the grant will be written to this pointer. |
typedef EFI_STATUS(EFIAPI * XENBUS_GRANT_END_ACCESS) (IN XENBUS_PROTOCOL *This, IN grant_ref_t Ref) |
typedef struct _XENBUS_PROTOCOL XENBUS_PROTOCOL |
typedef XENSTORE_STATUS(EFIAPI * XENBUS_REGISTER_WATCH) (IN XENBUS_PROTOCOL *This, IN CONST CHAR8 *Node, OUT VOID **Token) |
Register a XenStore watch.
XenStore watches allow a client to wait for changes to an object in the XenStore.
This | A pointer to the XENBUS_PROTOCOL. |
Node | The basename of the path to watch. |
Token | A token. |
typedef XENSTORE_STATUS(EFIAPI * XENBUS_REGISTER_WATCH_BACKEND) (IN XENBUS_PROTOCOL *This, IN CONST CHAR8 *Node, OUT VOID **Token) |
Register a XenStore watch on a backend's node.
XenStore watches allow a client to wait for changes to an object in the XenStore.
This | A pointer to the XENBUS_PROTOCOL. |
Node | The basename of the path to watch. |
Token | A token. |
typedef XENSTORE_STATUS(EFIAPI * XENBUS_SET_STATE) (IN XENBUS_PROTOCOL *This, IN CONST XENSTORE_TRANSACTION *Transaction, IN XenBusState State) |
Set a new state for the frontend of the PV driver.
This | A pointer to XENBUS_PROTOCOL instance. |
Transaction | The transaction to end/commit. |
State | The new state to apply. |
typedef VOID(EFIAPI * XENBUS_UNREGISTER_WATCH) (IN XENBUS_PROTOCOL *This, IN VOID *Token) |
typedef XENSTORE_STATUS(EFIAPI * XENBUS_WAIT_FOR_WATCH) (IN XENBUS_PROTOCOL *This, IN VOID *Token) |
Block until the node watch by Token change.
This | A pointer to the XENBUS_PROTOCOL. |
Token | An token previously returned by a successful call to RegisterWatch or RegisterWatchBackend. |
typedef XENSTORE_STATUS(EFIAPI * XENBUS_XS_BACKEND_READ) (IN XENBUS_PROTOCOL *This, IN CONST XENSTORE_TRANSACTION *Transaction, IN CONST CHAR8 *Node, OUT VOID **Result) |
Get the contents of the node Node of the PV device's backend. Returns the contents in *Result which should be freed after use.
This | A pointer to XENBUS_PROTOCOL instance. |
Transaction | The XenStore transaction covering this request. |
Node | The basename of the file to read. |
Result | The returned contents from this file. |
typedef 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,...) |
Print formatted write to a XenStore node.
This | A pointer to XENBUS_PROTOCOL instance. |
Transaction | The XenStore transaction covering this request. |
Directory | The dirname of the path to read. |
Node | The basename of the path to read. |
Format | AsciiSPrint format string followed by a variable number of arguments. |
typedef XENSTORE_STATUS(EFIAPI * XENBUS_XS_READ) (IN XENBUS_PROTOCOL *This, IN CONST XENSTORE_TRANSACTION *Transaction, IN CONST CHAR8 *Node, OUT VOID **Result) |
Function prototypes Get the contents of the node Node of the PV device. Returns the contents in Result which should be freed after use.
This | A pointer to XENBUS_PROTOCOL instance. |
Transaction | The XenStore transaction covering this request. |
Node | The basename of the file to read. |
Result | The returned contents from this file. |
typedef XENSTORE_STATUS(EFIAPI * XENBUS_XS_REMOVE) (IN XENBUS_PROTOCOL *This, IN CONST XENSTORE_TRANSACTION *Transaction, IN CONST CHAR8 *Node) |
Remove a node or directory (directories must be empty) of the PV driver's subdirectory.
This | A pointer to XENBUS_PROTOCOL instance. |
Transaction | The XenStore transaction covering this request. |
Node | The basename of the node to remove. |
typedef XENSTORE_STATUS(EFIAPI * XENBUS_XS_TRANSACTION_END) (IN XENBUS_PROTOCOL *This, IN CONST XENSTORE_TRANSACTION *Transaction, IN BOOLEAN Abort) |
End a transaction.
This | A pointer to XENBUS_PROTOCOL instance. |
Transaction | The transaction to end/commit. |
Abort | If TRUE, the transaction is discarded instead of committed. |
typedef XENSTORE_STATUS(EFIAPI * XENBUS_XS_TRANSACTION_START) (IN XENBUS_PROTOCOL *This, OUT XENSTORE_TRANSACTION *Transaction) |
Start a transaction.
Changes by others will not be seen during the lifetime of this transaction, and changes will not be visible to others until it is committed (XsTransactionEnd).
This | A pointer to XENBUS_PROTOCOL instance. |
Transaction | The returned transaction. |