TianoCore EDK2 master
Loading...
Searching...
No Matches
FirmwareManagement.h File Reference

Go to the source code of this file.

Data Structures

struct  EFI_FIRMWARE_IMAGE_DEP
 
struct  EFI_FIRMWARE_IMAGE_DESCRIPTOR
 
struct  EFI_FIRMWARE_IMAGE_AUTHENTICATION
 
struct  _EFI_FIRMWARE_MANAGEMENT_PROTOCOL
 

Macros

#define EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GUID
 
#define EFI_FMP_DEP_PUSH_GUID   0x00
 
#define EFI_FMP_DEP_PUSH_VERSION   0x01
 
#define EFI_FMP_DEP_VERSION_STR   0x02
 
#define EFI_FMP_DEP_AND   0x03
 
#define EFI_FMP_DEP_OR   0x04
 
#define EFI_FMP_DEP_NOT   0x05
 
#define EFI_FMP_DEP_TRUE   0x06
 
#define EFI_FMP_DEP_FALSE   0x07
 
#define EFI_FMP_DEP_EQ   0x08
 
#define EFI_FMP_DEP_GT   0x09
 
#define EFI_FMP_DEP_GTE   0x0A
 
#define EFI_FMP_DEP_LT   0x0B
 
#define EFI_FMP_DEP_LTE   0x0C
 
#define EFI_FMP_DEP_END   0x0D
 
#define EFI_FMP_DEP_DECLARE_LENGTH   0x0E
 
#define IMAGE_ATTRIBUTE_IMAGE_UPDATABLE   0x0000000000000001
 
#define IMAGE_ATTRIBUTE_RESET_REQUIRED   0x0000000000000002
 
#define IMAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED   0x0000000000000004
 
#define IMAGE_ATTRIBUTE_IN_USE   0x0000000000000008
 
#define IMAGE_ATTRIBUTE_UEFI_IMAGE   0x0000000000000010
 
#define IMAGE_ATTRIBUTE_DEPENDENCY   0x0000000000000020
 
#define IMAGE_COMPATIBILITY_CHECK_SUPPORTED   0x0000000000000001
 
#define EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION   4
 
#define IMAGE_UPDATABLE_VALID   0x0000000000000001
 
#define IMAGE_UPDATABLE_INVALID   0x0000000000000002
 
#define IMAGE_UPDATABLE_INVALID_TYPE   0x0000000000000004
 
#define IMAGE_UPDATABLE_INVALID_OLD   0x0000000000000008
 
#define IMAGE_UPDATABLE_VALID_WITH_VENDOR_CODE   0x0000000000000010
 
#define PACKAGE_ATTRIBUTE_VERSION_UPDATABLE   0x0000000000000001
 
#define PACKAGE_ATTRIBUTE_RESET_REQUIRED   0x0000000000000002
 
#define PACKAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED   0x0000000000000004
 

Typedefs

typedef struct _EFI_FIRMWARE_MANAGEMENT_PROTOCOL EFI_FIRMWARE_MANAGEMENT_PROTOCOL
 
typedef EFI_STATUS(EFIAPI * EFI_FIRMWARE_MANAGEMENT_UPDATE_IMAGE_PROGRESS) (IN UINTN Completion)
 
typedef EFI_STATUS(EFIAPI * EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GET_IMAGE_INFO) (IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This, IN OUT UINTN *ImageInfoSize, IN OUT EFI_FIRMWARE_IMAGE_DESCRIPTOR *ImageInfo, OUT UINT32 *DescriptorVersion, OUT UINT8 *DescriptorCount, OUT UINTN *DescriptorSize, OUT UINT32 *PackageVersion, OUT CHAR16 **PackageVersionName)
 
typedef EFI_STATUS(EFIAPI * EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GET_IMAGE) (IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This, IN UINT8 ImageIndex, OUT VOID *Image, IN OUT UINTN *ImageSize)
 
