-
Notifications
You must be signed in to change notification settings - Fork 0
/
MyTestDriver.h
115 lines (94 loc) · 2.66 KB
/
MyTestDriver.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/** @file
TODO: Brief Description of UEFI Driver MyTestDriver
TODO: Detailed Description of UEFI Driver MyTestDriver
TODO: Copyright for UEFI Driver MyTestDriver
TODO: License for UEFI Driver MyTestDriver
**/
#ifndef __EFI_MY_TEST_DRIVER_H__
#define __EFI_MY_TEST_DRIVER_H__
#include <Uefi.h>
#include "MyTestDriverNVDataStruc.h"
//
// Libraries
//
#include <Library/UefiBootServicesTableLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/BaseLib.h>
#include <Library/UefiLib.h>
#include <Library/DevicePathLib.h>
#include <Library/DebugLib.h>
#include <Library/HiiLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
//
// UEFI Driver Model Protocols
//
#include <Protocol/DriverBinding.h>
#include <Protocol/HiiDatabase.h>
#include <Protocol/HiiPackageList.h>
#include <Protocol/DriverSupportedEfiVersion.h>
#include <Protocol/ComponentName2.h>
#include <Protocol/ComponentName.h>
#include <Protocol/HiiConfigAccess.h>
// Added for HII
#include <Protocol/HiiConfigRouting.h>
#include <Protocol/FormBrowser2.h>
#include <Protocol/HiiString.h>
#include <Library/DevicePathLib.h>
//
// Consumed Protocols
//
#include <Protocol/PciIo.h>
//
// Produced Protocols
//
//
// Guids
//
//
// Driver Version
//
#define MY_TEST_DRIVER_VERSION 0x00000000
//
// Protocol instances
//
extern EFI_DRIVER_BINDING_PROTOCOL gMyTestDriverDriverBinding;
extern EFI_COMPONENT_NAME2_PROTOCOL gMyTestDriverComponentName2;
extern EFI_COMPONENT_NAME_PROTOCOL gMyTestDriverComponentName;
extern EFI_HII_CONFIG_ACCESS_PROTOCOL gMyTestDriverHiiConfigAccess;
#define MYTESTDRIVER_DEV_SIGNATURE SIGNATURE_32 ('m', 'w', 'd', 'r')
typedef struct {
UINT32 Signature;
EFI_HANDLE Handle;
MYTESTDRIVER_CONFIGURATION Configuration;
EFI_HANDLE DriverHandle[2];
EFI_HII_HANDLE HiiHandle[2];
//
// Consumed protocol
//
EFI_HII_DATABASE_PROTOCOL *HiiDatabase;
EFI_HII_STRING_PROTOCOL *HiiString;
EFI_HII_CONFIG_ROUTING_PROTOCOL *HiiConfigRouting;
EFI_FORM_BROWSER2_PROTOCOL *FormBrowser2;
//
// Produced protocol
//
EFI_HII_CONFIG_ACCESS_PROTOCOL ConfigAccess;
} MYTESTDRIVER_DEV;
#define MYTESTDRIVER_DEV_FROM_THIS(a) CR (a, MYTESTDRIVER_DEV, ConfigAccess, MYTESTDRIVER_DEV_SIGNATURE)
#pragma pack(1)
///
/// HII specific Vendor Device Path definition.
///
typedef struct {
VENDOR_DEVICE_PATH VendorDevicePath;
EFI_DEVICE_PATH_PROTOCOL End;
} HII_VENDOR_DEVICE_PATH;
#pragma pack()
//
// Include files with function prototypes
//
#include "DriverBinding.h"
#include "ComponentName.h"
#include "HiiConfigAccess.h"
#endif