mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-28 16:14:04 +02:00
If "SupArchList" is defined for a PCD in MSA, should check current arch is in the range of "SupArchList".
If not exist in the range, do not autogen for that PCD. If exist, autogen it. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2136 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
13cbe22d4f
commit
7432a21444
@ -668,7 +668,7 @@ public class AutoGen {
|
|||||||
this.myPcdAutogen = new PCDAutoGenAction(moduleId,
|
this.myPcdAutogen = new PCDAutoGenAction(moduleId,
|
||||||
arch,
|
arch,
|
||||||
true,
|
true,
|
||||||
saq.getModulePcdEntryNameArray(),
|
saq.getModulePcdEntryNameArray(this.arch),
|
||||||
pcdDriverType,
|
pcdDriverType,
|
||||||
parentId);
|
parentId);
|
||||||
this.myPcdAutogen.execute();
|
this.myPcdAutogen.execute();
|
||||||
|
@ -1947,30 +1947,56 @@ public class SurfaceAreaQuery {
|
|||||||
return new ModuleSADocument.ModuleSA[0];
|
return new ModuleSADocument.ModuleSA[0];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Get name array of PCD in a module. In one module, token space
|
Get name array who contains all PCDs in a module according to specified arch.
|
||||||
is same, and token name should not be conflicted.
|
|
||||||
|
@param arch The specified architecture type.
|
||||||
@return String[]
|
|
||||||
|
@return String[] return all PCDs name into array, if no any PCD used by
|
||||||
|
this module, a String[0] array is returned.
|
||||||
**/
|
**/
|
||||||
public String[] getModulePcdEntryNameArray() {
|
public String[] getModulePcdEntryNameArray(String arch) {
|
||||||
PcdCodedDocument.PcdCoded.PcdEntry[] pcdEntries = null;
|
PcdCodedDocument.PcdCoded.PcdEntry[] pcdEntries = null;
|
||||||
String[] results;
|
java.util.List archList = null;
|
||||||
int index;
|
java.util.List<String> results = new java.util.ArrayList<String> ();
|
||||||
String[] xPath = new String[] {"/PcdEntry"};
|
int index;
|
||||||
Object[] returns = get ("PcdCoded", xPath);
|
String[] xPath = new String[] {"/PcdEntry"};
|
||||||
|
Object[] returns = get ("PcdCoded", xPath);
|
||||||
|
|
||||||
if (returns == null) {
|
if (returns == null) {
|
||||||
return new String[0];
|
return new String[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
pcdEntries = (PcdCodedDocument.PcdCoded.PcdEntry[])returns;
|
pcdEntries = (PcdCodedDocument.PcdCoded.PcdEntry[])returns;
|
||||||
results = new String[pcdEntries.length];
|
|
||||||
|
|
||||||
for (index = 0; index < pcdEntries.length; index ++) {
|
for (index = 0; index < pcdEntries.length; index ++) {
|
||||||
results[index] = pcdEntries[index].getCName();
|
archList = pcdEntries[index].getSupArchList();
|
||||||
|
//
|
||||||
|
// If the ArchList is specified in MSA for this PCD, need check
|
||||||
|
// current arch whether can support by this PCD.
|
||||||
|
//
|
||||||
|
if (archList != null) {
|
||||||
|
if (archList.contains(arch)) {
|
||||||
|
results.add(new String(pcdEntries[index].getCName()));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//
|
||||||
|
// If no ArchList is specificied in MSA for this PCD, that means
|
||||||
|
// this PCD support all architectures.
|
||||||
|
//
|
||||||
|
results.add(new String(pcdEntries[index].getCName()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return results;
|
|
||||||
|
if (results.size() == 0) {
|
||||||
|
return new String[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
String[] retArray = new String[results.size()];
|
||||||
|
results.toArray(retArray);
|
||||||
|
|
||||||
|
return retArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user