]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/FirmwareManagement.h
IntelFrameworkModulePkg: INF/DEC file updates to EDK II packages
[mirror_edk2.git] / MdePkg / Include / Protocol / FirmwareManagement.h
CommitLineData
252b9c7a 1/** @file\r
2 UEFI Firmware Management Protocol definition\r
3 Firmware Management Protocol provides an abstraction for device to provide firmware \r
4 management support. The base requirements for managing device firmware images include \r
5 identifying firmware image revision level and programming the image into the device.\r
6\r
7 GetImageInfo() is the only required function. GetImage(), SetImage(), \r
8 CheckImage(), GetPackageInfo(), and SetPackageInfo() shall return \r
9 EFI_UNSUPPORTED if not supported by the driver.\r
10 \r
9938c13d 11 Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
9df063a0 12 This program and the accompanying materials \r
252b9c7a 13 are licensed and made available under the terms and conditions of the BSD License \r
14 which accompanies this distribution. The full text of the license may be found at \r
15 http://opensource.org/licenses/bsd-license.php \r
16\r
17 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
18 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
19\r
20 @par Revision Reference: \r
21 This Protocol is introduced in UEFI Specification 2.3 \r
22\r
23**/\r
24\r
25#ifndef __EFI_FIRMWARE_MANAGEMENT_PROTOCOL_H__\r
26#define __EFI_FIRMWARE_MANAGEMENT_PROTOCOL_H__\r
27\r
28\r
29#define EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GUID \\r
30 { \\r
31 0x86c77a67, 0xb97, 0x4633, {0xa1, 0x87, 0x49, 0x10, 0x4d, 0x6, 0x85, 0xc7 } \\r
32 }\r
33\r
34typedef struct _EFI_FIRMWARE_MANAGEMENT_PROTOCOL EFI_FIRMWARE_MANAGEMENT_PROTOCOL;\r
35\r
36///\r
37/// EFI_FIRMWARE_IMAGE_DESCRIPTOR\r
38///\r
39typedef struct {\r
40 /// \r
41 /// A unique number identifying the firmware image within the device. The number is \r
42 /// between 1 and DescriptorCount.\r
43 /// \r
44 UINT8 ImageIndex;\r
45 ///\r
46 /// A unique number identifying the firmware image type. \r
47 /// \r
48 EFI_GUID ImageTypeId;\r
49 /// \r
50 /// A unique number identifying the firmware image. \r
51 /// \r
52 UINT64 ImageId;\r
53 /// \r
4f077902 54 /// A pointer to a null-terminated string representing the firmware image name. \r
252b9c7a 55 /// \r
56 CHAR16 *ImageIdName;\r
57 /// \r
58 /// Identifies the version of the device firmware. The format is vendor specific and new \r
59 /// version must have a greater value than an old version.\r
60 /// \r
61 UINT32 Version;\r
62 /// \r
4f077902 63 /// A pointer to a null-terminated string representing the firmware image version name.\r
252b9c7a 64 /// \r
65 CHAR16 *VersionName;\r
66 /// \r
67 /// Size of the image in bytes. If size=0, then only ImageIndex and ImageTypeId are valid.\r
68 /// \r
69 UINTN Size;\r
70 /// \r
71 /// Image attributes that are supported by this device. See 'Image Attribute Definitions' \r
72 /// for possible returned values of this parameter. A value of 1 indicates the attribute is \r
73 /// supported and the current setting value is indicated in AttributesSetting. A \r
74 /// value of 0 indicates the attribute is not supported and the current setting value in \r
75 /// AttributesSetting is meaningless.\r
76 /// \r
77 UINT64 AttributesSupported;\r
78 /// \r
79 /// Image attributes. See 'Image Attribute Definitions' for possible returned values of \r
80 /// this parameter.\r
81 /// \r
82 UINT64 AttributesSetting;\r
83 /// \r
84 /// Image compatibilities. See 'Image Compatibility Definitions' for possible returned \r
85 /// values of this parameter.\r
86 /// \r
87 UINT64 Compatibilities;\r
7076ecdb
SQ
88 ///\r
89 /// Describes the lowest ImageDescriptor version that the device will accept. Only\r
90 /// present in version 2 or higher.\r
91 ///\r
92 UINT32 LowestSupportedImageVersion;\r
252b9c7a 93} EFI_FIRMWARE_IMAGE_DESCRIPTOR;\r
94\r
95\r
96//\r
97// Image Attribute Definitions\r
98//\r
99///\r
100/// The attribute IMAGE_ATTRIBUTE_IMAGE_UPDATABLE indicates this device supports firmware \r
101/// image update.\r
102///\r
103#define IMAGE_ATTRIBUTE_IMAGE_UPDATABLE 0x0000000000000001\r
104///\r
105/// The attribute IMAGE_ATTRIBUTE_RESET_REQUIRED indicates a reset of the device is required \r
106/// for the new firmware image to take effect after a firmware update. The device is the device hosting \r
107/// the firmware image.\r
108/// \r
109#define IMAGE_ATTRIBUTE_RESET_REQUIRED 0x0000000000000002\r
110///\r
111/// The attribute IMAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED indicates authentication is \r
112/// required to perform the following image operations: GetImage(), SetImage(), and \r
113/// CheckImage(). See 'Image Attribute - Authentication'.\r
114/// \r
115#define IMAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED 0x0000000000000004\r
116///\r
117/// The attribute IMAGE_ATTRIBUTE_IN_USE indicates the current state of the firmware image. \r
118/// This distinguishes firmware images in a device that supports redundant images. \r
119/// \r
120#define IMAGE_ATTRIBUTE_IN_USE 0x0000000000000008\r
121\r
122\r
123//\r
124// Image Compatibility Definitions\r
125//\r
126/// Values from 0x0000000000000002 thru 0x000000000000FFFF are reserved for future assignments.\r
127/// Values from 0x0000000000010000 thru 0xFFFFFFFFFFFFFFFF are used by firmware vendor for \r
128/// compatibility check.\r
129///\r
130#define IMAGE_COMPATIBILITY_CHECK_SUPPORTED 0x0000000000000001\r
131\r
132///\r
9938c13d 133/// Descriptor Version exposed by GetImageInfo() function\r
252b9c7a 134///\r
7076ecdb 135#define EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION 2\r
252b9c7a 136\r
137\r
138///\r
fa3e7746 139/// Image Attribute -Authentication Required\r
252b9c7a 140///\r
141typedef struct {\r
142 ///\r
143 /// It is included in the signature of AuthInfo. It is used to ensure freshness/no replay. \r
144 /// It is incremented during each firmware image operation. \r
145 /// \r
146 UINT64 MonotonicCount;\r
147 ///\r
148 /// Provides the authorization for the firmware image operations. It is a signature across \r
149 /// the image data and the Monotonic Count value. Caller uses the private key that is \r
150 /// associated with a public key that has been provisioned via the key exchange. \r
9938c13d
LG
151 /// Because this is defined as a signature, WIN_CERTIFICATE_UEFI_GUID.CertType must\r
152 /// be EFI_CERT_TYPE_PKCS7_GUID.\r
252b9c7a 153 ///\r
154 WIN_CERTIFICATE_UEFI_GUID AuthInfo;\r
155} EFI_FIRMWARE_IMAGE_AUTHENTICATION;\r
156\r
157\r
158//\r
159// ImageUpdatable Definitions\r
160//\r
161///\r
162/// IMAGE_UPDATABLE_VALID indicates SetImage() will accept the new image and update the \r
163/// device with the new image.\r
164///\r
165#define IMAGE_UPDATABLE_VALID 0x0000000000000001\r
166///\r
167/// IMAGE_UPDATABLE_INVALID indicates SetImage() will reject the new image. No additional \r
168/// information is provided for the rejection.\r
169///\r
170#define IMAGE_UPDATABLE_INVALID 0x0000000000000002\r
171///\r
172/// IMAGE_UPDATABLE_INVALID_TYPE indicates SetImage() will reject the new image. The \r
173/// rejection is due to the new image is not a firmware image recognized for this device.\r
174///\r
175#define IMAGE_UPDATABLE_INVALID_TYPE 0x0000000000000004\r
176///\r
177/// IMAGE_UPDATABLE_INVALID_OLD indicates SetImage() will reject the new image. The \r
178/// rejection is due to the new image version is older than the current firmware image\r
179/// version in the device. The device firmware update policy does not support firmware \r
180/// version downgrade.\r
181///\r
182#define IMAGE_UPDATABLE_INVALID_OLD 0x0000000000000008\r
183\r
184\r
185//\r
186// Package Attribute Definitions\r
187//\r
188///\r
189/// The attribute PACKAGE_ATTRIBUTE_VERSION_UPDATABLE indicates this device supports the \r
190/// update of the firmware package version.\r
191///\r
192#define PACKAGE_ATTRIBUTE_VERSION_UPDATABLE 0x0000000000000001\r
193///\r
194/// The attribute PACKAGE_ATTRIBUTE_RESET_REQUIRED indicates a reset of the device is \r
195/// required for the new package info to take effect after an update.\r
196///\r
197#define PACKAGE_ATTRIBUTE_RESET_REQUIRED 0x0000000000000002\r
198///\r
199/// The attribute PACKAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED indicates authentication \r
200/// is required to update the package info.\r
201///\r
202#define PACKAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED 0x0000000000000004\r
203\r
204/** \r
205 Callback funtion to report the process of the firmware updating.\r
206\r
207 @param[in] Completion A value between 1 and 100 indicating the current completion\r
208 progress of the firmware update. Completion progress is \r
209 reported as from 1 to 100 percent. A value of 0 is used by\r
210 the driver to indicate that progress reporting is not supported.\r
211\r
212 @retval EFI_SUCCESS SetImage() continues to do the callback if supported.\r
213 @retval other SetImage() discontinues the callback and completes\r
214 the update and returns.\r
215\r
216**/\r
217typedef\r
218EFI_STATUS\r
219(EFIAPI *EFI_FIRMWARE_MANAGEMENT_UPDATE_IMAGE_PROGRESS)(\r
220 IN UINTN Completion\r
221 );\r
222\r
223/**\r
224 Returns information about the current firmware image(s) of the device.\r
225\r
226 This function allows a copy of the current firmware image to be created and saved.\r
227 The saved copy could later been used, for example, in firmware image recovery or rollback.\r
228\r
229 @param[in] This A pointer to the EFI_FIRMWARE_MANAGEMENT_PROTOCOL instance.\r
230 @param[in, out] ImageInfoSize A pointer to the size, in bytes, of the ImageInfo buffer. \r
231 On input, this is the size of the buffer allocated by the caller.\r
232 On output, it is the size of the buffer returned by the firmware \r
233 if the buffer was large enough, or the size of the buffer needed\r
234 to contain the image(s) information if the buffer was too small.\r
235 @param[in, out] ImageInfo A pointer to the buffer in which firmware places the current image(s)\r
236 information. The information is an array of EFI_FIRMWARE_IMAGE_DESCRIPTORs.\r
237 @param[out] DescriptorVersion A pointer to the location in which firmware returns the version number\r
238 associated with the EFI_FIRMWARE_IMAGE_DESCRIPTOR. \r
239 @param[out] DescriptorCount A pointer to the location in which firmware returns the number of\r
240 descriptors or firmware images within this device.\r
241 @param[out] DescriptorSize A pointer to the location in which firmware returns the size, in bytes,\r
242 of an individual EFI_FIRMWARE_IMAGE_DESCRIPTOR.\r
243 @param[out] PackageVersion A version number that represents all the firmware images in the device.\r
244 The format is vendor specific and new version must have a greater value\r
245 than the old version. If PackageVersion is not supported, the value is\r
246 0xFFFFFFFF. A value of 0xFFFFFFFE indicates that package version comparison\r
247 is to be performed using PackageVersionName. A value of 0xFFFFFFFD indicates\r
248 that package version update is in progress.\r
4f077902 249 @param[out] PackageVersionName A pointer to a pointer to a null-terminated string representing the\r
252b9c7a 250 package version name. The buffer is allocated by this function with \r
251 AllocatePool(), and it is the caller's responsibility to free it with a call\r
252 to FreePool().\r
253\r
254 @retval EFI_SUCCESS The device was successfully updated with the new image.\r
255 @retval EFI_BUFFER_TOO_SMALL The ImageInfo buffer was too small. The current buffer size \r
256 needed to hold the image(s) information is returned in ImageInfoSize. \r
257 @retval EFI_INVALID_PARAMETER ImageInfoSize is NULL.\r
258 @retval EFI_DEVICE_ERROR Valid information could not be returned. Possible corrupted image.\r
259\r
260**/ \r
261typedef\r
262EFI_STATUS\r
263(EFIAPI *EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GET_IMAGE_INFO)(\r
264 IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This,\r
265 IN OUT UINTN *ImageInfoSize,\r
266 IN OUT EFI_FIRMWARE_IMAGE_DESCRIPTOR *ImageInfo,\r
267 OUT UINT32 *DescriptorVersion,\r
268 OUT UINT8 *DescriptorCount,\r
269 OUT UINTN *DescriptorSize,\r
270 OUT UINT32 *PackageVersion,\r
271 OUT CHAR16 **PackageVersionName\r
272 );\r
273\r
274/**\r
275 Retrieves a copy of the current firmware image of the device. \r
276\r
277 This function allows a copy of the current firmware image to be created and saved.\r
278 The saved copy could later been used, for example, in firmware image recovery or rollback.\r
279\r
280 @param[in] This A pointer to the EFI_FIRMWARE_MANAGEMENT_PROTOCOL instance.\r
281 @param[in] ImageIndex A unique number identifying the firmware image(s) within the device.\r
282 The number is between 1 and DescriptorCount.\r
283 @param[out] Image Points to the buffer where the current image is copied to.\r
284 @param[out] ImageSize On entry, points to the size of the buffer pointed to by Image, in bytes.\r
285 On return, points to the length of the image, in bytes.\r
286\r
287 @retval EFI_SUCCESS The device was successfully updated with the new image.\r
288 @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is too small to hold the \r
289 image. The current buffer size needed to hold the image is returned \r
290 in ImageSize.\r
291 @retval EFI_INVALID_PARAMETER The Image was NULL.\r
292 @retval EFI_NOT_FOUND The current image is not copied to the buffer.\r
293 @retval EFI_UNSUPPORTED The operation is not supported.\r
294 @retval EFI_SECURITY_VIOLATIO The operation could not be performed due to an authentication failure.\r
295\r
296**/ \r
297typedef\r
298EFI_STATUS\r
299(EFIAPI *EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GET_IMAGE)(\r
300 IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This,\r
301 IN UINT8 ImageIndex,\r
302 IN OUT VOID *Image,\r
303 IN OUT UINTN *ImageSize\r
304 );\r
305\r
306/**\r
307 Updates the firmware image of the device.\r
308\r
309 This function updates the hardware with the new firmware image.\r
310 This function returns EFI_UNSUPPORTED if the firmware image is not updatable.\r
311 If the firmware image is updatable, the function should perform the following minimal validations\r
312 before proceeding to do the firmware image update.\r
313 - Validate the image authentication if image has attribute \r
314 IMAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED. The function returns \r
315 EFI_SECURITY_VIOLATION if the validation fails.\r
316 - Validate the image is a supported image for this device. The function returns EFI_ABORTED if \r
317 the image is unsupported. The function can optionally provide more detailed information on \r
318 why the image is not a supported image.\r
319 - Validate the data from VendorCode if not null. Image validation must be performed before \r
320 VendorCode data validation. VendorCode data is ignored or considered invalid if image \r
321 validation failed. The function returns EFI_ABORTED if the data is invalid.\r
322 \r
323 VendorCode enables vendor to implement vendor-specific firmware image update policy. Null if \r
324 the caller did not specify the policy or use the default policy. As an example, vendor can implement \r
325 a policy to allow an option to force a firmware image update when the abort reason is due to the new \r
326 firmware image version is older than the current firmware image version or bad image checksum. \r
327 Sensitive operations such as those wiping the entire firmware image and render the device to be\r
328 non-functional should be encoded in the image itself rather than passed with the VendorCode.\r
329 AbortReason enables vendor to have the option to provide a more detailed description of the abort\r
330 reason to the caller.\r
331\r
332 @param[in] This A pointer to the EFI_FIRMWARE_MANAGEMENT_PROTOCOL instance.\r
333 @param[in] ImageIndex A unique number identifying the firmware image(s) within the device.\r
334 The number is between 1 and DescriptorCount.\r
335 @param[in] Image Points to the new image.\r
336 @param[in] ImageSize Size of the new image in bytes.\r
337 @param[in] VendorCode This enables vendor to implement vendor-specific firmware image update policy. \r
338 Null indicates the caller did not specify the policy or use the default policy.\r
339 @param[in] Progress A function used by the driver to report the progress of the firmware update.\r
4f077902 340 @param[out] AbortReason A pointer to a pointer to a null-terminated string providing more\r
252b9c7a 341 details for the aborted operation. The buffer is allocated by this function \r
342 with AllocatePool(), and it is the caller's responsibility to free it with a\r
343 call to FreePool().\r
344\r
345 @retval EFI_SUCCESS The device was successfully updated with the new image.\r
346 @retval EFI_ABORTED The operation is aborted.\r
347 @retval EFI_INVALID_PARAMETER The Image was NULL.\r
348 @retval EFI_UNSUPPORTED The operation is not supported.\r
349 @retval EFI_SECURITY_VIOLATIO The operation could not be performed due to an authentication failure.\r
350\r
351**/ \r
352typedef\r
353EFI_STATUS\r
354(EFIAPI *EFI_FIRMWARE_MANAGEMENT_PROTOCOL_SET_IMAGE)(\r
355 IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This,\r
356 IN UINT8 ImageIndex,\r
357 IN CONST VOID *Image,\r
358 IN UINTN ImageSize,\r
359 IN CONST VOID *VendorCode,\r
360 IN EFI_FIRMWARE_MANAGEMENT_UPDATE_IMAGE_PROGRESS Progress,\r
361 OUT CHAR16 **AbortReason\r
362 );\r
363\r
364/**\r
365 Checks if the firmware image is valid for the device.\r
366\r
367 This function allows firmware update application to validate the firmware image without \r
368 invoking the SetImage() first.\r
369\r
370 @param[in] This A pointer to the EFI_FIRMWARE_MANAGEMENT_PROTOCOL instance.\r
371 @param[in] ImageIndex A unique number identifying the firmware image(s) within the device.\r
372 The number is between 1 and DescriptorCount.\r
373 @param[in] Image Points to the new image.\r
374 @param[in] ImageSize Size of the new image in bytes.\r
375 @param[out] ImageUpdatable Indicates if the new image is valid for update. It also provides,\r
376 if available, additional information if the image is invalid. \r
377\r
378 @retval EFI_SUCCESS The image was successfully checked.\r
379 @retval EFI_INVALID_PARAMETER The Image was NULL.\r
380 @retval EFI_UNSUPPORTED The operation is not supported.\r
381 @retval EFI_SECURITY_VIOLATIO The operation could not be performed due to an authentication failure.\r
382\r
383**/ \r
384typedef\r
385EFI_STATUS\r
386(EFIAPI *EFI_FIRMWARE_MANAGEMENT_PROTOCOL_CHECK_IMAGE)(\r
387 IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This,\r
388 IN UINT8 ImageIndex,\r
389 IN CONST VOID *Image,\r
390 IN UINTN ImageSize,\r
391 OUT UINT32 *ImageUpdatable\r
392 );\r
393\r
394/**\r
395 Returns information about the firmware package. \r
396\r
397 This function returns package information.\r
398\r
399 @param[in] This A pointer to the EFI_FIRMWARE_MANAGEMENT_PROTOCOL instance.\r
400 @param[out] PackageVersion A version number that represents all the firmware images in the device.\r
401 The format is vendor specific and new version must have a greater value\r
402 than the old version. If PackageVersion is not supported, the value is\r
403 0xFFFFFFFF. A value of 0xFFFFFFFE indicates that package version\r
404 comparison is to be performed using PackageVersionName. A value of\r
405 0xFFFFFFFD indicates that package version update is in progress.\r
4f077902 406 @param[out] PackageVersionName A pointer to a pointer to a null-terminated string representing\r
252b9c7a 407 the package version name. The buffer is allocated by this function with\r
408 AllocatePool(), and it is the caller's responsibility to free it with a\r
409 call to FreePool().\r
410 @param[out] PackageVersionNameMaxLen The maximum length of package version name if device supports update of\r
411 package version name. A value of 0 indicates the device does not support\r
412 update of package version name. Length is the number of Unicode characters,\r
413 including the terminating null character.\r
414 @param[out] AttributesSupported Package attributes that are supported by this device. See 'Package Attribute \r
415 Definitions' for possible returned values of this parameter. A value of 1 \r
416 indicates the attribute is supported and the current setting value is\r
417 indicated in AttributesSetting. A value of 0 indicates the attribute is not\r
418 supported and the current setting value in AttributesSetting is meaningless.\r
419 @param[out] AttributesSetting Package attributes. See 'Package Attribute Definitions' for possible returned\r
420 values of this parameter\r
421\r
422 @retval EFI_SUCCESS The package information was successfully returned.\r
423 @retval EFI_UNSUPPORTED The operation is not supported.\r
424\r
425**/\r
426typedef\r
427EFI_STATUS\r
428(EFIAPI *EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GET_PACKAGE_INFO)(\r
429 IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This,\r
430 OUT UINT32 *PackageVersion,\r
431 OUT CHAR16 **PackageVersionName,\r
432 OUT UINT32 *PackageVersionNameMaxLen,\r
433 OUT UINT64 *AttributesSupported,\r
434 OUT UINT64 *AttributesSetting\r
435 );\r
436\r
437/**\r
438 Updates information about the firmware package.\r
439\r
440 This function updates package information.\r
441 This function returns EFI_UNSUPPORTED if the package information is not updatable.\r
442 VendorCode enables vendor to implement vendor-specific package information update policy.\r
443 Null if the caller did not specify this policy or use the default policy.\r
444\r
445 @param[in] This A pointer to the EFI_FIRMWARE_MANAGEMENT_PROTOCOL instance.\r
446 @param[in] Image Points to the authentication image.\r
447 Null if authentication is not required.\r
448 @param[in] ImageSize Size of the authentication image in bytes.\r
449 0 if authentication is not required.\r
450 @param[in] VendorCode This enables vendor to implement vendor-specific firmware\r
451 image update policy. \r
452 Null indicates the caller did not specify this policy or use\r
453 the default policy.\r
454 @param[in] PackageVersion The new package version.\r
455 @param[in] PackageVersionName A pointer to the new null-terminated Unicode string representing\r
456 the package version name. \r
457 The string length is equal to or less than the value returned in \r
458 PackageVersionNameMaxLen.\r
459\r
460 @retval EFI_SUCCESS The device was successfully updated with the new package\r
461 information.\r
462 @retval EFI_INVALID_PARAMETER The PackageVersionName length is longer than the value \r
463 returned in PackageVersionNameMaxLen.\r
464 @retval EFI_UNSUPPORTED The operation is not supported.\r
465 @retval EFI_SECURITY_VIOLATIO The operation could not be performed due to an authentication failure.\r
466\r
467**/\r
468typedef\r
469EFI_STATUS\r
470(EFIAPI *EFI_FIRMWARE_MANAGEMENT_PROTOCOL_SET_PACKAGE_INFO)(\r
471 IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This,\r
472 IN CONST VOID *Image,\r
473 IN UINTN ImageSize,\r
474 IN CONST VOID *VendorCode,\r
475 IN UINT32 PackageVersion,\r
476 IN CONST CHAR16 *PackageVersionName\r
477 );\r
478\r
479///\r
480/// EFI_FIRMWARE_MANAGEMENT_PROTOCOL\r
481/// The protocol for managing firmware provides the following services.\r
482/// - Get the attributes of the current firmware image. Attributes include revision level.\r
483/// - Get a copy of the current firmware image. As an example, this service could be used by a \r
484/// management application to facilitate a firmware roll-back.\r
485/// - Program the device with a firmware image supplied by the user.\r
486/// - Label all the firmware images within a device with a single version.\r
487///\r
488struct _EFI_FIRMWARE_MANAGEMENT_PROTOCOL {\r
489 EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GET_IMAGE_INFO GetImageInfo;\r
490 EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GET_IMAGE GetImage;\r
491 EFI_FIRMWARE_MANAGEMENT_PROTOCOL_SET_IMAGE SetImage;\r
492 EFI_FIRMWARE_MANAGEMENT_PROTOCOL_CHECK_IMAGE CheckImage;\r
493 EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GET_PACKAGE_INFO GetPackageInfo;\r
494 EFI_FIRMWARE_MANAGEMENT_PROTOCOL_SET_PACKAGE_INFO SetPackageInfo;\r
495};\r
496\r
497extern EFI_GUID gEfiFirmwareManagementProtocolGuid;\r
498\r
499#endif\r