]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: fix a bug for PEI VPD Pcd collection
authorYonghong Zhu <yonghong.zhu@intel.com>
Tue, 19 Apr 2016 02:43:57 +0000 (10:43 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Tue, 19 Apr 2016 10:40:37 +0000 (18:40 +0800)
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>
BaseTools/Source/Python/AutoGen/AutoGen.py

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