BaseTools: Fix a bug in the VPD report generation

Changed the if condition to check whether current Region is FD VPD region
to fix a bug in the VPD report generation.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19139 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Yonghong Zhu 2015-12-07 09:03:35 +00:00 committed by yzhu52
parent ca9d6d7962
commit 043928da6a
1 changed files with 3 additions and 3 deletions

View File

@ -1389,11 +1389,11 @@ class FdReport(object):
self.FdRegionList = [FdRegionReport(FdRegion, Wa) for FdRegion in Fd.RegionList]
self.FvPath = os.path.join(Wa.BuildDir, "FV")
self.VpdFilePath = os.path.join(self.FvPath, "%s.map" % Wa.Platform.VpdToolGuid)
VpdPcdToken = 'gEfiMdeModulePkgTokenSpaceGuid'
VpdPcdName = 'PcdVpdBaseAddress'
self.VPDBaseAddress = 0
self.VPDSize = 0
self.VPDInfoList = []
for index, FdRegion in enumerate(Fd.RegionList):
if (VpdPcdName, VpdPcdToken) == FdRegion.PcdOffset:
if str(FdRegion.RegionType) is 'FILE' and Wa.Platform.VpdToolGuid in str(FdRegion.RegionDataList):
self.VPDBaseAddress = self.FdRegionList[index].BaseAddress
self.VPDSize = self.FdRegionList[index].Size
break