TianoCore EDK2 master
Loading...
Searching...
No Matches
FmpDxe.c File Reference
#include "FmpDxe.h"
#include "VariableSupport.h"

Go to the source code of this file.

Functions

EFI_STATUS EFIAPI FmpDxeProgress (IN UINTN Completion)
 
EFI_GUIDGetImageTypeIdGuid (VOID)
 
CHAR16 * GetImageTypeNameString (VOID)
 
UINT32 GetLowestSupportedVersion (FIRMWARE_MANAGEMENT_PRIVATE_DATA *Private)
 
VOID PopulateDescriptor (FIRMWARE_MANAGEMENT_PRIVATE_DATA *Private)
 
EFI_STATUS EFIAPI GetTheImageInfo (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)
 
EFI_STATUS EFIAPI GetTheImage (IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This, IN UINT8 ImageIndex, IN OUT VOID *Image, IN OUT UINTN *ImageSize)
 
VOID * GetFmpHeader (IN CONST EFI_FIRMWARE_IMAGE_AUTHENTICATION *Image, IN CONST UINTN ImageSize, IN CONST UINTN AdditionalHeaderSize, OUT UINTN *PayloadSize OPTIONAL)
 
UINT32 GetAllHeaderSize (IN CONST EFI_FIRMWARE_IMAGE_AUTHENTICATION *Image, IN UINT32 AdditionalHeaderSize)
 
EFI_STATUS EFIAPI CheckTheImageInternal (IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This, IN UINT8 ImageIndex, IN CONST VOID *Image, IN UINTN ImageSize, OUT UINT32 *ImageUpdatable, OUT UINT32 *LastAttemptStatus)
 
EFI_STATUS EFIAPI CheckTheImage (IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This, IN UINT8 ImageIndex, IN CONST VOID *Image, IN UINTN ImageSize, OUT UINT32 *ImageUpdatable)
 
EFI_STATUS EFIAPI SetTheImage (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)
 
EFI_STATUS EFIAPI GetPackageInfo (IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This, OUT UINT32 *PackageVersion, OUT CHAR16 **PackageVersionName, OUT UINT32 *PackageVersionNameMaxLen, OUT UINT64 *AttributesSupported, OUT UINT64 *AttributesSetting)
 
EFI_STATUS EFIAPI SetPackageInfo (IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This, IN CONST VOID *Image, IN UINTN ImageSize, IN CONST VOID *VendorCode, IN UINT32 PackageVersion, IN CONST CHAR16 *PackageVersionName)
 
VOID EFIAPI FmpDxeLockEventNotify (IN EFI_EVENT Event, IN VOID *Context)
 
EFI_STATUS EFIAPI InstallFmpInstance (IN EFI_HANDLE Handle)
 
EFI_STATUS EFIAPI UninstallFmpInstance (IN EFI_HANDLE Handle)
 
