MdeModulePkg/CapsuleLib: Follow UEFI 22.2.3 to process FMP.
Previous logic does not follow UEFI 22.2.3 to process FMP strictly. It may cause FMP image not be processed in some corner case. The updated logic follows UEFI 22.2.3. The way to check if a capsule is processed is also simplified. The function - ProcessFmpCapsuleImage() is too big, so that we created sub-functions - StartFmpImage(), DumpAllFmpInfo(), GetFmpHandleBufferByType(), SetFmpImageData(), RecordFmpCapsuleStatus() to improve the readability. The function - ProcessTheseCapsules() is too big, so that we created sub-functions - InitCapsulePtr(), AreAllImagesProcessed(), PopulateCapsuleInConfigurationTable() to improve the readability. Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
@@ -19,26 +19,6 @@
|
||||
#include <Guid/FmpCapsule.h>
|
||||
#include <Library/CapsuleLib.h>
|
||||
|
||||
/**
|
||||
Check if this FMP capsule is processed.
|
||||
|
||||
@param[in] CapsuleHeader The capsule image header
|
||||
@param[in] PayloadIndex FMP payload index
|
||||
@param[in] ImageHeader FMP image header
|
||||
|
||||
@retval TRUE This FMP capsule is processed.
|
||||
@retval FALSE This FMP capsule is not processed.
|
||||
**/
|
||||
BOOLEAN
|
||||
IsFmpCapsuleProcessed (
|
||||
IN EFI_CAPSULE_HEADER *CapsuleHeader,
|
||||
IN UINTN PayloadIndex,
|
||||
IN EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER *ImageHeader
|
||||
)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
Record capsule status variable and to local cache.
|
||||
|
||||
|
Reference in New Issue
Block a user