typedef EFI_STATUS(EFIAPI * EFI_FIRMWARE_MANAGEMENT_PROTOCOL_SET_IMAGE) (IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This, IN UINT8 ImageIndex, IN CONST VOID *Image, IN UINTN ImageSize, IN CONST VOID *VendorCode, IN EFI_FIRMWARE_MANAGEMENT_UPDATE_IMAGE_PROGRESS Progress, OUT CHAR16 **AbortReason)
 
typedef EFI_STATUS(EFIAPI * EFI_FIRMWARE_MANAGEMENT_PROTOCOL_CHECK_IMAGE) (IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This, IN UINT8 ImageIndex, IN CONST VOID *Image, IN UINTN ImageSize, OUT UINT32 *ImageUpdatable)
 
typedef EFI_STATUS(EFIAPI * EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GET_PACKAGE_INFO) (IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This, OUT UINT32 *PackageVersion, OUT CHAR16 **PackageVersionName, OUT UINT32 *PackageVersionNameMaxLen, OUT UINT64 *AttributesSupported, OUT UINT64 *AttributesSetting)
 
typedef EFI_STATUS(EFIAPI * EFI_FIRMWARE_MANAGEMENT_PROTOCOL_SET_PACKAGE_INFO) (IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This, IN CONST VOID *Image, IN UINTN ImageSize, IN CONST VOID *VendorCode, IN UINT32 PackageVersion, IN CONST CHAR16 *PackageVersionName)
 

Variables

EFI_GUID gEfiFirmwareManagementProtocolGuid
 

Detailed Description

UEFI Firmware Management Protocol definition Firmware Management Protocol provides an abstraction for device to provide firmware management support. The base requirements for managing device firmware images include identifying firmware image revision level and programming the image into the device.

GetImageInfo() is the only required function. GetImage(), SetImage(), CheckImage(), GetPackageInfo(), and SetPackageInfo() shall return EFI_UNSUPPORTED if not supported by the driver.

Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.
Copyright (c) 2013 - 2014, Hewlett-Packard Development Company, L.P.
SPDX-License-Identifier: BSD-2-Clause-Patent

Revision Reference:
This Protocol is introduced in UEFI Specification 2.3

Definition in file FirmwareManagement.h.

Macro Definition Documentation

◆ EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION

#define EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION   4

Descriptor Version exposed by GetImageInfo() function

Definition at line 190 of file FirmwareManagement.h.

◆ EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GUID

#define EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GUID
Value:
{ \
0x86c77a67, 0xb97, 0x4633, {0xa1, 0x87, 0x49, 0x10, 0x4d, 0x6, 0x85, 0xc7 } \
}

Definition at line 23 of file FirmwareManagement.h.

◆ EFI_FMP_DEP_AND

#define EFI_FMP_DEP_AND   0x03

Definition at line 36 of file FirmwareManagement.h.

◆ EFI_FMP_DEP_DECLARE_LENGTH

#define EFI_FMP_DEP_DECLARE_LENGTH   0x0E

Definition at line 47 of file FirmwareManagement.h.

◆ EFI_FMP_DEP_END

#define EFI_FMP_DEP_END   0x0D

Definition at line 46 of file FirmwareManagement.h.

◆ EFI_FMP_DEP_EQ

#define EFI_FMP_DEP_EQ   0x08

Definition at line 41 of file FirmwareManagement.h.

◆ EFI_FMP_DEP_FALSE

#define EFI_FMP_DEP_FALSE   0x07

Definition at line 40 of file FirmwareManagement.h.

◆ EFI_FMP_DEP_GT

#define EFI_FMP_DEP_GT   0x09

Definition at line 42 of file FirmwareManagement.h.

◆ EFI_FMP_DEP_GTE

#define EFI_FMP_DEP_GTE   0x0A

Definition at line 43 of file FirmwareManagement.h.

◆ EFI_FMP_DEP_LT

