]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.h
ShellPkg: Clean up source files
[mirror_edk2.git] / ShellPkg / Library / UefiHandleParsingLib / UefiHandleParsingLib.h
... / ...
CommitLineData
1/** @file\r
2 Provides interface to advanced shell functionality for parsing both handle and protocol database.\r
3\r
4 Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
5 (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
6 (C) Copyright 2013-2016 Hewlett-Packard Development Company, L.P.<BR>\r
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
17#ifndef _UEFI_HANDLE_PARSING_LIB_INTERNAL_H_\r
18#define _UEFI_HANDLE_PARSING_LIB_INTERNAL_H_\r
19\r
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
29#include <Guid/ShellLibHiiGuid.h>\r
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
35#include <Protocol/Shell.h>\r
36#include <Protocol/ShellParameters.h>\r
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
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
90#include <Protocol/Ip4Config2.h>\r
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
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
136#include <Protocol/IdeControllerInit.h>\r
137#include <Protocol/DiskIo2.h>\r
138#include <Protocol/AdapterInformation.h>\r
139#include <Protocol/ShellDynamicCommand.h>\r
140#include <Protocol/DiskInfo.h>\r
141#include <Protocol/PartitionInfo.h>\r
142\r
143#include <Library/HandleParsingLib.h>\r
144#include <Library/UefiBootServicesTableLib.h>\r
145#include <Library/BaseLib.h>\r
146#include <Library/BaseMemoryLib.h>\r
147#include <Library/DebugLib.h>\r
148#include <Library/MemoryAllocationLib.h>\r
149#include <Library/DevicePathLib.h>\r
150#include <Library/PcdLib.h>\r
151#include <Library/PrintLib.h>\r
152#include <Library/UefiLib.h>\r
153#include <Library/HiiLib.h>\r
154#include <Library/ShellLib.h>\r
155#include <Library/SortLib.h>\r
156#include <Library/ShellCommandLib.h>\r
157#include <Library/PeCoffGetEntryPointLib.h>\r
158\r
159#define EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION_V1 1\r
160#define EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION_V2 2\r
161\r
162///\r
163/// EFI_FIRMWARE_IMAGE_DESCRIPTOR in UEFI spec < 2.4a\r
164///\r
165typedef struct {\r
166 ///\r
167 /// A unique number identifying the firmware image within the device. The number is\r
168 /// between 1 and DescriptorCount.\r
169 ///\r
170 UINT8 ImageIndex;\r
171 ///\r
172 /// A unique number identifying the firmware image type.\r
173 ///\r
174 EFI_GUID ImageTypeId;\r
175 ///\r
176 /// A unique number identifying the firmware image.\r
177 ///\r
178 UINT64 ImageId;\r
179 ///\r
180 /// A pointer to a null-terminated string representing the firmware image name.\r
181 ///\r
182 CHAR16 *ImageIdName;\r
183 ///\r
184 /// Identifies the version of the device firmware. The format is vendor specific and new\r
185 /// version must have a greater value than an old version.\r
186 ///\r
187 UINT32 Version;\r
188 ///\r
189 /// A pointer to a null-terminated string representing the firmware image version name.\r
190 ///\r
191 CHAR16 *VersionName;\r
192 ///\r
193 /// Size of the image in bytes. If size=0, then only ImageIndex and ImageTypeId are valid.\r
194 ///\r
195 UINTN Size;\r
196 ///\r
197 /// Image attributes that are supported by this device. See 'Image Attribute Definitions'\r
198 /// for possible returned values of this parameter. A value of 1 indicates the attribute is\r
199 /// supported and the current setting value is indicated in AttributesSetting. A\r
200 /// value of 0 indicates the attribute is not supported and the current setting value in\r
201 /// AttributesSetting is meaningless.\r
202 ///\r
203 UINT64 AttributesSupported;\r
204 ///\r
205 /// Image attributes. See 'Image Attribute Definitions' for possible returned values of\r
206 /// this parameter.\r
207 ///\r
208 UINT64 AttributesSetting;\r
209 ///\r
210 /// Image compatibilities. See 'Image Compatibility Definitions' for possible returned\r
211 /// values of this parameter.\r
212 ///\r
213 UINT64 Compatibilities;\r
214} EFI_FIRMWARE_IMAGE_DESCRIPTOR_V1;\r
215\r
216\r
217///\r
218/// EFI_FIRMWARE_IMAGE_DESCRIPTOR in UEFI spec > 2.4a and < 2.5\r
219///\r
220typedef struct {\r
221 ///\r
222 /// A unique number identifying the firmware image within the device. The number is\r
223 /// between 1 and DescriptorCount.\r
224 ///\r
225 UINT8 ImageIndex;\r
226 ///\r
227 /// A unique number identifying the firmware image type.\r
228 ///\r
229 EFI_GUID ImageTypeId;\r
230 ///\r
231 /// A unique number identifying the firmware image.\r
232 ///\r
233 UINT64 ImageId;\r
234 ///\r
235 /// A pointer to a null-terminated string representing the firmware image name.\r
236 ///\r
237 CHAR16 *ImageIdName;\r
238 ///\r
239 /// Identifies the version of the device firmware. The format is vendor specific and new\r
240 /// version must have a greater value than an old version.\r
241 ///\r
242 UINT32 Version;\r
243 ///\r
244 /// A pointer to a null-terminated string representing the firmware image version name.\r
245 ///\r
246 CHAR16 *VersionName;\r
247 ///\r
248 /// Size of the image in bytes. If size=0, then only ImageIndex and ImageTypeId are valid.\r
249 ///\r
250 UINTN Size;\r
251 ///\r
252 /// Image attributes that are supported by this device. See 'Image Attribute Definitions'\r
253 /// for possible returned values of this parameter. A value of 1 indicates the attribute is\r
254 /// supported and the current setting value is indicated in AttributesSetting. A\r
255 /// value of 0 indicates the attribute is not supported and the current setting value in\r
256 /// AttributesSetting is meaningless.\r
257 ///\r
258 UINT64 AttributesSupported;\r
259 ///\r
260 /// Image attributes. See 'Image Attribute Definitions' for possible returned values of\r
261 /// this parameter.\r
262 ///\r
263 UINT64 AttributesSetting;\r
264 ///\r
265 /// Image compatibilities. See 'Image Compatibility Definitions' for possible returned\r
266 /// values of this parameter.\r
267 ///\r
268 UINT64 Compatibilities;\r
269 ///\r
270 /// Describes the lowest ImageDescriptor version that the device will accept. Only\r
271 /// present in version 2 or higher.\r
272 UINT32 LowestSupportedImageVersion;\r
273} EFI_FIRMWARE_IMAGE_DESCRIPTOR_V2;\r
274\r
275typedef struct {\r
276 LIST_ENTRY Link;\r
277 EFI_HANDLE TheHandle;\r
278 UINTN TheIndex;\r
279}HANDLE_LIST;\r
280\r
281typedef struct {\r
282 HANDLE_LIST List;\r
283 UINTN NextIndex;\r
284} HANDLE_INDEX_LIST;\r
285\r
286typedef\r
287CHAR16 *\r
288(EFIAPI *DUMP_PROTOCOL_INFO)(\r
289 IN CONST EFI_HANDLE TheHandle,\r
290 IN CONST BOOLEAN Verbose\r
291 );\r
292\r
293typedef struct _GUID_INFO_BLOCK{\r
294 EFI_STRING_ID StringId;\r
295 EFI_GUID *GuidId;\r
296 DUMP_PROTOCOL_INFO DumpInfo;\r
297} GUID_INFO_BLOCK;\r
298\r
299#endif\r
300\r