diff options
author | Star Zeng <star.zeng@intel.com> | 2016-10-24 15:53:21 +0800 |
---|---|---|
committer | Star Zeng <star.zeng@intel.com> | 2016-10-27 21:47:49 +0800 |
commit | 7bd394623aa89d0f2fc871fd69d8a8762738de14 (patch) | |
tree | 1d7b5f8d348bb7d3dd76afb3dd6082cb189faefd /MdeModulePkg | |
parent | f66ad5d2d7f7cc866d0cae69b30cd758bb2ceb04 (diff) | |
download | edk2-platforms-7bd394623aa89d0f2fc871fd69d8a8762738de14.tar.xz |
MdeModulePkg PeiCore: Make sure FvInfo has FFS2 format if Ffs2Guid FvFormat
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=160
Cc: Liming Gao <liming.gao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Core/Pei/FwVol/FwVol.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/MdeModulePkg/Core/Pei/FwVol/FwVol.c b/MdeModulePkg/Core/Pei/FwVol/FwVol.c index d2eb0bc35b..8d07bd0747 100644 --- a/MdeModulePkg/Core/Pei/FwVol/FwVol.c +++ b/MdeModulePkg/Core/Pei/FwVol/FwVol.c @@ -565,6 +565,20 @@ FirmwareVolmeInfoPpiNotifyCallback ( IsFvInfo2 = FALSE;
}
+ if (CompareGuid (&FvInfo2Ppi.FvFormat, &gEfiFirmwareFileSystem2Guid)) {
+ //
+ // gEfiFirmwareFileSystem2Guid is specified for FvFormat, then here to check the
+ // FileSystemGuid pointed by FvInfo against gEfiFirmwareFileSystem2Guid to make sure
+ // FvInfo has the firmware file system 2 format.
+ //
+ // If the ASSERT really appears, FvFormat needs to be specified correctly, for example,
+ // gEfiFirmwareFileSystem3Guid can be used for firmware file system 3 format, or
+ // ((EFI_FIRMWARE_VOLUME_HEADER *) FvInfo)->FileSystemGuid can be just used for both
+ // firmware file system 2 and 3 format.
+ //
+ ASSERT (CompareGuid (&(((EFI_FIRMWARE_VOLUME_HEADER *) FvInfo2Ppi.FvInfo)->FileSystemGuid), &gEfiFirmwareFileSystem2Guid));
+ }
+
//
// Locate the corresponding FV_PPI according to founded FV's format guid
//
|