BaseTools: fix a bug for PEI VPD Pcd collection

When a PEI phase VPD PCD only list in the DSC IA32 arch, then build X64
arch image, it missed to collect this PEI VPD pcd into VPD Pcd map file.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Yonghong Zhu 2016-04-19 10:43:57 +08:00
parent e642ceb8a5
commit 61ee1dff16
1 changed files with 10 additions and 5 deletions

View File

@ -861,6 +861,7 @@ class PlatformAutoGen(AutoGen):
#
_DynaPcdList_ = []
_NonDynaPcdList_ = []
_PlatformPcds = {}
#
# The priority list while override build option
@ -1215,6 +1216,10 @@ class PlatformAutoGen(AutoGen):
VpdFile = VpdInfoFile.VpdInfoFile()
NeedProcessVpdMapFile = False
for pcd in self.Platform.Pcds.keys():
if pcd not in self._PlatformPcds.keys():
self._PlatformPcds[pcd] = self.Platform.Pcds[pcd]
if (self.Workspace.ArchList[-1] == self.Arch):
for Pcd in self._DynamicPcdList:
# just pick the a value to determine whether is unicode string type
@ -1233,13 +1238,13 @@ class PlatformAutoGen(AutoGen):
if Pcd.Type in [TAB_PCDS_DYNAMIC_VPD, TAB_PCDS_DYNAMIC_EX_VPD]:
VpdPcdDict[(Pcd.TokenCName, Pcd.TokenSpaceGuidCName)] = Pcd
PlatformPcds = self.Platform.Pcds.keys()
PlatformPcds = self._PlatformPcds.keys()
PlatformPcds.sort()
#
# Add VPD type PCD into VpdFile and determine whether the VPD PCD need to be fixed up.
#
for PcdKey in PlatformPcds:
Pcd = self.Platform.Pcds[PcdKey]
Pcd = self._PlatformPcds[PcdKey]
if Pcd.Type in [TAB_PCDS_DYNAMIC_VPD, TAB_PCDS_DYNAMIC_EX_VPD] and \
PcdKey in VpdPcdDict:
Pcd = VpdPcdDict[PcdKey]
@ -1281,7 +1286,7 @@ class PlatformAutoGen(AutoGen):
# An example is PCD for signature usage.
#
for DscPcd in PlatformPcds:
DscPcdEntry = self.Platform.Pcds[DscPcd]
DscPcdEntry = self._PlatformPcds[DscPcd]
if DscPcdEntry.Type in [TAB_PCDS_DYNAMIC_VPD, TAB_PCDS_DYNAMIC_EX_VPD]:
if not (self.Platform.VpdToolGuid == None or self.Platform.VpdToolGuid == ''):
FoundFlag = False