TianoCore EDK2 master
|
#include "XenStore.h"
#include <Library/PrintLib.h>
#include <IndustryStandard/Xen/hvm/params.h>
#include "EventChannel.h"
#include <Library/XenHypercallLib.h>
Go to the source code of this file.
Data Structures | |
struct | WRITE_REQUEST |
struct | _XENSTORE_WATCH |
struct | XENSTORE_MESSAGE |
struct | XENSTORE_PRIVATE |
struct | XenStoreErrors |
Macros | |
#define | XENSTORE_WATCH_SIGNATURE SIGNATURE_32 ('X','S','w','a') |
#define | XENSTORE_WATCH_FROM_LINK(l) CR (l, XENSTORE_WATCH, Link, XENSTORE_WATCH_SIGNATURE) |
#define | XENSTORE_MESSAGE_SIGNATURE SIGNATURE_32 ('X', 'S', 's', 'm') |
#define | XENSTORE_MESSAGE_FROM_LINK(r) CR (r, XENSTORE_MESSAGE, Link, XENSTORE_MESSAGE_SIGNATURE) |
Functions | |
STATIC UINT32 | ExtractStrings (IN CONST CHAR8 *Strings, IN UINTN Len, OUT CONST CHAR8 **Dst OPTIONAL) |
STATIC CONST CHAR8 ** | Split (IN CHAR8 *Strings, IN UINTN Len, OUT UINT32 *NumPtr) |
STATIC XENSTORE_WATCH * | XenStoreFindWatch (IN CONST CHAR8 *Token) |
CHAR8 * | XenStoreJoin (IN CONST CHAR8 *DirectoryPath, IN CONST CHAR8 *Node) |
STATIC BOOLEAN | XenStoreCheckIndexes (XENSTORE_RING_IDX Cons, XENSTORE_RING_IDX Prod) |
STATIC VOID * | XenStoreGetOutputChunk (IN XENSTORE_RING_IDX Cons, IN XENSTORE_RING_IDX Prod, IN CHAR8 *Buffer, OUT UINT32 *LenPtr) |
STATIC CONST VOID * | XenStoreGetInputChunk (IN XENSTORE_RING_IDX Cons, IN XENSTORE_RING_IDX Prod, IN CONST CHAR8 *Buffer, OUT UINT32 *LenPtr) |
STATIC EFI_STATUS | XenStoreWaitForEvent (IN EFI_EVENT Event, IN UINT64 Timeout) |
STATIC XENSTORE_STATUS | XenStoreWriteStore (IN CONST VOID *DataPtr, IN UINT32 Len) |
STATIC XENSTORE_STATUS | XenStoreReadStore (OUT VOID *DataPtr, IN UINT32 Len) |
STATIC XENSTORE_STATUS | XenStoreProcessMessage (VOID) |
STATIC XENSTORE_STATUS | XenStoreGetError (CONST CHAR8 *ErrorStr) |
STATIC XENSTORE_STATUS | XenStoreReadReply (OUT enum xsd_sockmsg_type *TypePtr, OUT UINT32 *LenPtr OPTIONAL, OUT VOID **Result) |
STATIC XENSTORE_STATUS | XenStoreTalkv (IN CONST XENSTORE_TRANSACTION *Transaction, IN enum xsd_sockmsg_type RequestType, IN CONST WRITE_REQUEST *WriteRequest, IN UINT32 NumRequests, OUT UINT32 *LenPtr OPTIONAL, OUT VOID **ResultPtr OPTIONAL) |
STATIC XENSTORE_STATUS | XenStoreSingle (IN CONST XENSTORE_TRANSACTION *Transaction, IN enum xsd_sockmsg_type RequestType, IN CONST CHAR8 *Body, OUT UINT32 *LenPtr OPTIONAL, OUT VOID **Result OPTIONAL) |
STATIC XENSTORE_STATUS | XenStoreWatch (CONST CHAR8 *Path, CONST CHAR8 *Token) |
STATIC XENSTORE_STATUS | XenStoreUnwatch (CONST CHAR8 *Path, CONST CHAR8 *Token) |
STATIC XENSTORE_STATUS | XenStoreWaitWatch (VOID *Token) |
VOID EFIAPI | NotifyEventChannelCheckForEvent (IN EFI_EVENT Event, IN VOID *Context) |
STATIC EFI_STATUS | XenStoreInitComms (XENSTORE_PRIVATE *xsp) |
EFI_STATUS | XenStoreInit (XENBUS_DEVICE *Dev) |
VOID | XenStoreDeinit (IN XENBUS_DEVICE *Dev) |
XENSTORE_STATUS | XenStoreListDirectory (IN CONST XENSTORE_TRANSACTION *Transaction, IN CONST CHAR8 *DirectoryPath, IN CONST CHAR8 *Node, OUT UINT32 *DirectoryCountPtr, OUT CONST CHAR8 ***DirectoryListPtr) |
BOOLEAN | XenStorePathExists (IN CONST XENSTORE_TRANSACTION *Transaction, IN CONST CHAR8 *Directory, IN CONST CHAR8 *Node) |
XENSTORE_STATUS | XenStoreRead (IN CONST XENSTORE_TRANSACTION *Transaction, IN CONST CHAR8 *DirectoryPath, IN CONST CHAR8 *Node, OUT UINT32 *LenPtr OPTIONAL, OUT VOID **Result) |
XENSTORE_STATUS | XenStoreWrite (IN CONST XENSTORE_TRANSACTION *Transaction, IN CONST CHAR8 *DirectoryPath, IN CONST CHAR8 *Node, IN CONST CHAR8 *Str) |
XENSTORE_STATUS | XenStoreRemove (IN CONST XENSTORE_TRANSACTION *Transaction, IN CONST CHAR8 *DirectoryPath, IN CONST CHAR8 *Node) |
XENSTORE_STATUS | XenStoreTransactionStart (OUT XENSTORE_TRANSACTION *Transaction) |
XENSTORE_STATUS | XenStoreTransactionEnd (IN CONST XENSTORE_TRANSACTION *Transaction, IN BOOLEAN Abort) |
XENSTORE_STATUS EFIAPI | XenStoreVSPrint (IN CONST XENSTORE_TRANSACTION *Transaction, IN CONST CHAR8 *DirectoryPath, IN CONST CHAR8 *Node, IN CONST CHAR8 *FormatString, IN VA_LIST Marker) |
XENSTORE_STATUS EFIAPI | XenStoreSPrint (IN CONST XENSTORE_TRANSACTION *Transaction, IN CONST CHAR8 *DirectoryPath, IN CONST CHAR8 *Node, IN CONST CHAR8 *FormatString,...) |
XENSTORE_STATUS | XenStoreRegisterWatch (IN CONST CHAR8 *DirectoryPath, IN CONST CHAR8 *Node, OUT XENSTORE_WATCH **WatchPtr) |
VOID | XenStoreUnregisterWatch (IN XENSTORE_WATCH *Watch) |
XENSTORE_STATUS EFIAPI | XenBusWaitForWatch (IN XENBUS_PROTOCOL *This, IN VOID *Token) |
XENSTORE_STATUS EFIAPI | XenBusXenStoreRead (IN XENBUS_PROTOCOL *This, IN CONST XENSTORE_TRANSACTION *Transaction, IN CONST CHAR8 *Node, OUT VOID **Value) |
XENSTORE_STATUS EFIAPI | XenBusXenStoreBackendRead (IN XENBUS_PROTOCOL *This, IN CONST XENSTORE_TRANSACTION *Transaction, IN CONST CHAR8 *Node, OUT VOID **Value) |
XENSTORE_STATUS EFIAPI | XenBusXenStoreRemove (IN XENBUS_PROTOCOL *This, IN CONST XENSTORE_TRANSACTION *Transaction, IN const char *Node) |
XENSTORE_STATUS EFIAPI | XenBusXenStoreTransactionStart (IN XENBUS_PROTOCOL *This, OUT XENSTORE_TRANSACTION *Transaction) |
XENSTORE_STATUS EFIAPI | XenBusXenStoreTransactionEnd (IN XENBUS_PROTOCOL *This, IN CONST XENSTORE_TRANSACTION *Transaction, IN BOOLEAN Abort) |
XENSTORE_STATUS EFIAPI | XenBusXenStoreSPrint (IN XENBUS_PROTOCOL *This, IN CONST XENSTORE_TRANSACTION *Transaction, IN CONST CHAR8 *DirectoryPath, IN CONST CHAR8 *Node, IN CONST CHAR8 *FormatString,...) |
XENSTORE_STATUS EFIAPI | XenBusRegisterWatch (IN XENBUS_PROTOCOL *This, IN CONST CHAR8 *Node, OUT VOID **Token) |
XENSTORE_STATUS EFIAPI | XenBusRegisterWatchBackend (IN XENBUS_PROTOCOL *This, IN CONST CHAR8 *Node, OUT VOID **Token) |
VOID EFIAPI | XenBusUnregisterWatch (IN XENBUS_PROTOCOL *This, IN VOID *Token) |
Low-level kernel interface to the XenStore.
The XenStore interface is a simple storage system that is a means of communicating state and configuration data between the Xen Domain 0 and the various guest domains. All configuration data other than a small amount of essential information required during the early boot process of launching a Xen aware guest, is managed using the XenStore.
The XenStore is ASCII string based, and has a structure and semantics similar to a filesystem. There are files and directories, the directories able to contain files or other directories. The depth of the hierarchy is only limited by the XenStore's maximum path length.
The communication channel between the XenStore service and other domains is via two, guest specific, ring buffers in a shared memory area. One ring buffer is used for communicating in each direction. The grant table references for this shared memory are given to the guest either via the xen_start_info structure for a fully para- virtualized guest, or via HVM hypercalls for a hardware virtualized guest.
The XenStore communication relies on an event channel and thus interrupts. But under OVMF this XenStore client will pull the state of the event channel.
Several Xen services depend on the XenStore, most notably the XenBus used to discover and manage Xen devices.
Copyright (C) 2005 Rusty Russell, IBM Corporation Copyright (C) 2009,2010 Spectra Logic Corporation Copyright (C) 2014, Citrix Ltd.
This file may be distributed separately from the Linux kernel, or incorporated into other software packages, subject to the following license:
SPDX-License-Identifier: MIT
Definition in file XenStore.c.
#define XENSTORE_MESSAGE_FROM_LINK | ( | r | ) | CR (r, XENSTORE_MESSAGE, Link, XENSTORE_MESSAGE_SIGNATURE) |
Definition at line 96 of file XenStore.c.
#define XENSTORE_MESSAGE_SIGNATURE SIGNATURE_32 ('X', 'S', 's', 'm') |
Structure capturing messages received from the XenStore service.
Definition at line 75 of file XenStore.c.
#define XENSTORE_WATCH_FROM_LINK | ( | l | ) | CR (l, XENSTORE_WATCH, Link, XENSTORE_WATCH_SIGNATURE) |
Definition at line 69 of file XenStore.c.
#define XENSTORE_WATCH_SIGNATURE SIGNATURE_32 ('X','S','w','a') |
Definition at line 60 of file XenStore.c.
STATIC UINT32 ExtractStrings | ( | IN CONST CHAR8 * | Strings, |
IN UINTN | Len, | ||
OUT CONST CHAR8 **Dst | OPTIONAL | ||
) |
Count and optionally record pointers to a number of NUL terminated strings in a buffer.
Strings | A pointer to a contiguous buffer of NUL terminated strings. |
Len | The length of the buffer pointed to by strings. |
Dst | An array to store pointers to each string found in strings. |
Definition at line 173 of file XenStore.c.
Definition at line 1015 of file XenStore.c.
Convert a contiguous buffer containing a series of NUL terminated strings into an array of pointers to strings.
The returned pointer references the array of string pointers which is followed by the storage for the string data. It is the client's responsibility to free this storage.
The storage addressed by Strings is free'd prior to Split returning.
Strings | A pointer to a contiguous buffer of NUL terminated strings. |
Len | The length of the buffer pointed to by strings. |
NumPtr | The number of strings found and returned in the strings array. |
Definition at line 212 of file XenStore.c.
XENSTORE_STATUS EFIAPI XenBusRegisterWatch | ( | IN XENBUS_PROTOCOL * | This, |
IN CONST CHAR8 * | Node, | ||
OUT VOID ** | Token | ||
) |
Definition at line 1584 of file XenStore.c.
XENSTORE_STATUS EFIAPI XenBusRegisterWatchBackend | ( | IN XENBUS_PROTOCOL * | This, |
IN CONST CHAR8 * | Node, | ||
OUT VOID ** | Token | ||
) |
Definition at line 1595 of file XenStore.c.
VOID EFIAPI XenBusUnregisterWatch | ( | IN XENBUS_PROTOCOL * | This, |
IN VOID * | Token | ||
) |
Definition at line 1606 of file XenStore.c.
XENSTORE_STATUS EFIAPI XenBusWaitForWatch | ( | IN XENBUS_PROTOCOL * | This, |
IN VOID * | Token | ||
) |
Definition at line 1497 of file XenStore.c.
XENSTORE_STATUS EFIAPI XenBusXenStoreBackendRead | ( | IN XENBUS_PROTOCOL * | This, |
IN CONST XENSTORE_TRANSACTION * | Transaction, | ||
IN CONST CHAR8 * | Node, | ||
OUT VOID ** | Value | ||
) |
Definition at line 1519 of file XenStore.c.
XENSTORE_STATUS EFIAPI XenBusXenStoreRead | ( | IN XENBUS_PROTOCOL * | This, |
IN CONST XENSTORE_TRANSACTION * | Transaction, | ||
IN CONST CHAR8 * | Node, | ||
OUT VOID ** | Value | ||
) |
Definition at line 1507 of file XenStore.c.
XENSTORE_STATUS EFIAPI XenBusXenStoreRemove | ( | IN XENBUS_PROTOCOL * | This, |
IN CONST XENSTORE_TRANSACTION * | Transaction, | ||
IN const char * | Node | ||
) |
Definition at line 1531 of file XenStore.c.
XENSTORE_STATUS EFIAPI XenBusXenStoreSPrint | ( | IN XENBUS_PROTOCOL * | This, |
IN CONST XENSTORE_TRANSACTION * | Transaction, | ||
IN CONST CHAR8 * | DirectoryPath, | ||
IN CONST CHAR8 * | Node, | ||
IN CONST CHAR8 * | FormatString, | ||
... | |||
) |
Definition at line 1563 of file XenStore.c.
XENSTORE_STATUS EFIAPI XenBusXenStoreTransactionEnd | ( | IN XENBUS_PROTOCOL * | This, |
IN CONST XENSTORE_TRANSACTION * | Transaction, | ||
IN BOOLEAN | Abort | ||
) |
Definition at line 1552 of file XenStore.c.
XENSTORE_STATUS EFIAPI XenBusXenStoreTransactionStart | ( | IN XENBUS_PROTOCOL * | This, |
OUT XENSTORE_TRANSACTION * | Transaction | ||
) |
Definition at line 1542 of file XenStore.c.
STATIC BOOLEAN XenStoreCheckIndexes | ( | XENSTORE_RING_IDX | Cons, |
XENSTORE_RING_IDX | Prod | ||
) |
Verify that the indexes for a ring are valid.
The difference between the producer and consumer cannot exceed the size of the ring.
Cons | The consumer index for the ring to test. |
Prod | The producer index for the ring to test. |
TRUE | If indexes are in range. |
FALSE | If the indexes are out of range. |
Definition at line 325 of file XenStore.c.
VOID XenStoreDeinit | ( | IN XENBUS_DEVICE * | Dev | ) |
Deinitialize the XenStore states and rings.
Dev | A pointer to a XENBUS_DEVICE instance. |
Definition at line 1124 of file XenStore.c.
STATIC XENSTORE_WATCH * XenStoreFindWatch | ( | IN CONST CHAR8 * | Token | ) |
Convert from watch token (unique identifier) to the associated internal tracking structure for this watch.
Tocken | The unique identifier for the watch to find. |
Definition at line 253 of file XenStore.c.
Definition at line 725 of file XenStore.c.
STATIC CONST VOID * XenStoreGetInputChunk | ( | IN XENSTORE_RING_IDX | Cons, |
IN XENSTORE_RING_IDX | Prod, | ||
IN CONST CHAR8 * | Buffer, | ||
OUT UINT32 * | LenPtr | ||
) |
Return a pointer to, and the length of, the contiguous data available to read from a ring buffer.
Cons | The consumer index for the ring. |
Prod | The producer index for the ring. |
Buffer | The base address of the ring's storage. |
LenPtr | The amount of contiguous data available to read. |
Definition at line 377 of file XenStore.c.
STATIC VOID * XenStoreGetOutputChunk | ( | IN XENSTORE_RING_IDX | Cons, |
IN XENSTORE_RING_IDX | Prod, | ||
IN CHAR8 * | Buffer, | ||
OUT UINT32 * | LenPtr | ||
) |
Return a pointer to, and the length of, the contiguous free region available for output in a ring buffer.
Cons | The consumer index for the ring. |
Prod | The producer index for the ring. |
Buffer | The base address of the ring's storage. |
LenPtr | The amount of contiguous storage available. |
Definition at line 346 of file XenStore.c.
EFI_STATUS XenStoreInit | ( | XENBUS_DEVICE * | Dev | ) |
Initialize XenStore.
Dev | A XENBUS_DEVICE instance. |
EFI_SUCCESS | if everything went well. |
The HVM guest pseudo-physical frame number. This is Xen's mapping of the true machine frame number into our "physical address space".
Definition at line 1085 of file XenStore.c.
STATIC EFI_STATUS XenStoreInitComms | ( | XENSTORE_PRIVATE * | xsp | ) |
Setup communication channels with the XenStore service.
EFI_SUCCESS | if everything went well. |
Definition at line 1035 of file XenStore.c.
Allocate and return the XenStore path string <DirectoryPath>/<Node>. If name is the NUL string, the returned value contains the path string <DirectoryPath>.
DirectoryPath | The NUL terminated directory prefix for new path. |
Node | The NUL terminated basename for the new path. |
Definition at line 285 of file XenStore.c.
XENSTORE_STATUS XenStoreListDirectory | ( | IN CONST XENSTORE_TRANSACTION * | Transaction, |
IN CONST CHAR8 * | DirectoryPath, | ||
IN CONST CHAR8 * | Node, | ||
OUT UINT32 * | DirectoryCountPtr, | ||
OUT CONST CHAR8 *** | DirectoryListPtr | ||
) |
Fetch the contents of a directory in the XenStore.
Transaction | The XenStore transaction covering this request. |
DirectoryPath | The dirname of the path to read. |
Node | The basename of the path to read. |
DirectoryCountPtr | The returned number of directory entries. |
DirectoryListPtr | An array of directory entry strings. |
Definition at line 1204 of file XenStore.c.
BOOLEAN XenStorePathExists | ( | IN CONST XENSTORE_TRANSACTION * | Transaction, |
IN CONST CHAR8 * | Directory, | ||
IN CONST CHAR8 * | Node | ||
) |
Determine if a path exists in the XenStore.
Transaction | The XenStore transaction covering this request. |
Directory | The dirname of the path to read. |
Node | The basename of the path to read. |
TRUE | The path exists. |
FALSE | The path does not exist or an error occurred attempting to make that determination. |
Definition at line 1236 of file XenStore.c.
STATIC XENSTORE_STATUS XenStoreProcessMessage | ( | VOID | ) |
Block reading the next message from the XenStore service and process the result.
Definition at line 618 of file XenStore.c.
XENSTORE_STATUS XenStoreRead | ( | IN CONST XENSTORE_TRANSACTION * | Transaction, |
IN CONST CHAR8 * | DirectoryPath, | ||
IN CONST CHAR8 * | Node, | ||
OUT UINT32 *LenPtr | OPTIONAL, | ||
OUT VOID ** | Result | ||
) |
Get the contents of a single "file". Returns the contents in *Result which should be freed after use. The length of the value in bytes is returned in LenPtr.
Transaction | The XenStore transaction covering this request. |
DirectoryPath | The dirname of the file to read. |
Node | The basename of the file to read. |
LenPtr | The amount of data read. |
Result | The returned contents from this file. |
Definition at line 1262 of file XenStore.c.
STATIC XENSTORE_STATUS XenStoreReadReply | ( | OUT enum xsd_sockmsg_type * | TypePtr, |
OUT UINT32 *LenPtr | OPTIONAL, | ||
OUT VOID ** | Result | ||
) |
Block waiting for a reply to a message request.
TypePtr | The returned type of the reply. |
LenPtr | The returned body length of the reply. |
Result | The returned body of the reply. |
Definition at line 750 of file XenStore.c.
Receive data from the XenStore service.
The buffer pointed to by DataPtr is at least Len bytes in length.
DataPtr | A pointer to the contiguous buffer to receive the data. |
Len | The amount of data to receive. |
Definition at line 531 of file XenStore.c.
XENSTORE_STATUS XenStoreRegisterWatch | ( | IN CONST CHAR8 * | DirectoryPath, |
IN CONST CHAR8 * | Node, | ||
OUT XENSTORE_WATCH ** | WatchPtr | ||
) |
Register a XenStore watch.
XenStore watches allow a client to be notified via a callback (embedded within the watch object) of changes to an object in the XenStore.
DirectoryPath | The dirname of the path to watch. |
Node | The basename of the path to watch. |
WatchPtr | A returned XENSTORE_WATCH pointer. |
Definition at line 1411 of file XenStore.c.
XENSTORE_STATUS XenStoreRemove | ( | IN CONST XENSTORE_TRANSACTION * | Transaction, |
IN CONST CHAR8 * | DirectoryPath, | ||
IN CONST CHAR8 * | Node | ||
) |
Remove a file or directory (directories must be empty).
Transaction | The XenStore transaction covering this request. |
DirectoryPath | The dirname of the directory to remove. |
Node | The basename of the directory to remove. |
Definition at line 1311 of file XenStore.c.
STATIC XENSTORE_STATUS XenStoreSingle | ( | IN CONST XENSTORE_TRANSACTION * | Transaction, |
IN enum xsd_sockmsg_type | RequestType, | ||
IN CONST CHAR8 * | Body, | ||
OUT UINT32 *LenPtr | OPTIONAL, | ||
OUT VOID **Result | OPTIONAL | ||
) |
Wrapper for XenStoreTalkv allowing easy transmission of a message with a single, contiguous, message body.
The returned result is provided in malloced storage and thus must be free'd by the caller.
Transaction | The transaction to use for this request. |
RequestType | The type of message to send. |
Body | The body of the request. |
LenPtr | The returned length of the reply. |
Result | The returned body of the reply. |
Definition at line 890 of file XenStore.c.
XENSTORE_STATUS EFIAPI XenStoreSPrint | ( | IN CONST XENSTORE_TRANSACTION * | Transaction, |
IN CONST CHAR8 * | DirectoryPath, | ||
IN CONST CHAR8 * | Node, | ||
IN CONST CHAR8 * | FormatString, | ||
... | |||
) |
Printf formatted write to a XenStore file.
Transaction | The XenStore transaction covering this request. |
DirectoryPath | The dirname of the path to read. |
Node | The basename of the path to read. |
FormatString | AsciiSPrint format string followed by a variable number of arguments. |
Definition at line 1392 of file XenStore.c.
STATIC XENSTORE_STATUS XenStoreTalkv | ( | IN CONST XENSTORE_TRANSACTION * | Transaction, |
IN enum xsd_sockmsg_type | RequestType, | ||
IN CONST WRITE_REQUEST * | WriteRequest, | ||
IN UINT32 | NumRequests, | ||
OUT UINT32 *LenPtr | OPTIONAL, | ||
OUT VOID **ResultPtr | OPTIONAL | ||
) |
Send a message with an optionally multi-part body to the XenStore service.
Transaction | The transaction to use for this request. |
RequestType | The type of message to send. |
WriteRequest | Pointers to the body sections of the request. |
NumRequests | The number of body sections in the request. |
LenPtr | The returned length of the reply. |
ResultPtr | The returned body of the reply. |
Definition at line 806 of file XenStore.c.
XENSTORE_STATUS XenStoreTransactionEnd | ( | IN CONST XENSTORE_TRANSACTION * | Transaction, |
IN BOOLEAN | Abort | ||
) |
End a transaction.
Transaction | The transaction to end/commit. |
Abort | If TRUE, the transaction is discarded instead of committed. |
Definition at line 1351 of file XenStore.c.
XENSTORE_STATUS XenStoreTransactionStart | ( | 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 (XenStoreTransactionEnd).
Transaction | The returned transaction. |
Definition at line 1328 of file XenStore.c.
VOID XenStoreUnregisterWatch | ( | IN XENSTORE_WATCH * | Watch | ) |
Unregister a XenStore watch.
Watch | An XENSTORE_WATCH object previously returned by a successful call to XenStoreRegisterWatch (). |
Definition at line 1452 of file XenStore.c.
Transmit an uwatch request to the XenStore service.
Path | The path in the XenStore to watch. |
Tocken | A unique identifier for this watch. |
Definition at line 954 of file XenStore.c.
XENSTORE_STATUS EFIAPI XenStoreVSPrint | ( | IN CONST XENSTORE_TRANSACTION * | Transaction, |
IN CONST CHAR8 * | DirectoryPath, | ||
IN CONST CHAR8 * | Node, | ||
IN CONST CHAR8 * | FormatString, | ||
IN VA_LIST | Marker | ||
) |
VA_LIST version of XenStoreSPrint().
Transaction | The XenStore transaction covering this request. |
DirectoryPath | The dirname of the path to read. |
Node | The basename of the path to read. |
FormatString | Printf format string. |
Marker | VA_LIST of printf arguments. |
Definition at line 1366 of file XenStore.c.
STATIC EFI_STATUS XenStoreWaitForEvent | ( | IN EFI_EVENT | Event, |
IN UINT64 | Timeout | ||
) |
Wait for an event or timeout.
Event | Event to wait for. |
Timeout | A timeout value in 100ns units. |
EFI_SUCCESS | Event have been triggered or the current TPL is not TPL_APPLICATION. |
EFI_TIMEOUT | Timeout have expired. |
Definition at line 407 of file XenStore.c.
STATIC XENSTORE_STATUS XenStoreWaitWatch | ( | VOID * | Token | ) |
Definition at line 971 of file XenStore.c.
Transmit a watch request to the XenStore service.
Path | The path in the XenStore to watch. |
Tocken | A unique identifier for this watch. |
Definition at line 928 of file XenStore.c.
XENSTORE_STATUS XenStoreWrite | ( | IN CONST XENSTORE_TRANSACTION * | Transaction, |
IN CONST CHAR8 * | DirectoryPath, | ||
IN CONST CHAR8 * | Node, | ||
IN CONST CHAR8 * | Str | ||
) |
Write to a single file.
Transaction | The XenStore transaction covering this request. |
DirectoryPath | The dirname of the file to write. |
Node | The basename of the file to write. |
Str | The NUL terminated string of data to write. |
Definition at line 1286 of file XenStore.c.
Transmit data to the XenStore service.
The buffer pointed to by DataPtr is at least Len bytes in length.
DataPtr | A pointer to the contiguous data to send. |
Len | The amount of data to send. |
Definition at line 449 of file XenStore.c.