Use alternative algorithm to collect PCD default value from all platform dependent...
authorqhuang8 <qhuang8@c2973edb-eda0-4c78-bc6a-9341b269661f>
Sat, 20 Feb 2010 03:22:58 +0000 (03:22 +0000)
committerqhuang8 <qhuang8@c2973edb-eda0-4c78-bc6a-9341b269661f>
Sat, 20 Feb 2010 03:22:58 +0000 (03:22 +0000)
git-svn-id: https://edk2-buildtools.svn.sourceforge.net/svnroot/edk2-buildtools/trunk/BaseTools@1878 c2973edb-eda0-4c78-bc6a-9341b269661f

Source/Python/build/BuildReport.py

index f0eb9d6..9c690b7 100755 (executable)
@@ -1071,22 +1071,14 @@ class FdRegionReport(object):
             self._DiscoverNestedFvList(FvName, Wa)
 
         PlatformPcds = {}
             self._DiscoverNestedFvList(FvName, Wa)
 
         PlatformPcds = {}
-        for Pa in Wa.AutoGenObjectList:
-            PackageList = []
-            for ModuleKey in Pa.Platform.Modules:
-                #
-                # Collect PCD DEC default value.
-                #
-                Module = Pa.Platform.Modules[ModuleKey]
-                for Package in Module.M.Module.Packages:
-                    if Package not in PackageList:
-                        PackageList.append(Package)
-
-            for Package in PackageList:
-                for (TokenCName, TokenSpaceGuidCName, DecType) in Package.Pcds:
-                    DecDefaultValue = Package.Pcds[TokenCName, TokenSpaceGuidCName, DecType].DefaultValue
-                    PlatformPcds[(TokenCName, TokenSpaceGuidCName)] = DecDefaultValue
-
+        
+        #
+        # Collect PCDs declared in DEC files.
+        #
+        for Package in Wa.BuildDatabase.WorkspaceDb.PackageList:
+            for (TokenCName, TokenSpaceGuidCName, DecType) in Package.Pcds:
+                DecDefaultValue = Package.Pcds[TokenCName, TokenSpaceGuidCName, DecType].DefaultValue
+                PlatformPcds[(TokenCName, TokenSpaceGuidCName)] = DecDefaultValue
         #
         # Collect PCDs defined in DSC common section
         #
         #
         # Collect PCDs defined in DSC common section
         #