EFI_STATUS EFIAPI FmpDxeLibDestructor (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
EFI_STATUS EFIAPI FmpDxeEntryPoint (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 

Variables

const EFI_GUID mDefaultModuleFileGuid
 
BOOLEAN mFmpSingleInstance = FALSE
 
EDKII_FIRMWARE_MANAGEMENT_PROGRESS_PROTOCOL mFmpProgress
 
const FIRMWARE_MANAGEMENT_PRIVATE_DATA mFirmwareManagementPrivateDataTemplate
 
EFI_GUIDmLockGuid = NULL
 
EFI_FIRMWARE_MANAGEMENT_UPDATE_IMAGE_PROGRESS mProgressFunc = NULL
 
CHAR16 * mImageIdName = NULL
 

Detailed Description

Produces a Firmware Management Protocol that supports updates to a firmware image stored in a firmware device with platform and firmware device specific information provided through PCDs and libraries.

Copyright (c) Microsoft Corporation.
Copyright (c) 2018 - 2020, Intel Corporation. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file FmpDxe.c.

Function Documentation

◆ CheckTheImage()

EFI_STATUS EFIAPI CheckTheImage ( 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_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 1105 of file FmpDxe.c.

◆ CheckTheImageInternal()

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

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.
[out]LastAttemptStatusA pointer to a UINT32 that holds the last attempt status to report back to the ESRT table in case of error. If an error does not occur, this function will set the value to LAST_ATTEMPT_STATUS_SUCCESS.

This function will return error codes that occur within this function implementation within a driver range of last attempt error codes from LAST_ATTEMPT_STATUS_DRIVER_MIN_ERROR_CODE_VALUE to LAST_ATTEMPT_STATUS_DRIVER_MAX_ERROR_CODE_VALUE.

This function might also return error codes that occur within libraries linked against this module that return last attempt error codes such as:

LAST_ATTEMPT_STATUS_FMP_DEPENDENCY_LIB_MIN_ERROR_CODE_VALUE to LAST_ATTEMPT_STATUS_FMP_DEPENDENCY_LIB_MAX_ERROR_CODE_VALUE

LAST_ATTEMPT_STATUS_FMP_DEPENDENCY_CHECK_LIB_MIN_ERROR_CODE_VALUE to LAST_ATTEMPT_STATUS_FMP_DEPENDENCY_CHECK_LIB_MAX_ERROR_CODE_VALUE

Return values
EFI_SUCCESSThe image was successfully checked.
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 763 of file FmpDxe.c.

◆ FmpDxeEntryPoint()

EFI_STATUS EFIAPI FmpDxeEntryPoint ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Main entry for this driver/library.

Parameters
[in]ImageHandleImage handle this driver.
[in]SystemTablePointer to SystemTable.

Definition at line 1905 of file FmpDxe.c.

◆ FmpDxeLibDestructor()

EFI_STATUS EFIAPI FmpDxeLibDestructor ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Unloads the application and its installed protocol.

Parameters
ImageHandleHandle that identifies the image to be unloaded.
SystemTableThe system table.
Return values
EFI_SUCCESSThe image has been unloaded.

Definition at line 1884 of file FmpDxe.c.

◆ FmpDxeLockEventNotify()

VOID EFIAPI FmpDxeLockEventNotify ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

Event notification function that is invoked when the event GUID specified by PcdFmpDeviceLockEventGuid is signaled.

Parameters
[in]EventEvent whose notification function is being invoked.
[in]ContextThe pointer to the notification function's context, which is implementation-dependent.

Definition at line 1599 of file FmpDxe.c.

◆ FmpDxeProgress()

EFI_STATUS EFIAPI FmpDxeProgress ( IN UINTN  Completion)

Callback function to report the process of the firmware updating.

Wrap the caller's version in this so that progress from the device lib is within the expected range. Convert device lib 0% - 100% to 6% - 98%.

FmpDxe 1% - 5% for validation FmpDeviceLib 6% - 98% for flashing/update FmpDxe 99% - 100% finish

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_SUCCESSThe progress was updated.
EFI_UNSUPPORTEDUpdating progress is not supported.

Definition at line 125 of file FmpDxe.c.

◆ GetAllHeaderSize()

UINT32 GetAllHeaderSize ( IN CONST EFI_FIRMWARE_IMAGE_AUTHENTICATION Image,
IN UINT32  AdditionalHeaderSize 
)

Helper function to safely calculate the size of all headers within an EFI_FIRMWARE_IMAGE_AUTHENTICATION structure.

Parameters
[in]ImagePointer to the image.
[in]AdditionalHeaderSizeSize of any headers that cannot be calculated by this function.
Return values
UINT32>0Valid size of all the headers.
0Structure is bad and size cannot be found.

Definition at line 691 of file FmpDxe.c.

◆ GetFmpHeader()

VOID * GetFmpHeader ( IN CONST EFI_FIRMWARE_IMAGE_AUTHENTICATION Image,
IN CONST UINTN  ImageSize,
IN CONST UINTN  AdditionalHeaderSize,
OUT UINTN *PayloadSize  OPTIONAL 
)

Helper function to safely retrieve the FMP header from within an EFI_FIRMWARE_IMAGE_AUTHENTICATION structure.

Parameters
[in]ImagePointer to the image.
[in]ImageSizeSize of the image.
[in]AdditionalHeaderSizeSize of any headers that cannot be calculated by this function.
[out]PayloadSizeAn optional pointer to a UINTN that holds the size of the payload (image size minus headers)
Return values
!NULLValid pointer to the header.
NULLStructure is bad and pointer cannot be found.

Definition at line 653 of file FmpDxe.c.

◆ GetImageTypeIdGuid()

EFI_GUID * GetImageTypeIdGuid ( VOID  )

Returns a pointer to the ImageTypeId GUID value. An attempt is made to get the GUID value from the FmpDeviceLib. If the FmpDeviceLib does not provide a GUID value, then PcdFmpDeviceImageTypeIdGuid is used. If the size of PcdFmpDeviceImageTypeIdGuid is not the size of EFI_GUID, then gEfiCallerIdGuid is returned.

Return values
TheImageTypeId GUID

Definition at line 160 of file FmpDxe.c.

◆ GetImageTypeNameString()

CHAR16 * GetImageTypeNameString ( VOID  )

Returns a pointer to the Null-terminated Unicode ImageIdName string.

Return values
Null-terminatedUnicode ImageIdName string.

Definition at line 204 of file FmpDxe.c.

◆ GetLowestSupportedVersion()

UINT32 GetLowestSupportedVersion ( FIRMWARE_MANAGEMENT_PRIVATE_DATA Private)

Lowest supported version is a combo of three parts.

  1. Check if the device lib has a lowest supported version
  2. Check if we have a variable for lowest supported version (this will be updated with each capsule applied)
  3. Check Fixed at build PCD
Parameters
[in]PrivatePointer to the private context structure for the Firmware Management Protocol instance.
Return values
Thelargest value

Definition at line 224 of file FmpDxe.c.

◆ GetPackageInfo()

EFI_STATUS EFIAPI GetPackageInfo ( 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 1532 of file FmpDxe.c.

◆ GetTheImage()

EFI_STATUS EFIAPI GetTheImage ( IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL This,
IN UINT8  ImageIndex,
IN 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.
[in,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 567 of file FmpDxe.c.

◆ GetTheImageInfo()

EFI_STATUS EFIAPI GetTheImageInfo ( 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 451 of file FmpDxe.c.

◆ InstallFmpInstance()

EFI_STATUS EFIAPI InstallFmpInstance ( IN EFI_HANDLE  Handle)

Function to install FMP instance.

Parameters
[in]HandleThe device handle to install a FMP instance on.
Return values
EFI_SUCCESSFMP Installed
EFI_INVALID_PARAMETERHandle was invalid
otherError installing FMP

Definition at line 1644 of file FmpDxe.c.

◆ PopulateDescriptor()

VOID PopulateDescriptor ( FIRMWARE_MANAGEMENT_PRIVATE_DATA Private)

Populates the EFI_FIRMWARE_IMAGE_DESCRIPTOR structure in the private context structure.

Parameters
[in]PrivatePointer to the private context structure for the Firmware Management Protocol instance.

Definition at line 282 of file FmpDxe.c.

◆ SetPackageInfo()

EFI_STATUS EFIAPI SetPackageInfo ( 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 1577 of file FmpDxe.c.

◆ SetTheImage()

EFI_STATUS EFIAPI SetTheImage ( 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 1166 of file FmpDxe.c.

◆ UninstallFmpInstance()

EFI_STATUS EFIAPI UninstallFmpInstance ( IN EFI_HANDLE  Handle)

Function to uninstall FMP instance.

Parameters
[in]HandleThe device handle to install a FMP instance on.
Return values
EFI_SUCCESSFMP Installed
EFI_INVALID_PARAMETERHandle was invalid
otherError installing FMP

Definition at line 1799 of file FmpDxe.c.

Variable Documentation

◆ mDefaultModuleFileGuid

const EFI_GUID mDefaultModuleFileGuid
Initial value:
= {
0x78ef0a56, 0x1cf0, 0x4535, { 0xb5, 0xda, 0xf6, 0xfd, 0x2f, 0x40, 0x5a, 0x11 }
}

FILE_GUID from FmpDxe.inf. When FmpDxe.inf is used in a platform, the FILE_GUID must always be overridden in the <Defines> section to provide the ESRT GUID value associated with the updatable firmware image. A check is made in this module's driver entry point to verify that a new FILE_GUID value has been defined.

Definition at line 23 of file FmpDxe.c.

◆ mFirmwareManagementPrivateDataTemplate

const FIRMWARE_MANAGEMENT_PRIVATE_DATA mFirmwareManagementPrivateDataTemplate

Definition at line 42 of file FmpDxe.c.

◆ mFmpProgress

Firmware Management Protocol instance that is initialized in the entry point from PCD settings.

Definition at line 36 of file FmpDxe.c.

◆ mFmpSingleInstance

BOOLEAN mFmpSingleInstance = FALSE

TRUE if FmpDeviceLib manages a single firmware storage device.

Definition at line 30 of file FmpDxe.c.

◆ mImageIdName

CHAR16* mImageIdName = NULL

Null-terminated Unicode string retrieved from PcdFmpDeviceImageIdName.

Definition at line 101 of file FmpDxe.c.

◆ mLockGuid

EFI_GUID* mLockGuid = NULL

GUID that is used to create event used to lock the firmware storage device.

Definition at line 91 of file FmpDxe.c.

◆ mProgressFunc

Progress() function pointer passed into SetTheImage()

Definition at line 96 of file FmpDxe.c.