]> git.proxmox.com Git - mirror_edk2.git/blame - ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.h
ShellPkg/dh: Modify the dump of UsbIo protocol
[mirror_edk2.git] / ShellPkg / Library / UefiHandleParsingLib / UefiHandleParsingLib.h
CommitLineData
a405b86d 1/** @file\r
2 Provides interface to advanced shell functionality for parsing both handle and protocol database.\r
3\r
4f67a614 4 Copyright (c) 2011 - 2017, 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
4f67a614 156#include <Library/PeCoffGetEntryPointLib.h>\r
a405b86d 157\r
8985d612
TS
158#define EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION_V1 1\r
159#define EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION_V2 2\r
160\r
161///\r
162/// EFI_FIRMWARE_IMAGE_DESCRIPTOR in UEFI spec < 2.4a\r
163///\r
164typedef struct {\r
165 /// \r
166 /// A unique number identifying the firmware image within the device. The number is \r
167 /// between 1 and DescriptorCount.\r
168 /// \r
169 UINT8 ImageIndex;\r
170 ///\r
171 /// A unique number identifying the firmware image type. \r
172 /// \r
173 EFI_GUID ImageTypeId;\r
174 /// \r
175 /// A unique number identifying the firmware image. \r
176 /// \r
177 UINT64 ImageId;\r
178 /// \r
179 /// A pointer to a null-terminated string representing the firmware image name. \r
180 /// \r
181 CHAR16 *ImageIdName;\r
182 /// \r
183 /// Identifies the version of the device firmware. The format is vendor specific and new \r
184 /// version must have a greater value than an old version.\r
185 /// \r
186 UINT32 Version;\r
187 /// \r
188 /// A pointer to a null-terminated string representing the firmware image version name.\r
189 /// \r
190 CHAR16 *VersionName;\r
191 /// \r
192 /// Size of the image in bytes. If size=0, then only ImageIndex and ImageTypeId are valid.\r
193 /// \r
194 UINTN Size;\r
195 /// \r
196 /// Image attributes that are supported by this device. See 'Image Attribute Definitions' \r
197 /// for possible returned values of this parameter. A value of 1 indicates the attribute is \r
198 /// supported and the current setting value is indicated in AttributesSetting. A \r
199 /// value of 0 indicates the attribute is not supported and the current setting value in \r
200 /// AttributesSetting is meaningless.\r
201 /// \r
202 UINT64 AttributesSupported;\r
203 /// \r
204 /// Image attributes. See 'Image Attribute Definitions' for possible returned values of \r
205 /// this parameter.\r
206 /// \r
207 UINT64 AttributesSetting;\r
208 /// \r
209 /// Image compatibilities. See 'Image Compatibility Definitions' for possible returned \r
210 /// values of this parameter.\r
211 /// \r
212 UINT64 Compatibilities;\r
213} EFI_FIRMWARE_IMAGE_DESCRIPTOR_V1;\r
214\r
215\r
216///\r
217/// EFI_FIRMWARE_IMAGE_DESCRIPTOR in UEFI spec > 2.4a and < 2.5\r
218///\r
219typedef struct {\r
220 /// \r
221 /// A unique number identifying the firmware image within the device. The number is \r
222 /// between 1 and DescriptorCount.\r
223 /// \r
224 UINT8 ImageIndex;\r
225 ///\r
226 /// A unique number identifying the firmware image type. \r
227 /// \r
228 EFI_GUID ImageTypeId;\r
229 /// \r
230 /// A unique number identifying the firmware image. \r
231 /// \r
232 UINT64 ImageId;\r
233 /// \r
234 /// A pointer to a null-terminated string representing the firmware image name. \r
235 /// \r
236 CHAR16 *ImageIdName;\r
237 /// \r
238 /// Identifies the version of the device firmware. The format is vendor specific and new \r
239 /// version must have a greater value than an old version.\r
240 /// \r
241 UINT32 Version;\r
242 /// \r
243 /// A pointer to a null-terminated string representing the firmware image version name.\r
244 /// \r
245 CHAR16 *VersionName;\r
246 /// \r
247 /// Size of the image in bytes. If size=0, then only ImageIndex and ImageTypeId are valid.\r
248 /// \r
249 UINTN Size;\r
250 /// \r
251 /// Image attributes that are supported by this device. See 'Image Attribute Definitions' \r
252 /// for possible returned values of this parameter. A value of 1 indicates the attribute is \r
253 /// supported and the current setting value is indicated in AttributesSetting. A \r
254 /// value of 0 indicates the attribute is not supported and the current setting value in \r
255 /// AttributesSetting is meaningless.\r
256 /// \r
257 UINT64 AttributesSupported;\r
258 /// \r
259 /// Image attributes. See 'Image Attribute Definitions' for possible returned values of \r
260 /// this parameter.\r
261 /// \r
262 UINT64 AttributesSetting;\r
263 /// \r
264 /// Image compatibilities. See 'Image Compatibility Definitions' for possible returned \r
265 /// values of this parameter.\r
266 /// \r
267 UINT64 Compatibilities;\r
268 ///\r
269 /// Describes the lowest ImageDescriptor version that the device will accept. Only\r
270 /// present in version 2 or higher.\r
271 UINT32 LowestSupportedImageVersion;\r
272} EFI_FIRMWARE_IMAGE_DESCRIPTOR_V2;\r
273\r
a405b86d 274typedef struct {\r
275 LIST_ENTRY Link;\r
276 EFI_HANDLE TheHandle;\r
277 UINTN TheIndex;\r
278}HANDLE_LIST;\r
279\r
280typedef struct {\r
281 HANDLE_LIST List;\r
282 UINTN NextIndex;\r
283} HANDLE_INDEX_LIST;\r
284\r
285typedef\r
286CHAR16 *\r
287(EFIAPI *DUMP_PROTOCOL_INFO)(\r
288 IN CONST EFI_HANDLE TheHandle,\r
289 IN CONST BOOLEAN Verbose\r
290 );\r
291\r
dee34318 292typedef struct _GUID_INFO_BLOCK{\r
a405b86d 293 EFI_STRING_ID StringId;\r
294 EFI_GUID *GuidId;\r
295 DUMP_PROTOCOL_INFO DumpInfo;\r
dee34318 296} GUID_INFO_BLOCK;\r
a405b86d 297\r
78ed876b 298#endif\r
299\r