]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/XenBusDxe/EventChannel.h
IntelFsp2Pkg/SplitFspBin.py: Support rebasing 1.x binary.
[mirror_edk2.git] / OvmfPkg / XenBusDxe / EventChannel.h
1 /** @file
2 Event Channel function declaration.
3
4 Copyright (C) 2014, Citrix Ltd.
5
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8 **/
9 #ifndef __XENBUS_EVENT_CHANNEL_H
10 #define __XENBUS_EVENT_CHANNEL_H
11
12 #include "XenBusDxe.h"
13
14 #include <IndustryStandard/Xen/event_channel.h>
15
16 /**
17 Send an event to the remote end of the channel whose local endpoint is Port.
18
19 @param Dev A pointer to XENBUS_DEVICE.
20 @param Port The port to notify.
21
22 @return Return 0 on success, or return the errno code from the hypercall.
23 **/
24 UINT32
25 XenEventChannelNotify (
26 IN XENBUS_DEVICE *Dev,
27 IN evtchn_port_t Port
28 );
29
30 /*
31 * XenBus protocol
32 */
33
34 /**
35 Allocate a port that can be bind from domain DomainId.
36
37 @param This A pointer to the XENBUS_PROTOCOL.
38 @param DomainId The domain ID that can bind the newly allocated port.
39 @param Port A pointer to a evtchn_port_t that will contain the newly
40 allocated port.
41
42 @retval UINT32 The return value from the hypercall, 0 if success.
43 **/
44 UINT32
45 EFIAPI
46 XenBusEventChannelAllocate (
47 IN XENBUS_PROTOCOL *This,
48 IN domid_t DomainId,
49 OUT evtchn_port_t *Port
50 );
51
52 /**
53 Send an event to the remote end of the channel whose local endpoint is Port.
54
55 @param This A pointer to the XENBUS_PROTOCOL.
56 @param Port Local port to the the event from.
57
58 @retval UINT32 The return value from the hypercall, 0 if success.
59 **/
60 UINT32
61 EFIAPI
62 XenBusEventChannelNotify (
63 IN XENBUS_PROTOCOL *This,
64 IN evtchn_port_t Port
65 );
66
67 /**
68 Close a local event channel Port.
69
70 @param This A pointer to the XENBUS_PROTOCOL.
71 @param Port The event channel to close.
72
73 @retval UINT32 The return value from the hypercall, 0 if success.
74 **/
75 UINT32
76 EFIAPI
77 XenBusEventChannelClose (
78 IN XENBUS_PROTOCOL *This,
79 IN evtchn_port_t Port
80 );
81
82 #endif