]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Fix a bug for Mixed Pcd value display in the report
authorYonghong Zhu <yonghong.zhu@intel.com>
Sun, 10 Sep 2017 08:23:09 +0000 (16:23 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Mon, 11 Sep 2017 02:58:45 +0000 (10:58 +0800)
the case is that override the mixed pcd value in DSC [Components]
section, the value display in the report is incorrect.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/Python/AutoGen/AutoGen.py

index 70e2e62057c1d37451779388462c2310680f59fa..1a8c0d9d31afa348fca185a52ea7c8302be89e8b 100644 (file)
@@ -2335,8 +2335,18 @@ class PlatformAutoGen(AutoGen):
         if Module in self.Platform.Modules:\r
             PlatformModule = self.Platform.Modules[str(Module)]\r
             for Key  in PlatformModule.Pcds:\r
+                Flag = False\r
                 if Key in Pcds:\r
-                    self._OverridePcd(Pcds[Key], PlatformModule.Pcds[Key], Module)\r
+                    ToPcd = Pcds[Key]\r
+                    Flag = True\r
+                elif Key in GlobalData.MixedPcd:\r
+                    for PcdItem in GlobalData.MixedPcd[Key]:\r
+                        if PcdItem in Pcds:\r
+                            ToPcd = Pcds[PcdItem]\r
+                            Flag = True\r
+                            break\r
+                if Flag:\r
+                    self._OverridePcd(ToPcd, PlatformModule.Pcds[Key], Module)\r
         return Pcds.values()\r
 \r
     ## Resolve library names to library modules\r