]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java
add support arch check for pcd entries when adding a module to platform, sync. platfo...
[mirror_edk2.git] / Tools / Java / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / platform / ui / FpdFileContents.java
index d08202b94ec9f924c3ed691cffc4e418d6089580..979d49ca39ae52af73eb652eeded9a44500935a1 100644 (file)
@@ -427,7 +427,7 @@ public class FpdFileContents {
                     if (nextMi == null) {\r
                         continue;\r
                     }\r
-                    if (WorkspaceProfile.pcdInMsa(saaModuleSaPcd[i][0], saaModuleSaPcd[i][1], nextMi)) {\r
+                    if (WorkspaceProfile.pcdInMsa(saaModuleSaPcd[i][0], saaModuleSaPcd[i][1], arch, nextMi)) {\r
                         continue nextPcd;\r
                     }\r
                 }\r
@@ -455,6 +455,13 @@ public class FpdFileContents {
                             }\r
                         }\r
                     }\r
+                    // Check sup arch conformance for the new PCD\r
+                    if (msaPcd.getSupArchList() != null) {\r
+                       String newPcdArch = msaPcd.getSupArchList().toString();\r
+                       if (!newPcdArch.toLowerCase().contains(arch.toLowerCase())) {\r
+                               continue;\r
+                       }\r
+                    }\r
                     \r
                     PackageIdentification[] depPkgs = SurfaceAreaQuery.getDependencePkg(null, vMi.get(i));\r
                     PcdDeclarationsDocument.PcdDeclarations.PcdEntry spdPcd = LookupPcdDeclaration(msaPcd, depPkgs);\r
@@ -686,7 +693,7 @@ public class FpdFileContents {
         \r
         int pcdSourceCount = 0;\r
         for (int i = 0; i < vMi.size(); ++i) {\r
-            if (WorkspaceProfile.pcdInMsa(cName, tsGuidCName, vMi.get(i))) {\r
+            if (WorkspaceProfile.pcdInMsa(cName, tsGuidCName, null, vMi.get(i))) {\r
                 pcdSourceCount++;\r
             }\r
         }\r
@@ -1179,6 +1186,11 @@ public class FpdFileContents {
         ListIterator li = l.listIterator();\r
         while (li.hasNext()) {\r
             PcdCodedDocument.PcdCoded.PcdEntry msaPcd = (PcdCodedDocument.PcdCoded.PcdEntry) li.next();\r
+            if (msaPcd.getSupArchList() != null) {\r
+               if (!msaPcd.getSupArchList().toString().toLowerCase().contains(arch.toLowerCase())) {\r
+                       continue;\r
+               }\r
+            }\r
             PcdDeclarationsDocument.PcdDeclarations.PcdEntry spdPcd = LookupPcdDeclaration(msaPcd, depPkgs);\r
             if (spdPcd == null) {\r
                 //\r