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