2 Provides interface to advanced shell functionality for parsing both handle and protocol database.
4 Copyright (c) 2011 - 2018, 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 SPDX-License-Identifier: BSD-2-Clause-Patent
11 #ifndef _UEFI_HANDLE_PARSING_LIB_INTERNAL_H_
12 #define _UEFI_HANDLE_PARSING_LIB_INTERNAL_H_
16 #include <Guid/FileInfo.h>
17 #include <Guid/ConsoleInDevice.h>
18 #include <Guid/ConsoleOutDevice.h>
19 #include <Guid/StandardErrorDevice.h>
20 #include <Guid/GlobalVariable.h>
22 #include <Guid/FileSystemInfo.h>
23 #include <Guid/ShellLibHiiGuid.h>
25 #include <Protocol/SimpleFileSystem.h>
26 #include <Protocol/LoadedImage.h>
27 #include <Protocol/EfiShellInterface.h>
28 #include <Protocol/EfiShellEnvironment2.h>
29 #include <Protocol/Shell.h>
30 #include <Protocol/ShellParameters.h>
31 #include <Protocol/DevicePathToText.h>
32 #include <Protocol/DriverBinding.h>
33 #include <Protocol/DriverConfiguration2.h>
34 #include <Protocol/DriverConfiguration.h>
35 #include <Protocol/DriverDiagnostics2.h>
36 #include <Protocol/DriverDiagnostics.h>
37 #include <Protocol/ComponentName2.h>
38 #include <Protocol/ComponentName.h>
39 #include <Protocol/PlatformDriverOverride.h>
40 #include <Protocol/DevicePathUtilities.h>
41 #include <Protocol/DevicePathFromText.h>
42 #include <Protocol/BusSpecificDriverOverride.h>
43 #include <Protocol/PlatformToDriverConfiguration.h>
44 #include <Protocol/DriverSupportedEfiVersion.h>
45 #include <Protocol/SimpleTextInEx.h>
46 #include <Protocol/SimplePointer.h>
47 #include <Protocol/SerialIo.h>
48 #include <Protocol/AbsolutePointer.h>
49 #include <Protocol/GraphicsOutput.h>
50 #include <Protocol/EdidDiscovered.h>
51 #include <Protocol/EdidActive.h>
52 #include <Protocol/EdidOverride.h>
53 #include <Protocol/LoadFile.h>
54 #include <Protocol/LoadFile2.h>
55 #include <Protocol/TapeIo.h>
56 #include <Protocol/DiskIo.h>
57 #include <Protocol/BlockIo.h>
58 #include <Protocol/UnicodeCollation.h>
59 #include <Protocol/PciRootBridgeIo.h>
60 #include <Protocol/PciIo.h>
61 #include <Protocol/ScsiPassThru.h>
62 #include <Protocol/ScsiPassThruExt.h>
63 #include <Protocol/ScsiIo.h>
64 #include <Protocol/IScsiInitiatorName.h>
65 #include <Protocol/UsbIo.h>
66 #include <Protocol/UsbHostController.h>
67 #include <Protocol/Usb2HostController.h>
68 #include <Protocol/DebugSupport.h>
69 #include <Protocol/DebugPort.h>
70 #include <Protocol/Decompress.h>
71 #include <Protocol/AcpiTable.h>
72 #include <Protocol/Ebc.h>
73 #include <Protocol/SimpleNetwork.h>
74 #include <Protocol/NetworkInterfaceIdentifier.h>
75 #include <Protocol/PxeBaseCode.h>
76 #include <Protocol/PxeBaseCodeCallBack.h>
77 #include <Protocol/Bis.h>
78 #include <Protocol/ManagedNetwork.h>
79 #include <Protocol/Arp.h>
80 #include <Protocol/Dhcp4.h>
81 #include <Protocol/Tcp4.h>
82 #include <Protocol/Ip4.h>
83 #include <Protocol/Ip4Config.h>
84 #include <Protocol/Ip4Config2.h>
85 #include <Protocol/Udp4.h>
86 #include <Protocol/Mtftp4.h>
87 #include <Protocol/AuthenticationInfo.h>
88 #include <Protocol/Hash.h>
89 #include <Protocol/HiiFont.h>
90 #include <Protocol/HiiString.h>
91 #include <Protocol/HiiImage.h>
92 #include <Protocol/HiiDatabase.h>
93 #include <Protocol/HiiConfigRouting.h>
94 #include <Protocol/HiiConfigAccess.h>
95 #include <Protocol/FormBrowser2.h>
96 #include <Protocol/DeviceIo.h>
97 #include <Protocol/UgaDraw.h>
98 #include <Protocol/UgaIo.h>
99 #include <Protocol/DriverConfiguration.h>
100 #include <Protocol/DriverConfiguration2.h>
101 #include <Protocol/DevicePathUtilities.h>
102 // #include <Protocol/FirmwareVolume.h>
103 // #include <Protocol/FirmwareVolume2.h>
104 #include <Protocol/DriverFamilyOverride.h>
105 #include <Protocol/Pcd.h>
106 #include <Protocol/TcgService.h>
107 #include <Protocol/HiiPackageList.h>
108 #include <Protocol/Ip6.h>
109 #include <Protocol/Ip6Config.h>
110 #include <Protocol/Mtftp6.h>
111 #include <Protocol/Dhcp6.h>
112 #include <Protocol/Udp6.h>
113 #include <Protocol/Tcp6.h>
114 #include <Protocol/VlanConfig.h>
115 #include <Protocol/Eap.h>
116 #include <Protocol/EapManagement.h>
117 #include <Protocol/Ftp4.h>
118 #include <Protocol/IpSecConfig.h>
119 #include <Protocol/DriverHealth.h>
120 #include <Protocol/DeferredImageLoad.h>
121 #include <Protocol/UserCredential.h>
122 #include <Protocol/UserManager.h>
123 #include <Protocol/AtaPassThru.h>
124 #include <Protocol/FirmwareManagement.h>
125 #include <Protocol/IpSec.h>
126 #include <Protocol/Kms.h>
127 #include <Protocol/BlockIo2.h>
128 #include <Protocol/StorageSecurityCommand.h>
129 #include <Protocol/UserCredential2.h>
130 #include <Protocol/IdeControllerInit.h>
131 #include <Protocol/DiskIo2.h>
132 #include <Protocol/AdapterInformation.h>
133 #include <Protocol/ShellDynamicCommand.h>
134 #include <Protocol/DiskInfo.h>
135 #include <Protocol/PartitionInfo.h>
137 #include <Library/HandleParsingLib.h>
138 #include <Library/UefiBootServicesTableLib.h>
139 #include <Library/BaseLib.h>
140 #include <Library/BaseMemoryLib.h>
141 #include <Library/DebugLib.h>
142 #include <Library/MemoryAllocationLib.h>
143 #include <Library/DevicePathLib.h>
144 #include <Library/PcdLib.h>
145 #include <Library/PrintLib.h>
146 #include <Library/UefiLib.h>
147 #include <Library/HiiLib.h>
148 #include <Library/ShellLib.h>
149 #include <Library/SortLib.h>
150 #include <Library/ShellCommandLib.h>
151 #include <Library/PeCoffGetEntryPointLib.h>
153 #define EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION_V1 1
154 #define EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION_V2 2
157 /// EFI_FIRMWARE_IMAGE_DESCRIPTOR in UEFI spec < 2.4a
161 /// A unique number identifying the firmware image within the device. The number is
162 /// between 1 and DescriptorCount.
166 /// A unique number identifying the firmware image type.
168 EFI_GUID ImageTypeId
;
170 /// A unique number identifying the firmware image.
174 /// A pointer to a null-terminated string representing the firmware image name.
178 /// Identifies the version of the device firmware. The format is vendor specific and new
179 /// version must have a greater value than an old version.
183 /// A pointer to a null-terminated string representing the firmware image version name.
187 /// Size of the image in bytes. If size=0, then only ImageIndex and ImageTypeId are valid.
191 /// Image attributes that are supported by this device. See 'Image Attribute Definitions'
192 /// for possible returned values of this parameter. A value of 1 indicates the attribute is
193 /// supported and the current setting value is indicated in AttributesSetting. A
194 /// value of 0 indicates the attribute is not supported and the current setting value in
195 /// AttributesSetting is meaningless.
197 UINT64 AttributesSupported
;
199 /// Image attributes. See 'Image Attribute Definitions' for possible returned values of
202 UINT64 AttributesSetting
;
204 /// Image compatibilities. See 'Image Compatibility Definitions' for possible returned
205 /// values of this parameter.
207 UINT64 Compatibilities
;
208 } EFI_FIRMWARE_IMAGE_DESCRIPTOR_V1
;
211 /// EFI_FIRMWARE_IMAGE_DESCRIPTOR in UEFI spec > 2.4a and < 2.5
215 /// A unique number identifying the firmware image within the device. The number is
216 /// between 1 and DescriptorCount.
220 /// A unique number identifying the firmware image type.
222 EFI_GUID ImageTypeId
;
224 /// A unique number identifying the firmware image.
228 /// A pointer to a null-terminated string representing the firmware image name.
232 /// Identifies the version of the device firmware. The format is vendor specific and new
233 /// version must have a greater value than an old version.
237 /// A pointer to a null-terminated string representing the firmware image version name.
241 /// Size of the image in bytes. If size=0, then only ImageIndex and ImageTypeId are valid.
245 /// Image attributes that are supported by this device. See 'Image Attribute Definitions'
246 /// for possible returned values of this parameter. A value of 1 indicates the attribute is
247 /// supported and the current setting value is indicated in AttributesSetting. A
248 /// value of 0 indicates the attribute is not supported and the current setting value in
249 /// AttributesSetting is meaningless.
251 UINT64 AttributesSupported
;
253 /// Image attributes. See 'Image Attribute Definitions' for possible returned values of
256 UINT64 AttributesSetting
;
258 /// Image compatibilities. See 'Image Compatibility Definitions' for possible returned
259 /// values of this parameter.
261 UINT64 Compatibilities
;
263 /// Describes the lowest ImageDescriptor version that the device will accept. Only
264 /// present in version 2 or higher.
265 UINT32 LowestSupportedImageVersion
;
266 } EFI_FIRMWARE_IMAGE_DESCRIPTOR_V2
;
270 EFI_HANDLE TheHandle
;
281 (EFIAPI
*DUMP_PROTOCOL_INFO
)(
282 IN CONST EFI_HANDLE TheHandle
,
283 IN CONST BOOLEAN Verbose
286 typedef struct _GUID_INFO_BLOCK
{
287 EFI_STRING_ID StringId
;
289 DUMP_PROTOCOL_INFO DumpInfo
;