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