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....@intel.com> --- Source/Python/build/BuildReport.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Python/build/BuildReport.py b/Source/Python/build/BuildReport.py index 38e55f3..d376244 100644 --- a/Source/Python/build/BuildReport.py +++ b/Source/Python/build/BuildReport.py @@ -1387,15 +1387,15 @@ class FdReport(object): self.BaseAddress = Fd.BaseAddress self.Size = Fd.Size 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 if os.path.isfile(self.VpdFilePath): -- 2.6.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel