summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/Include/Protocol
diff options
context:
space:
mode:
authorAnthony PERARD <anthony.perard@citrix.com>2014-10-29 06:50:50 +0000
committerjljusten <jljusten@Edk2>2014-10-29 06:50:50 +0000
commita9090a94bb4a8dae61eb79428a5769916d621940 (patch)
tree8f17f2b01fcdc99bffa72d6cecf1454d79b461de /OvmfPkg/Include/Protocol
parent6342f1fea881996666b4f1a9e7f132c484e03ff0 (diff)
downloadedk2-a9090a94bb4a8dae61eb79428a5769916d621940.tar.gz
edk2-a9090a94bb4a8dae61eb79428a5769916d621940.tar.bz2
edk2-a9090a94bb4a8dae61eb79428a5769916d621940.zip
OvmfPkg/XenBusDxe: Add XenStore client implementation
XenStore is a key/value database, which is running on another virtual machine. It can be accessed through shared memory. This is a client implementation. Change in V3: - moving xs_wire.h from patch #1 to this patch - fix return value of XenStoreListDirectory - Use a timeout to print a debug message if the other side of the xenstore ring does not notify through the event channel. This is done with the new XenStoreWaitForEvent function. - Have XenStoreReadReply check status of XenStoreProcessMessage and return an error if needed. - Have XenStoreTalkv return the status of XenStoreReadReply. - Have a loop to check for the quiescent of the response ring in the XenStoreInitComms function. (with a timeout of 5 seconds) - use the recently introduced XenStore 'closing' feature. Change in V2: - Change comment style, from freebsd to ovmf - Fix type of EventChannel - Fix debug print, no more cast - Implement XenStoreDeinit. - Clean up comments - Fix few codding style issue - Add FAIL xenstore status value. Origin: FreeBSD 10.0 License: This patch adds several files under the MIT licence. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16267 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OvmfPkg/Include/Protocol')
-rw-r--r--OvmfPkg/Include/Protocol/XenBus.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/OvmfPkg/Include/Protocol/XenBus.h b/OvmfPkg/Include/Protocol/XenBus.h
index 89bf74fbc5..565d491db6 100644
--- a/OvmfPkg/Include/Protocol/XenBus.h
+++ b/OvmfPkg/Include/Protocol/XenBus.h
@@ -32,6 +32,35 @@
///
typedef struct _XENBUS_PROTOCOL XENBUS_PROTOCOL;
+typedef enum xenbus_state XenBusState;
+
+typedef struct
+{
+ UINT32 Id;
+} XENSTORE_TRANSACTION;
+
+#define XST_NIL ((XENSTORE_TRANSACTION) { 0 })
+
+typedef enum {
+ XENSTORE_STATUS_SUCCESS = 0,
+ XENSTORE_STATUS_FAIL,
+ XENSTORE_STATUS_EINVAL,
+ XENSTORE_STATUS_EACCES,
+ XENSTORE_STATUS_EEXIST,
+ XENSTORE_STATUS_EISDIR,
+ XENSTORE_STATUS_ENOENT,
+ XENSTORE_STATUS_ENOMEM,
+ XENSTORE_STATUS_ENOSPC,
+ XENSTORE_STATUS_EIO,
+ XENSTORE_STATUS_ENOTEMPTY,
+ XENSTORE_STATUS_ENOSYS,
+ XENSTORE_STATUS_EROFS,
+ XENSTORE_STATUS_EBUSY,
+ XENSTORE_STATUS_EAGAIN,
+ XENSTORE_STATUS_EISCONN,
+ XENSTORE_STATUS_E2BIG
+} XENSTORE_STATUS;
+
#include <IndustryStandard/Xen/grant_table.h>