]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/XenBusDxe/EventChannel.h
OvmfPkg/XenBusDxe: Add Event Channel into XenBus protocol.
[mirror_edk2.git] / OvmfPkg / XenBusDxe / EventChannel.h
index 5f3171d7ca289b36ec47e41f4c375ecb62be71c7..4dcc20f73bfc9989159eae70112fd83c11b229fe 100644 (file)
@@ -33,4 +33,56 @@ XenEventChannelNotify (
   IN evtchn_port_t Port\r
   );\r
 \r
+/*\r
+ * XenBus protocol\r
+ */\r
+\r
+/**\r
+  Allocate a port that can be bind from domain DomainId.\r
+\r
+  @param This       A pointer to the XENBUS_PROTOCOL.\r
+  @param DomainId   The domain ID that can bind the newly allocated port.\r
+  @param Port       A pointer to a evtchn_port_t that will contain the newly\r
+                    allocated port.\r
+\r
+  @retval UINT32    The return value from the hypercall, 0 if success.\r
+**/\r
+UINT32\r
+EFIAPI\r
+XenBusEventChannelAllocate (\r
+  IN  XENBUS_PROTOCOL *This,\r
+  IN  domid_t         DomainId,\r
+  OUT evtchn_port_t   *Port\r
+  );\r
+\r
+/**\r
+  Send an event to the remote end of the channel whose local endpoint is Port.\r
+\r
+  @param This       A pointer to the XENBUS_PROTOCOL.\r
+  @param Port       Local port to the the event from.\r
+\r
+  @retval UINT32    The return value from the hypercall, 0 if success.\r
+**/\r
+UINT32\r
+EFIAPI\r
+XenBusEventChannelNotify (\r
+  IN XENBUS_PROTOCOL *This,\r
+  IN evtchn_port_t   Port\r
+  );\r
+\r
+/**\r
+  Close a local event channel Port.\r
+\r
+  @param This       A pointer to the XENBUS_PROTOCOL.\r
+  @param Port       The event channel to close.\r
+\r
+  @retval UINT32    The return value from the hypercall, 0 if success.\r
+**/\r
+UINT32\r
+EFIAPI\r
+XenBusEventChannelClose (\r
+  IN XENBUS_PROTOCOL *This,\r
+  IN evtchn_port_t   Port\r
+  );\r
+\r
 #endif\r