]>
Commit | Line | Data |
---|---|---|
0bb0f8b8 | 1 | /** @file\r |
2 | \r | |
a6973cff | 3 | Copyright (c) 2007 - 2009, Intel Corporation\r |
0bb0f8b8 | 4 | All rights reserved. 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 | |
7064c0a5 | 24 | #ifndef _DRIVER_SAMPLE_H_\r |
25 | #define _DRIVER_SAMPLE_H_\r | |
0bb0f8b8 | 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 | \r | |
5c526736 | 35 | #include <Guid/MdeModuleHii.h>\r |
0bb0f8b8 | 36 | #include <Library/DebugLib.h>\r |
cb7d01c0 | 37 | #include <Library/BaseLib.h>\r |
0bb0f8b8 | 38 | #include <Library/BaseMemoryLib.h>\r |
39 | #include <Library/UefiRuntimeServicesTableLib.h>\r | |
40 | #include <Library/UefiDriverEntryPoint.h>\r | |
41 | #include <Library/UefiBootServicesTableLib.h>\r | |
42 | #include <Library/MemoryAllocationLib.h>\r | |
0bb0f8b8 | 43 | #include <Library/HiiLib.h>\r |
f6f910dd | 44 | #include <Library/DevicePathLib.h>\r |
84f9a9ec | 45 | #include <Library/PrintLib.h>\r |
a6973cff | 46 | #include <Library/UefiLib.h>\r |
0bb0f8b8 | 47 | \r |
0bb0f8b8 | 48 | #include "NVDataStruc.h"\r |
49 | \r | |
0bb0f8b8 | 50 | //\r |
51 | // This is the generated IFR binary data for each formset defined in VFR.\r | |
cb7d01c0 | 52 | // This data array is ready to be used as input of HiiAddPackages() to\r |
0bb0f8b8 | 53 | // create a packagelist (which contains Form packages, String packages, etc).\r |
54 | //\r | |
55 | extern UINT8 VfrBin[];\r | |
56 | extern UINT8 InventoryBin[];\r | |
57 | \r | |
58 | //\r | |
59 | // This is the generated String package data for all .UNI files.\r | |
cb7d01c0 | 60 | // This data array is ready to be used as input of HiiAddPackages() to\r |
0bb0f8b8 | 61 | // create a packagelist (which contains Form packages, String packages, etc).\r |
62 | //\r | |
63 | extern UINT8 DriverSampleStrings[];\r | |
64 | \r | |
36dadb8a | 65 | #define DYNAMIC_ONE_OF_VAR_OFFSET OFFSET_OF (DRIVER_SAMPLE_CONFIGURATION, DynamicOneof)\r |
66 | #define DYNAMIC_ORDERED_LIST_VAR_OFFSET OFFSET_OF (DRIVER_SAMPLE_CONFIGURATION, DynamicOrderedList)\r | |
0bb0f8b8 | 67 | \r |
38ebfecb LG |
68 | //\r |
69 | // Number of name in Name/Value storage\r | |
70 | //\r | |
71 | #define NAME_VALUE_NAME_NUMBER 3\r | |
72 | \r | |
f3f2e05d | 73 | #define DRIVER_SAMPLE_PRIVATE_SIGNATURE SIGNATURE_32 ('D', 'S', 'p', 's')\r |
0bb0f8b8 | 74 | \r |
75 | typedef struct {\r | |
76 | UINTN Signature;\r | |
77 | \r | |
78 | EFI_HANDLE DriverHandle[2];\r | |
79 | EFI_HII_HANDLE HiiHandle[2];\r | |
80 | DRIVER_SAMPLE_CONFIGURATION Configuration;\r | |
81 | UINT8 PasswordState;\r | |
82 | \r | |
38ebfecb LG |
83 | //\r |
84 | // Name/Value storage Name list\r | |
85 | //\r | |
86 | EFI_STRING_ID NameStringId[NAME_VALUE_NAME_NUMBER];\r | |
87 | EFI_STRING NameValueName[NAME_VALUE_NAME_NUMBER];\r | |
88 | \r | |
0bb0f8b8 | 89 | //\r |
90 | // Consumed protocol\r | |
91 | //\r | |
92 | EFI_HII_DATABASE_PROTOCOL *HiiDatabase;\r | |
93 | EFI_HII_STRING_PROTOCOL *HiiString;\r | |
94 | EFI_HII_CONFIG_ROUTING_PROTOCOL *HiiConfigRouting;\r | |
95 | EFI_FORM_BROWSER2_PROTOCOL *FormBrowser2;\r | |
96 | \r | |
97 | //\r | |
98 | // Produced protocol\r | |
99 | //\r | |
100 | EFI_HII_CONFIG_ACCESS_PROTOCOL ConfigAccess;\r | |
101 | } DRIVER_SAMPLE_PRIVATE_DATA;\r | |
102 | \r | |
103 | #define DRIVER_SAMPLE_PRIVATE_FROM_THIS(a) CR (a, DRIVER_SAMPLE_PRIVATE_DATA, ConfigAccess, DRIVER_SAMPLE_PRIVATE_SIGNATURE)\r | |
104 | \r | |
f6f910dd | 105 | #pragma pack(1)\r |
106 | \r | |
107 | ///\r | |
108 | /// HII specific Vendor Device Path definition.\r | |
109 | ///\r | |
110 | typedef struct {\r | |
111 | VENDOR_DEVICE_PATH VendorDevicePath;\r | |
112 | EFI_DEVICE_PATH_PROTOCOL End;\r | |
113 | } HII_VENDOR_DEVICE_PATH;\r | |
114 | \r | |
115 | #pragma pack()\r | |
116 | \r | |
0bb0f8b8 | 117 | #endif\r |