diff options
author | Liming Gao <liming.gao@intel.com> | 2019-01-14 10:31:27 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2019-02-11 12:58:45 +0800 |
commit | 8a1a7774d23297891bd4efc2e9bceebdcff1679a (patch) | |
tree | 811b0b1a69fcbf83574edb71898179dcd8d8b245 /MdeModulePkg/Library | |
parent | 2a784a2cc356df5a8958afe88bc7e844dc0fb7cc (diff) | |
download | edk2-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')
-rw-r--r-- | MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 6 |
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);
|