#define EFI_FMP_DEP_LT   0x0B

Definition at line 44 of file FirmwareManagement.h.

◆ EFI_FMP_DEP_LTE

#define EFI_FMP_DEP_LTE   0x0C

Definition at line 45 of file FirmwareManagement.h.

◆ EFI_FMP_DEP_NOT

#define EFI_FMP_DEP_NOT   0x05

Definition at line 38 of file FirmwareManagement.h.

◆ EFI_FMP_DEP_OR

#define EFI_FMP_DEP_OR   0x04

Definition at line 37 of file FirmwareManagement.h.

◆ EFI_FMP_DEP_PUSH_GUID

#define EFI_FMP_DEP_PUSH_GUID   0x00

Dependency Expression Opcode

Definition at line 33 of file FirmwareManagement.h.

◆ EFI_FMP_DEP_PUSH_VERSION

#define EFI_FMP_DEP_PUSH_VERSION   0x01

Definition at line 34 of file FirmwareManagement.h.

◆ EFI_FMP_DEP_TRUE

#define EFI_FMP_DEP_TRUE   0x06

Definition at line 39 of file FirmwareManagement.h.

◆ EFI_FMP_DEP_VERSION_STR

#define EFI_FMP_DEP_VERSION_STR   0x02

Definition at line 35 of file FirmwareManagement.h.

◆ IMAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED

#define IMAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED   0x0000000000000004

The attribute IMAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED indicates authentication is required to perform the following image operations: GetImage(), SetImage(), and CheckImage(). See 'Image Attribute - Authentication'.

Definition at line 161 of file FirmwareManagement.h.

◆ IMAGE_ATTRIBUTE_DEPENDENCY

#define IMAGE_ATTRIBUTE_DEPENDENCY   0x0000000000000020

The attribute IMAGE_ATTRIBUTE_DEPENDENCY indicates that there is an EFI_FIRMWARE_IMAGE_DEP section associated with the image.

Definition at line 175 of file FirmwareManagement.h.

◆ IMAGE_ATTRIBUTE_IMAGE_UPDATABLE

#define IMAGE_ATTRIBUTE_IMAGE_UPDATABLE   0x0000000000000001

The attribute IMAGE_ATTRIBUTE_IMAGE_UPDATABLE indicates this device supports firmware image update.

Definition at line 149 of file FirmwareManagement.h.

◆ IMAGE_ATTRIBUTE_IN_USE

#define IMAGE_ATTRIBUTE_IN_USE   0x0000000000000008

The attribute IMAGE_ATTRIBUTE_IN_USE indicates the current state of the firmware image. This distinguishes firmware images in a device that supports redundant images.

Definition at line 166 of file FirmwareManagement.h.

◆ IMAGE_ATTRIBUTE_RESET_REQUIRED

#define IMAGE_ATTRIBUTE_RESET_REQUIRED   0x0000000000000002

The attribute IMAGE_ATTRIBUTE_RESET_REQUIRED indicates a reset of the device is required for the new firmware image to take effect after a firmware update. The device is the device hosting the firmware image.

Definition at line 155 of file FirmwareManagement.h.

◆ IMAGE_ATTRIBUTE_UEFI_IMAGE

#define IMAGE_ATTRIBUTE_UEFI_IMAGE   0x0000000000000010

The attribute IMAGE_ATTRIBUTE_UEFI_IMAGE indicates that this image is an EFI compatible image.

Definition at line 170 of file FirmwareManagement.h.

◆ IMAGE_COMPATIBILITY_CHECK_SUPPORTED

#define IMAGE_COMPATIBILITY_CHECK_SUPPORTED   0x0000000000000001

Values from 0x0000000000000002 thru 0x000000000000FFFF are reserved for future assignments. Values from 0x0000000000010000 thru 0xFFFFFFFFFFFFFFFF are used by firmware vendor for compatibility check.

Definition at line 185 of file FirmwareManagement.h.

