mirror of https://github.com/acidanthera/audk.git
Fixed EDKT469
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1951 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
b8cc11a572
commit
e425f07334
|
@ -119,6 +119,15 @@ public class AutoGen {
|
|||
private List<String> setVirtalAddList = new ArrayList<String>();
|
||||
private List<String> exitBootServiceList = new ArrayList<String>();
|
||||
|
||||
//
|
||||
// flag of PcdComponentNameDisable, PcdDriverDiagnosticDisable
|
||||
//
|
||||
private boolean componentNamePcd = false;
|
||||
private boolean driverDiagnostPcd = false;
|
||||
|
||||
//
|
||||
// Instance of SurfaceAreaQuery
|
||||
//
|
||||
private SurfaceAreaQuery saq = null;
|
||||
|
||||
private ModuleIdentification parentId = null;
|
||||
|
@ -240,6 +249,8 @@ public class AutoGen {
|
|||
Faile to create module AutoGen.c & AutoGen.h.
|
||||
**/
|
||||
void moduleGenAutogen() throws EdkException {
|
||||
setPcdComponentName();
|
||||
setPcdDriverDiagnostic();
|
||||
collectLibInstanceInfo();
|
||||
moduleGenAutogenC();
|
||||
moduleGenAutogenH();
|
||||
|
@ -1669,12 +1680,6 @@ public class AutoGen {
|
|||
**/
|
||||
void ExternsDriverBindingToAutoGenC(StringBuffer fileBuffer)
|
||||
throws EdkException {
|
||||
//
|
||||
// Flag to indicate whether need to replace cmponentName/DriverDiagnostic
|
||||
// to NULL.
|
||||
//
|
||||
boolean componentNamePcd = false;
|
||||
boolean driverDiagnostPcd = false;
|
||||
//
|
||||
// Get the arry of extern. The driverBindingGroup is a 2 dimension array.
|
||||
// The second dimension is include following element: DriverBinding,
|
||||
|
@ -1682,22 +1687,6 @@ public class AutoGen {
|
|||
//
|
||||
String[][] driverBindingGroup = this.saq.getExternProtocolGroup();
|
||||
|
||||
//
|
||||
// Get the Pcd Value of ComponentName and DriverDiagnostic to
|
||||
// decide whether need to disable the componentName and
|
||||
// DriverDiagnostic.
|
||||
//
|
||||
|
||||
String pcdValue = null;
|
||||
pcdValue = saq.getPcdValueBycName("PcdComponentNameDisable");
|
||||
if (pcdValue != null && pcdValue.equalsIgnoreCase("true")) {
|
||||
componentNamePcd = true;
|
||||
}
|
||||
|
||||
pcdValue = saq.getPcdValueBycName("PcdDriverDiagnosticsDisable");
|
||||
if (pcdValue != null && pcdValue.equalsIgnoreCase("true")) {
|
||||
driverDiagnostPcd = true;
|
||||
}
|
||||
|
||||
//
|
||||
// inital BitMask;
|
||||
|
@ -1718,7 +1707,7 @@ public class AutoGen {
|
|||
//
|
||||
// Write component name protocol extern to autogen.c
|
||||
//
|
||||
if (componentNamePcd) {
|
||||
if (!componentNamePcd) {
|
||||
for (int i = 0; i < driverBindingGroup.length; i++) {
|
||||
if (driverBindingGroup[i][1]!= null) {
|
||||
if (driverBindingGroup[i][0] != null) {
|
||||
|
@ -1752,7 +1741,7 @@ public class AutoGen {
|
|||
//
|
||||
// Write driver dignastic protocol extern to autogen.c
|
||||
//
|
||||
if (driverDiagnostPcd) {
|
||||
if (!driverDiagnostPcd) {
|
||||
for (int i = 0; i < driverBindingGroup.length; i++) {
|
||||
if (driverBindingGroup[i][3] != null) {
|
||||
if (driverBindingGroup[i][0] != null) {
|
||||
|
@ -1809,7 +1798,7 @@ public class AutoGen {
|
|||
//
|
||||
// ComponentName
|
||||
//
|
||||
if (driverBindingGroup[i][1] != null && componentNamePcd) {
|
||||
if (driverBindingGroup[i][1] != null && componentNamePcd != true) {
|
||||
fileBuffer.append(" &");
|
||||
fileBuffer.append(driverBindingGroup[i][1]);
|
||||
fileBuffer.append(", \r\n");
|
||||
|
@ -1831,7 +1820,7 @@ public class AutoGen {
|
|||
//
|
||||
// DriverDiagnostic
|
||||
//
|
||||
if (driverBindingGroup[i][3] != null && driverDiagnostPcd) {
|
||||
if (driverBindingGroup[i][3] != null && driverDiagnostPcd != true) {
|
||||
fileBuffer.append(" &");
|
||||
fileBuffer.append(driverBindingGroup[i][3]);
|
||||
fileBuffer.append(", \r\n");
|
||||
|
@ -1970,7 +1959,6 @@ public class AutoGen {
|
|||
// Process library instance one by one.
|
||||
//
|
||||
for (int i = 0; i < orderList.size(); i++) {
|
||||
|
||||
//
|
||||
// Get library instance basename.
|
||||
//
|
||||
|
@ -2062,7 +2050,6 @@ public class AutoGen {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
private void setVirtualAddressToAutogenC(StringBuffer fileBuffer){
|
||||
|
@ -2213,7 +2200,35 @@ public class AutoGen {
|
|||
fileBuffer.append(",\r\n NULL");
|
||||
fileBuffer.append("\r\n};\r\n\r\n");
|
||||
}
|
||||
}
|
||||
/**
|
||||
setPcdComponentName
|
||||
|
||||
Get the Pcd Value of ComponentName to
|
||||
decide whether need to disable the componentName.
|
||||
|
||||
**/
|
||||
public void setPcdComponentName (){
|
||||
String pcdValue = null;
|
||||
pcdValue = saq.getPcdValueBycName("PcdComponentNameDisable");
|
||||
if (pcdValue != null && pcdValue.equalsIgnoreCase("true")) {
|
||||
this.componentNamePcd = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
setPcdDriverDiagnostic
|
||||
|
||||
Get the Pcd Value of DriverDiagnostic to
|
||||
decide whether need to disable DriverDiagnostic.
|
||||
|
||||
**/
|
||||
public void setPcdDriverDiagnostic (){
|
||||
String pcdValue = null;
|
||||
pcdValue = saq.getPcdValueBycName("PcdDriverDiagnosticsDisable");
|
||||
if (pcdValue != null && pcdValue.equalsIgnoreCase("true")) {
|
||||
this.driverDiagnostPcd = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -77,7 +77,6 @@ public class SurfaceAreaQuery {
|
|||
// keep the namep declaration for xmlbeans Xpath query
|
||||
//
|
||||
private String queryDeclaration = null;
|
||||
|
||||
private StringBuffer normQueryString = new StringBuffer(4096);
|
||||
private Pattern xPathPattern = Pattern.compile("([^/]*)(/|//)([^/]+)");
|
||||
|
||||
|
|
Loading…
Reference in New Issue