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