◆ IMAGE_UPDATABLE_INVALID

#define IMAGE_UPDATABLE_INVALID   0x0000000000000002

IMAGE_UPDATABLE_INVALID indicates SetImage() will reject the new image. No additional information is provided for the rejection.

Definition at line 225 of file FirmwareManagement.h.

◆ IMAGE_UPDATABLE_INVALID_OLD

#define IMAGE_UPDATABLE_INVALID_OLD   0x0000000000000008

IMAGE_UPDATABLE_INVALID_OLD indicates SetImage() will reject the new image. The rejection is due to the new image version is older than the current firmware image version in the device. The device firmware update policy does not support firmware version downgrade.

Definition at line 237 of file FirmwareManagement.h.

◆ IMAGE_UPDATABLE_INVALID_TYPE

#define IMAGE_UPDATABLE_INVALID_TYPE   0x0000000000000004

IMAGE_UPDATABLE_INVALID_TYPE indicates SetImage() will reject the new image. The rejection is due to the new image is not a firmware image recognized for this device.

Definition at line 230 of file FirmwareManagement.h.

◆ IMAGE_UPDATABLE_VALID

#define IMAGE_UPDATABLE_VALID   0x0000000000000001

IMAGE_UPDATABLE_VALID indicates SetImage() will accept the new image and update the device with the new image. The version of the new image could be higher or lower than the current image. SetImage VendorCode is optional but can be used for vendor specific action.

Definition at line 220 of file FirmwareManagement.h.

◆ IMAGE_UPDATABLE_VALID_WITH_VENDOR_CODE

#define IMAGE_UPDATABLE_VALID_WITH_VENDOR_CODE   0x0000000000000010

IMAGE_UPDATABLE_VALID_WITH_VENDOR_CODE indicates SetImage() will accept and update the new image only if a correct VendorCode is provided or else image would be rejected and SetImage will return appropriate error.

Definition at line 243 of file FirmwareManagement.h.

◆ PACKAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED

#define PACKAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED   0x0000000000000004

The attribute PACKAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED indicates authentication is required to update the package info.

Definition at line 262 of file FirmwareManagement.h.

◆ PACKAGE_ATTRIBUTE_RESET_REQUIRED

#define PACKAGE_ATTRIBUTE_RESET_REQUIRED   0x0000000000000002

The attribute PACKAGE_ATTRIBUTE_RESET_REQUIRED indicates a reset of the device is required for the new package info to take effect after an update.

Definition at line 257 of file FirmwareManagement.h.

◆ PACKAGE_ATTRIBUTE_VERSION_UPDATABLE

#define PACKAGE_ATTRIBUTE_VERSION_UPDATABLE   0x0000000000000001

The attribute PACKAGE_ATTRIBUTE_VERSION_UPDATABLE indicates this device supports the update of the firmware package version.

Definition at line 252 of file FirmwareManagement.h.

Typedef Documentation

◆ EFI_FIRMWARE_MANAGEMENT_PROTOCOL

◆ EFI_FIRMWARE_MANAGEMENT_PROTOCOL_CHECK_IMAGE

typedef EFI_STATUS(EFIAPI * EFI_FIRMWARE_MANAGEMENT_PROTOCOL_CHECK_IMAGE) (IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This, IN UINT8 ImageIndex, IN CONST VOID *Image, IN UINTN ImageSize, OUT UINT32 *ImageUpdatable)

Checks if the firmware image is valid for the device.

This function allows firmware update application to validate the firmware image without invoking the SetImage() first.

Parameters
[in]ThisA pointer to the EFI_FIRMWARE_MANAGEMENT_PROTOCOL instance.
[in]ImageIndexA unique number identifying the firmware image(s) within the device. The number is between 1 and DescriptorCount.
[in]ImagePoints to the new image.
[in]ImageSizeSize of the new image in bytes.
[out]ImageUpdatableIndicates if the new image is valid for update. It also provides, if available, additional information if the image is invalid.
Return values
EFI_SUCCESSThe image was successfully checked.
EFI_INVALID_PARAMETERThe Image was NULL.
EFI_UNSUPPORTEDThe operation is not supported.
EFI_SECURITY_VIOLATIONThe operation could not be performed due to an authentication failure.

