diff options
author | jlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-12-28 08:45:08 +0000 |
---|---|---|
committer | jlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-12-28 08:45:08 +0000 |
commit | 11c5f0713c3c6112c9f595671a3e0c49b7fda509 (patch) | |
tree | 99bc15abbb3937fbd69d374088e28b3c85012a3e /Tools | |
parent | a9e882c96dd107020c423a0788778d1cf8bef933 (diff) | |
download | edk2-platforms-11c5f0713c3c6112c9f595671a3e0c49b7fda509.tar.xz |
add support arch check for pcd entries when adding a module to platform, sync. platform pcd with msa pcd and adding library instances.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2149 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools')
4 files changed, 46 insertions, 17 deletions
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java index d08202b94e..979d49ca39 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java @@ -427,7 +427,7 @@ public class FpdFileContents { if (nextMi == null) {
continue;
}
- if (WorkspaceProfile.pcdInMsa(saaModuleSaPcd[i][0], saaModuleSaPcd[i][1], nextMi)) {
+ if (WorkspaceProfile.pcdInMsa(saaModuleSaPcd[i][0], saaModuleSaPcd[i][1], arch, nextMi)) {
continue nextPcd;
}
}
@@ -455,6 +455,13 @@ public class FpdFileContents { }
}
}
+ // Check sup arch conformance for the new PCD
+ if (msaPcd.getSupArchList() != null) {
+ String newPcdArch = msaPcd.getSupArchList().toString();
+ if (!newPcdArch.toLowerCase().contains(arch.toLowerCase())) {
+ continue;
+ }
+ }
PackageIdentification[] depPkgs = SurfaceAreaQuery.getDependencePkg(null, vMi.get(i));
PcdDeclarationsDocument.PcdDeclarations.PcdEntry spdPcd = LookupPcdDeclaration(msaPcd, depPkgs);
@@ -686,7 +693,7 @@ public class FpdFileContents { int pcdSourceCount = 0;
for (int i = 0; i < vMi.size(); ++i) {
- if (WorkspaceProfile.pcdInMsa(cName, tsGuidCName, vMi.get(i))) {
+ if (WorkspaceProfile.pcdInMsa(cName, tsGuidCName, null, vMi.get(i))) {
pcdSourceCount++;
}
}
@@ -1179,6 +1186,11 @@ public class FpdFileContents { ListIterator li = l.listIterator();
while (li.hasNext()) {
PcdCodedDocument.PcdCoded.PcdEntry msaPcd = (PcdCodedDocument.PcdCoded.PcdEntry) li.next();
+ if (msaPcd.getSupArchList() != null) {
+ if (!msaPcd.getSupArchList().toString().toLowerCase().contains(arch.toLowerCase())) {
+ continue;
+ }
+ }
PcdDeclarationsDocument.PcdDeclarations.PcdEntry spdPcd = LookupPcdDeclaration(msaPcd, depPkgs);
if (spdPcd == null) {
//
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java index 2d8b23760e..9e4df720b0 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java @@ -672,17 +672,18 @@ public class FpdFrameworkModules extends IInternalFrame { }
private void showSettingsDlg (int row) {
- try {
- Vector<String> vExceptions = new Vector<String>();
- if (ffc.adjustPcd(row, vExceptions)) {
- JOptionPane.showMessageDialog(frame, "Pcd entries sync. with those in MSA files.");
- docConsole.setSaved(false);
- }
- }
- catch (Exception exp) {
- JOptionPane.showMessageDialog(frame, exp.getMessage());
-// return;
- }
+// As PCD sync. check is full platform range now during opening FrameworkModules editor,
+// the following check is no longer needed.
+// try {
+// Vector<String> vExceptions = new Vector<String>();
+// if (ffc.adjustPcd(row, vExceptions)) {
+// JOptionPane.showMessageDialog(frame, "Pcd entries sync. with those in MSA files.");
+// docConsole.setSaved(false);
+// }
+// }
+// catch (Exception exp) {
+// JOptionPane.showMessageDialog(frame, exp.getMessage());
+// }
if (settingDlg == null) {
settingDlg = new FpdModuleSA(ffc);
@@ -864,7 +865,7 @@ public class FpdFrameworkModules extends IInternalFrame { for (int i = 0; i < vExceptions.size(); ++i) {
errorMsg += " " + vExceptions.get(i) + "\n";
}
- JOptionPane.showMessageDialog(frame, "Error occurred during synchronization:" + errorMsg);
+ JOptionPane.showMessageDialog(frame, "Error occurred during synchronization:\n" + errorMsg);
}
}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java index 22bcf498ac..fc715516ed 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java @@ -581,12 +581,21 @@ public class FpdModuleSA extends JDialog implements ActionListener { }
+ private String getModuleArch () {
+ String arch = "";
+ String[] moduleInfo = moduleKey.split(" ");
+ for (int i = 4; i < moduleInfo.length; ++i) {
+ arch += moduleInfo[i];
+ arch += " ";
+ }
+ return arch.trim();
+ }
private void addLibInstance (ModuleIdentification libMi) throws Exception{
//
// Add pcd information of selected instance to current moduleSA
//
- ffc.addFrameworkModulesPcdBuildDefs(libMi, null, ffc.getModuleSA(moduleKey));
+ ffc.addFrameworkModulesPcdBuildDefs(libMi, getModuleArch(), ffc.getModuleSA(moduleKey));
ffc.genLibraryInstance(libMi, moduleKey);
}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/global/WorkspaceProfile.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/global/WorkspaceProfile.java index b06a97b0d7..8b0f4ccc1b 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/global/WorkspaceProfile.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/global/WorkspaceProfile.java @@ -130,7 +130,7 @@ public class WorkspaceProfile { return msa.getModuleDefinitions().getOutputFileBasename();
}
- public static boolean pcdInMsa (String cName, String tsGuid, ModuleIdentification mi) {
+ public static boolean pcdInMsa (String cName, String tsGuid, String supArchList, ModuleIdentification mi) {
ModuleSurfaceAreaDocument.ModuleSurfaceArea msa = (ModuleSurfaceAreaDocument.ModuleSurfaceArea)getModuleXmlObject(mi);
if (msa.getPcdCoded() == null || msa.getPcdCoded().getPcdEntryList() == null) {
return false;
@@ -139,7 +139,14 @@ public class WorkspaceProfile { while (li.hasNext()) {
PcdCodedDocument.PcdCoded.PcdEntry msaPcd = (PcdCodedDocument.PcdCoded.PcdEntry)li.next();
if (msaPcd.getCName().equals(cName) && msaPcd.getTokenSpaceGuidCName().equals(tsGuid)) {
- return true;
+ if (supArchList != null && msaPcd.getSupArchList() != null) {
+ if (msaPcd.getSupArchList().toString().toLowerCase().contains(supArchList.trim().toLowerCase())) {
+ return true;
+ }
+ }
+ else{
+ return true;
+ }
}
}
return false;
|