3 XenBus protocol to be used between the XenBus bus driver and Xen PV devices.
5 DISCLAIMER: the XENBUS_PROTOCOL introduced here is a work in progress, and
6 should not be used outside of the EDK II tree.
8 This protocol provide the necessary for a Xen PV driver frontend to
9 communicate with the bus driver, and perform several task to
10 initialize/shutdown a PV device and perform IO with a PV backend.
12 Copyright (C) 2014, Citrix Ltd.
14 This program and the accompanying materials
15 are licensed and made available under the terms and conditions of the BSD License
16 which accompanies this distribution. The full text of the license may be found at
17 http://opensource.org/licenses/bsd-license.php
19 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
20 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
24 #ifndef __PROTOCOL_XENBUS_H__
25 #define __PROTOCOL_XENBUS_H__
27 #define XENBUS_PROTOCOL_GUID \
28 {0x3d3ca290, 0xb9a5, 0x11e3, {0xb7, 0x5d, 0xb8, 0xac, 0x6f, 0x7d, 0x65, 0xe6}}
31 /// Forward declaration
33 typedef struct _XENBUS_PROTOCOL XENBUS_PROTOCOL
;
35 typedef enum xenbus_state XenBusState
;
40 } XENSTORE_TRANSACTION
;
42 #define XST_NIL ((XENSTORE_TRANSACTION) { 0 })
45 XENSTORE_STATUS_SUCCESS
= 0,
47 XENSTORE_STATUS_EINVAL
,
48 XENSTORE_STATUS_EACCES
,
49 XENSTORE_STATUS_EEXIST
,
50 XENSTORE_STATUS_EISDIR
,
51 XENSTORE_STATUS_ENOENT
,
52 XENSTORE_STATUS_ENOMEM
,
53 XENSTORE_STATUS_ENOSPC
,
55 XENSTORE_STATUS_ENOTEMPTY
,
56 XENSTORE_STATUS_ENOSYS
,
57 XENSTORE_STATUS_EROFS
,
58 XENSTORE_STATUS_EBUSY
,
59 XENSTORE_STATUS_EAGAIN
,
60 XENSTORE_STATUS_EISCONN
,
65 #include <IndustryStandard/Xen/grant_table.h>
68 /// Function prototypes
72 Grant access to the page Frame to the domain DomainId.
74 @param This A pointer to XENBUS_PROTOCOL instance.
75 @param DomainId ID of the domain to grant acces to.
76 @param Frame Frame Number of the page to grant access to.
77 @param ReadOnly Provide read-only or read-write access.
78 @param RefPtr Reference number of the grant will be writen to this pointer.
82 (EFIAPI
*XENBUS_GRANT_ACCESS
)(
83 IN XENBUS_PROTOCOL
*This
,
91 End access to grant Ref, previously return by XenBusGrantAccess.
93 @param This A pointer to XENBUS_PROTOCOL instance.
94 @param Ref Reference numeber of a grant previously returned by
99 (EFIAPI
*XENBUS_GRANT_END_ACCESS
)(
100 IN XENBUS_PROTOCOL
*This
,
106 /// Protocol structure
108 /// DISCLAIMER: the XENBUS_PROTOCOL introduced here is a work in progress, and
109 /// should not be used outside of the EDK II tree.
111 struct _XENBUS_PROTOCOL
{
112 XENBUS_GRANT_ACCESS GrantAccess
;
113 XENBUS_GRANT_END_ACCESS GrantEndAccess
;
115 // Protocol data fields
119 extern EFI_GUID gXenBusProtocolGuid
;