Definition at line 445 of file FirmwareManagement.h.

◆ EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GET_IMAGE

typedef EFI_STATUS(EFIAPI * EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GET_IMAGE) (IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This, IN UINT8 ImageIndex, OUT VOID *Image, IN OUT UINTN *ImageSize)

Retrieves a copy of the current firmware image of the device.

This function allows a copy of the current firmware image to be created and saved. The saved copy could later been used, for example, in firmware image recovery or rollback.

Parameters
[in]ThisA pointer to the EFI_FIRMWARE_MANAGEMENT_PROTOCOL instance.
[in]ImageIndexA unique number identifying the firmware image(s) within the device. The number is between 1 and DescriptorCount.
[out]ImagePoints to the buffer where the current image is copied to.
[in,out]ImageSizeOn entry, points to the size of the buffer pointed to by Image, in bytes. On return, points to the length of the image, in bytes.
Return values
EFI_SUCCESSThe device was successfully updated with the new image.
EFI_BUFFER_TOO_SMALLThe buffer specified by ImageSize is too small to hold the image. The current buffer size needed to hold the image is returned in ImageSize.
EFI_INVALID_PARAMETERThe Image was NULL.
EFI_NOT_FOUNDThe current image is not copied to the buffer.
EFI_UNSUPPORTEDThe operation is not supported.
EFI_SECURITY_VIOLATIONThe operation could not be performed due to an authentication failure.

Definition at line 358 of file FirmwareManagement.h.

◆ EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GET_IMAGE_INFO

typedef EFI_STATUS(EFIAPI * EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GET_IMAGE_INFO) (IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This, IN OUT UINTN *ImageInfoSize, IN OUT EFI_FIRMWARE_IMAGE_DESCRIPTOR *ImageInfo, OUT UINT32 *DescriptorVersion, OUT UINT8 *DescriptorCount, OUT UINTN *DescriptorSize, OUT UINT32 *PackageVersion, OUT CHAR16 **PackageVersionName)

Returns information about the current firmware image(s) of the device.

This function allows a copy of the current firmware image to be created and saved. The saved copy could later been used, for example, in firmware image recovery or rollback.

Parameters
[in]ThisA pointer to the EFI_FIRMWARE_MANAGEMENT_PROTOCOL instance.
[in,out]ImageInfoSizeA pointer to the size, in bytes, of the ImageInfo buffer. On input, this is the size of the buffer allocated by the caller. On output, it is the size of the buffer returned by the firmware if the buffer was large enough, or the size of the buffer needed to contain the image(s) information if the buffer was too small.
[in,out]ImageInfoA pointer to the buffer in which firmware places the current image(s) information. The information is an array of EFI_FIRMWARE_IMAGE_DESCRIPTORs.
[out]DescriptorVersionA pointer to the location in which firmware returns the version number associated with the EFI_FIRMWARE_IMAGE_DESCRIPTOR.
[out]DescriptorCountA pointer to the location in which firmware returns the number of descriptors or firmware images within this device.
[out]DescriptorSizeA pointer to the location in which firmware returns the size, in bytes, of an individual EFI_FIRMWARE_IMAGE_DESCRIPTOR.
[out]PackageVersionA version number that represents all the firmware images in the device. The format is vendor specific and new version must have a greater value than the old version. If PackageVersion is not supported, the value is 0xFFFFFFFF. A value of 0xFFFFFFFE indicates that package version comparison is to be performed using PackageVersionName. A value of 0xFFFFFFFD indicates that package version update is in progress.
[out]PackageVersionNameA pointer to a pointer to a null-terminated string representing the package version name. The buffer is allocated by this function with AllocatePool(), and it is the caller's responsibility to free it with a call to FreePool().
Return values
EFI_SUCCESSThe device was successfully updated with the new image.
EFI_BUFFER_TOO_SMALLThe ImageInfo buffer was too small. The current buffer size needed to hold the image(s) information is returned in ImageInfoSize.
EFI_INVALID_PARAMETERImageInfoSize is NULL.
EFI_DEVICE_ERRORValid information could not be returned. Possible corrupted image.

