TianoCore EDK2 master
Loading...
Searching...
No Matches
XenBusDxe.h
Go to the documentation of this file.
1
10#ifndef __EFI_XENBUS_DXE_H__
11#define __EFI_XENBUS_DXE_H__
12
13#include <Uefi.h>
14
15//
16// Libraries
17//
21#include <Library/BaseLib.h>
22#include <Library/UefiLib.h>
24#include <Library/DebugLib.h>
25#include <Library/PcdLib.h>
26
27//
28// UEFI Driver Model Protocols
29//
31
32//
33// Consumed Protocols
34//
35#include <Protocol/XenIo.h>
36
37//
38// Produced Protocols
39//
40#include <Protocol/XenBus.h>
41
42//
43// Driver Version
44//
45#define XENBUS_DXE_VERSION 0x00000010
46
47//
48// Protocol instances
49//
53
54//
55// Include files with function prototypes
56//
57#include "DriverBinding.h"
58#include "ComponentName.h"
59
60//
61// Other stuff
62//
63#include <IndustryStandard/Xen/xen.h>
64
66typedef struct _XENBUS_DEVICE XENBUS_DEVICE;
67
68// Have the state of the driver.
69#define XENBUS_DEVICE_SIGNATURE SIGNATURE_32 ('X','B','s','t')
71 UINT32 Signature;
73 EFI_HANDLE ControllerHandle;
74 XENIO_PROTOCOL *XenIo;
75 EFI_EVENT ExitBootEvent;
76 EFI_DEVICE_PATH_PROTOCOL *DevicePath;
77 LIST_ENTRY ChildList;
78
79 shared_info_t *SharedInfo;
80};
81
82// There is one of this struct allocated for every child.
83#define XENBUS_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('X', 'B', 'p', 'd')
84typedef struct {
85 UINTN Signature;
86 LIST_ENTRY Link;
87 EFI_HANDLE Handle;
88 XENBUS_PROTOCOL XenBusIo;
89 XENBUS_DEVICE *Dev;
90 XENBUS_DEVICE_PATH *DevicePath;
92
93#define XENBUS_PRIVATE_DATA_FROM_THIS(a) \
94 CR (a, XENBUS_PRIVATE_DATA, XenBusIo, XENBUS_PRIVATE_DATA_SIGNATURE)
95#define XENBUS_PRIVATE_DATA_FROM_LINK(a) \
96 CR (a, XENBUS_PRIVATE_DATA, Link, XENBUS_PRIVATE_DATA_SIGNATURE)
97
98/*
99 * Helpers
100 */
101
110INT32
111EFIAPI
113 IN INT32 Bit,
114 IN VOID *Address
115 );
116
117CHAR8 *
118AsciiStrDup (
119 IN CONST CHAR8 *Str
120 );
121
122#endif
UINT64 UINTN
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
VOID * EFI_EVENT
Definition: UefiBaseType.h:37
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
EFI_DRIVER_BINDING_PROTOCOL gXenBusDxeDriverBinding
Definition: XenBusDxe.c:35
INT32 EFIAPI TestAndClearBit(IN INT32 Bit, IN VOID *Address)
EFI_COMPONENT_NAME_PROTOCOL gXenBusDxeComponentName
Definition: ComponentName.c:16
EFI_COMPONENT_NAME2_PROTOCOL gXenBusDxeComponentName2
Definition: ComponentName.c:26