]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - OvmfPkg/XenBusDxe/EventChannel.h
OvmfPkg/XenBusDxe: Add Event Channel into XenBus protocol.
[mirror_edk2.git] / OvmfPkg / XenBusDxe / EventChannel.h
... / ...
CommitLineData
1/** @file\r
2 Event Channel function declaration.\r
3\r
4 Copyright (C) 2014, Citrix Ltd.\r
5\r
6 This program and the accompanying materials\r
7 are licensed and made available under the terms and conditions of the BSD License\r
8 which accompanies this distribution. The full text of the license may be found at\r
9 http://opensource.org/licenses/bsd-license.php\r
10\r
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13\r
14**/\r
15#ifndef __XENBUS_EVENT_CHANNEL_H\r
16#define __XENBUS_EVENT_CHANNEL_H\r
17\r
18#include "XenBusDxe.h"\r
19\r
20#include <IndustryStandard/Xen/event_channel.h>\r
21\r
22/**\r
23 Send an event to the remote end of the channel whose local endpoint is Port.\r
24\r
25 @param Dev A pointer to XENBUS_DEVICE.\r
26 @param Port The port to notify.\r
27\r
28 @return Return 0 on success, or return the errno code from the hypercall.\r
29**/\r
30UINT32\r
31XenEventChannelNotify (\r
32 IN XENBUS_DEVICE *Dev,\r
33 IN evtchn_port_t Port\r
34 );\r
35\r
36/*\r
37 * XenBus protocol\r
38 */\r
39\r
40/**\r
41 Allocate a port that can be bind from domain DomainId.\r
42\r
43 @param This A pointer to the XENBUS_PROTOCOL.\r
44 @param DomainId The domain ID that can bind the newly allocated port.\r
45 @param Port A pointer to a evtchn_port_t that will contain the newly\r
46 allocated port.\r
47\r
48 @retval UINT32 The return value from the hypercall, 0 if success.\r
49**/\r
50UINT32\r
51EFIAPI\r
52XenBusEventChannelAllocate (\r
53 IN XENBUS_PROTOCOL *This,\r
54 IN domid_t DomainId,\r
55 OUT evtchn_port_t *Port\r
56 );\r
57\r
58/**\r
59 Send an event to the remote end of the channel whose local endpoint is Port.\r
60\r
61 @param This A pointer to the XENBUS_PROTOCOL.\r
62 @param Port Local port to the the event from.\r
63\r
64 @retval UINT32 The return value from the hypercall, 0 if success.\r
65**/\r
66UINT32\r
67EFIAPI\r
68XenBusEventChannelNotify (\r
69 IN XENBUS_PROTOCOL *This,\r
70 IN evtchn_port_t Port\r
71 );\r
72\r
73/**\r
74 Close a local event channel Port.\r
75\r
76 @param This A pointer to the XENBUS_PROTOCOL.\r
77 @param Port The event channel to close.\r
78\r
79 @retval UINT32 The return value from the hypercall, 0 if success.\r
80**/\r
81UINT32\r
82EFIAPI\r
83XenBusEventChannelClose (\r
84 IN XENBUS_PROTOCOL *This,\r
85 IN evtchn_port_t Port\r
86 );\r
87\r
88#endif\r