Definition at line 322 of file FirmwareManagement.h.

◆ EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GET_PACKAGE_INFO

typedef EFI_STATUS(EFIAPI * EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GET_PACKAGE_INFO) (IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This, OUT UINT32 *PackageVersion, OUT CHAR16 **PackageVersionName, OUT UINT32 *PackageVersionNameMaxLen, OUT UINT64 *AttributesSupported, OUT UINT64 *AttributesSetting)

Returns information about the firmware package.

This function returns package information.

Parameters
[in]ThisA pointer to the EFI_FIRMWARE_MANAGEMENT_PROTOCOL instance.
[out]PackageVersionA version number that represents all the firmware images in the device. The format is vendor specific and new version must have a greater value than the old version. If PackageVersion is not supported, the value is 0xFFFFFFFF. A value of 0xFFFFFFFE indicates that package version comparison is to be performed using PackageVersionName. A value of 0xFFFFFFFD indicates that package version update is in progress.
[out]PackageVersionNameA pointer to a pointer to a null-terminated string representing the package version name. The buffer is allocated by this function with AllocatePool(), and it is the caller's responsibility to free it with a call to FreePool().
[out]PackageVersionNameMaxLenThe maximum length of package version name if device supports update of package version name. A value of 0 indicates the device does not support update of package version name. Length is the number of Unicode characters, including the terminating null character.
[out]AttributesSupportedPackage attributes that are supported by this device. See 'Package Attribute Definitions' for possible returned values of this parameter. A value of 1 indicates the attribute is supported and the current setting value is indicated in AttributesSetting. A value of 0 indicates the attribute is not supported and the current setting value in AttributesSetting is meaningless.
[out]AttributesSettingPackage attributes. See 'Package Attribute Definitions' for possible returned values of this parameter
Return values
EFI_SUCCESSThe package information was successfully returned.
EFI_UNSUPPORTEDThe operation is not supported.

Definition at line 487 of file FirmwareManagement.h.

◆ EFI_FIRMWARE_MANAGEMENT_PROTOCOL_SET_IMAGE

typedef EFI_STATUS(EFIAPI * EFI_FIRMWARE_MANAGEMENT_PROTOCOL_SET_IMAGE) (IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This, IN UINT8 ImageIndex, IN CONST VOID *Image, IN UINTN ImageSize, IN CONST VOID *VendorCode, IN EFI_FIRMWARE_MANAGEMENT_UPDATE_IMAGE_PROGRESS Progress, OUT CHAR16 **AbortReason)

Updates the firmware image of the device.

This function updates the hardware with the new firmware image. This function returns EFI_UNSUPPORTED if the firmware image is not updatable. If the firmware image is updatable, the function should perform the following minimal validations before proceeding to do the firmware image update.

  • Validate the image authentication if image has attribute IMAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED. The function returns EFI_SECURITY_VIOLATION if the validation fails.
  • Validate the image is a supported image for this device. The function returns EFI_ABORTED if the image is unsupported. The function can optionally provide more detailed information on why the image is not a supported image.
  • Validate the data from VendorCode if not null. Image validation must be performed before VendorCode data validation. VendorCode data is ignored or considered invalid if image validation failed. The function returns EFI_ABORTED if the data is invalid.

