]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/XenBusDxe/XenBusDxe.h
388d2996953ca3e278486dcf6bbdadc1c9d97e39
[mirror_edk2.git] / OvmfPkg / XenBusDxe / XenBusDxe.h
1 /** @file
2 Function declaration and internal data for XenBusDxe.
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
16 #ifndef __EFI_XENBUS_DXE_H__
17 #define __EFI_XENBUS_DXE_H__
18
19 #include <Uefi.h>
20
21 //
22 // Libraries
23 //
24 #include <Library/UefiBootServicesTableLib.h>
25 #include <Library/MemoryAllocationLib.h>
26 #include <Library/BaseMemoryLib.h>
27 #include <Library/BaseLib.h>
28 #include <Library/UefiLib.h>
29 #include <Library/DevicePathLib.h>
30 #include <Library/DebugLib.h>
31
32
33 //
34 // UEFI Driver Model Protocols
35 //
36 #include <Protocol/DriverBinding.h>
37
38
39 //
40 // Consumed Protocols
41 //
42 #include <Protocol/PciIo.h>
43
44
45 //
46 // Produced Protocols
47 //
48
49
50 //
51 // Driver Version
52 //
53 #define XENBUS_DXE_VERSION 0x00000010
54
55
56 //
57 // Protocol instances
58 //
59 extern EFI_DRIVER_BINDING_PROTOCOL gXenBusDxeDriverBinding;
60 extern EFI_COMPONENT_NAME2_PROTOCOL gXenBusDxeComponentName2;
61 extern EFI_COMPONENT_NAME_PROTOCOL gXenBusDxeComponentName;
62
63
64 //
65 // Include files with function prototypes
66 //
67 #include "DriverBinding.h"
68 #include "ComponentName.h"
69
70 //
71 // Other stuff
72 //
73 #include <IndustryStandard/Xen/xen.h>
74
75 #define PCI_VENDOR_ID_XEN 0x5853
76 #define PCI_DEVICE_ID_XEN_PLATFORM 0x0001
77
78
79 typedef struct _XENBUS_DEVICE XENBUS_DEVICE;
80
81 // Have the state of the driver.
82 #define XENBUS_DEVICE_SIGNATURE SIGNATURE_32 ('X','B','s','t')
83 struct _XENBUS_DEVICE {
84 UINT32 Signature;
85 EFI_DRIVER_BINDING_PROTOCOL *This;
86 EFI_HANDLE ControllerHandle;
87 EFI_PCI_IO_PROTOCOL *PciIo;
88 EFI_EVENT ExitBootEvent;
89
90 VOID *Hyperpage;
91 shared_info_t *SharedInfo;
92 };
93
94 #endif