MdeModulePkg DxeCapsuleLibFmp: Update SupportCapsuleImage() for Fake Capsule

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1088
Per UEFI spec, the fake capsule image with the header only is a valid case
in QueryCapsuleCpapbilities(). So, SupportCapsuleImage() is updated to
support this case.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
This commit is contained in:
Liming Gao 2019-01-14 10:31:27 +08:00
parent 2a784a2cc3
commit 8a1a7774d2
1 changed files with 6 additions and 0 deletions

View File

@ -1421,6 +1421,12 @@ SupportCapsuleImage (
}
if (IsFmpCapsule(CapsuleHeader)) {
//
// Fake capsule header is valid case in QueryCapsuleCpapbilities().
//
if (CapsuleHeader->HeaderSize == CapsuleHeader->CapsuleImageSize) {
return EFI_SUCCESS;
}
//
// Check layout of FMP capsule
//