VendorCode enables vendor to implement vendor-specific firmware image update policy. Null if the caller did not specify the policy or use the default policy. As an example, vendor can implement a policy to allow an option to force a firmware image update when the abort reason is due to the new firmware image version is older than the current firmware image version or bad image checksum. Sensitive operations such as those wiping the entire firmware image and render the device to be non-functional should be encoded in the image itself rather than passed with the VendorCode. AbortReason enables vendor to have the option to provide a more detailed description of the abort reason to the caller.

Parameters
[in]ThisA pointer to the EFI_FIRMWARE_MANAGEMENT_PROTOCOL instance.
[in]ImageIndexA unique number identifying the firmware image(s) within the device. The number is between 1 and DescriptorCount.
[in]ImagePoints to the new image.
[in]ImageSizeSize of the new image in bytes.
[in]VendorCodeThis enables vendor to implement vendor-specific firmware image update policy. Null indicates the caller did not specify the policy or use the default policy.
[in]ProgressA function used by the driver to report the progress of the firmware update.
[out]AbortReasonA pointer to a pointer to a null-terminated string providing more details for the aborted operation. The buffer is allocated by this function with AllocatePool(), and it is the caller's responsibility to free it with a call to FreePool().
Return values
EFI_SUCCESSThe device was successfully updated with the new image.
EFI_ABORTEDThe operation is aborted.
EFI_INVALID_PARAMETERThe Image was NULL.
EFI_UNSUPPORTEDThe operation is not supported.
EFI_SECURITY_VIOLATIONThe operation could not be performed due to an authentication failure.

Definition at line 413 of file FirmwareManagement.h.

◆ EFI_FIRMWARE_MANAGEMENT_PROTOCOL_SET_PACKAGE_INFO

typedef EFI_STATUS(EFIAPI * EFI_FIRMWARE_MANAGEMENT_PROTOCOL_SET_PACKAGE_INFO) (IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This, IN CONST VOID *Image, IN UINTN ImageSize, IN CONST VOID *VendorCode, IN UINT32 PackageVersion, IN CONST CHAR16 *PackageVersionName)

Updates information about the firmware package.

This function updates package information. This function returns EFI_UNSUPPORTED if the package information is not updatable. VendorCode enables vendor to implement vendor-specific package information update policy. Null if the caller did not specify this policy or use the default policy.

Parameters
[in]ThisA pointer to the EFI_FIRMWARE_MANAGEMENT_PROTOCOL instance.
[in]ImagePoints to the authentication image. Null if authentication is not required.
[in]ImageSizeSize of the authentication image in bytes. 0 if authentication is not required.
[in]VendorCodeThis enables vendor to implement vendor-specific firmware image update policy. Null indicates the caller did not specify this policy or use the default policy.
[in]PackageVersionThe new package version.
[in]PackageVersionNameA pointer to the new null-terminated Unicode string representing the package version name. The string length is equal to or less than the value returned in PackageVersionNameMaxLen.
Return values
EFI_SUCCESSThe device was successfully updated with the new package information.
EFI_INVALID_PARAMETERThe PackageVersionName length is longer than the value returned in PackageVersionNameMaxLen.
EFI_UNSUPPORTEDThe operation is not supported.
EFI_SECURITY_VIOLATIONThe operation could not be performed due to an authentication failure.

Definition at line 529 of file FirmwareManagement.h.

◆ EFI_FIRMWARE_MANAGEMENT_UPDATE_IMAGE_PROGRESS

typedef EFI_STATUS(EFIAPI * EFI_FIRMWARE_MANAGEMENT_UPDATE_IMAGE_PROGRESS) (IN UINTN Completion)

Callback function to report the process of the firmware updating.

Parameters
[in]CompletionA value between 1 and 100 indicating the current completion progress of the firmware update. Completion progress is reported as from 1 to 100 percent. A value of 0 is used by the driver to indicate that progress reporting is not supported.
Return values
EFI_SUCCESSSetImage() continues to do the callback if supported.
otherSetImage() discontinues the callback and completes the update and returns.

Definition at line 278 of file FirmwareManagement.h.