summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
diff options
context:
space:
mode:
authorLiming Gao <liming.gao@intel.com>2019-01-14 10:31:27 +0800
committerLiming Gao <liming.gao@intel.com>2019-02-11 12:58:45 +0800
commit8a1a7774d23297891bd4efc2e9bceebdcff1679a (patch)
tree811b0b1a69fcbf83574edb71898179dcd8d8b245 /MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
parent2a784a2cc356df5a8958afe88bc7e844dc0fb7cc (diff)
downloadedk2-8a1a7774d23297891bd4efc2e9bceebdcff1679a.zip
edk2-8a1a7774d23297891bd4efc2e9bceebdcff1679a.tar.gz
edk2-8a1a7774d23297891bd4efc2e9bceebdcff1679a.tar.bz2
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>
Diffstat (limited to 'MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c')
-rw-r--r--MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
index fa557b6..f56809b 100644
--- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
+++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
@@ -1422,6 +1422,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
//
return ValidateFmpCapsule(CapsuleHeader, NULL);