]>
Commit | Line | Data |
---|---|---|
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 | |
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 |
770f3f61 | 141 | #include <Protocol/PartitionInfo.h>\r |
a405b86d | 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 | |
28cdb62b | 155 | #include <Library/SortLib.h>\r |
9b7143c9 | 156 | #include <Library/ShellCommandLib.h>\r |
4f67a614 | 157 | #include <Library/PeCoffGetEntryPointLib.h>\r |
a405b86d | 158 | \r |
8985d612 TS |
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 | |
165 | typedef struct {\r | |
ba0014b9 LG |
166 | ///\r |
167 | /// A unique number identifying the firmware image within the device. The number is\r | |
8985d612 | 168 | /// between 1 and DescriptorCount.\r |
ba0014b9 | 169 | ///\r |
8985d612 TS |
170 | UINT8 ImageIndex;\r |
171 | ///\r | |
ba0014b9 LG |
172 | /// A unique number identifying the firmware image type.\r |
173 | ///\r | |
8985d612 | 174 | EFI_GUID ImageTypeId;\r |
ba0014b9 LG |
175 | ///\r |
176 | /// A unique number identifying the firmware image.\r | |
177 | ///\r | |
8985d612 | 178 | UINT64 ImageId;\r |
ba0014b9 LG |
179 | ///\r |
180 | /// A pointer to a null-terminated string representing the firmware image name.\r | |
181 | ///\r | |
8985d612 | 182 | CHAR16 *ImageIdName;\r |
ba0014b9 LG |
183 | ///\r |
184 | /// Identifies the version of the device firmware. The format is vendor specific and new\r | |
8985d612 | 185 | /// version must have a greater value than an old version.\r |
ba0014b9 | 186 | ///\r |
8985d612 | 187 | UINT32 Version;\r |
ba0014b9 | 188 | ///\r |
8985d612 | 189 | /// A pointer to a null-terminated string representing the firmware image version name.\r |
ba0014b9 | 190 | ///\r |
8985d612 | 191 | CHAR16 *VersionName;\r |
ba0014b9 | 192 | ///\r |
8985d612 | 193 | /// Size of the image in bytes. If size=0, then only ImageIndex and ImageTypeId are valid.\r |
ba0014b9 | 194 | ///\r |
8985d612 | 195 | UINTN Size;\r |
ba0014b9 LG |
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 | |
8985d612 | 201 | /// AttributesSetting is meaningless.\r |
ba0014b9 | 202 | ///\r |
8985d612 | 203 | UINT64 AttributesSupported;\r |
ba0014b9 LG |
204 | ///\r |
205 | /// Image attributes. See 'Image Attribute Definitions' for possible returned values of\r | |
8985d612 | 206 | /// this parameter.\r |
ba0014b9 | 207 | ///\r |
8985d612 | 208 | UINT64 AttributesSetting;\r |
ba0014b9 LG |
209 | ///\r |
210 | /// Image compatibilities. See 'Image Compatibility Definitions' for possible returned\r | |
8985d612 | 211 | /// values of this parameter.\r |
ba0014b9 | 212 | ///\r |
8985d612 TS |
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 | |
220 | typedef struct {\r | |
ba0014b9 LG |
221 | ///\r |
222 | /// A unique number identifying the firmware image within the device. The number is\r | |
8985d612 | 223 | /// between 1 and DescriptorCount.\r |
ba0014b9 | 224 | ///\r |
8985d612 TS |
225 | UINT8 ImageIndex;\r |
226 | ///\r | |
ba0014b9 LG |
227 | /// A unique number identifying the firmware image type.\r |
228 | ///\r | |
8985d612 | 229 | EFI_GUID ImageTypeId;\r |
ba0014b9 LG |
230 | ///\r |
231 | /// A unique number identifying the firmware image.\r | |
232 | ///\r | |
8985d612 | 233 | UINT64 ImageId;\r |
ba0014b9 LG |
234 | ///\r |
235 | /// A pointer to a null-terminated string representing the firmware image name.\r | |
236 | ///\r | |
8985d612 | 237 | CHAR16 *ImageIdName;\r |
ba0014b9 LG |
238 | ///\r |
239 | /// Identifies the version of the device firmware. The format is vendor specific and new\r | |
8985d612 | 240 | /// version must have a greater value than an old version.\r |
ba0014b9 | 241 | ///\r |
8985d612 | 242 | UINT32 Version;\r |
ba0014b9 | 243 | ///\r |
8985d612 | 244 | /// A pointer to a null-terminated string representing the firmware image version name.\r |
ba0014b9 | 245 | ///\r |
8985d612 | 246 | CHAR16 *VersionName;\r |
ba0014b9 | 247 | ///\r |
8985d612 | 248 | /// Size of the image in bytes. If size=0, then only ImageIndex and ImageTypeId are valid.\r |
ba0014b9 | 249 | ///\r |
8985d612 | 250 | UINTN Size;\r |
ba0014b9 LG |
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 | |
8985d612 | 256 | /// AttributesSetting is meaningless.\r |
ba0014b9 | 257 | ///\r |
8985d612 | 258 | UINT64 AttributesSupported;\r |
ba0014b9 LG |
259 | ///\r |
260 | /// Image attributes. See 'Image Attribute Definitions' for possible returned values of\r | |
8985d612 | 261 | /// this parameter.\r |
ba0014b9 | 262 | ///\r |
8985d612 | 263 | UINT64 AttributesSetting;\r |
ba0014b9 LG |
264 | ///\r |
265 | /// Image compatibilities. See 'Image Compatibility Definitions' for possible returned\r | |
8985d612 | 266 | /// values of this parameter.\r |
ba0014b9 | 267 | ///\r |
8985d612 TS |
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 | |
a405b86d | 275 | typedef struct {\r |
276 | LIST_ENTRY Link;\r | |
277 | EFI_HANDLE TheHandle;\r | |
278 | UINTN TheIndex;\r | |
279 | }HANDLE_LIST;\r | |
280 | \r | |
281 | typedef struct {\r | |
282 | HANDLE_LIST List;\r | |
283 | UINTN NextIndex;\r | |
284 | } HANDLE_INDEX_LIST;\r | |
285 | \r | |
286 | typedef\r | |
287 | CHAR16 *\r | |
288 | (EFIAPI *DUMP_PROTOCOL_INFO)(\r | |
289 | IN CONST EFI_HANDLE TheHandle,\r | |
290 | IN CONST BOOLEAN Verbose\r | |
291 | );\r | |
292 | \r | |
dee34318 | 293 | typedef struct _GUID_INFO_BLOCK{\r |
a405b86d | 294 | EFI_STRING_ID StringId;\r |
295 | EFI_GUID *GuidId;\r | |
296 | DUMP_PROTOCOL_INFO DumpInfo;\r | |
dee34318 | 297 | } GUID_INFO_BLOCK;\r |
a405b86d | 298 | \r |
78ed876b | 299 | #endif\r |
300 | \r |