]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | \r | |
3 | Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r | |
4 | This program and the accompanying materials\r | |
5 | are licensed and made available under the terms and conditions of the BSD License\r | |
6 | which accompanies this distribution. The full text of the license may be found at\r | |
7 | http://opensource.org/licenses/bsd-license.php\r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
11 | \r | |
12 | Module Name:\r | |
13 | \r | |
14 | DriverSample.h\r | |
15 | \r | |
16 | Abstract:\r | |
17 | \r | |
18 | \r | |
19 | Revision History\r | |
20 | \r | |
21 | \r | |
22 | **/\r | |
23 | \r | |
24 | #ifndef _DRIVER_SAMPLE_H_\r | |
25 | #define _DRIVER_SAMPLE_H_\r | |
26 | \r | |
27 | #include <Uefi.h>\r | |
28 | \r | |
29 | #include <Protocol/HiiConfigRouting.h>\r | |
30 | #include <Protocol/FormBrowser2.h>\r | |
31 | #include <Protocol/HiiConfigAccess.h>\r | |
32 | #include <Protocol/HiiDatabase.h>\r | |
33 | #include <Protocol/HiiString.h>\r | |
34 | #include <Protocol/FormBrowserEx.h>\r | |
35 | #include <Protocol/HiiConfigKeyword.h>\r | |
36 | #include <Protocol/HiiPopup.h>\r | |
37 | \r | |
38 | #include <Guid/MdeModuleHii.h>\r | |
39 | #include <Library/DebugLib.h>\r | |
40 | #include <Library/BaseLib.h>\r | |
41 | #include <Library/BaseMemoryLib.h>\r | |
42 | #include <Library/UefiRuntimeServicesTableLib.h>\r | |
43 | #include <Library/UefiDriverEntryPoint.h>\r | |
44 | #include <Library/UefiBootServicesTableLib.h>\r | |
45 | #include <Library/MemoryAllocationLib.h>\r | |
46 | #include <Library/HiiLib.h>\r | |
47 | #include <Library/DevicePathLib.h>\r | |
48 | #include <Library/PrintLib.h>\r | |
49 | #include <Library/UefiLib.h>\r | |
50 | \r | |
51 | #include "NVDataStruc.h"\r | |
52 | \r | |
53 | //\r | |
54 | // This is the generated IFR binary data for each formset defined in VFR.\r | |
55 | // This data array is ready to be used as input of HiiAddPackages() to\r | |
56 | // create a packagelist (which contains Form packages, String packages, etc).\r | |
57 | //\r | |
58 | extern UINT8 VfrBin[];\r | |
59 | extern UINT8 InventoryBin[];\r | |
60 | \r | |
61 | //\r | |
62 | // This is the generated String package data for all .UNI files.\r | |
63 | // This data array is ready to be used as input of HiiAddPackages() to\r | |
64 | // create a packagelist (which contains Form packages, String packages, etc).\r | |
65 | //\r | |
66 | extern UINT8 DriverSampleStrings[];\r | |
67 | \r | |
68 | #define DYNAMIC_ONE_OF_VAR_OFFSET OFFSET_OF (DRIVER_SAMPLE_CONFIGURATION, DynamicOneof)\r | |
69 | #define DYNAMIC_ORDERED_LIST_VAR_OFFSET OFFSET_OF (DRIVER_SAMPLE_CONFIGURATION, DynamicOrderedList)\r | |
70 | \r | |
71 | #define DEFAULT_CLASS_MANUFACTURING_VALUE 0xFF\r | |
72 | #define DEFAULT_CLASS_STANDARD_VALUE 0x0\r | |
73 | \r | |
74 | //\r | |
75 | // Number of name in Name/Value storage\r | |
76 | //\r | |
77 | #define NAME_VALUE_NAME_NUMBER 3\r | |
78 | \r | |
79 | #define DRIVER_SAMPLE_PRIVATE_SIGNATURE SIGNATURE_32 ('D', 'S', 'p', 's')\r | |
80 | \r | |
81 | typedef struct {\r | |
82 | UINTN Signature;\r | |
83 | \r | |
84 | EFI_HANDLE DriverHandle[2];\r | |
85 | EFI_HII_HANDLE HiiHandle[2];\r | |
86 | DRIVER_SAMPLE_CONFIGURATION Configuration;\r | |
87 | MY_EFI_VARSTORE_DATA VarStoreConfig;\r | |
88 | MY_EFI_BITS_VARSTORE_DATA BitsVarStoreConfig;\r | |
89 | MY_EFI_UNION_DATA UnionConfig;\r | |
90 | \r | |
91 | //\r | |
92 | // Name/Value storage Name list\r | |
93 | //\r | |
94 | EFI_STRING_ID NameStringId[NAME_VALUE_NAME_NUMBER];\r | |
95 | EFI_STRING NameValueName[NAME_VALUE_NAME_NUMBER];\r | |
96 | \r | |
97 | //\r | |
98 | // Consumed protocol\r | |
99 | //\r | |
100 | EFI_HII_DATABASE_PROTOCOL *HiiDatabase;\r | |
101 | EFI_HII_STRING_PROTOCOL *HiiString;\r | |
102 | EFI_HII_CONFIG_ROUTING_PROTOCOL *HiiConfigRouting;\r | |
103 | EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL *HiiKeywordHandler;\r | |
104 | EFI_HII_POPUP_PROTOCOL *HiiPopup;\r | |
105 | \r | |
106 | EFI_FORM_BROWSER2_PROTOCOL *FormBrowser2;\r | |
107 | \r | |
108 | //\r | |
109 | // Produced protocol\r | |
110 | //\r | |
111 | EFI_HII_CONFIG_ACCESS_PROTOCOL ConfigAccess;\r | |
112 | } DRIVER_SAMPLE_PRIVATE_DATA;\r | |
113 | \r | |
114 | #define DRIVER_SAMPLE_PRIVATE_FROM_THIS(a) CR (a, DRIVER_SAMPLE_PRIVATE_DATA, ConfigAccess, DRIVER_SAMPLE_PRIVATE_SIGNATURE)\r | |
115 | \r | |
116 | #pragma pack(1)\r | |
117 | \r | |
118 | ///\r | |
119 | /// HII specific Vendor Device Path definition.\r | |
120 | ///\r | |
121 | typedef struct {\r | |
122 | VENDOR_DEVICE_PATH VendorDevicePath;\r | |
123 | EFI_DEVICE_PATH_PROTOCOL End;\r | |
124 | } HII_VENDOR_DEVICE_PATH;\r | |
125 | \r | |
126 | #pragma pack()\r | |
127 | \r | |
128 | #endif\r |