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