]>
Commit | Line | Data |
---|---|---|
a405b86d | 1 | /** @file\r |
2 | Provides interface to advanced shell functionality for parsing both handle and protocol database.\r | |
3 | \r | |
28165f24 | 4 | Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>\r |
9b7143c9 LG |
5 | (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r |
6 | (C) Copyright 2013-2016 Hewlett-Packard Development Company, L.P.<BR>\r | |
a405b86d | 7 | This program and the accompanying materials\r |
8 | are licensed and made available under the terms and conditions of the BSD License\r | |
9 | which accompanies this distribution. The full text of the license may be found at\r | |
10 | http://opensource.org/licenses/bsd-license.php\r | |
11 | \r | |
12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
13 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
14 | \r | |
15 | **/\r | |
16 | \r | |
a1d4bfcc | 17 | #ifndef _UEFI_HANDLE_PARSING_LIB_INTERNAL_H_\r |
78ed876b | 18 | #define _UEFI_HANDLE_PARSING_LIB_INTERNAL_H_\r |
19 | \r | |
a405b86d | 20 | #include <Uefi.h>\r |
21 | \r | |
22 | #include <Guid/FileInfo.h>\r | |
23 | #include <Guid/ConsoleInDevice.h>\r | |
24 | #include <Guid/ConsoleOutDevice.h>\r | |
25 | #include <Guid/StandardErrorDevice.h>\r | |
26 | #include <Guid/GlobalVariable.h>\r | |
27 | #include <Guid/Gpt.h>\r | |
28 | #include <Guid/FileSystemInfo.h>\r | |
bca163ff | 29 | #include <Guid/ShellLibHiiGuid.h>\r |
a405b86d | 30 | \r |
31 | #include <Protocol/SimpleFileSystem.h>\r | |
32 | #include <Protocol/LoadedImage.h>\r | |
33 | #include <Protocol/EfiShellInterface.h>\r | |
34 | #include <Protocol/EfiShellEnvironment2.h>\r | |
28165f24 RN |
35 | #include <Protocol/Shell.h>\r |
36 | #include <Protocol/ShellParameters.h>\r | |
a405b86d | 37 | #include <Protocol/DevicePathToText.h>\r |
38 | #include <Protocol/DriverBinding.h>\r | |
39 | #include <Protocol/DriverConfiguration2.h>\r | |
40 | #include <Protocol/DriverConfiguration.h>\r | |
41 | #include <Protocol/DriverDiagnostics2.h>\r | |
42 | #include <Protocol/DriverDiagnostics.h>\r | |
43 | #include <Protocol/ComponentName2.h>\r | |
44 | #include <Protocol/ComponentName.h>\r | |
45 | #include <Protocol/PlatformDriverOverride.h>\r | |
46 | #include <Protocol/DevicePathUtilities.h>\r | |
47 | #include <Protocol/DevicePathFromText.h>\r | |
48 | #include <Protocol/BusSpecificDriverOverride.h>\r | |
49 | #include <Protocol/PlatformToDriverConfiguration.h>\r | |
50 | #include <Protocol/DriverSupportedEfiVersion.h>\r | |
51 | #include <Protocol/SimpleTextInEx.h>\r | |
52 | #include <Protocol/SimplePointer.h>\r | |
53 | #include <Protocol/SerialIo.h>\r | |
54 | #include <Protocol/AbsolutePointer.h>\r | |
55 | #include <Protocol/GraphicsOutput.h>\r | |
56 | #include <Protocol/EdidDiscovered.h>\r | |
57 | #include <Protocol/EdidActive.h>\r | |
58 | #include <Protocol/EdidOverride.h>\r | |
59 | #include <Protocol/LoadFile.h>\r | |
60 | #include <Protocol/LoadFile2.h>\r | |
a405b86d | 61 | #include <Protocol/TapeIo.h>\r |
62 | #include <Protocol/DiskIo.h>\r | |
63 | #include <Protocol/BlockIo.h>\r | |
64 | #include <Protocol/UnicodeCollation.h>\r | |
65 | #include <Protocol/PciRootBridgeIo.h>\r | |
66 | #include <Protocol/PciIo.h>\r | |
67 | #include <Protocol/ScsiPassThru.h>\r | |
68 | #include <Protocol/ScsiPassThruExt.h>\r | |
69 | #include <Protocol/ScsiIo.h>\r | |
70 | #include <Protocol/IScsiInitiatorName.h>\r | |
71 | #include <Protocol/UsbIo.h>\r | |
72 | #include <Protocol/UsbHostController.h>\r | |
73 | #include <Protocol/Usb2HostController.h>\r | |
74 | #include <Protocol/DebugSupport.h>\r | |
75 | #include <Protocol/DebugPort.h>\r | |
76 | #include <Protocol/Decompress.h>\r | |
77 | #include <Protocol/AcpiTable.h>\r | |
78 | #include <Protocol/Ebc.h>\r | |
79 | #include <Protocol/SimpleNetwork.h>\r | |
80 | #include <Protocol/NetworkInterfaceIdentifier.h>\r | |
81 | #include <Protocol/PxeBaseCode.h>\r | |
82 | #include <Protocol/PxeBaseCodeCallBack.h>\r | |
83 | #include <Protocol/Bis.h>\r | |
84 | #include <Protocol/ManagedNetwork.h>\r | |
85 | #include <Protocol/Arp.h>\r | |
86 | #include <Protocol/Dhcp4.h>\r | |
87 | #include <Protocol/Tcp4.h>\r | |
88 | #include <Protocol/Ip4.h>\r | |
89 | #include <Protocol/Ip4Config.h>\r | |
00a6ad1b | 90 | #include <Protocol/Ip4Config2.h>\r |
a405b86d | 91 | #include <Protocol/Udp4.h>\r |
92 | #include <Protocol/Mtftp4.h>\r | |
93 | #include <Protocol/AuthenticationInfo.h>\r | |
94 | #include <Protocol/Hash.h>\r | |
95 | #include <Protocol/HiiFont.h>\r | |
96 | #include <Protocol/HiiString.h>\r | |
97 | #include <Protocol/HiiImage.h>\r | |
98 | #include <Protocol/HiiDatabase.h>\r | |
99 | #include <Protocol/HiiConfigRouting.h>\r | |
100 | #include <Protocol/HiiConfigAccess.h>\r | |
101 | #include <Protocol/FormBrowser2.h>\r | |
102 | #include <Protocol/DeviceIo.h>\r | |
103 | #include <Protocol/UgaDraw.h>\r | |
104 | #include <Protocol/UgaIo.h>\r | |
105 | #include <Protocol/DriverConfiguration.h>\r | |
106 | #include <Protocol/DriverConfiguration2.h>\r | |
107 | #include <Protocol/DevicePathUtilities.h>\r | |
108 | //#include <Protocol/FirmwareVolume.h>\r | |
109 | //#include <Protocol/FirmwareVolume2.h>\r | |
dee34318 | 110 | #include <Protocol/DriverFamilyOverride.h>\r |
111 | #include <Protocol/Pcd.h>\r | |
112 | #include <Protocol/TcgService.h>\r | |
113 | #include <Protocol/HiiPackageList.h>\r | |
114 | #include <Protocol/Ip6.h>\r | |
115 | #include <Protocol/Ip6Config.h>\r | |
116 | #include <Protocol/Mtftp6.h>\r | |
117 | #include <Protocol/Dhcp6.h>\r | |
118 | #include <Protocol/Udp6.h>\r | |
119 | #include <Protocol/Tcp6.h>\r | |
120 | #include <Protocol/VlanConfig.h>\r | |
121 | #include <Protocol/Eap.h>\r | |
122 | #include <Protocol/EapManagement.h>\r | |
123 | #include <Protocol/Ftp4.h>\r | |
124 | #include <Protocol/IpSecConfig.h>\r | |
125 | #include <Protocol/DriverHealth.h>\r | |
126 | #include <Protocol/DeferredImageLoad.h>\r | |
127 | #include <Protocol/UserCredential.h>\r | |
128 | #include <Protocol/UserManager.h>\r | |
129 | #include <Protocol/AtaPassThru.h>\r | |
130 | #include <Protocol/FirmwareManagement.h>\r | |
131 | #include <Protocol/IpSec.h>\r | |
132 | #include <Protocol/Kms.h>\r | |
133 | #include <Protocol/BlockIo2.h>\r | |
134 | #include <Protocol/StorageSecurityCommand.h>\r | |
135 | #include <Protocol/UserCredential2.h>\r | |
6b640b4a | 136 | #include <Protocol/IdeControllerInit.h>\r |
28cdb62b | 137 | #include <Protocol/DiskIo2.h>\r |
0fb7e718 | 138 | #include <Protocol/AdapterInformation.h>\r |
28165f24 | 139 | #include <Protocol/ShellDynamicCommand.h>\r |
4024c116 | 140 | #include <Protocol/DiskInfo.h>\r |
a405b86d | 141 | \r |
142 | #include <Library/HandleParsingLib.h>\r | |
143 | #include <Library/UefiBootServicesTableLib.h>\r | |
144 | #include <Library/BaseLib.h>\r | |
145 | #include <Library/BaseMemoryLib.h>\r | |
146 | #include <Library/DebugLib.h>\r | |
147 | #include <Library/MemoryAllocationLib.h>\r | |
148 | #include <Library/DevicePathLib.h>\r | |
149 | #include <Library/PcdLib.h>\r | |
150 | #include <Library/PrintLib.h>\r | |
151 | #include <Library/UefiLib.h>\r | |
152 | #include <Library/HiiLib.h>\r | |
153 | #include <Library/ShellLib.h>\r | |
28cdb62b | 154 | #include <Library/SortLib.h>\r |
9b7143c9 | 155 | #include <Library/ShellCommandLib.h>\r |
a405b86d | 156 | \r |
8985d612 TS |
157 | #define EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION_V1 1\r |
158 | #define EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION_V2 2\r | |
159 | \r | |
160 | ///\r | |
161 | /// EFI_FIRMWARE_IMAGE_DESCRIPTOR in UEFI spec < 2.4a\r | |
162 | ///\r | |
163 | typedef struct {\r | |
164 | /// \r | |
165 | /// A unique number identifying the firmware image within the device. The number is \r | |
166 | /// between 1 and DescriptorCount.\r | |
167 | /// \r | |
168 | UINT8 ImageIndex;\r | |
169 | ///\r | |
170 | /// A unique number identifying the firmware image type. \r | |
171 | /// \r | |
172 | EFI_GUID ImageTypeId;\r | |
173 | /// \r | |
174 | /// A unique number identifying the firmware image. \r | |
175 | /// \r | |
176 | UINT64 ImageId;\r | |
177 | /// \r | |
178 | /// A pointer to a null-terminated string representing the firmware image name. \r | |
179 | /// \r | |
180 | CHAR16 *ImageIdName;\r | |
181 | /// \r | |
182 | /// Identifies the version of the device firmware. The format is vendor specific and new \r | |
183 | /// version must have a greater value than an old version.\r | |
184 | /// \r | |
185 | UINT32 Version;\r | |
186 | /// \r | |
187 | /// A pointer to a null-terminated string representing the firmware image version name.\r | |
188 | /// \r | |
189 | CHAR16 *VersionName;\r | |
190 | /// \r | |
191 | /// Size of the image in bytes. If size=0, then only ImageIndex and ImageTypeId are valid.\r | |
192 | /// \r | |
193 | UINTN Size;\r | |
194 | /// \r | |
195 | /// Image attributes that are supported by this device. See 'Image Attribute Definitions' \r | |
196 | /// for possible returned values of this parameter. A value of 1 indicates the attribute is \r | |
197 | /// supported and the current setting value is indicated in AttributesSetting. A \r | |
198 | /// value of 0 indicates the attribute is not supported and the current setting value in \r | |
199 | /// AttributesSetting is meaningless.\r | |
200 | /// \r | |
201 | UINT64 AttributesSupported;\r | |
202 | /// \r | |
203 | /// Image attributes. See 'Image Attribute Definitions' for possible returned values of \r | |
204 | /// this parameter.\r | |
205 | /// \r | |
206 | UINT64 AttributesSetting;\r | |
207 | /// \r | |
208 | /// Image compatibilities. See 'Image Compatibility Definitions' for possible returned \r | |
209 | /// values of this parameter.\r | |
210 | /// \r | |
211 | UINT64 Compatibilities;\r | |
212 | } EFI_FIRMWARE_IMAGE_DESCRIPTOR_V1;\r | |
213 | \r | |
214 | \r | |
215 | ///\r | |
216 | /// EFI_FIRMWARE_IMAGE_DESCRIPTOR in UEFI spec > 2.4a and < 2.5\r | |
217 | ///\r | |
218 | typedef struct {\r | |
219 | /// \r | |
220 | /// A unique number identifying the firmware image within the device. The number is \r | |
221 | /// between 1 and DescriptorCount.\r | |
222 | /// \r | |
223 | UINT8 ImageIndex;\r | |
224 | ///\r | |
225 | /// A unique number identifying the firmware image type. \r | |
226 | /// \r | |
227 | EFI_GUID ImageTypeId;\r | |
228 | /// \r | |
229 | /// A unique number identifying the firmware image. \r | |
230 | /// \r | |
231 | UINT64 ImageId;\r | |
232 | /// \r | |
233 | /// A pointer to a null-terminated string representing the firmware image name. \r | |
234 | /// \r | |
235 | CHAR16 *ImageIdName;\r | |
236 | /// \r | |
237 | /// Identifies the version of the device firmware. The format is vendor specific and new \r | |
238 | /// version must have a greater value than an old version.\r | |
239 | /// \r | |
240 | UINT32 Version;\r | |
241 | /// \r | |
242 | /// A pointer to a null-terminated string representing the firmware image version name.\r | |
243 | /// \r | |
244 | CHAR16 *VersionName;\r | |
245 | /// \r | |
246 | /// Size of the image in bytes. If size=0, then only ImageIndex and ImageTypeId are valid.\r | |
247 | /// \r | |
248 | UINTN Size;\r | |
249 | /// \r | |
250 | /// Image attributes that are supported by this device. See 'Image Attribute Definitions' \r | |
251 | /// for possible returned values of this parameter. A value of 1 indicates the attribute is \r | |
252 | /// supported and the current setting value is indicated in AttributesSetting. A \r | |
253 | /// value of 0 indicates the attribute is not supported and the current setting value in \r | |
254 | /// AttributesSetting is meaningless.\r | |
255 | /// \r | |
256 | UINT64 AttributesSupported;\r | |
257 | /// \r | |
258 | /// Image attributes. See 'Image Attribute Definitions' for possible returned values of \r | |
259 | /// this parameter.\r | |
260 | /// \r | |
261 | UINT64 AttributesSetting;\r | |
262 | /// \r | |
263 | /// Image compatibilities. See 'Image Compatibility Definitions' for possible returned \r | |
264 | /// values of this parameter.\r | |
265 | /// \r | |
266 | UINT64 Compatibilities;\r | |
267 | ///\r | |
268 | /// Describes the lowest ImageDescriptor version that the device will accept. Only\r | |
269 | /// present in version 2 or higher.\r | |
270 | UINT32 LowestSupportedImageVersion;\r | |
271 | } EFI_FIRMWARE_IMAGE_DESCRIPTOR_V2;\r | |
272 | \r | |
a405b86d | 273 | typedef struct {\r |
274 | LIST_ENTRY Link;\r | |
275 | EFI_HANDLE TheHandle;\r | |
276 | UINTN TheIndex;\r | |
277 | }HANDLE_LIST;\r | |
278 | \r | |
279 | typedef struct {\r | |
280 | HANDLE_LIST List;\r | |
281 | UINTN NextIndex;\r | |
282 | } HANDLE_INDEX_LIST;\r | |
283 | \r | |
284 | typedef\r | |
285 | CHAR16 *\r | |
286 | (EFIAPI *DUMP_PROTOCOL_INFO)(\r | |
287 | IN CONST EFI_HANDLE TheHandle,\r | |
288 | IN CONST BOOLEAN Verbose\r | |
289 | );\r | |
290 | \r | |
dee34318 | 291 | typedef struct _GUID_INFO_BLOCK{\r |
a405b86d | 292 | EFI_STRING_ID StringId;\r |
293 | EFI_GUID *GuidId;\r | |
294 | DUMP_PROTOCOL_INFO DumpInfo;\r | |
dee34318 | 295 | } GUID_INFO_BLOCK;\r |
a405b86d | 296 | \r |
78ed876b | 297 | #endif\r |
298 | \r |