summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--EdkModulePkg/EdkModulePkg-All-Archs.fpd4
-rw-r--r--Tools/Conf/BuildMacro.xml4
-rw-r--r--Tools/Conf/tools_def.template2
-rw-r--r--Tools/Source/GenBuild/org/tianocore/build/autogen/AutoGen.java39
-rw-r--r--Tools/Source/GenBuild/org/tianocore/build/global/SurfaceAreaQuery.java139
5 files changed, 93 insertions, 95 deletions
diff --git a/EdkModulePkg/EdkModulePkg-All-Archs.fpd b/EdkModulePkg/EdkModulePkg-All-Archs.fpd
index 4bc218c532..a40c309e00 100644
--- a/EdkModulePkg/EdkModulePkg-All-Archs.fpd
+++ b/EdkModulePkg/EdkModulePkg-All-Archs.fpd
@@ -15044,7 +15044,7 @@
"/nologo", "/W3", "/WX", "/c", "/coff", "/DEFI32", "/Fl${DEST_DIR_OUTPUT}/${FILE_PATH}/${FILE_BASENAME}.lst"
</Option>
<Option BuildTargets="DEBUG" ToolChainFamily="MSFT" SupArchList="IA32" ToolCode="ASMLINK"/>
- <Option ToolChainFamily="MSFT" SupArchList="IA32" ToolCode="PP"> "/P", "/TC" </Option>
+ <Option ToolChainFamily="MSFT" SupArchList="IA32" ToolCode="PP"> "/P", "/TC", "/FI${DEST_DIR_DEBUG}/AutoGen.h" </Option>
<Option ToolChainFamily="MSFT" SupArchList="IA32" ToolCode="ASL"> "/nologo" </Option>
<!-- MSFT tool chain options definition : X64 -->
@@ -15062,7 +15062,7 @@
</Option>
<Option ToolChainFamily="MSFT" SupArchList="X64" ToolCode="ASMLINK"> </Option>
<Option ToolChainFamily="MSFT" SupArchList="X64" ToolCode="PP">
- "/P", "/TC"
+ "/P", "/TC", "/FI${DEST_DIR_DEBUG}/AutoGen.h"
</Option>
<Option ToolChainFamily="MSFT" SupArchList="X64" ToolCode="ASL"> "/nologo" </Option>
diff --git a/Tools/Conf/BuildMacro.xml b/Tools/Conf/BuildMacro.xml
index 5696082453..4722908931 100644
--- a/Tools/Conf/BuildMacro.xml
+++ b/Tools/Conf/BuildMacro.xml
@@ -164,7 +164,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<if>
<or>
<equals arg1="@{FILEEXT}" arg2="asm" />
- <equals arg1="@{FILEEXT}" arg2="s" />
+ <equals arg1="@{FILEEXT}" arg2="S" />
</or>
<then>
<Build_Assembly FILEPATH="@{FILEPATH}" FILENAME="@{FILENAME}" FILEEXT="@{FILEEXT}">
@@ -173,7 +173,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
</Build_Assembly>
</then>
<elseif>
- <equals arg1="@{FILEEXT}" arg2="S" />
+ <equals arg1="@{FILEEXT}" arg2="s" />
<then>
<Build_IPF_Assembly_Code FILEPATH="@{FILEPATH}" FILENAME="@{FILENAME}" FILEEXT="@{FILEEXT}">
<EXTRA.INC.1><EXTRA.INC /></EXTRA.INC.1>
diff --git a/Tools/Conf/tools_def.template b/Tools/Conf/tools_def.template
index 8c80d414e7..1ed9446499 100644
--- a/Tools/Conf/tools_def.template
+++ b/Tools/Conf/tools_def.template
@@ -41,7 +41,7 @@
# EBC definitions
*_MSFT_EBC_*_FAMILY = INTEL
*_MSFT_EBC_*_PATH = C:\Program Files\Intel\EBC\Bin
-*_MSFT_EBC_*_SPATH = C:\Program Files\Intel\EBC\Lib\EbcLib.lib
+*_MSFT_EBC_*_SPATH = C:\Progra~1\Intel\EBC\Lib\EbcLib.lib
*_MSFT_EBC_CC_NAME = iec.exe
*_MSFT_EBC_SLINK_NAME = link.exe
diff --git a/Tools/Source/GenBuild/org/tianocore/build/autogen/AutoGen.java b/Tools/Source/GenBuild/org/tianocore/build/autogen/AutoGen.java
index 7de80e6c72..7f9b40e65c 100644
--- a/Tools/Source/GenBuild/org/tianocore/build/autogen/AutoGen.java
+++ b/Tools/Source/GenBuild/org/tianocore/build/autogen/AutoGen.java
@@ -882,16 +882,11 @@ public class AutoGen {
.append("GLOBAL_REMOVE_IF_UNREFERENCED const UINT8 _gDriverEntryPointCount = ");
fileBuffer.append(Integer.toString(entryPointCount));
fileBuffer.append(";\r\n");
- fileBuffer
- .append("static BASE_LIBRARY_JUMP_BUFFER mJumpContext;\r\n");
- fileBuffer
- .append("static EFI_STATUS mDriverEntryPointStatus = EFI_LOAD_ERROR;\r\n\r\n");
-
- fileBuffer.append("EFI_STATUS\r\n");
+ fileBuffer.append("EFI_STATUS\r\n");
fileBuffer.append("EFIAPI\r\n");
fileBuffer.append("ProcessModuleEntryPointList (\r\n");
- fileBuffer.append(" EFI_HANDLE ImageHandle,\r\n");
- fileBuffer.append(" EFI_SYSTEM_TABLE *SystemTable\r\n");
+ fileBuffer.append(" IN EFI_HANDLE ImageHandle,\r\n");
+ fileBuffer.append(" IN EFI_SYSTEM_TABLE *SystemTable\r\n");
fileBuffer.append(" )\r\n\r\n");
fileBuffer.append("{\r\n");
fileBuffer.append(" return EFI_SUCCESS;\r\n");
@@ -924,8 +919,8 @@ public class AutoGen {
fileBuffer.append("EFI_STATUS\r\n");
fileBuffer.append("EFIAPI\r\n");
fileBuffer.append("ProcessModuleEntryPointList (\r\n");
- fileBuffer.append(" EFI_HANDLE ImageHandle,\r\n");
- fileBuffer.append(" EFI_SYSTEM_TABLE *SystemTable\r\n");
+ fileBuffer.append(" IN EFI_HANDLE ImageHandle,\r\n");
+ fileBuffer.append(" IN EFI_SYSTEM_TABLE *SystemTable\r\n");
fileBuffer.append(" )\r\n\r\n");
fileBuffer.append("{\r\n");
@@ -991,7 +986,7 @@ public class AutoGen {
fileBuffer.append("EFI_STATUS\r\n");
fileBuffer.append("EFIAPI\r\n");
fileBuffer.append("ProcessModuleUnloadList (\r\n");
- fileBuffer.append(" EFI_HANDLE ImageHandle\r\n");
+ fileBuffer.append(" IN EFI_HANDLE ImageHandle\r\n");
fileBuffer.append(" )\r\n");
fileBuffer.append("{\r\n");
@@ -1042,8 +1037,8 @@ public class AutoGen {
fileBuffer.append("EFI_STATUS\r\n");
fileBuffer.append("EFIAPI\r\n");
fileBuffer.append("ProcessModuleEntryPointList (\r\n");
- fileBuffer.append(" EFI_HANDLE ImageHandle,\r\n");
- fileBuffer.append(" EFI_SYSTEM_TABLE *SystemTable\r\n");
+ fileBuffer.append(" IN EFI_HANDLE ImageHandle,\r\n");
+ fileBuffer.append(" IN EFI_SYSTEM_TABLE *SystemTable\r\n");
fileBuffer.append(" )\r\n\r\n");
fileBuffer.append("{\r\n");
fileBuffer.append(" return EFI_SUCCESS;\r\n");
@@ -1077,8 +1072,8 @@ public class AutoGen {
fileBuffer.append("EFI_STATUS\r\n");
fileBuffer.append("EFIAPI\r\n");
fileBuffer.append("ProcessModuleEntryPointList (\r\n");
- fileBuffer.append(" EFI_HANDLE ImageHandle,\r\n");
- fileBuffer.append(" EFI_SYSTEM_TABLE *SystemTable\r\n");
+ fileBuffer.append(" IN EFI_HANDLE ImageHandle,\r\n");
+ fileBuffer.append(" IN EFI_SYSTEM_TABLE *SystemTable\r\n");
fileBuffer.append(" )\r\n\r\n");
fileBuffer.append("{\r\n");
@@ -1179,7 +1174,7 @@ public class AutoGen {
fileBuffer.append("EFI_STATUS\n");
fileBuffer.append("EFIAPI\r\n");
fileBuffer.append("ProcessModuleUnloadList (\r\n");
- fileBuffer.append(" EFI_HANDLE ImageHandle\r\n");
+ fileBuffer.append(" IN EFI_HANDLE ImageHandle\r\n");
fileBuffer.append(" )\r\n");
fileBuffer.append("{\r\n");
@@ -1193,8 +1188,12 @@ public class AutoGen {
fileBuffer.append(" EFI_STATUS Status;\r\n\r\n");
fileBuffer.append(" Status = EFI_SUCCESS;\r\n\r\n");
for (int i = 0; i < entryPointList.length; i++) {
- if (!entryPointList[i].equals("")) {
- fileBuffer.append(" if (EFI_ERROR (Status)) {\r\n");
+ if (i == 0) {
+ fileBuffer.append(" Status = ");
+ fileBuffer.append(entryPointList[i]);
+ fileBuffer.append("(ImageHandle);\r\n");
+ }else{
+ fileBuffer.append(" if (EFI_ERROR (Status)) {\r\n");
fileBuffer.append(" ");
fileBuffer.append(entryPointList[i]);
fileBuffer.append("(ImageHandle);\r\n");
@@ -1203,9 +1202,7 @@ public class AutoGen {
fileBuffer.append(entryPointList[i]);
fileBuffer.append("(ImageHandle);\r\n");
fileBuffer.append(" }\r\n");
- } else {
- break;
- }
+ }
}
fileBuffer.append(" return Status;\r\n");
}
diff --git a/Tools/Source/GenBuild/org/tianocore/build/global/SurfaceAreaQuery.java b/Tools/Source/GenBuild/org/tianocore/build/global/SurfaceAreaQuery.java
index 956033993d..5f86217378 100644
--- a/Tools/Source/GenBuild/org/tianocore/build/global/SurfaceAreaQuery.java
+++ b/Tools/Source/GenBuild/org/tianocore/build/global/SurfaceAreaQuery.java
@@ -26,41 +26,12 @@ import java.util.regex.Pattern;
import org.apache.xmlbeans.XmlNormalizedString;
import org.apache.xmlbeans.XmlObject;
import org.apache.xmlbeans.XmlString;
-import org.tianocore.BuildOptionsDocument;
-import org.tianocore.CNameType;
-import org.tianocore.DataIdDocument;
-import org.tianocore.ExternsDocument;
-import org.tianocore.FileNameConvention;
-import org.tianocore.FvAttributeDocument;
-import org.tianocore.FvImagesDocument;
-import org.tianocore.FvOptionDocument;
-import org.tianocore.GuidDeclarationsDocument;
-import org.tianocore.GuidsDocument;
-import org.tianocore.LibrariesDocument;
-import org.tianocore.LibraryClassDeclarationsDocument;
-import org.tianocore.LibraryClassDocument;
-import org.tianocore.ModuleDefinitionsDocument;
-import org.tianocore.ModuleSADocument;
-import org.tianocore.ModuleSaBuildOptionsDocument;
-import org.tianocore.ModuleTypeDef;
-import org.tianocore.MsaFilesDocument;
-import org.tianocore.MsaHeaderDocument;
-import org.tianocore.OptionDocument;
-import org.tianocore.PPIsDocument;
-import org.tianocore.PackageDependenciesDocument;
-import org.tianocore.PackageHeadersDocument;
-import org.tianocore.PcdCodedDocument;
-import org.tianocore.PlatformDefinitionsDocument;
-import org.tianocore.PpiDeclarationsDocument;
-import org.tianocore.ProtocolDeclarationsDocument;
-import org.tianocore.Sentence;
-import org.tianocore.SpdHeaderDocument;
-import org.tianocore.SupportedArchitectures;
+import org.tianocore.*;
import org.tianocore.FilenameDocument.Filename;
import org.tianocore.MsaHeaderDocument.MsaHeader;
import org.tianocore.ProtocolsDocument.Protocols.Protocol;
import org.tianocore.ProtocolsDocument.Protocols.ProtocolNotify;
-import org.tianocore.PlatformHeaderDocument;
+import org.tianocore.SupportedArchitectures.Enum;
import org.tianocore.build.id.FpdModuleIdentification;
import org.tianocore.build.id.ModuleIdentification;
import org.tianocore.build.id.PackageIdentification;
@@ -269,12 +240,7 @@ public class SurfaceAreaQuery {
String[] xPath;
Object[] returns;
- if (arch == null || arch.equals("")) {
- xPath = new String[] { "/Filename" };
- } else {
- xPath = new String[] { "/Filename[not(@SupArchList) or @SupArchList='"
- + arch + "']" };
- }
+ xPath = new String[] { "/Filename" };
returns = get("SourceFiles", xPath);
@@ -283,10 +249,18 @@ public class SurfaceAreaQuery {
}
Filename[] sourceFileNames = (Filename[]) returns;
- String[][] outputString = new String[sourceFileNames.length][2];
+ List<String[]> outputList = new ArrayList<String[]>();
for (int i = 0; i < sourceFileNames.length; i++) {
- outputString[i][0] = sourceFileNames[i].getToolCode();
- outputString[i][1] = sourceFileNames[i].getStringValue();
+ List<String> archList = sourceFileNames[i].getSupArchList();
+ if (arch == null || arch.equalsIgnoreCase("") || archList == null || archList.contains(arch)) {
+ outputList.add(new String[] {sourceFileNames[i].getToolCode(),sourceFileNames[i].getStringValue()});
+ }
+ }
+
+ String[][] outputString = new String[outputList.size()][2];
+ for (int index = 0; index < outputList.size(); index++) {
+ outputString[index][0] = outputList.get(index)[0];
+ outputString[index][1] = outputList.get(index)[1];
}
return outputString;
}
@@ -558,13 +532,9 @@ public class SurfaceAreaQuery {
String packageGuid = null;
String packageVersion = null;
- if (arch == null || arch.equals("")) {
- xPath = new String[] { "/Package" };
- } else {
- xPath = new String[] { "/Package[not(@SupArchList) or @SupArchList='"
- + arch + "']" };
- }
-
+
+ xPath = new String[] { "/Package" };
+
Object[] returns = get("PackageDependencies", xPath);
if (returns == null) {
return new PackageIdentification[0];
@@ -572,10 +542,13 @@ public class SurfaceAreaQuery {
PackageIdentification[] packageIdList = new PackageIdentification[returns.length];
for (int i = 0; i < returns.length; i++) {
PackageDependenciesDocument.PackageDependencies.Package item = (PackageDependenciesDocument.PackageDependencies.Package) returns[i];
- packageGuid = item.getPackageGuid();
- packageVersion = item.getPackageVersion();
- packageIdList[i] = (new PackageIdentification(null, packageGuid,
+ List<String> archList = item.getSupArchList();
+ if (arch == null || archList == null || archList.contains(arch)) {
+ packageGuid = item.getPackageGuid();
+ packageVersion = item.getPackageVersion();
+ packageIdList[i] = (new PackageIdentification(null, packageGuid,
packageVersion));
+ }
}
return packageIdList;
}
@@ -654,7 +627,7 @@ public class SurfaceAreaQuery {
if (arch == null || arch.equals("")) {
return new String[0];
} else {
- archXpath = "/Protocol[@SupArchList='" + arch + "']";
+ archXpath = "/Protocol";
if (usage != null && !usage.equals("")) {
usageXpath = "/Protocol[@Usage='" + usage + "']";
xPath = new String[] { usageXpath, archXpath };
@@ -699,15 +672,20 @@ public class SurfaceAreaQuery {
if (returns == null) {
return new String[0];
}
- Protocol[] protocolList = (Protocol[]) returns;
+ Protocol[] returnlList = (Protocol[]) returns;
- String[] protocolArray = new String[returns.length];
+ List<String> protocolList = new ArrayList<String>();
+
for (int i = 0; i < returns.length; i++) {
- List<String> archList = protocolList[i].getSupArchList();
+ List<String> archList = returnlList[i].getSupArchList();
if (archList == null || archList.contains(arch)){
- protocolArray[i] = protocolList[i].getProtocolCName();
+ protocolList.add(returnlList[i].getProtocolCName());
}
}
+ String[] protocolArray = new String[protocolList.size()];
+ for (int i = 0; i < protocolList.size(); i++) {
+ protocolArray[i] = protocolList.get(i);
+ }
return protocolArray;
}
@@ -734,16 +712,20 @@ public class SurfaceAreaQuery {
return new String[0];
}
- String[] protocolNotifyList = new String[returns.length];
+ List<String> protocolNotifyList = new ArrayList<String>();
+
for (int i = 0; i < returns.length; i++) {
List<String> archList = ((ProtocolNotify) returns[i]).getSupArchList();
if (archList == null || archList.contains(arch)){
- protocolNotifyList[i] = ((ProtocolNotify) returns[i]).getProtocolNotifyCName();
+ protocolNotifyList.add(((ProtocolNotify) returns[i]).getProtocolNotifyCName());
}
}
-
- return protocolNotifyList;
+ String[] protocolNotifyArray = new String[protocolNotifyList.size()];
+ for (int i = 0; i < protocolNotifyList.size(); i++) {
+ protocolNotifyArray[i] = protocolNotifyList.get(i);
+ }
+ return protocolNotifyArray;
}
/**
@@ -764,7 +746,7 @@ public class SurfaceAreaQuery {
if (arch == null || arch.equals("")) {
return new String[0];
} else {
- archXpath = "/ProtocolNotify[@SupArchList='" + arch + "']";
+ archXpath = "/ProtocolNotify";
if (usage != null && !usage.equals("")) {
usageXpath = "/ProtocolNotify[@Usage='" + arch + "']";
xPath = new String[] { archXpath, usageXpath };
@@ -851,16 +833,21 @@ public class SurfaceAreaQuery {
return new String[0];
}
- String[] ppiNotifyList = new String[returns.length];
+
+ List<String> ppiNotifyList = new ArrayList<String>();
for (int i = 0; i < returns.length; i++) {
List<String> archList = ((PPIsDocument.PPIs.PpiNotify) returns[i]).getSupArchList();
if (archList == null || archList.contains(arch)){
- ppiNotifyList[i] = ((PPIsDocument.PPIs.PpiNotify) returns[i]).getPpiNotifyCName();
+ ppiNotifyList.add(((PPIsDocument.PPIs.PpiNotify) returns[i]).getPpiNotifyCName());
}
}
+ String[] ppiNotifyArray = new String[ppiNotifyList.size()];
+ for (int i = 0; i < ppiNotifyList.size(); i++) {
+ ppiNotifyArray[i] = ppiNotifyList.get(i);
+ }
- return ppiNotifyList;
+ return ppiNotifyArray;
}
/**
@@ -927,15 +914,19 @@ public class SurfaceAreaQuery {
return new String[0];
}
- String[] ppiList = new String[returns.length];
+ List<String> ppiList = new ArrayList<String>();
for (int i = 0; i < returns.length; i++) {
List<String> archList = ((PPIsDocument.PPIs.Ppi) returns[i]).getSupArchList();
if (archList == null || archList.contains(arch)){
- ppiList[i] = ((PPIsDocument.PPIs.Ppi) returns[i]).getPpiCName();
+ ppiList.add(((PPIsDocument.PPIs.Ppi) returns[i]).getPpiCName());
}
}
- return ppiList;
+ String[] ppiArray = new String[ppiList.size()];
+ for (int i = 0; i < ppiList.size(); i++) {
+ ppiArray[i] = ppiList.get(i);
+ }
+ return ppiArray;
}
/**
@@ -1001,15 +992,20 @@ public class SurfaceAreaQuery {
if (returns == null) {
return new String[0];
}
- String[] guidList = new String[returns.length];
+
+ List<String> guidList = new ArrayList<String>();
for (int i = 0; i < returns.length; i++) {
List<String> archList = ((GuidsDocument.Guids.GuidCNames) returns[i]).getSupArchList();
if (archList == null || archList.contains(arch)){
- guidList[i] = ((GuidsDocument.Guids.GuidCNames) returns[i]).getGuidCName();
+ guidList.add(((GuidsDocument.Guids.GuidCNames) returns[i]).getGuidCName());
}
}
- return guidList;
+ String[] guidArray = new String[guidList.size()];
+ for (int i = 0; i < guidList.size(); i++) {
+ guidArray[i] = guidList.get(i);
+ }
+ return guidArray;
}
@@ -1074,6 +1070,11 @@ public class SurfaceAreaQuery {
if (arch == null || arch.equalsIgnoreCase("")) {
xPath = new String[] { "/Instance" };
} else {
+ //
+ // Since Schema don't have SupArchList now, so the follow Xpath is
+ // equal to "/Instance" and [not(@SupArchList) or @SupArchList= arch]
+ // don't have effect.
+ //
xPath = new String[] { "/Instance[not(@SupArchList) or @SupArchList='"
+ arch + "']" };
}