VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.h@ 77662

Last change on this file since 77662 was 77662, checked in by vboxsync, 6 years ago

EFI: First step in UDK2018 merge. Does not build yet.

  • Property svn:eol-style set to native
File size: 10.1 KB
Line 
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#include <Protocol/PartitionInfo.h>
142
143#include <Library/HandleParsingLib.h>
144#include <Library/UefiBootServicesTableLib.h>
145#include <Library/BaseLib.h>
146#include <Library/BaseMemoryLib.h>
147#include <Library/DebugLib.h>
148#include <Library/MemoryAllocationLib.h>
149#include <Library/DevicePathLib.h>
150#include <Library/PcdLib.h>
151#include <Library/PrintLib.h>
152#include <Library/UefiLib.h>
153#include <Library/HiiLib.h>
154#include <Library/ShellLib.h>
155#include <Library/SortLib.h>
156#include <Library/ShellCommandLib.h>
157#include <Library/PeCoffGetEntryPointLib.h>
158
159#define EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION_V1 1
160#define EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION_V2 2
161
162///
163/// EFI_FIRMWARE_IMAGE_DESCRIPTOR in UEFI spec < 2.4a
164///
165typedef struct {
166 ///
167 /// A unique number identifying the firmware image within the device. The number is
168 /// between 1 and DescriptorCount.
169 ///
170 UINT8 ImageIndex;
171 ///
172 /// A unique number identifying the firmware image type.
173 ///
174 EFI_GUID ImageTypeId;
175 ///
176 /// A unique number identifying the firmware image.
177 ///
178 UINT64 ImageId;
179 ///
180 /// A pointer to a null-terminated string representing the firmware image name.
181 ///
182 CHAR16 *ImageIdName;
183 ///
184 /// Identifies the version of the device firmware. The format is vendor specific and new
185 /// version must have a greater value than an old version.
186 ///
187 UINT32 Version;
188 ///
189 /// A pointer to a null-terminated string representing the firmware image version name.
190 ///
191 CHAR16 *VersionName;
192 ///
193 /// Size of the image in bytes. If size=0, then only ImageIndex and ImageTypeId are valid.
194 ///
195 UINTN Size;
196 ///
197 /// Image attributes that are supported by this device. See 'Image Attribute Definitions'
198 /// for possible returned values of this parameter. A value of 1 indicates the attribute is
199 /// supported and the current setting value is indicated in AttributesSetting. A
200 /// value of 0 indicates the attribute is not supported and the current setting value in
201 /// AttributesSetting is meaningless.
202 ///
203 UINT64 AttributesSupported;
204 ///
205 /// Image attributes. See 'Image Attribute Definitions' for possible returned values of
206 /// this parameter.
207 ///
208 UINT64 AttributesSetting;
209 ///
210 /// Image compatibilities. See 'Image Compatibility Definitions' for possible returned
211 /// values of this parameter.
212 ///
213 UINT64 Compatibilities;
214} EFI_FIRMWARE_IMAGE_DESCRIPTOR_V1;
215
216
217///
218/// EFI_FIRMWARE_IMAGE_DESCRIPTOR in UEFI spec > 2.4a and < 2.5
219///
220typedef struct {
221 ///
222 /// A unique number identifying the firmware image within the device. The number is
223 /// between 1 and DescriptorCount.
224 ///
225 UINT8 ImageIndex;
226 ///
227 /// A unique number identifying the firmware image type.
228 ///
229 EFI_GUID ImageTypeId;
230 ///
231 /// A unique number identifying the firmware image.
232 ///
233 UINT64 ImageId;
234 ///
235 /// A pointer to a null-terminated string representing the firmware image name.
236 ///
237 CHAR16 *ImageIdName;
238 ///
239 /// Identifies the version of the device firmware. The format is vendor specific and new
240 /// version must have a greater value than an old version.
241 ///
242 UINT32 Version;
243 ///
244 /// A pointer to a null-terminated string representing the firmware image version name.
245 ///
246 CHAR16 *VersionName;
247 ///
248 /// Size of the image in bytes. If size=0, then only ImageIndex and ImageTypeId are valid.
249 ///
250 UINTN Size;
251 ///
252 /// Image attributes that are supported by this device. See 'Image Attribute Definitions'
253 /// for possible returned values of this parameter. A value of 1 indicates the attribute is
254 /// supported and the current setting value is indicated in AttributesSetting. A
255 /// value of 0 indicates the attribute is not supported and the current setting value in
256 /// AttributesSetting is meaningless.
257 ///
258 UINT64 AttributesSupported;
259 ///
260 /// Image attributes. See 'Image Attribute Definitions' for possible returned values of
261 /// this parameter.
262 ///
263 UINT64 AttributesSetting;
264 ///
265 /// Image compatibilities. See 'Image Compatibility Definitions' for possible returned
266 /// values of this parameter.
267 ///
268 UINT64 Compatibilities;
269 ///
270 /// Describes the lowest ImageDescriptor version that the device will accept. Only
271 /// present in version 2 or higher.
272 UINT32 LowestSupportedImageVersion;
273} EFI_FIRMWARE_IMAGE_DESCRIPTOR_V2;
274
275typedef struct {
276 LIST_ENTRY Link;
277 EFI_HANDLE TheHandle;
278 UINTN TheIndex;
279}HANDLE_LIST;
280
281typedef struct {
282 HANDLE_LIST List;
283 UINTN NextIndex;
284} HANDLE_INDEX_LIST;
285
286typedef
287CHAR16 *
288(EFIAPI *DUMP_PROTOCOL_INFO)(
289 IN CONST EFI_HANDLE TheHandle,
290 IN CONST BOOLEAN Verbose
291 );
292
293typedef struct _GUID_INFO_BLOCK{
294 EFI_STRING_ID StringId;
295 EFI_GUID *GuidId;
296 DUMP_PROTOCOL_INFO DumpInfo;
297} GUID_INFO_BLOCK;
298
299#endif
300
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette