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