summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2009-11-09 11:47:35 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2009-11-09 11:47:35 +0000
commitb303ea726e1c8ed240dad2bce54821318567eab3 (patch)
tree355db6226949afd1bfcc87d69e09a320ea9b7bb7
parent4c913fe619bd00861270cb0866feb34bcdc1592e (diff)
downloadedk2-platforms-b303ea726e1c8ed240dad2bce54821318567eab3.tar.xz
Sync tool code to BuildTools project r1739.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9397 6f19259b-4bc3-4df7-8a09-765794883524
-rwxr-xr-xBaseTools/Bin/Win32/BootSectImage.exebin393216 -> 393216 bytes
-rwxr-xr-xBaseTools/Bin/Win32/EfiLdrImage.exebin421888 -> 421888 bytes
-rwxr-xr-xBaseTools/Bin/Win32/EfiRom.exebin446464 -> 446464 bytes
-rwxr-xr-xBaseTools/Bin/Win32/Fpd2Dsc.exebin1428685 -> 1428686 bytes
-rwxr-xr-xBaseTools/Bin/Win32/GenBootSector.exebin425984 -> 425984 bytes
-rwxr-xr-xBaseTools/Bin/Win32/GenCrc32.exebin425984 -> 425984 bytes
-rwxr-xr-xBaseTools/Bin/Win32/GenDepex.exebin609936 -> 610196 bytes
-rwxr-xr-xBaseTools/Bin/Win32/GenFds.exebin1443923 -> 1451625 bytes
-rwxr-xr-xBaseTools/Bin/Win32/GenFfs.exebin430080 -> 430080 bytes
-rwxr-xr-xBaseTools/Bin/Win32/GenFv.exebin475136 -> 479232 bytes
-rwxr-xr-xBaseTools/Bin/Win32/GenFw.exebin466944 -> 462848 bytes
-rwxr-xr-xBaseTools/Bin/Win32/GenPage.exebin421888 -> 421888 bytes
-rwxr-xr-xBaseTools/Bin/Win32/GenSec.exebin446464 -> 446464 bytes
-rwxr-xr-xBaseTools/Bin/Win32/GenVtf.exebin442368 -> 446464 bytes
-rw-r--r--BaseTools/Bin/Win32/LzmaCompress.exebin397312 -> 397312 bytes
-rwxr-xr-xBaseTools/Bin/Win32/MigrationMsa2Inf.exebin1374302 -> 1374303 bytes
-rwxr-xr-xBaseTools/Bin/Win32/Spd2Dec.exebin1382264 -> 1382526 bytes
-rwxr-xr-xBaseTools/Bin/Win32/Split.exebin425984 -> 425984 bytes
-rwxr-xr-xBaseTools/Bin/Win32/TargetTool.exebin579151 -> 579152 bytes
-rwxr-xr-xBaseTools/Bin/Win32/TianoCompress.exebin434176 -> 434176 bytes
-rwxr-xr-xBaseTools/Bin/Win32/Trim.exebin671727 -> 671989 bytes
-rwxr-xr-xBaseTools/Bin/Win32/VfrCompile.exebin1146880 -> 1146880 bytes
-rwxr-xr-xBaseTools/Bin/Win32/VolInfo.exebin471040 -> 471040 bytes
-rwxr-xr-xBaseTools/Bin/Win32/build.exebin1704037 -> 1722689 bytes
-rw-r--r--BaseTools/Conf/build_rule.template47
-rw-r--r--BaseTools/Conf/tools_def.template279
-rw-r--r--BaseTools/Source/C/Common/FirmwareVolumeBuffer.c4
-rw-r--r--BaseTools/Source/C/Common/FvLib.c6
-rw-r--r--BaseTools/Source/C/GenFfs/GenFfs.c2
-rw-r--r--BaseTools/Source/C/GenFv/GenFvInternalLib.c204
-rw-r--r--BaseTools/Source/C/GenFv/GenFvInternalLib.h14
-rw-r--r--BaseTools/Source/C/GenFw/GenFw.c522
-rw-r--r--BaseTools/Source/C/GenVtf/GenVtf.c22
-rw-r--r--BaseTools/Source/C/GenVtf/GenVtf.h4
-rw-r--r--BaseTools/Source/C/Include/Common/PiFirmwareFile.h3
-rw-r--r--BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h10
-rw-r--r--BaseTools/Source/C/Include/IndustryStandard/PeImage.h53
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrCompiler.cpp28
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp4
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrFormPkg.h8
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrSyntax.g34
-rw-r--r--BaseTools/Source/C/VolInfo/VolInfo.c83
-rw-r--r--BaseTools/Source/Python/AutoGen/AutoGen.py404
-rw-r--r--BaseTools/Source/Python/AutoGen/GenC.py118
-rw-r--r--BaseTools/Source/Python/AutoGen/GenDepex.py2
-rw-r--r--BaseTools/Source/Python/AutoGen/StrGather.py106
-rw-r--r--BaseTools/Source/Python/AutoGen/UniClassObject.py10
-rw-r--r--BaseTools/Source/Python/Common/DataType.py4
-rw-r--r--BaseTools/Source/Python/Common/FdfParserLite.py10
-rw-r--r--BaseTools/Source/Python/Common/InfClassObject.py2
-rw-r--r--BaseTools/Source/Python/Common/Misc.py38
-rw-r--r--BaseTools/Source/Python/CommonDataClass/CommonClass.py6
-rw-r--r--BaseTools/Source/Python/CommonDataClass/ModuleClass.py2
-rw-r--r--BaseTools/Source/Python/CommonDataClass/PackageClass.py2
-rw-r--r--BaseTools/Source/Python/GenFds/DepexSection.py32
-rw-r--r--BaseTools/Source/Python/GenFds/Fd.py27
-rw-r--r--BaseTools/Source/Python/GenFds/FdfParser.py123
-rw-r--r--BaseTools/Source/Python/GenFds/Ffs.py4
-rw-r--r--BaseTools/Source/Python/GenFds/FfsInfStatement.py47
-rw-r--r--BaseTools/Source/Python/GenFds/Fv.py83
-rw-r--r--BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py12
-rw-r--r--BaseTools/Source/Python/GenFds/Section.py2
-rw-r--r--BaseTools/Source/Python/Workspace/MetaFileParser.py5
-rw-r--r--BaseTools/Source/Python/Workspace/WorkspaceDatabase.py30
-rw-r--r--BaseTools/Source/Python/build/build.py27
65 files changed, 1840 insertions, 583 deletions
diff --git a/BaseTools/Bin/Win32/BootSectImage.exe b/BaseTools/Bin/Win32/BootSectImage.exe
index b239a9da5b..a20f3a32ab 100755
--- a/BaseTools/Bin/Win32/BootSectImage.exe
+++ b/BaseTools/Bin/Win32/BootSectImage.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/EfiLdrImage.exe b/BaseTools/Bin/Win32/EfiLdrImage.exe
index 377f851d83..2e3b1023d3 100755
--- a/BaseTools/Bin/Win32/EfiLdrImage.exe
+++ b/BaseTools/Bin/Win32/EfiLdrImage.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/EfiRom.exe b/BaseTools/Bin/Win32/EfiRom.exe
index e9264b4a5c..413f2bb28d 100755
--- a/BaseTools/Bin/Win32/EfiRom.exe
+++ b/BaseTools/Bin/Win32/EfiRom.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/Fpd2Dsc.exe b/BaseTools/Bin/Win32/Fpd2Dsc.exe
index 0908d2cd8f..59212c57bc 100755
--- a/BaseTools/Bin/Win32/Fpd2Dsc.exe
+++ b/BaseTools/Bin/Win32/Fpd2Dsc.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/GenBootSector.exe b/BaseTools/Bin/Win32/GenBootSector.exe
index bee5b511ed..406f903c9a 100755
--- a/BaseTools/Bin/Win32/GenBootSector.exe
+++ b/BaseTools/Bin/Win32/GenBootSector.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/GenCrc32.exe b/BaseTools/Bin/Win32/GenCrc32.exe
index 2ae3c80f42..d8185c55de 100755
--- a/BaseTools/Bin/Win32/GenCrc32.exe
+++ b/BaseTools/Bin/Win32/GenCrc32.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/GenDepex.exe b/BaseTools/Bin/Win32/GenDepex.exe
index d27b507f0a..ba0bc6c3f7 100755
--- a/BaseTools/Bin/Win32/GenDepex.exe
+++ b/BaseTools/Bin/Win32/GenDepex.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/GenFds.exe b/BaseTools/Bin/Win32/GenFds.exe
index 0d10d130a5..96572b8fce 100755
--- a/BaseTools/Bin/Win32/GenFds.exe
+++ b/BaseTools/Bin/Win32/GenFds.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/GenFfs.exe b/BaseTools/Bin/Win32/GenFfs.exe
index 3ef968b47e..a479bd8d77 100755
--- a/BaseTools/Bin/Win32/GenFfs.exe
+++ b/BaseTools/Bin/Win32/GenFfs.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/GenFv.exe b/BaseTools/Bin/Win32/GenFv.exe
index 25f89046e9..2281b88a4e 100755
--- a/BaseTools/Bin/Win32/GenFv.exe
+++ b/BaseTools/Bin/Win32/GenFv.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/GenFw.exe b/BaseTools/Bin/Win32/GenFw.exe
index a88916e43f..cb6f95fec2 100755
--- a/BaseTools/Bin/Win32/GenFw.exe
+++ b/BaseTools/Bin/Win32/GenFw.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/GenPage.exe b/BaseTools/Bin/Win32/GenPage.exe
index 72d8c9d26f..6b64ebc740 100755
--- a/BaseTools/Bin/Win32/GenPage.exe
+++ b/BaseTools/Bin/Win32/GenPage.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/GenSec.exe b/BaseTools/Bin/Win32/GenSec.exe
index d042527366..c19a2fddc5 100755
--- a/BaseTools/Bin/Win32/GenSec.exe
+++ b/BaseTools/Bin/Win32/GenSec.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/GenVtf.exe b/BaseTools/Bin/Win32/GenVtf.exe
index 3ab563082d..19aa09c4aa 100755
--- a/BaseTools/Bin/Win32/GenVtf.exe
+++ b/BaseTools/Bin/Win32/GenVtf.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/LzmaCompress.exe b/BaseTools/Bin/Win32/LzmaCompress.exe
index 20a90b09e1..76c369fa14 100644
--- a/BaseTools/Bin/Win32/LzmaCompress.exe
+++ b/BaseTools/Bin/Win32/LzmaCompress.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/MigrationMsa2Inf.exe b/BaseTools/Bin/Win32/MigrationMsa2Inf.exe
index b360966037..089252d4e5 100755
--- a/BaseTools/Bin/Win32/MigrationMsa2Inf.exe
+++ b/BaseTools/Bin/Win32/MigrationMsa2Inf.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/Spd2Dec.exe b/BaseTools/Bin/Win32/Spd2Dec.exe
index c28ace4f8f..c88b721f02 100755
--- a/BaseTools/Bin/Win32/Spd2Dec.exe
+++ b/BaseTools/Bin/Win32/Spd2Dec.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/Split.exe b/BaseTools/Bin/Win32/Split.exe
index bd4ad84c3c..2583f3035e 100755
--- a/BaseTools/Bin/Win32/Split.exe
+++ b/BaseTools/Bin/Win32/Split.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/TargetTool.exe b/BaseTools/Bin/Win32/TargetTool.exe
index f3bafab02f..b0c6cde178 100755
--- a/BaseTools/Bin/Win32/TargetTool.exe
+++ b/BaseTools/Bin/Win32/TargetTool.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/TianoCompress.exe b/BaseTools/Bin/Win32/TianoCompress.exe
index b8862c0a44..65e7b6502d 100755
--- a/BaseTools/Bin/Win32/TianoCompress.exe
+++ b/BaseTools/Bin/Win32/TianoCompress.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/Trim.exe b/BaseTools/Bin/Win32/Trim.exe
index 5cfb19e263..d99729f1af 100755
--- a/BaseTools/Bin/Win32/Trim.exe
+++ b/BaseTools/Bin/Win32/Trim.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/VfrCompile.exe b/BaseTools/Bin/Win32/VfrCompile.exe
index da9bdb6213..bcf7958660 100755
--- a/BaseTools/Bin/Win32/VfrCompile.exe
+++ b/BaseTools/Bin/Win32/VfrCompile.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/VolInfo.exe b/BaseTools/Bin/Win32/VolInfo.exe
index 389d913ac4..116efbdc5b 100755
--- a/BaseTools/Bin/Win32/VolInfo.exe
+++ b/BaseTools/Bin/Win32/VolInfo.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/build.exe b/BaseTools/Bin/Win32/build.exe
index 3999ed1925..b636e7075f 100755
--- a/BaseTools/Bin/Win32/build.exe
+++ b/BaseTools/Bin/Win32/build.exe
Binary files differ
diff --git a/BaseTools/Conf/build_rule.template b/BaseTools/Conf/build_rule.template
index f036fb375f..0ce61b7070 100644
--- a/BaseTools/Conf/build_rule.template
+++ b/BaseTools/Conf/build_rule.template
@@ -69,6 +69,7 @@
# $(<tool>_FLAGS) Tools flags of current module
# $(MODULE_NAME) Current module name
# $(MODULE_TYPE) Current module type
+# $(MODULE_GUID) Current module guid
# $(ARCH) Architecture of current module
# $(TOOLCHAIN) Toolchain used to build current module
# $(TARGET) Target of current module (DEBUG/RELEASE)
@@ -209,7 +210,7 @@
"$(SLINK)" $(SLINK_FLAGS) /OUT:${dst} @$(OBJECT_FILES_LIST)
<Command.GCC>
- "$(SLINK)" -cr ${dst} $(SLINK_FLAGS) @"$(OBJECT_FILES_LIST)"
+ "$(SLINK)" -cr ${dst} $(SLINK_FLAGS) @$(OBJECT_FILES_LIST)
<Command.RVCT>
"$(SLINK)" $(SLINK_FLAGS) ${dst} --via $(OBJECT_FILES_LIST)
@@ -235,7 +236,7 @@
"$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)
<Command.GCC>
- "$(DLINK)" -o ${dst} $(DLINK_FLAGS) -\( $(DLINK_SPATH) @"$(STATIC_LIBRARY_FILES_LIST)" -\) $(DLINK2_FLAGS)
+ "$(DLINK)" -o ${dst} $(DLINK_FLAGS) -\( $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST) -\) $(DLINK2_FLAGS)
"$(OBJCOPY)" $(OBJCOPY_FLAGS) ${dst}
<Command.RVCT>
@@ -456,3 +457,45 @@
<Command>
$(OPTROM) -i $(PCI_DEVICE_ID) -f $(PCI_VENDOR_ID) -l $(PCI_CLASS_CODE) -r $(PCI_REVISION) -o $dst $(OPTROM_FLAGS) $src
+[Unicode-Text-File.UEFI_HII]
+ <InputFile>
+ *.uni, *.Uni, *.UNI
+
+ <OutputFile>
+ $(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk
+ $(DEBUG_DIR)(+)$(MODULE_NAME)StrDefs.h
+
+ <Command>
+
+[Visual-Form-Representation-File.UEFI_HII]
+ <InputFile>
+ ?.vfr
+ ?.Vfr
+ ?.VFR
+
+ <ExtraDependency>
+ $(MAKE_FILE)
+
+ <OutputFile>
+ $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.hpk
+
+ <Command>
+ -$(MD) $(OUTPUT_DIR)(+)${s_dir} > NUL 2>&1
+ "$(VFRPP)" $(VFRPP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
+ -$(MD) $(OUTPUT_DIR)(+)${s_dir} > NUL 2>&1
+ "$(VFR)" $(VFR_FLAGS) --create-ifr-package --output-directory $(OUTPUT_DIR)(+)${s_dir} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
+
+[Hii-Binary-Package.UEFI_HII]
+ <InputFile>
+ *.hpk
+
+ <OutputFile>
+ $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.lib
+
+ <Command.MSFT, Command.INTEL>
+ GenFw -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiipackage $(HII_BINARY_PACKAGES)
+ "$(RC)" /Fo${dst} $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc
+
+ <Command.GCC>
+ GenFw -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiipackage $(HII_BINARY_PACKAGES)
+ "$(RC)" (RC_FLAGS) $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc ${dst}
diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index b3132a08fe..cbff0b1666 100644
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -27,6 +27,16 @@ DEFINE VS2005x86_DLL = C:\Program Files (x86)\Microsoft Visual Studio 8\Commo
DEFINE VS2005x86_BINX64 = DEF(VS2005x86_BIN)\x86_amd64
DEFINE VS2005x86_BIN64 = DEF(VS2005x86_BIN)\x86_ia64
+
+# These defines are needed for certain Microsoft Visual Studio tools that
+# are used by other toolchains. An example is that ICC on Windows normally
+# uses Microsoft's nmake.exe.
+
+# Some MS_VS_BIN options: DEF(VS2003_BIN), DEF(VS2005_BIN), DEF(VS2005x86_BIN)
+DEFINE MS_VS_BIN = DEF(VS2005_BIN)
+# Some MS_VS_DLL options: DEF(VS2003_DLL), DEF(VS2005_DLL), DEF(VS2005x86_DLL)
+DEFINE MS_VS_DLL = DEF(VS2005_DLL)
+
DEFINE WINDDK_BIN16 = C:\WINDDK\3790.1830\bin\bin16
DEFINE WINDDK_BIN32 = C:\WINDDK\3790.1830\bin\x86
DEFINE WINDDK_BINX64 = C:\WINDDK\3790.1830\bin\win64\x86\amd64
@@ -80,7 +90,7 @@ DEFINE UNIXGCC_IPF_PETOOLS_PREFIX = /opt/tiano/ia64-pc-elf/ia64-pc-elf/bin/
#
DEFINE CYGWIN_BIN = c:/cygwin/bin
-DEFINE CYGWIN_BIN32 = c:/cygwin/opt/tiano/i386-tiano-pe/i386-tiano-pe/bin/
+DEFINE CYGWIN_BINIA32 = c:/cygwin/opt/tiano/i386-tiano-pe/i386-tiano-pe/bin/
DEFINE CYGWIN_BINX64 = c:/cygwin/opt/tiano/x86_64-pc-mingw64/x86_64-pc-mingw64/bin/
DEFINE CYGWIN_BINIPF = c:/cygwin/opt/tiano/gcc/ipf/bin/ia64-pc-elf-
@@ -237,7 +247,7 @@ DEFINE ARMGCC_BIN = /
*_VS2003_IA32_ASLCC_PATH = DEF(VS2003_BIN)\cl.exe
*_VS2003_IA32_ASLPP_PATH = DEF(VS2003_BIN)\cl.exe
*_VS2003_IA32_ASLDLINK_PATH = DEF(VS2003_BIN)\link.exe
-
+*_VS2003_IA32_RC_PATH = DEF(VS2003_BIN)\rc.exe
*_VS2003_IA32_MAKE_FLAGS = /nologo
*_VS2003_IA32_APP_FLAGS = /nologo /E /TC
@@ -248,8 +258,8 @@ RELEASE_VS2003_IA32_CC_FLAGS = /nologo /c /WX /W4 /Gs8192 /Gy /D UNICODE
DEBUG_VS2003_IA32_ASM_FLAGS = /nologo /c /WX /W3 /coff /Cx /Zd /Zi
RELEASE_VS2003_IA32_ASM_FLAGS = /nologo /c /WX /W3 /coff /Cx /Zd
*_VS2003_IA32_SLINK_FLAGS = /nologo /LTCG
- DEBUG_VS2003_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2003_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+ DEBUG_VS2003_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_VS2003_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
*_VS2003_IA32_ASMLINK_FLAGS = /nologo /tiny
##################
@@ -263,6 +273,7 @@ RELEASE_VS2003_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:RE
*_VS2003_EBC_CC_PATH = DEF(EBC_BIN)\iec.exe
*_VS2003_EBC_SLINK_PATH = DEF(EBC_BIN)\link.exe
*_VS2003_EBC_DLINK_PATH = DEF(EBC_BIN)\link.exe
+*_VS2003_EBC_RC_PATH = DEF(VS2003_BIN)\rc.exe
*_VS2003_EBC_MAKE_FLAGS = /nologo
*_VS2003_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h
@@ -306,6 +317,7 @@ RELEASE_VS2003_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:RE
*_VS2003xASL_IA32_ASLCC_PATH = DEF(VS2003_BIN)\cl.exe
*_VS2003xASL_IA32_ASLPP_PATH = DEF(VS2003_BIN)\cl.exe
*_VS2003xASL_IA32_ASLDLINK_PATH = DEF(VS2003_BIN)\link.exe
+*_VS2003xASL_IA32_RC_PATH = DEF(VS2003_BIN)\rc.exe
*_VS2003xASL_IA32_MAKE_FLAGS = /nologo
@@ -317,8 +329,8 @@ RELEASE_VS2003xASL_IA32_CC_FLAGS = /nologo /c /WX /W4 /Gs8192 /Gy /D UNIC
DEBUG_VS2003xASL_IA32_ASM_FLAGS = /nologo /c /WX /W3 /coff /Cx /Zd /Zi
RELEASE_VS2003xASL_IA32_ASM_FLAGS = /nologo /c /WX /W3 /coff /Cx /Zd
*_VS2003xASL_IA32_SLINK_FLAGS = /nologo /LTCG
- DEBUG_VS2003xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2003xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+ DEBUG_VS2003xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_VS2003xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
*_VS2003xASL_IA32_ASMLINK_FLAGS = /nologo /tiny
##################
@@ -332,6 +344,7 @@ RELEASE_VS2003xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OP
*_VS2003xASL_EBC_CC_PATH = DEF(EBC_BIN)\iec.exe
*_VS2003xASL_EBC_SLINK_PATH = DEF(EBC_BIN)\link.exe
*_VS2003xASL_EBC_DLINK_PATH = DEF(EBC_BIN)\link.exe
+*_VS2003xASL_EBC_RC_PATH = DEF(VS2003_BIN)\rc.exe
*_VS2003xASL_EBC_MAKE_FLAGS = /nologo
*_VS2003xASL_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h
@@ -352,6 +365,7 @@ RELEASE_VS2003xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OP
*_VS2005_*_MAKE_PATH = DEF(VS2005_BIN)\nmake.exe
*_VS2005_*_MAKE_FLAGS = /nologo
+*_VS2005_*_RC_PATH = DEF(VS2005_BIN)\rc.exe
*_VS2005_*_SLINK_FLAGS = /NOLOGO /LTCG
*_VS2005_*_APP_FLAGS = /nologo /E /TC
@@ -391,8 +405,8 @@ RELEASE_VS2003xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OP
RELEASE_VS2005_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs8192 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF
DEBUG_VS2005_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
RELEASE_VS2005_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
- DEBUG_VS2005_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2005_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+ DEBUG_VS2005_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_VS2005_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
*_VS2005_IA32_ASMLINK_FLAGS = /nologo /tiny
##################
@@ -416,8 +430,8 @@ RELEASE_VS2005_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF
RELEASE_VS2005_X64_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gs8192 /D UNICODE /O1ib2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF
DEBUG_VS2005_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
RELEASE_VS2005_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
- DEBUG_VS2005_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2005_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+ DEBUG_VS2005_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_VS2005_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
##################
# IPF definitions
@@ -439,8 +453,8 @@ RELEASE_VS2005_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /O
RELEASE_VS2005_IPF_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /EHs-c- /GR- /Gy /Os /GL /FIAutoGen.h /QIPF_fr32
DEBUG_VS2005_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4 -d debug
RELEASE_VS2005_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4
- DEBUG_VS2005_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4086 /MAP /ALIGN:32 /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb /DEBUG
-RELEASE_VS2005_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF.ICF /IGNORE:4086 /MAP /ALIGN:32 /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb
+ DEBUG_VS2005_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4086 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb /DEBUG
+RELEASE_VS2005_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF.ICF /IGNORE:4086 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb
##################
# EBC definitions
@@ -473,6 +487,7 @@ RELEASE_VS2005_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF.ICF
*_VS2005xASL_*_MAKE_PATH = DEF(VS2005_BIN)\nmake.exe
*_VS2005xASL_*_MAKE_FLAG = /nologo
+*_VS2005xASL_*_RC_PATH = DEF(VS2005_BIN)\rc.exe
*_VS2005xASL_*_SLINK_FLAGS = /NOLOGO /LTCG
*_VS2005xASL_*_APP_FLAGS = /nologo /E /TC
@@ -512,8 +527,8 @@ RELEASE_VS2005_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF.ICF
RELEASE_VS2005xASL_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs8192 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF
DEBUG_VS2005xASL_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
RELEASE_VS2005xASL_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
- DEBUG_VS2005xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2005xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+ DEBUG_VS2005xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_VS2005xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
*_VS2005xASL_IA32_ASMLINK_FLAGS= /nologo /tiny
##################
@@ -537,8 +552,8 @@ RELEASE_VS2005xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:RE
RELEASE_VS2005xASL_X64_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gs8192 /D UNICODE /O1ib2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF
DEBUG_VS2005xASL_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
RELEASE_VS2005xASL_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
- DEBUG_VS2005xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2005xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+ DEBUG_VS2005xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_VS2005xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
##################
# IPF definitions
@@ -560,8 +575,8 @@ RELEASE_VS2005xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:RE
RELEASE_VS2005xASL_IPF_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /EHs-c- /GR- /Gy /Os /GL /FIAutoGen.h /QIPF_fr32
DEBUG_VS2005xASL_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4 -d debug
RELEASE_VS2005xASL_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4
- DEBUG_VS2005xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4086 /MAP /ALIGN:32 /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb /DEBUG
-RELEASE_VS2005xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF.ICF /IGNORE:4086 /MAP /ALIGN:32 /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb
+ DEBUG_VS2005xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4086 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb /DEBUG
+RELEASE_VS2005xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF.ICF /IGNORE:4086 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb
##################
# EBC definitions
@@ -594,6 +609,7 @@ RELEASE_VS2005xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF.
*_VS2005x86_*_MAKE_PATH = DEF(VS2005x86_BIN)\nmake.exe
*_VS2005x86_*_MAKE_FLAGS = /nologo
+*_VS2005x86_*_RC_PATH = DEF(VS2005x86_BIN)\rc.exe
*_VS2005x86_*_SLINK_FLAGS = /NOLOGO /LTCG
*_VS2005x86_*_APP_FLAGS = /nologo /E /TC
@@ -633,8 +649,8 @@ RELEASE_VS2005xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF.
RELEASE_VS2005x86_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs8192 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF
DEBUG_VS2005x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
RELEASE_VS2005x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
- DEBUG_VS2005x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2005x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+ DEBUG_VS2005x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_VS2005x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
*_VS2005x86_IA32_ASMLINK_FLAGS= /nologo /tiny
##################
@@ -658,8 +674,8 @@ RELEASE_VS2005x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF
RELEASE_VS2005x86_X64_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gs8192 /D UNICODE /O1ib2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF
DEBUG_VS2005x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
RELEASE_VS2005x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
- DEBUG_VS2005x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2005x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+ DEBUG_VS2005x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_VS2005x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
##################
# IPF definitions
@@ -681,8 +697,8 @@ RELEASE_VS2005x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF
RELEASE_VS2005x86_IPF_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /EHs-c- /GR- /Gy /Os /GL /FIAutoGen.h /QIPF_fr32
DEBUG_VS2005x86_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4 -d debug
RELEASE_VS2005x86_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4
- DEBUG_VS2005x86_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4086 /MAP /ALIGN:32 /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb /DEBUG
-RELEASE_VS2005x86_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF.ICF /IGNORE:4086 /MAP /ALIGN:32 /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb
+ DEBUG_VS2005x86_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4086 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb /DEBUG
+RELEASE_VS2005x86_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF.ICF /IGNORE:4086 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb
##################
# EBC definitions
@@ -715,6 +731,7 @@ RELEASE_VS2005x86_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF.I
*_VS2005x86xASL_*_MAKE_PATH = DEF(VS2005x86_BIN)\nmake.exe
*_VS2005x86xASL_*_MAKE_FLAGS = /nologo
+*_VS2005x86xASL_*_RC_PATH = DEF(VS2005x86_BIN)\rc.exe
*_VS2005x86xASL_*_SLINK_FLAGS = /NOLOGO /LTCG
*_VS2005x86xASL_*_APP_FLAGS = /nologo /E /TC
@@ -754,8 +771,8 @@ RELEASE_VS2005x86_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF.I
RELEASE_VS2005x86xASL_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs8192 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF
DEBUG_VS2005x86xASL_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
RELEASE_VS2005x86xASL_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
- DEBUG_VS2005x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2005x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+ DEBUG_VS2005x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_VS2005x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
*_VS2005x86xASL_IA32_ASMLINK_FLAGS= /nologo /tiny
##################
@@ -779,8 +796,8 @@ RELEASE_VS2005x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT
RELEASE_VS2005x86xASL_X64_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gs8192 /D UNICODE /O1ib2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF
DEBUG_VS2005x86xASL_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
RELEASE_VS2005x86xASL_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
- DEBUG_VS2005x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2005x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+ DEBUG_VS2005x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_VS2005x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
##################
# IPF definitions
@@ -802,8 +819,8 @@ RELEASE_VS2005x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT
RELEASE_VS2005x86xASL_IPF_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /EHs-c- /GR- /Gy /Os /GL /FIAutoGen.h /QIPF_fr32
DEBUG_VS2005x86xASL_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4 -d debug
RELEASE_VS2005x86xASL_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4
- DEBUG_VS2005x86xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4086 /MAP /ALIGN:32 /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb /DEBUG
-RELEASE_VS2005x86xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF.ICF /IGNORE:4086 /MAP /ALIGN:32 /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb
+ DEBUG_VS2005x86xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4086 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb /DEBUG
+RELEASE_VS2005x86xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF.ICF /IGNORE:4086 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb
##################
# EBC definitions
@@ -836,6 +853,7 @@ RELEASE_VS2005x86xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:R
*_DDK3790_*_MAKE_PATH = DEF(WINDDK_BIN32)\nmake.exe
*_DDK3790_*_MAKE_FLAGS = /nologo
+*_DDK3790_*_RC_PATH = DEF(WINDDK_BIN32)\rc.exe
*_DDK3790_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h
*_DDK3790_*_APP_FLAGS = /nologo /E /TC
@@ -871,8 +889,8 @@ RELEASE_VS2005x86xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:R
RELEASE_DDK3790_IA32_CC_FLAGS = /nologo /c /WX /W4 /Gy /Gs8192 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF
DEBUG_DDK3790_IA32_ASM_FLAGS = /nologo /c /WX /W3 /coff /Cx /Zd /Zi
RELEASE_DDK3790_IA32_ASM_FLAGS = /nologo /c /WX /W3 /coff /Cx /Zd
- DEBUG_DDK3790_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_DDK3790_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+ DEBUG_DDK3790_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_DDK3790_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
*_DDK3790_IA32_ASMLINK_FLAGS = /nologo /tiny
##################
@@ -893,8 +911,8 @@ RELEASE_DDK3790_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /
RELEASE_DDK3790_X64_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gs8192 /D UNICODE /O1ib2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF
DEBUG_DDK3790_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
RELEASE_DDK3790_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
- DEBUG_DDK3790_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_DDK3790_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+ DEBUG_DDK3790_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_DDK3790_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
##################
# IPF definitions
@@ -915,8 +933,8 @@ RELEASE_DDK3790_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /
RELEASE_DDK3790_IPF_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /EHs-c- /GR- /Gy /Os /GL /FIAutoGen.h /QIPF_fr32
DEBUG_DDK3790_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4 -d debug
RELEASE_DDK3790_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4
- DEBUG_DDK3790_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4086 /MAP /ALIGN:32 /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEST_DIR_DEBUG)/$(BASE_NAME).map /PDB:$(DEST_DIR_DEBUG)/$(BASE_NAME).pdb /DEBUG
-RELEASE_DDK3790_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF.ICF /IGNORE:4086 /MAP /ALIGN:32 /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEST_DIR_DEBUG)/$(BASE_NAME).map /PDB:$(DEST_DIR_DEBUG)/$(BASE_NAME).pdb
+ DEBUG_DDK3790_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4086 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEST_DIR_DEBUG)/$(BASE_NAME).map /PDB:$(DEST_DIR_DEBUG)/$(BASE_NAME).pdb /DEBUG
+RELEASE_DDK3790_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF.ICF /IGNORE:4086 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEST_DIR_DEBUG)/$(BASE_NAME).map /PDB:$(DEST_DIR_DEBUG)/$(BASE_NAME).pdb
##################
# EBC definitions
@@ -945,6 +963,7 @@ RELEASE_DDK3790_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF.ICF
*_DDK3790xASL_*_MAKE_PATH = DEF(WINDDK_BIN32)\nmake.exe
*_DDK3790xASL_*_MAKE_FLAGS = /nologo
+*_DDK3790xASL_*_RC_PATH = DEF(WINDDK_BIN32)\rc.exe
*_DDK3790xASL_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h
*_DDK3790xASL_*_APP_FLAGS = /nologo /E /TC
@@ -980,8 +999,8 @@ RELEASE_DDK3790_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF.ICF
RELEASE_DDK3790xASL_IA32_CC_FLAGS = /nologo /c /WX /W4 /Gy /Gs8192 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF
DEBUG_DDK3790xASL_IA32_ASM_FLAGS = /nologo /c /WX /W3 /coff /Cx /Zd /Zi
RELEASE_DDK3790xASL_IA32_ASM_FLAGS = /nologo /c /WX /W3 /coff /Cx /Zd
- DEBUG_DDK3790xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_DDK3790xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+ DEBUG_DDK3790xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_DDK3790xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
*_DDK3790xASL_IA32_ASMLINK_FLAGS = /nologo /tiny
##################
@@ -1002,8 +1021,8 @@ RELEASE_DDK3790xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:R
RELEASE_DDK3790xASL_X64_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gs8192 /D UNICODE /O1ib2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF
DEBUG_DDK3790xASL_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
RELEASE_DDK3790xASL_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
- DEBUG_DDK3790xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_DDK3790xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+ DEBUG_DDK3790xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_DDK3790xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
##################
# IPF definitions
@@ -1024,8 +1043,8 @@ RELEASE_DDK3790xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:R
RELEASE_DDK3790xASL_IPF_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /EHs-c- /GR- /Gy /Os /GL /FIAutoGen.h /QIPF_fr32
DEBUG_DDK3790xASL_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4 -d debug
RELEASE_DDK3790xASL_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4
- DEBUG_DDK3790xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4086 /MAP /ALIGN:32 /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEST_DIR_DEBUG)/$(BASE_NAME).map /PDB:$(DEST_DIR_DEBUG)/$(BASE_NAME).pdb /DEBUG
-RELEASE_DDK3790xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF.ICF /IGNORE:4086 /MAP /ALIGN:32 /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEST_DIR_DEBUG)/$(BASE_NAME).map /PDB:$(DEST_DIR_DEBUG)/$(BASE_NAME).pdb
+ DEBUG_DDK3790xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4086 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEST_DIR_DEBUG)/$(BASE_NAME).map /PDB:$(DEST_DIR_DEBUG)/$(BASE_NAME).pdb /DEBUG
+RELEASE_DDK3790xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF.ICF /IGNORE:4086 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEST_DIR_DEBUG)/$(BASE_NAME).map /PDB:$(DEST_DIR_DEBUG)/$(BASE_NAME).pdb
##################
# EBC definitions
@@ -1104,8 +1123,10 @@ DEFINE UNIXGCC_DLINK_FLAGS_COMMON = -nostdlib -s --pie
*_UNIXGCC_IA32_ASLDLINK_PATH = DEF(UNIXGCC_IA32_PETOOLS_PREFIX)ld
*_UNIXGCC_IA32_ASM_PATH = DEF(UNIXGCC_IA32_PETOOLS_PREFIX)gcc
*_UNIXGCC_IA32_VFRPP_PATH = DEF(UNIXGCC_IA32_PETOOLS_PREFIX)gcc
+*_UNIXGCC_IA32_RC_PATH = DEF(UNIXGCC_IA32_PETOOLS_PREFIX)windres
*_UNIXGCC_IA32_CC_FLAGS = -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -Wno-array-bounds -c -include AutoGen.h -m32 -malign-double -freorder-blocks -freorder-blocks-and-partition
+*_UNIXGCC_IA32_RC_FLAGS = -J rc -O coff
##################
# X64 definitions
@@ -1119,8 +1140,10 @@ DEFINE UNIXGCC_DLINK_FLAGS_COMMON = -nostdlib -s --pie
*_UNIXGCC_X64_PP_PATH = DEF(UNIXGCC_X64_PETOOLS_PREFIX)gcc
*_UNIXGCC_X64_ASLPP_PATH = DEF(UNIXGCC_X64_PETOOLS_PREFIX)gcc
*_UNIXGCC_X64_VFRPP_PATH = DEF(UNIXGCC_X64_PETOOLS_PREFIX)gcc
+*_UNIXGCC_X64_RC_PATH = DEF(UNIXGCC_X64_PETOOLS_PREFIX)windres
*_UNIXGCC_X64_CC_FLAGS = -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -Wno-array-bounds -c -include AutoGen.h -mno-red-zone -Wno-address
+*_UNIXGCC_X64_RC_FLAGS = -J rc -O coff
##################
# IPF definitions
@@ -1136,11 +1159,13 @@ DEFINE UNIXGCC_DLINK_FLAGS_COMMON = -nostdlib -s --pie
*_UNIXGCC_IPF_VFRPP_PATH = DEF(UNIXGCC_IPF_PETOOLS_PREFIX)gcc
*_UNIXGCC_IPF_OBJCOPY_PATH = DEF(UNIXGCC_IPF_PETOOLS_PREFIX)objcopy
*_UNIXGCC_IPF_SYMRENAME_PATH = DEF(UNIXGCC_IPF_PETOOLS_PREFIX)objcopy
+*_UNIXGCC_IPF_RC_PATH = DEF(UNIXGCC_IPF_PETOOLS_PREFIX)objcopy
*_UNIXGCC_IPF_CC_FLAGS = -Os -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -Wno-array-bounds -c -include AutoGen.h -minline-int-divide-min-latency
*_UNIXGCC_IPF_DLINK_FLAGS = -nostdlib -O2 --gc-sections --dll -static --entry $(IMAGE_ENTRY_POINT) --undefined $(IMAGE_ENTRY_POINT) -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
*_UNIXGCC_IPF_OBJCOPY_FLAGS = -I elf64-ia64-little -O efi-bsdrv-ia64
*_UNIXGCC_IPF_SYMRENAME_FLAGS = --redefine-sym memcpy=CopyMem
+*_UNIXGCC_IPF_RC_FLAGS = -I binary -O elf64-ia64 --rename-section .data=.hii
####################################################################################
#
@@ -1152,7 +1177,7 @@ DEFINE UNIXGCC_DLINK_FLAGS_COMMON = -nostdlib -s --pie
*_CYGGCC_*_*_FAMILY = GCC
*_CYGGCC_*_*_DLL = DEF(CYGWIN_BIN)
-*_CYGGCC_*_MAKE_PATH = DEF(VS2003_BIN)\nmake.exe
+*_CYGGCC_*_MAKE_PATH = DEF(MS_VS_BIN)\nmake.exe
*_CYGGCC_*_MAKE_FLAGS = /nologo
*_CYGGCC_*_PP_FLAGS = -E -x assembler-with-cpp -include AutoGen.h
@@ -1174,18 +1199,20 @@ DEFINE UNIXGCC_DLINK_FLAGS_COMMON = -nostdlib -s --pie
##################
# IA32 definitions
##################
-*_CYGGCC_IA32_CC_PATH = DEF(CYGWIN_BIN32)gcc
-*_CYGGCC_IA32_SLINK_PATH = DEF(CYGWIN_BIN32)ar
-*_CYGGCC_IA32_DLINK_PATH = DEF(CYGWIN_BIN32)ld
-*_CYGGCC_IA32_ASM_PATH = DEF(CYGWIN_BIN32)gcc
-*_CYGGCC_IA32_PP_PATH = DEF(CYGWIN_BIN32)gcc
-*_CYGGCC_IA32_APP_PATH = DEF(CYGWIN_BIN32)gcc
-*_CYGGCC_IA32_VFRPP_PATH = DEF(CYGWIN_BIN32)gcc
-*_CYGGCC_IA32_ASLCC_PATH = DEF(CYGWIN_BIN32)gcc
-*_CYGGCC_IA32_ASLPP_PATH = DEF(CYGWIN_BIN32)gcc
-*_CYGGCC_IA32_ASLDLINK_PATH = DEF(CYGWIN_BIN32)ld
+*_CYGGCC_IA32_CC_PATH = DEF(CYGWIN_BINIA32)gcc
+*_CYGGCC_IA32_SLINK_PATH = DEF(CYGWIN_BINIA32)ar
+*_CYGGCC_IA32_DLINK_PATH = DEF(CYGWIN_BINIA32)ld
+*_CYGGCC_IA32_ASM_PATH = DEF(CYGWIN_BINIA32)gcc
+*_CYGGCC_IA32_PP_PATH = DEF(CYGWIN_BINIA32)gcc
+*_CYGGCC_IA32_APP_PATH = DEF(CYGWIN_BINIA32)gcc
+*_CYGGCC_IA32_VFRPP_PATH = DEF(CYGWIN_BINIA32)gcc
+*_CYGGCC_IA32_ASLCC_PATH = DEF(CYGWIN_BINIA32)gcc
+*_CYGGCC_IA32_ASLPP_PATH = DEF(CYGWIN_BINIA32)gcc
+*_CYGGCC_IA32_ASLDLINK_PATH = DEF(CYGWIN_BINIA32)ld
+*_CYGGCC_IA32_RC_PATH = DEF(CYGWIN_BINIA32)windres
*_CYGGCC_IA32_CC_FLAGS = -Os -fshort-wchar -fno-strict-aliasing -Wall -Werror -c -include AutoGen.h
+*_CYGGCC_IA32_RC_FLAGS = -J rc -O coff
##################
# X64 definitions
@@ -1200,8 +1227,10 @@ DEFINE UNIXGCC_DLINK_FLAGS_COMMON = -nostdlib -s --pie
*_CYGGCC_X64_ASLCC_PATH = DEF(CYGWIN_BINX64)gcc
*_CYGGCC_X64_ASLPP_PATH = DEF(CYGWIN_BINX64)gcc
*_CYGGCC_X64_ASLDLINK_PATH = DEF(CYGWIN_BINX64)ld
+*_CYGGCC_X64_RC_PATH = DEF(CYGWIN_BINX64)windres
*_CYGGCC_X64_CC_FLAGS = -Os -fshort-wchar -fno-strict-aliasing -mno-red-zone -Wall -Werror -c -include AutoGen.h -D_EFI_P64
+*_CYGGCC_X64_RC_FLAGS = -J rc -O coff
##################
# IPF definitions
@@ -1217,11 +1246,13 @@ DEFINE UNIXGCC_DLINK_FLAGS_COMMON = -nostdlib -s --pie
*_CYGGCC_IPF_ASLPP_PATH = DEF(CYGWIN_BINIPF)gcc
*_CYGGCC_IPF_OBJCOPY_PATH = DEF(CYGWIN_BINIPF)objcopy
*_CYGGCC_IPF_SYMRENAME_PATH = DEF(CYGWIN_BINIPF)objcopy
+*_CYGGCC_IPF_RC_PATH = DEF(CYGWIN_BINIPF)objcopy
*_CYGGCC_IPF_CC_FLAGS = -Os -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -Wno-array-bounds -c -include AutoGen.h -minline-int-divide-min-latency
*_CYGGCC_IPF_DLINK_FLAGS = -nostdlib -O2 --gc-sections --dll -static --entry $(IMAGE_ENTRY_POINT) --undefined $(IMAGE_ENTRY_POINT) -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
*_CYGGCC_IPF_OBJCOPY_FLAGS = -I elf64-ia64-little -O efi-bsdrv-ia64
*_CYGGCC_IPF_SYMRENAME_FLAGS = --redefine-sym memcpy=CopyMem
+*_CYGGCC_IPF_RC_FLAGS = -I binary -O elf64-ia64 --rename-section .data=.hii
##################
# EBC definitions
@@ -1233,6 +1264,7 @@ DEFINE UNIXGCC_DLINK_FLAGS_COMMON = -nostdlib -s --pie
*_CYGGCC_EBC_DLINK_PATH = DEF(EBC_BIN)\link.exe
*_CYGGCC_EBC_SLINK_PATH = DEF(EBC_BIN)\link.exe
*_CYGGCC_EBC_VFRPP_PATH = DEF(EBC_BIN)\iec.exe
+*_CYGGCC_EBC_RC_PATH = DEF(MS_VS_BIN)\rc.exe
*_CYGGCC_EBC_CC_FLAGS = /nologo /c /WX /W3 /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT)
*_CYGGCC_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC
@@ -1248,7 +1280,7 @@ DEFINE UNIXGCC_DLINK_FLAGS_COMMON = -nostdlib -s --pie
*_CYGGCCxASL_*_*_FAMILY = GCC
*_CYGGCCxASL_*_*_DLL = DEF(CYGWIN_BIN)
-*_CYGGCCxASL_*_MAKE_PATH = DEF(VS2003_BIN)\nmake.exe
+*_CYGGCCxASL_*_MAKE_PATH = DEF(MS_VS_BIN)\nmake.exe
*_CYGGCCxASL_*_MAKE_FLAGS = /nologo
*_CYGGCCxASL_*_PP_FLAGS = -E -x assembler-with-cpp -include AutoGen.h
@@ -1270,18 +1302,20 @@ DEFINE UNIXGCC_DLINK_FLAGS_COMMON = -nostdlib -s --pie
##################
# IA32 definitions
##################
-*_CYGGCCxASL_IA32_CC_PATH = DEF(CYGWIN_BIN32)gcc
-*_CYGGCCxASL_IA32_SLINK_PATH = DEF(CYGWIN_BIN32)ar
-*_CYGGCCxASL_IA32_DLINK_PATH = DEF(CYGWIN_BIN32)ld
-*_CYGGCCxASL_IA32_ASM_PATH = DEF(CYGWIN_BIN32)gcc
-*_CYGGCCxASL_IA32_PP_PATH = DEF(CYGWIN_BIN32)gcc
-*_CYGGCCxASL_IA32_APP_PATH = DEF(CYGWIN_BIN32)gcc
-*_CYGGCCxASL_IA32_VFRPP_PATH = DEF(CYGWIN_BIN32)gcc
-*_CYGGCCxASL_IA32_ASLCC_PATH = DEF(CYGWIN_BIN32)gcc
-*_CYGGCCxASL_IA32_ASLPP_PATH = DEF(CYGWIN_BIN32)gcc
-*_CYGGCCxASL_IA32_ASLDLINK_PATH = DEF(CYGWIN_BIN32)ld
+*_CYGGCCxASL_IA32_CC_PATH = DEF(CYGWIN_BINIA32)gcc
+*_CYGGCCxASL_IA32_SLINK_PATH = DEF(CYGWIN_BINIA32)ar
+*_CYGGCCxASL_IA32_DLINK_PATH = DEF(CYGWIN_BINIA32)ld
+*_CYGGCCxASL_IA32_ASM_PATH = DEF(CYGWIN_BINIA32)gcc
+*_CYGGCCxASL_IA32_PP_PATH = DEF(CYGWIN_BINIA32)gcc
+*_CYGGCCxASL_IA32_APP_PATH = DEF(CYGWIN_BINIA32)gcc
+*_CYGGCCxASL_IA32_VFRPP_PATH = DEF(CYGWIN_BINIA32)gcc
+*_CYGGCCxASL_IA32_ASLCC_PATH = DEF(CYGWIN_BINIA32)gcc
+*_CYGGCCxASL_IA32_ASLPP_PATH = DEF(CYGWIN_BINIA32)gcc
+*_CYGGCCxASL_IA32_ASLDLINK_PATH = DEF(CYGWIN_BINIA32)ld
+*_CYGGCCxASL_IA32_RC_PATH = DEF(CYGWIN_BINIA32)windres
*_CYGGCCxASL_IA32_CC_FLAGS = -Os -fshort-wchar -fno-strict-aliasing -Wall -Werror -c -include AutoGen.h
+*_CYGGCCxASL_IA32_RC_FLAGS = -J rc -O coff
##################
# X64 definitions
@@ -1296,8 +1330,10 @@ DEFINE UNIXGCC_DLINK_FLAGS_COMMON = -nostdlib -s --pie
*_CYGGCCxASL_X64_ASLCC_PATH = DEF(CYGWIN_BINX64)gcc
*_CYGGCCxASL_X64_ASLPP_PATH = DEF(CYGWIN_BINX64)gcc
*_CYGGCCxASL_X64_ASLDLINK_PATH = DEF(CYGWIN_BINX64)ld
+*_CYGGCCxASL_X64_RC_PATH = DEF(CYGWIN_BINX64)windres
*_CYGGCCxASL_X64_CC_FLAGS = -Os -fshort-wchar -fno-strict-aliasing -mno-red-zone -Wall -Werror -c -include AutoGen.h -D_EFI_P64
+*_CYGGCCxASL_X64_RC_FLAGS = -J rc -O coff
##################
# IPF definitions
@@ -1313,11 +1349,13 @@ DEFINE UNIXGCC_DLINK_FLAGS_COMMON = -nostdlib -s --pie
*_CYGGCCxASL_IPF_ASLPP_PATH = DEF(CYGWIN_BINIPF)gcc
*_CYGGCCxASL_IPF_OBJCOPY_PATH = DEF(CYGWIN_BINIPF)objcopy
*_CYGGCCxASL_IPF_SYMRENAME_PATH = DEF(CYGWIN_BINIPF)objcopy
+*_CYGGCCxASL_IPF_RC_PATH = DEF(CYGWIN_BINIPF)objcopy
*_CYGGCCxASL_IPF_CC_FLAGS = -Os -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -Wno-array-bounds -c -include AutoGen.h -minline-int-divide-min-latency
*_CYGGCCxASL_IPF_DLINK_FLAGS = -nostdlib -O2 --gc-sections --dll -static --entry $(IMAGE_ENTRY_POINT) --undefined $(IMAGE_ENTRY_POINT) -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
*_CYGGCCxASL_IPF_OBJCOPY_FLAGS = -I elf64-ia64-little -O efi-bsdrv-ia64
*_CYGGCCxASL_IPF_SYMRENAME_FLAGS = --redefine-sym memcpy=CopyMem
+*_CYGGCCxASL_IPF_RC_FLAGS = -I binary -O elf64-ia64 --rename-section .data=.hii
##################
# EBC definitions
@@ -1329,6 +1367,7 @@ DEFINE UNIXGCC_DLINK_FLAGS_COMMON = -nostdlib -s --pie
*_CYGGCCxASL_EBC_DLINK_PATH = DEF(EBC_BIN)\link.exe
*_CYGGCCxASL_EBC_SLINK_PATH = DEF(EBC_BIN)\link.exe
*_CYGGCCxASL_EBC_VFRPP_PATH = DEF(EBC_BIN)\iec.exe
+*_CYGGCCxASL_EBC_RC_PATH = DEF(MS_VS_BIN)\rc.exe
*_CYGGCCxASL_EBC_CC_FLAGS = /nologo /c /WX /W3 /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT)
*_CYGGCCxASL_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC
@@ -1369,6 +1408,7 @@ DEFINE UNIXGCC_DLINK_FLAGS_COMMON = -nostdlib -s --pie
*_ELFGCC32_IA32_ASLCC_PATH = DEF(ELFGCC_BIN)/gcc
*_ELFGCC32_IA32_ASLPP_PATH = DEF(ELFGCC_BIN)/gcc
*_ELFGCC32_IA32_ASLDLINK_PATH = DEF(ELFGCC_BIN)/ld
+*_ELFGCC_IA32_RC_PATH = DEF(ELFGCC_BIN)/objcopy
*_ELFGCC_IA32_CC_FLAGS = -m32 -g -fshort-wchar -fno-strict-aliasing -Wall -malign-double -c -include $(DEST_DIR_DEBUG)/AutoGen.h -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
*_ELFGCC_IA32_SLINK_FLAGS =
@@ -1377,6 +1417,7 @@ DEFINE UNIXGCC_DLINK_FLAGS_COMMON = -nostdlib -s --pie
*_ELFGCC_IA32_ASM_FLAGS = -c -x assembler -imacros $(DEST_DIR_DEBUG)/AutoGen.h
*_ELFGCC_IA32_PP_FLAGS = -m32 -E -x assembler-with-cpp -include $(DEST_DIR_DEBUG)/AutoGen.h
*_ELFGCC_IA32_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE --include $(DEST_DIR_DEBUG)/$(MODULE_NAME)StrDefs.h
+*_ELFGCC_IA32_RC_FLAGS = -I binary -O elf32-i386 -B i386 --rename-section .data=.hii
##################
# X64 definitions
@@ -1390,6 +1431,7 @@ DEFINE UNIXGCC_DLINK_FLAGS_COMMON = -nostdlib -s --pie
*_ELFGCC_X64_PP_PATH = DEF(ELFGCC_BIN)/gcc
*_ELFGCC_X64_ASLPP_PATH = DEF(ELFGCC_BIN)/gcc
*_ELFGCC_X64_VFRPP_PATH = DEF(ELFGCC_BIN)/gcc
+*_ELFGCC_X64_RC_PATH = DEF(ELFGCC_BIN)/objcopy
*_ELFGCC_X64_CC_FLAGS = -Os -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -Wno-address -Wno-array-bounds -c -include AutoGen.h -D_EFI_P64
*_ELFGCC_X64_DLINK_FLAGS = -nostdlib --shared --entry $(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT)
@@ -1397,6 +1439,7 @@ DEFINE UNIXGCC_DLINK_FLAGS_COMMON = -nostdlib -s --pie
*_ELFGCC_X64_ASM_FLAGS = -c -x assembler -imacros $(DEST_DIR_DEBUG)/AutoGen.h
*_ELFGCC_X64_PP_FLAGS = -E -x assembler-with-cpp -include $(DEST_DIR_DEBUG)/AutoGen.h
*_ELFGCC_X64_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE --include $(DEST_DIR_DEBUG)/$(MODULE_NAME)StrDefs.h
+*_ELFGCC_X64_RC_FLAGS = -I binary -O elf64-x86-64 -B i386 --rename-section .data=.hii
##################
# IPF definitions
@@ -1410,6 +1453,7 @@ DEFINE UNIXGCC_DLINK_FLAGS_COMMON = -nostdlib -s --pie
*_ELFGCC_IPF_PP_PATH = DEF(ELFGCC_BIN)/gcc
*_ELFGCC_IPF_ASLPP_PATH = DEF(ELFGCC_BIN)/gcc
*_ELFGCC_IPF_VFRPP_PATH = DEF(ELFGCC_BIN)/gcc
+*_ELFGCC_IPF_RC_PATH = DEF(ELFGCC_BIN)/objcopy
*_ELFGCC_IPF_CC_FLAGS = -Os -fshort-wchar -Wall -Werror -c -include AutoGen.h -D_EFI_P64
*_ELFGCC_IPF_DLINK_FLAGS = -nostdlib --shared --entry $(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT)
@@ -1417,6 +1461,7 @@ DEFINE UNIXGCC_DLINK_FLAGS_COMMON = -nostdlib -s --pie
*_ELFGCC_IPF_ASM_FLAGS = -c -x assembler -imacros $(DEST_DIR_DEBUG)/AutoGen.h
*_ELFGCC_IPF_PP_FLAGS = -E -x assembler-with-cpp -include $(DEST_DIR_DEBUG)/AutoGen.h
*_ELFGCC_IPF_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE --include $(DEST_DIR_DEBUG)/$(MODULE_NAME)StrDefs.h
+*_ELFGCC_IPF_RC_FLAGS = -I binary -O elf64-ia64-little -B ia64 --rename-section .data=.hii
####################################################################################
#
@@ -1429,7 +1474,8 @@ DEFINE UNIXGCC_DLINK_FLAGS_COMMON = -nostdlib -s --pie
# ICC - Intel C Compiler V9.1
*_ICC_*_*_FAMILY = INTEL
-*_ICC_*_MAKE_PATH = DEF(VS2005_BIN)\nmake.exe
+*_ICC_*_MAKE_PATH = DEF(MS_VS_BIN)\nmake.exe
+*_ICC_*_RC_PATH = DEF(MS_VS_BIN)\rc.exe
*_ICC_*_MAKE_FLAGS = /nologo
*_ICC_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h
@@ -1452,14 +1498,14 @@ DEFINE UNIXGCC_DLINK_FLAGS_COMMON = -nostdlib -s --pie
*_ICC_IA32_CC_PATH = DEF(ICC_BIN32)\icl.exe
*_ICC_IA32_SLINK_PATH = DEF(ICC_BIN32)\xilib.exe
# xilib.exe needs lib.exe from Visual Studio
-*_ICC_IA32_SLINK_DLL = DEF(VS2005_BIN)
+*_ICC_IA32_SLINK_DLL = DEF(MS_VS_BIN)
*_ICC_IA32_DLINK_PATH = DEF(ICC_BIN32)\xilink.exe
*_ICC_IA32_ASMLINK_PATH = DEF(WINDDK_BIN16)\link16.exe
*_ICC_IA32_PP_PATH = DEF(ICC_BIN32)\icl.exe
*_ICC_IA32_VFRPP_PATH = DEF(ICC_BIN32)\icl.exe
*_ICC_IA32_APP_PATH = DEF(ICC_BIN32)\icl.exe
-*_ICC_IA32_ASM_PATH = DEF(VS2005_BIN)\ml.exe
-*_ICC_IA32_ASM_DLL = DEF(VS2005_DLL)
+*_ICC_IA32_ASM_PATH = DEF(MS_VS_BIN)\ml.exe
+*_ICC_IA32_ASM_DLL = DEF(MS_VS_DLL)
*_ICC_IA32_ASLCC_PATH = DEF(ICC_BIN32)\icl.exe
*_ICC_IA32_ASLPP_PATH = DEF(ICC_BIN32)\icl.exe
*_ICC_IA32_ASLDLINK_PATH = DEF(ICC_BIN32)\xilink.exe
@@ -1469,8 +1515,8 @@ RELEASE_ICC_IA32_CC_FLAGS = /nologo /c /WX /W4 /Gy /Gs8192 /D UNI
DEBUG_ICC_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Zd /Zi
RELEASE_ICC_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Zd
*_ICC_IA32_SLINK_FLAGS = /nologo
- DEBUG_ICC_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICC_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+ DEBUG_ICC_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_ICC_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
*_ICC_IA32_ASMLINK_FLAGS = /nologo /tiny
##################
@@ -1479,13 +1525,13 @@ RELEASE_ICC_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /O
*_ICC_X64_CC_PATH = DEF(ICC_BINX64)\icl.exe
*_ICC_X64_SLINK_PATH = DEF(ICC_BINX64)\xilib.exe
# xilib.exe needs lib.exe from Visual Studio
-*_ICC_X64_SLINK_DLL = DEF(VS2005_BIN)
+*_ICC_X64_SLINK_DLL = DEF(MS_VS_BIN)
*_ICC_X64_DLINK_PATH = DEF(ICC_BINX64)\xilink.exe
*_ICC_X64_PP_PATH = DEF(ICC_BINX64)\icl.exe
*_ICC_X64_VFRPP_PATH = DEF(ICC_BINX64)\icl.exe
*_ICC_X64_APP_PATH = DEF(ICC_BINX64)\icl.exe
*_ICC_X64_ASM_PATH = DEF(WINDDK_BINX64)\ml64.exe
-*_ICC_X64_ASM_DLL = DEF(VS2005_DLL)
+*_ICC_X64_ASM_DLL = DEF(MS_VS_DLL)
*_ICC_X64_ASLCC_PATH = DEF(ICC_BINX64)\icl.exe
*_ICC_X64_ASLPP_PATH = DEF(ICC_BINX64)\icl.exe
*_ICC_X64_ASLDLINK_PATH = DEF(ICC_BINX64)\xilink.exe
@@ -1494,8 +1540,8 @@ RELEASE_ICC_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /O
RELEASE_ICC_X64_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gs8192 /D UNICODE /O1ib2s /GL /Gy /FI$(DEST_DIR_DEBUG)/AutoGen.h /EHs-c- /GF
DEBUG_ICC_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
RELEASE_ICC_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
- DEBUG_ICC_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICC_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+ DEBUG_ICC_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_ICC_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
*_ICC_X64_SLINK_FLAGS = /nologo /LTCG
@@ -1504,10 +1550,10 @@ RELEASE_ICC_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /O
##################
*_ICC_IPF_CC_PATH = DEF(ICC_BIN64)\icl.exe
# icl.exe needs cl.exe from Visual Studio
-*_ICC_IPF_CC_DLL = DEF(VS2005_BIN)
+*_ICC_IPF_CC_DLL = DEF(MS_VS_BIN)
*_ICC_IPF_SLINK_PATH = DEF(ICC_BIN64)\xilib.exe
# xilib.exe needs lib.exe from Visual Studio
-*_ICC_IPF_SLINK_DLL = DEF(VS2005_BIN);DEF(VS2005_DLL)
+*_ICC_IPF_SLINK_DLL = DEF(MS_VS_BIN);DEF(MS_VS_DLL)
*_ICC_IPF_DLINK_PATH = DEF(ICC_BIN64)\xilink.exe
*_ICC_IPF_PP_PATH = DEF(ICC_BIN64)\icl.exe
*_ICC_IPF_VFRPP_PATH = DEF(ICC_BIN64)\icl.exe
@@ -1521,8 +1567,8 @@ RELEASE_ICC_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /O
RELEASE_ICC_IPF_CC_FLAGS = /nologo /c /WX /W4 /GX /Gy /Od /FI$(DEST_DIR_DEBUG)/AutoGen.h /QIA64_fr32 /GF
DEBUG_ICC_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W3 -d debug -F COFF32
RELEASE_ICC_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W3 -F COFF32
- DEBUG_ICC_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4086 /MAP /ALIGN:64 /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEST_DIR_DEBUG)/$(BASE_NAME).map /PDB:$(DEST_DIR_DEBUG)/$(BASE_NAME).pdb /DEBUG
-RELEASE_ICC_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4086 /MAP /ALIGN:64 /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEST_DIR_DEBUG)/$(BASE_NAME).map /PDB:$(DEST_DIR_DEBUG)/$(BASE_NAME).pdb
+ DEBUG_ICC_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4086 /MAP /ALIGN:64 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEST_DIR_DEBUG)/$(BASE_NAME).map /PDB:$(DEST_DIR_DEBUG)/$(BASE_NAME).pdb /DEBUG
+RELEASE_ICC_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4086 /MAP /ALIGN:64 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEST_DIR_DEBUG)/$(BASE_NAME).map /PDB:$(DEST_DIR_DEBUG)/$(BASE_NAME).pdb
*_ICC_IPF_SLINK_FLAGS = /nologo
##################
@@ -1530,7 +1576,7 @@ RELEASE_ICC_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT
##################
*_ICC_EBC_*_FAMILY = INTEL
-*_ICC_EBC_MAKE_PATH = DEF(VS2005_BIN)\nmake.exe
+*_ICC_EBC_MAKE_PATH = DEF(MS_VS_BIN)\nmake.exe
*_ICC_EBC_PP_PATH = DEF(EBC_BIN)\iec.exe
*_ICC_EBC_VFRPP_PATH = DEF(EBC_BIN)\iec.exe
*_ICC_EBC_CC_PATH = DEF(EBC_BIN)\iec.exe
@@ -1555,7 +1601,8 @@ RELEASE_ICC_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT
# ICCxASL - Intel C Compiler V9.1
*_ICCxASL_*_*_FAMILY = INTEL
-*_ICCxASL_*_MAKE_PATH = DEF(VS2005_BIN)\nmake.exe
+*_ICCxASL_*_MAKE_PATH = DEF(MS_VS_BIN)\nmake.exe
+*_ICCxASL_*_RC_PATH = DEF(MS_VS_BIN)\rc.exe
*_ICCxASL_*_MAKE_FLAGS = /nologo
*_ICCxASL_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h
@@ -1578,14 +1625,14 @@ RELEASE_ICC_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT
*_ICCxASL_IA32_CC_PATH = DEF(ICC_BIN32)\icl.exe
*_ICCxASL_IA32_SLINK_PATH = DEF(ICC_BIN32)\xilib.exe
# xilib.exe needs lib.exe from Visual Studio
-*_ICCxASL_IA32_SLINK_DLL = DEF(VS2005_BIN)
+*_ICCxASL_IA32_SLINK_DLL = DEF(MS_VS_BIN)
*_ICCxASL_IA32_DLINK_PATH = DEF(ICC_BIN32)\xilink.exe
*_ICCxASL_IA32_ASMLINK_PATH = DEF(WINDDK_BIN16)\link16.exe
*_ICCxASL_IA32_PP_PATH = DEF(ICC_BIN32)\icl.exe
*_ICCxASL_IA32_VFRPP_PATH = DEF(ICC_BIN32)\icl.exe
*_ICCxASL_IA32_APP_PATH = DEF(ICC_BIN32)\icl.exe
-*_ICCxASL_IA32_ASM_PATH = DEF(VS2005_BIN)\ml.exe
-*_ICCxASL_IA32_ASM_DLL = DEF(VS2005_DLL)
+*_ICCxASL_IA32_ASM_PATH = DEF(MS_VS_BIN)\ml.exe
+*_ICCxASL_IA32_ASM_DLL = DEF(MS_VS_DLL)
*_ICCxASL_IA32_ASLCC_PATH = DEF(ICC_BIN32)\icl.exe
*_ICCxASL_IA32_ASLPP_PATH = DEF(ICC_BIN32)\icl.exe
*_ICCxASL_IA32_ASLDLINK_PATH = DEF(ICC_BIN32)\xilink.exe
@@ -1595,8 +1642,8 @@ RELEASE_ICCxASL_IA32_CC_FLAGS = /nologo /c /WX /W4 /Gy /Gs8192 /D
DEBUG_ICCxASL_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Zd /Zi
RELEASE_ICCxASL_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Zd
*_ICCxASL_IA32_SLINK_FLAGS = /nologo
- DEBUG_ICCxASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICCxASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+ DEBUG_ICCxASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_ICCxASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
*_ICCxASL_IA32_ASMLINK_FLAGS = /nologo /tiny
##################
@@ -1605,13 +1652,13 @@ RELEASE_ICCxASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:408
*_ICCxASL_X64_CC_PATH = DEF(ICC_BINX64)\icl.exe
*_ICCxASL_X64_SLINK_PATH = DEF(ICC_BINX64)\xilib.exe
# xilib.exe needs lib.exe from Visual Studio
-*_ICCxASL_X64_SLINK_DLL = DEF(VS2005_BIN)
+*_ICCxASL_X64_SLINK_DLL = DEF(MS_VS_BIN)
*_ICCxASL_X64_DLINK_PATH = DEF(ICC_BINX64)\xilink.exe
*_ICCxASL_X64_PP_PATH = DEF(ICC_BINX64)\icl.exe
*_ICCxASL_X64_VFRPP_PATH = DEF(ICC_BINX64)\icl.exe
*_ICCxASL_X64_APP_PATH = DEF(ICC_BINX64)\icl.exe
*_ICCxASL_X64_ASM_PATH = DEF(WINDDK_BINX64)\ml64.exe
-*_ICCxASL_X64_ASM_DLL = DEF(VS2005_DLL)
+*_ICCxASL_X64_ASM_DLL = DEF(MS_VS_DLL)
*_ICCxASL_X64_ASLCC_PATH = DEF(ICC_BINX64)\icl.exe
*_ICCxASL_X64_ASLPP_PATH = DEF(ICC_BINX64)\icl.exe
*_ICCxASL_X64_ASLDLINK_PATH = DEF(ICC_BINX64)\xilink.exe
@@ -1620,8 +1667,8 @@ RELEASE_ICCxASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:408
RELEASE_ICCxASL_X64_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gs8192 /D UNICODE /O1ib2s /GL /Gy /FI$(DEST_DIR_DEBUG)/AutoGen.h /EHs-c- /GF
DEBUG_ICCxASL_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
RELEASE_ICCxASL_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
- DEBUG_ICCxASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICCxASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+ DEBUG_ICCxASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_ICCxASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
*_ICCxASL_X64_SLINK_FLAGS = /nologo /LTCG
@@ -1630,10 +1677,10 @@ RELEASE_ICCxASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:408
##################
*_ICCxASL_IPF_CC_PATH = DEF(ICC_BIN64)\icl.exe
# icl.exe needs cl.exe from Visual Studio
-*_ICCxASL_IPF_CC_DLL = DEF(VS2005_BIN)
+*_ICCxASL_IPF_CC_DLL = DEF(MS_VS_BIN)
*_ICCxASL_IPF_SLINK_PATH = DEF(ICC_BIN64)\xilib.exe
# xilib.exe needs lib.exe from Visual Studio
-*_ICCxASL_IPF_SLINK_DLL = DEF(VS2005_BIN);DEF(VS2005_DLL)
+*_ICCxASL_IPF_SLINK_DLL = DEF(MS_VS_BIN);DEF(MS_VS_DLL)
*_ICCxASL_IPF_DLINK_PATH = DEF(ICC_BIN64)\xilink.exe
*_ICCxASL_IPF_PP_PATH = DEF(ICC_BIN64)\icl.exe
*_ICCxASL_IPF_VFRPP_PATH = DEF(ICC_BIN64)\icl.exe
@@ -1647,8 +1694,8 @@ RELEASE_ICCxASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:408
RELEASE_ICCxASL_IPF_CC_FLAGS = /nologo /c /WX /W4 /GX /Gy /Od /FI$(DEST_DIR_DEBUG)/AutoGen.h /QIA64_fr32 /GF
DEBUG_ICCxASL_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W3 -d debug -F COFF32
RELEASE_ICCxASL_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W3 -F COFF32
- DEBUG_ICCxASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4086 /MAP /ALIGN:64 /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEST_DIR_DEBUG)/$(BASE_NAME).map /PDB:$(DEST_DIR_DEBUG)/$(BASE_NAME).pdb /DEBUG
-RELEASE_ICCxASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4086 /MAP /ALIGN:64 /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEST_DIR_DEBUG)/$(BASE_NAME).map /PDB:$(DEST_DIR_DEBUG)/$(BASE_NAME).pdb
+ DEBUG_ICCxASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4086 /MAP /ALIGN:64 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEST_DIR_DEBUG)/$(BASE_NAME).map /PDB:$(DEST_DIR_DEBUG)/$(BASE_NAME).pdb /DEBUG
+RELEASE_ICCxASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4086 /MAP /ALIGN:64 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEST_DIR_DEBUG)/$(BASE_NAME).map /PDB:$(DEST_DIR_DEBUG)/$(BASE_NAME).pdb
*_ICCxASL_IPF_SLINK_FLAGS = /nologo
##################
@@ -1656,7 +1703,7 @@ RELEASE_ICCxASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL
##################
*_ICCxASL_EBC_*_FAMILY = INTEL
-*_ICCxASL_EBC_MAKE_PATH = DEF(VS2005_BIN)\nmake.exe
+*_ICCxASL_EBC_MAKE_PATH = DEF(MS_VS_BIN)\nmake.exe
*_ICCxASL_EBC_PP_PATH = DEF(EBC_BIN)\iec.exe
*_ICCxASL_EBC_VFRPP_PATH = DEF(EBC_BIN)\iec.exe
*_ICCxASL_EBC_CC_PATH = DEF(EBC_BIN)\iec.exe
@@ -1683,6 +1730,7 @@ RELEASE_ICCxASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL
*_ICCx86_*_*_FAMILY = INTEL
*_ICCx86_*_MAKE_PATH = DEF(VS2005x86_BIN)\nmake.exe
+*_ICCx86_*_RC_PATH = DEF(VS2005x86_BIN)\rc.exe
*_ICCx86_*_MAKE_FLAGS = /nologo
*_ICCx86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h
@@ -1722,8 +1770,8 @@ RELEASE_ICCx86_IA32_CC_FLAGS = /nologo /c /WX /W4 /Gy /Gs8192 /D
DEBUG_ICCx86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Zd /Zi
RELEASE_ICCx86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Zd
*_ICCx86_IA32_SLINK_FLAGS = /nologo
- DEBUG_ICCx86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICCx86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+ DEBUG_ICCx86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_ICCx86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
*_ICCx86_IA32_ASMLINK_FLAGS = /nologo /tiny
##################
@@ -1747,8 +1795,8 @@ RELEASE_ICCx86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086
RELEASE_ICCx86_X64_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gs8192 /D UNICODE /O1ib2s /GL /Gy /FI$(DEST_DIR_DEBUG)/AutoGen.h /EHs-c- /GF
DEBUG_ICCx86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
RELEASE_ICCx86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
- DEBUG_ICCx86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICCx86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+ DEBUG_ICCx86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_ICCx86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
*_ICCx86_X64_SLINK_FLAGS = /nologo /LTCG
@@ -1774,8 +1822,8 @@ RELEASE_ICCx86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086
RELEASE_ICCx86_IPF_CC_FLAGS = /nologo /c /WX /W4 /GX /Gy /Od /FI$(DEST_DIR_DEBUG)/AutoGen.h /QIA64_fr32 /GF
DEBUG_ICCx86_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W3 -d debug -F COFF32
RELEASE_ICCx86_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W3 -F COFF32
- DEBUG_ICCx86_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4086 /MAP /ALIGN:64 /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEST_DIR_DEBUG)/$(BASE_NAME).map /PDB:$(DEST_DIR_DEBUG)/$(BASE_NAME).pdb /DEBUG
-RELEASE_ICCx86_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4086 /MAP /ALIGN:64 /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEST_DIR_DEBUG)/$(BASE_NAME).map /PDB:$(DEST_DIR_DEBUG)/$(BASE_NAME).pdb
+ DEBUG_ICCx86_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4086 /MAP /ALIGN:64 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEST_DIR_DEBUG)/$(BASE_NAME).map /PDB:$(DEST_DIR_DEBUG)/$(BASE_NAME).pdb /DEBUG
+RELEASE_ICCx86_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4086 /MAP /ALIGN:64 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEST_DIR_DEBUG)/$(BASE_NAME).map /PDB:$(DEST_DIR_DEBUG)/$(BASE_NAME).pdb
*_ICCx86_IPF_SLINK_FLAGS = /nologo
##################
@@ -1810,6 +1858,7 @@ RELEASE_ICCx86_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /
*_ICCx86xASL_*_*_FAMILY = INTEL
*_ICCx86xASL_*_MAKE_PATH = DEF(VS2005x86_BIN)\nmake.exe
+*_ICCx86xASL_*_RC_PATH = DEF(VS2005x86_BIN)\rc.exe
*_ICCx86xASL_*_MAKE_FLAGS = /nologo
*_ICCx86xASL_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h
@@ -1849,8 +1898,8 @@ RELEASE_ICCx86xASL_IA32_CC_FLAGS = /nologo /c /WX /W4 /Gy /Gs8192
DEBUG_ICCx86xASL_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Zd /Zi
RELEASE_ICCx86xASL_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Zd
*_ICCx86xASL_IA32_SLINK_FLAGS = /nologo
- DEBUG_ICCx86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICCx86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+ DEBUG_ICCx86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_ICCx86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
*_ICCx86xASL_IA32_ASMLINK_FLAGS = /nologo /tiny
##################
@@ -1874,8 +1923,8 @@ RELEASE_ICCx86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:
RELEASE_ICCx86xASL_X64_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gs8192 /D UNICODE /O1ib2s /GL /Gy /FI$(DEST_DIR_DEBUG)/AutoGen.h /EHs-c- /GF
DEBUG_ICCx86xASL_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
RELEASE_ICCx86xASL_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
- DEBUG_ICCx86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICCx86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+ DEBUG_ICCx86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_ICCx86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
*_ICCx86xASL_X64_SLINK_FLAGS = /nologo /LTCG
@@ -1901,8 +1950,8 @@ RELEASE_ICCx86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:
RELEASE_ICCx86xASL_IPF_CC_FLAGS = /nologo /c /WX /W4 /GX /Gy /Od /FI$(DEST_DIR_DEBUG)/AutoGen.h /QIA64_fr32 /GF
DEBUG_ICCx86xASL_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W3 -d debug -F COFF32
RELEASE_ICCx86xASL_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W3 -F COFF32
- DEBUG_ICCx86xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4086 /MAP /ALIGN:64 /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEST_DIR_DEBUG)/$(BASE_NAME).map /PDB:$(DEST_DIR_DEBUG)/$(BASE_NAME).pdb /DEBUG
-RELEASE_ICCx86xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4086 /MAP /ALIGN:64 /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEST_DIR_DEBUG)/$(BASE_NAME).map /PDB:$(DEST_DIR_DEBUG)/$(BASE_NAME).pdb
+ DEBUG_ICCx86xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4086 /MAP /ALIGN:64 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEST_DIR_DEBUG)/$(BASE_NAME).map /PDB:$(DEST_DIR_DEBUG)/$(BASE_NAME).pdb /DEBUG
+RELEASE_ICCx86xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4086 /MAP /ALIGN:64 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEST_DIR_DEBUG)/$(BASE_NAME).map /PDB:$(DEST_DIR_DEBUG)/$(BASE_NAME).pdb
*_ICCx86xASL_IPF_SLINK_FLAGS = /nologo
##################
@@ -1971,13 +2020,14 @@ RELEASE_ICCx86xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /D
*_MYTOOLS_IA32_ASLCC_PATH = DEF(VS2005_BIN)\cl.exe
*_MYTOOLS_IA32_ASLPP_PATH = DEF(VS2005_BIN)\cl.exe
*_MYTOOLS_IA32_ASLDLINK_PATH = DEF(VS2005_BIN)\link.exe
+*_MYTOOLS_IA32_RC_PATH = DEF(VS2005_BIN)\rc.exe
DEBUG_MYTOOLS_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs8192 /Gy /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm
RELEASE_MYTOOLS_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs8192 /Gy /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF
DEBUG_MYTOOLS_IA32_ASM_FLAGS = /nologo /c /WX /W3 /coff /Cx /Zd /Zi
RELEASE_MYTOOLS_IA32_ASM_FLAGS = /nologo /c /WX /W3 /coff /Cx /Zd
- DEBUG_MYTOOLS_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb
-RELEASE_MYTOOLS_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb
+ DEBUG_MYTOOLS_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb
+RELEASE_MYTOOLS_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb
*_MYTOOLS_IA32_ASMLINK_FLAGS = /nologo /tiny
##################
@@ -1996,13 +2046,14 @@ RELEASE_MYTOOLS_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /O
*_MYTOOLS_X64_ASLCC_PATH = DEF(VS2005_BINX64)\cl.exe
*_MYTOOLS_X64_ASLPP_PATH = DEF(VS2005_BINX64)\cl.exe
*_MYTOOLS_X64_ASLDLINK_PATH = DEF(VS2005_BINX64)\link.exe
+*_MYTOOLS_X64_RC_PATH = DEF(VS2005_BIN)\rc.exe
DEBUG_MYTOOLS_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs8192 /Gy /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm
RELEASE_MYTOOLS_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs8192 /Gy /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF
DEBUG_MYTOOLS_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
RELEASE_MYTOOLS_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
- DEBUG_MYTOOLS_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_MYTOOLS_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+ DEBUG_MYTOOLS_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_MYTOOLS_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
##################
# IPF definitions
@@ -2018,14 +2069,15 @@ RELEASE_MYTOOLS_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /O
*_MYTOOLS_IPF_ASLCC_PATH = DEF(WINDDK_BIN64)\cl.exe
*_MYTOOLS_IPF_ASLPP_PATH = DEF(WINDDK_BIN64)\cl.exe
*_MYTOOLS_IPF_ASLDLINK_PATH = DEF(WINDDK_BIN64)\link.exe
- *_MYTOOLS_IPF_ASM_OUTPUT = "-o "
+*_MYTOOLS_IPF_RC_PATH = DEF(WINDDK_BIN32)\rc.exe
+ *_MYTOOLS_IPF_ASM_OUTPUT = "-o "
DEBUG_MYTOOLS_IPF_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gy /Ox /GL /FIAutoGen.h /EHs-c- /GR- /GF /Zx /QIPF_fr32 /Zi
RELEASE_MYTOOLS_IPF_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gy /Ox /GL /FIAutoGen.h /EHs-c- /GR- /GF /Zx /QIPF_fr32
DEBUG_MYTOOLS_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4 -d debug
RELEASE_MYTOOLS_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4
- DEBUG_MYTOOLS_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF /OPT:ICF=10 /IGNORE:4086 /MAP /ALIGN:32 /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEST_DIR_DEBUG)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb /DEBUG
-RELEASE_MYTOOLS_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF /OPT:ICF=10 /IGNORE:4086 /MAP /ALIGN:32 /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEST_DIR_DEBUG)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb
+ DEBUG_MYTOOLS_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF /OPT:ICF=10 /IGNORE:4086 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEST_DIR_DEBUG)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb /DEBUG
+RELEASE_MYTOOLS_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF /OPT:ICF=10 /IGNORE:4086 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEST_DIR_DEBUG)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb
*_MYTOOLS_IPF_SLINK_FLAGS = /nologo /LTCG
##################
@@ -2039,6 +2091,7 @@ RELEASE_MYTOOLS_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT
*_MYTOOLS_EBC_CC_PATH = DEF(EBC_BIN)\iec.exe
*_MYTOOLS_EBC_SLINK_PATH = DEF(EBC_BIN)\link.exe
*_MYTOOLS_EBC_DLINK_PATH = DEF(EBC_BIN)\link.exe
+*_MYTOOLS_EBC_RC_PATH = DEF(VS2005_BIN)\rc.exe
*_MYTOOLS_EBC_MAKE_FLAGS = /nologo
*_MYTOOLS_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h
diff --git a/BaseTools/Source/C/Common/FirmwareVolumeBuffer.c b/BaseTools/Source/C/Common/FirmwareVolumeBuffer.c
index d51e359043..2d3b1353cb 100644
--- a/BaseTools/Source/C/Common/FirmwareVolumeBuffer.c
+++ b/BaseTools/Source/C/Common/FirmwareVolumeBuffer.c
@@ -236,8 +236,8 @@ Returns:
if (File->Attributes & FFS_ATTRIB_CHECKSUM) {
File->IntegrityCheck.Checksum.File = FvBufCalculateChecksum8 (
- (VOID*)File,
- FileSize
+ (VOID*)(File + 1),
+ FileSize - sizeof (EFI_FFS_FILE_HEADER)
);
} else {
File->IntegrityCheck.Checksum.File = FFS_FIXED_CHECKSUM;
diff --git a/BaseTools/Source/C/Common/FvLib.c b/BaseTools/Source/C/Common/FvLib.c
index 292b077f34..dc50e877e6 100644
--- a/BaseTools/Source/C/Common/FvLib.c
+++ b/BaseTools/Source/C/Common/FvLib.c
@@ -703,8 +703,8 @@ Returns:
// Verify file data checksum
//
FileLength = GetLength (FfsHeader->Size);
- Checksum = CalculateSum8 ((UINT8 *) FfsHeader, FileLength);
- Checksum = (UINT8) (Checksum - FfsHeader->State);
+ Checksum = CalculateSum8 ((UINT8 *) (FfsHeader + 1), FileLength - sizeof (EFI_FFS_FILE_HEADER));
+ Checksum = Checksum + FfsHeader->IntegrityCheck.Checksum.File;
if (Checksum != 0) {
Error (NULL, 0, 0006, "invalid FFS file checksum", "Ffs file with Guid %s", FileGuidString);
return EFI_ABORTED;
@@ -712,7 +712,7 @@ Returns:
} else {
//
// File does not have a checksum
- // Verify contents are 0x5A as spec'd
+ // Verify contents are 0xAA as spec'd
//
if (FfsHeader->IntegrityCheck.Checksum.File != FFS_FIXED_CHECKSUM) {
Error (NULL, 0, 0006, "invalid fixed FFS file header checksum", "Ffs file with Guid %s", FileGuidString);
diff --git a/BaseTools/Source/C/GenFfs/GenFfs.c b/BaseTools/Source/C/GenFfs/GenFfs.c
index 12a3b2f18c..324490a707 100644
--- a/BaseTools/Source/C/GenFfs/GenFfs.c
+++ b/BaseTools/Source/C/GenFfs/GenFfs.c
@@ -134,6 +134,8 @@ Returns:
EFI_FV_FILETYPE_PEI_CORE, EFI_FV_FILETYPE_DXE_CORE,\n\
EFI_FV_FILETYPE_DRIVER, EFI_FV_FILETYPE_APPLICATION,\n\
EFI_FV_FILETYPE_COMBINED_PEIM_DRIVER,\n\
+ EFI_FV_FILETYPE_SMM, EFI_FV_FILETYPE_SMM_CORE,\n\
+ EFI_FV_FILETYPE_COMBINED_SMM_DXE, \n\
EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE.\n");
fprintf (stdout, " -g FileGuid, --fileguid FileGuid\n\
FileGuid is one module guid.\n\
diff --git a/BaseTools/Source/C/GenFv/GenFvInternalLib.c b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
index 917baa11e8..6b5d6bda2a 100644
--- a/BaseTools/Source/C/GenFv/GenFvInternalLib.c
+++ b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
@@ -229,22 +229,11 @@ Returns:
}
//
- // Read the FV Name Guid
+ // Read the FV Extension Header File Name
//
- if (!FvInfo->FvNameGuidSet) {
- Status = FindToken (InfFile, ATTRIBUTES_SECTION_STRING, EFI_FV_NAMEGUID_STRING, 0, Value);
- if (Status == EFI_SUCCESS) {
- //
- // Get the guid value
- //
- Status = StringToGuid (Value, &GuidValue);
- if (EFI_ERROR (Status)) {
- Error (NULL, 0, 2000, "Invalid parameter", "%s = %s", EFI_FV_NAMEGUID_STRING, Value);
- return EFI_ABORTED;
- }
- memcpy (&FvInfo->FvNameGuid, &GuidValue, sizeof (EFI_GUID));
- FvInfo->FvNameGuidSet = TRUE;
- }
+ Status = FindToken (InfFile, ATTRIBUTES_SECTION_STRING, EFI_FV_EXT_HEADER_FILE_NAME, 0, Value);
+ if (Status == EFI_SUCCESS) {
+ strcpy (FvInfo->FvExtHeaderFile, Value);
}
//
@@ -1272,6 +1261,7 @@ Returns:
EFI_FFS_FILE_STATE SavedState;
UINT64 FitAddress;
FIT_TABLE *FitTablePtr;
+ BOOLEAN Vtf0Detected;
//
// Verify input parameters
@@ -1292,11 +1282,32 @@ Returns:
return EFI_INVALID_PARAMETER;
}
+ if (
+ (((UINTN)FvImage->Eof - (UINTN)FvImage->FileImage) >=
+ IA32_X64_VTF_SIGNATURE_OFFSET) &&
+ (*(UINT32 *)(VOID*)((UINTN) FvImage->Eof -
+ IA32_X64_VTF_SIGNATURE_OFFSET) ==
+ IA32_X64_VTF0_SIGNATURE)
+ ) {
+ Vtf0Detected = TRUE;
+ } else {
+ Vtf0Detected = FALSE;
+ }
+
//
// Find the Sec Core
//
Status = GetFileByType (EFI_FV_FILETYPE_SECURITY_CORE, 1, &SecCoreFile);
if (EFI_ERROR (Status) || SecCoreFile == NULL) {
+ if (Vtf0Detected) {
+ //
+ // If the SEC core file is not found, but the VTF-0 signature
+ // is found, we'll treat it as a VTF-0 'Volume Top File'.
+ // This means no modifications are required to the VTF.
+ //
+ return EFI_SUCCESS;
+ }
+
Error (NULL, 0, 3000, "Invalid", "could not find the SEC core file in the FV.");
return EFI_ABORTED;
}
@@ -1325,6 +1336,19 @@ Returns:
return EFI_ABORTED;
}
+ if (
+ Vtf0Detected &&
+ (MachineType == EFI_IMAGE_MACHINE_IA32 ||
+ MachineType == EFI_IMAGE_MACHINE_X64)
+ ) {
+ //
+ // If the SEC core code is IA32 or X64 and the VTF-0 signature
+ // is found, we'll treat it as a VTF-0 'Volume Top File'.
+ // This means no modifications are required to the VTF.
+ //
+ return EFI_SUCCESS;
+ }
+
//
// Physical address is FV base + offset of PE32 + offset of the entry point
//
@@ -1428,16 +1452,6 @@ Returns:
SecCoreEntryAddressPtr = (EFI_PHYSICAL_ADDRESS *) ((UINTN) FvImage->Eof - IPF_SALE_ENTRY_ADDRESS_OFFSET);
*SecCoreEntryAddressPtr = SecCorePhysicalAddress;
- } else if (
- (MachineType == EFI_IMAGE_MACHINE_IA32 ||
- MachineType == EFI_IMAGE_MACHINE_X64) &&
- (((UINTN)FvImage->Eof - (UINTN)FvImage->FileImage) >= IA32_X64_VTF_SIGNATURE_OFFSET) &&
- (*(UINT32 *)(VOID*)((UINTN) FvImage->Eof - IA32_X64_VTF_SIGNATURE_OFFSET) ==
- IA32_X64_VTF0_SIGNATURE)
- ) {
- //
- // If VTF-0 signature is found, then no modifications are needed.
- //
} else if (MachineType == EFI_IMAGE_MACHINE_IA32 || MachineType == EFI_IMAGE_MACHINE_X64) {
//
// Get the location to update
@@ -1545,8 +1559,8 @@ Returns:
VtfFile->State = 0;
if (VtfFile->Attributes & FFS_ATTRIB_CHECKSUM) {
VtfFile->IntegrityCheck.Checksum.File = CalculateChecksum8 (
- (UINT8 *) VtfFile,
- GetLength (VtfFile->Size)
+ (UINT8 *) (VtfFile + 1),
+ GetLength (VtfFile->Size) - sizeof (EFI_FFS_FILE_HEADER)
);
} else {
VtfFile->IntegrityCheck.Checksum.File = FFS_FIXED_CHECKSUM;
@@ -1938,19 +1952,21 @@ Returns:
--*/
{
- EFI_STATUS Status;
- MEMORY_FILE InfMemoryFile;
- MEMORY_FILE FvImageMemoryFile;
- UINTN Index;
- EFI_FIRMWARE_VOLUME_HEADER *FvHeader;
- EFI_FFS_FILE_HEADER *VtfFileImage;
- UINT8 *FvBufferHeader; // to make sure fvimage header 8 type alignment.
- UINT8 *FvImage;
- UINTN FvImageSize;
- FILE *FvFile;
- CHAR8 FvMapName [_MAX_PATH];
- FILE *FvMapFile;
- EFI_FIRMWARE_VOLUME_EXT_HEADER FvExtHeader;
+ EFI_STATUS Status;
+ MEMORY_FILE InfMemoryFile;
+ MEMORY_FILE FvImageMemoryFile;
+ UINTN Index;
+ EFI_FIRMWARE_VOLUME_HEADER *FvHeader;
+ EFI_FFS_FILE_HEADER *VtfFileImage;
+ UINT8 *FvBufferHeader; // to make sure fvimage header 8 type alignment.
+ UINT8 *FvImage;
+ UINTN FvImageSize;
+ FILE *FvFile;
+ CHAR8 FvMapName [_MAX_PATH];
+ FILE *FvMapFile;
+ EFI_FIRMWARE_VOLUME_EXT_HEADER *FvExtHeader;
+ FILE *FvExtHeaderFile;
+ UINTN FileSize;
FvBufferHeader = NULL;
FvFile = NULL;
@@ -2008,6 +2024,58 @@ Returns:
mFvDataInfo.FvFileSystemGuid.Data4[6],
mFvDataInfo.FvFileSystemGuid.Data4[7]);
}
+
+ //
+ // Add PI FV extension header
+ //
+ FvExtHeader = NULL;
+ FvExtHeaderFile = NULL;
+ if (mFvDataInfo.FvExtHeaderFile[0] != 0) {
+ //
+ // Open the FV Extension Header file
+ //
+ FvExtHeaderFile = fopen (mFvDataInfo.FvExtHeaderFile, "rb");
+
+ //
+ // Get the file size
+ //
+ FileSize = _filelength (fileno (FvExtHeaderFile));
+
+ //
+ // Allocate a buffer for the FV Extension Header
+ //
+ FvExtHeader = malloc(FileSize);
+ if (FvExtHeader == NULL) {
+ fclose (FvExtHeaderFile);
+ return EFI_OUT_OF_RESOURCES;
+ }
+
+ //
+ // Read the FV Extension Header
+ //
+ fread (FvExtHeader, sizeof (UINT8), FileSize, FvExtHeaderFile);
+ fclose (FvExtHeaderFile);
+
+ //
+ // See if there is an override for the FV Name GUID
+ //
+ if (mFvDataInfo.FvNameGuidSet) {
+ memcpy (&FvExtHeader->FvName, &mFvDataInfo.FvNameGuid, sizeof (EFI_GUID));
+ }
+ memcpy (&mFvDataInfo.FvNameGuid, &FvExtHeader->FvName, sizeof (EFI_GUID));
+ mFvDataInfo.FvNameGuidSet = TRUE;
+ } else if (mFvDataInfo.FvNameGuidSet) {
+ //
+ // Allocate a buffer for the FV Extension Header
+ //
+ FvExtHeader = malloc(sizeof (EFI_FIRMWARE_VOLUME_EXT_HEADER));
+ if (FvExtHeader == NULL) {
+ return EFI_OUT_OF_RESOURCES;
+ }
+ memcpy (&FvExtHeader->FvName, &mFvDataInfo.FvNameGuid, sizeof (EFI_GUID));
+ FvExtHeader->ExtHeaderSize = sizeof (EFI_FIRMWARE_VOLUME_EXT_HEADER);
+ }
+
//
// Debug message Fv Name Guid
//
@@ -2173,12 +2241,14 @@ Returns:
}
//
- // Set PI FV extension header
+ // Add PI FV extension header
//
- if (mFvDataInfo.FvNameGuidSet) {
- memcpy (&FvExtHeader.FvName, &mFvDataInfo.FvNameGuid, sizeof (EFI_GUID));
- FvExtHeader.ExtHeaderSize = sizeof (EFI_FIRMWARE_VOLUME_EXT_HEADER);
- AddPadFile (&FvImageMemoryFile, 4, VtfFileImage, &FvExtHeader);
+ if (FvExtHeader != NULL) {
+ //
+ // Add FV Extended Header contents to the FV as a PAD file
+ //
+ AddPadFile (&FvImageMemoryFile, 4, VtfFileImage, FvExtHeader);
+
//
// Fv Extension header change update Fv Header Check sum
//
@@ -2282,6 +2352,10 @@ Finish:
if (FvBufferHeader != NULL) {
free (FvBufferHeader);
}
+
+ if (FvExtHeader != NULL) {
+ free (FvExtHeader);
+ }
if (FvFile != NULL) {
fclose (FvFile);
@@ -2385,11 +2459,13 @@ Returns:
UINTN Index;
FILE *fpin;
UINTN FfsFileSize;
+ UINTN FvExtendHeaderSize;
UINT32 FfsAlignment;
EFI_FFS_FILE_HEADER FfsHeader;
BOOLEAN VtfFileFlag;
UINTN VtfFileSize;
+ FvExtendHeaderSize = 0;
VtfFileSize = 0;
VtfFileFlag = FALSE;
fpin = NULL;
@@ -2418,7 +2494,17 @@ Returns:
//
// Calculate PI extension header
//
- if (CompareGuid (&mFvDataInfo.FvNameGuid, &mZeroGuid) != 0) {
+ if (mFvDataInfo.FvExtHeaderFile[0] != '\0') {
+ fpin = fopen (mFvDataInfo.FvExtHeaderFile, "rb");
+ if (fpin == NULL) {
+ Error (NULL, 0, 0001, "Error opening file", mFvDataInfo.FvExtHeaderFile);
+ return EFI_ABORTED;
+ }
+ FvExtendHeaderSize = _filelength (fileno (fpin));
+ fclose (fpin);
+ CurrentOffset += sizeof (EFI_FFS_FILE_HEADER) + FvExtendHeaderSize;
+ CurrentOffset = (CurrentOffset + 7) & (~7);
+ } else if (mFvDataInfo.FvNameGuidSet) {
CurrentOffset += sizeof (EFI_FFS_FILE_HEADER) + sizeof (EFI_FIRMWARE_VOLUME_EXT_HEADER);
CurrentOffset = (CurrentOffset + 7) & (~7);
}
@@ -2959,15 +3045,10 @@ Returns:
SavedState = FfsFile->State;
FfsFile->IntegrityCheck.Checksum.File = 0;
FfsFile->State = 0;
- if (FfsFile->Attributes & FFS_ATTRIB_CHECKSUM) {
- FfsFile->IntegrityCheck.Checksum.File = CalculateChecksum8 (
- (UINT8 *) FfsFile,
- GetLength (FfsFile->Size)
- );
- } else {
- FfsFile->IntegrityCheck.Checksum.File = FFS_FIXED_CHECKSUM;
- }
-
+ FfsFile->IntegrityCheck.Checksum.File = CalculateChecksum8 (
+ (UINT8 *) (FfsFile + 1),
+ GetLength (FfsFile->Size) - sizeof (EFI_FFS_FILE_HEADER)
+ );
FfsFile->State = SavedState;
}
@@ -3189,15 +3270,10 @@ WritePeMap:
SavedState = FfsFile->State;
FfsFile->IntegrityCheck.Checksum.File = 0;
FfsFile->State = 0;
- if (FfsFile->Attributes & FFS_ATTRIB_CHECKSUM) {
- FfsFile->IntegrityCheck.Checksum.File = CalculateChecksum8 (
- (UINT8 *) FfsFile,
- GetLength (FfsFile->Size)
- );
- } else {
- FfsFile->IntegrityCheck.Checksum.File = FFS_FIXED_CHECKSUM;
- }
-
+ FfsFile->IntegrityCheck.Checksum.File = CalculateChecksum8 (
+ (UINT8 *)(FfsFile + 1),
+ GetLength (FfsFile->Size) - sizeof (EFI_FFS_FILE_HEADER)
+ );
FfsFile->State = SavedState;
}
//
diff --git a/BaseTools/Source/C/GenFv/GenFvInternalLib.h b/BaseTools/Source/C/GenFv/GenFvInternalLib.h
index d6b3ad7fc1..3c0e9336bd 100644
--- a/BaseTools/Source/C/GenFv/GenFvInternalLib.h
+++ b/BaseTools/Source/C/GenFv/GenFvInternalLib.h
@@ -61,13 +61,12 @@ Abstract:
#define MAX_NUMBER_OF_FILES_IN_FV 1000
#define MAX_NUMBER_OF_FILES_IN_CAP 1000
#define EFI_FFS_FILE_HEADER_ALIGNMENT 8
-
//
// INF file strings
//
-#define OPTIONS_SECTION_STRING "[options]"
-#define ATTRIBUTES_SECTION_STRING "[attributes]"
-#define FILES_SECTION_STRING "[files]"
+#define OPTIONS_SECTION_STRING "[options]"
+#define ATTRIBUTES_SECTION_STRING "[attributes]"
+#define FILES_SECTION_STRING "[files]"
//
// Options section
@@ -158,6 +157,12 @@ Abstract:
#define NULL_STRING "NULL"
//
+//
+//
+#define EFI_FV_EXT_HEADER_FILE_NAME "EFI_FV_EXT_HEADER_FILE_NAME"
+
+
+//
// VTF (Firmware Volume Top File) signatures
//
#define IA32_X64_VTF_SIGNATURE_OFFSET 0x14
@@ -229,6 +234,7 @@ typedef struct {
BOOLEAN FvFileSystemGuidSet;
EFI_GUID FvNameGuid;
BOOLEAN FvNameGuidSet;
+ CHAR8 FvExtHeaderFile[_MAX_PATH];
UINTN Size;
EFI_FVB_ATTRIBUTES FvAttributes;
CHAR8 FvName[_MAX_PATH];
diff --git a/BaseTools/Source/C/GenFw/GenFw.c b/BaseTools/Source/C/GenFw/GenFw.c
index 8c648eb407..e72f052869 100644
--- a/BaseTools/Source/C/GenFw/GenFw.c
+++ b/BaseTools/Source/C/GenFw/GenFw.c
@@ -33,6 +33,7 @@ Abstract:
#include <Common/UefiBaseTypes.h>
#include <IndustryStandard/PeImage.h>
+#include <Common/UefiInternalFormRepresentation.h>
//
// Acpi Table definition
@@ -60,6 +61,8 @@ Abstract:
#define UTILITY_MAJOR_VERSION 0
#define UTILITY_MINOR_VERSION 2
+#define HII_RESOURCE_SECTION_INDEX 1
+#define HII_RESOURCE_SECTION_NAME "HII"
//
// Action for this tool.
//
@@ -73,6 +76,7 @@ Abstract:
#define FW_MCI_IMAGE 7
#define FW_MERGE_IMAGE 8
#define FW_RELOC_STRIPEED_IMAGE 9
+#define FW_HII_PACKAGE_LIST_RCIMAGE 10
#define DUMP_TE_HEADER 0x11
@@ -100,6 +104,15 @@ typedef struct {
UINT32 Reserved[3];
} MICROCODE_IMAGE_HEADER;
+static EFI_GUID mZeroGuid = {0x0, 0x0, 0x0, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}};
+
+static const char *gHiiPackageRCFileHeader[] = {
+ "//",
+ "// DO NOT EDIT -- auto-generated file",
+ "//",
+ NULL
+};
+
STATIC CHAR8 *mInImageName;
STATIC
@@ -258,6 +271,16 @@ Returns:
fprintf (stdout, " -r, --replace Overwrite the input file with the output content.\n\
If more input files are specified,\n\
the last input file will be as the output file.\n");
+ fprintf (stdout, " -g HiiPackageListGuid, --hiiguid HiiPackageListGuid\n\
+ HiiListPackageGuidGuid is from the module guid.\n\
+ Its format is xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\n\
+ If not specified, the first Form FormSet guid is used.\n");
+ fprintf (stdout, " --hiipackage Combine all input binary hii pacakges into \n\
+ a single package list as the text resource data(RC).\n\
+ It can't be combined with other action options\n\
+ except for -o option. It is a action option.\n\
+ If it is combined with other action options, the later\n\
+ input action option will override the previous one.\n");
fprintf (stdout, " -v, --verbose Turn on verbose output with informational messages.\n");
fprintf (stdout, " -q, --quiet Disable all messages except key message and fatal error\n");
fprintf (stdout, " -d, --debug level Enable debug messages, at input debug level.\n");
@@ -440,7 +463,7 @@ typedef Elf32_Dyn Elf_Dyn;
#define ELFCLASS ELFCLASS32
#define ELF_R_TYPE(r) ELF32_R_TYPE(r)
#define ELF_R_SYM(r) ELF32_R_SYM(r)
-
+#define ELF_HII_SECTION_NAME ".hii"
//
// Well known ELF structures.
//
@@ -452,7 +475,7 @@ Elf_Phdr *gPhdrBase;
// PE section alignment.
//
const UINT32 CoffAlignment = 0x20;
-const UINT16 CoffNbrSections = 4;
+const UINT16 CoffNbrSections = 5;
//
// Current offset in coff file.
@@ -475,8 +498,15 @@ UINT32 NtHdrOffset;
UINT32 TableOffset;
UINT32 TextOffset;
UINT32 DataOffset;
+UINT32 HiiRsrcOffset;
UINT32 RelocOffset;
+//
+// HiiBinData
+//
+UINT8* HiiBinData = NULL;
+UINT32 HiiBinSize = 0;
+
EFI_IMAGE_BASE_RELOCATION *CoffBaseRel;
UINT16 *CoffEntryRel;
@@ -548,10 +578,27 @@ IsTextShdr(
}
int
+IsHiiRsrcShdr(
+ Elf_Shdr *Shdr
+ )
+{
+ Elf_Shdr *Namedr = GetShdrByIndex(Ehdr->e_shstrndx);
+
+ if (strcmp((CHAR8*)Ehdr + Namedr->sh_offset + Shdr->sh_name, ELF_HII_SECTION_NAME) == 0) {
+ return 1;
+ }
+
+ return 0;
+}
+
+int
IsDataShdr(
Elf_Shdr *Shdr
)
{
+ if (IsHiiRsrcShdr(Shdr)) {
+ return 0;
+ }
return (Shdr->sh_flags & (SHF_WRITE | SHF_ALLOC)) == (SHF_ALLOC | SHF_WRITE);
}
@@ -581,6 +628,128 @@ CreateSectionHeader(
}
VOID
+GetBinaryHiiData (
+ CHAR8 *RcString,
+ UINT32 Size,
+ UINT32 OffsetToFile
+ )
+{
+ unsigned Data16;
+ UINT32 HiiBinOffset;
+ UINT32 Index;
+ EFI_IMAGE_RESOURCE_DIRECTORY *ResourceDirectory;
+ EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY *ResourceDirectoryEntry;
+ EFI_IMAGE_RESOURCE_DIRECTORY_STRING *ResourceDirectoryString;
+ EFI_IMAGE_RESOURCE_DATA_ENTRY *ResourceDataEntry;
+
+ Index = 0;
+ while (Index < Size && *RcString != '\0' && *RcString != '{') {
+ RcString ++;
+ Index ++;
+ }
+
+ if (*RcString == '\0' || Index == Size) {
+ return;
+ }
+
+ //
+ // Skip '{' character
+ // Skip space and ',' character
+ //
+ RcString ++;
+ Index ++;
+ while (Index < Size && *RcString != '\0' && (isspace (*RcString) || *RcString == ',')){
+ RcString ++;
+ Index ++;
+ }
+
+ //
+ // '}' end character
+ //
+ if (*RcString == '}' || Index == Size) {
+ return;
+ }
+
+ HiiBinOffset = 0;
+ HiiBinSize = 0x1000;
+ HiiBinData = (UINT8 *) malloc (HiiBinSize);
+ if (HiiBinData == NULL) {
+ return;
+ }
+ memset (HiiBinData, 0, HiiBinSize);
+ //
+ // Fill Resource section entry
+ //
+ ResourceDirectory = (EFI_IMAGE_RESOURCE_DIRECTORY *) (HiiBinData + HiiBinOffset);
+ HiiBinOffset += sizeof (EFI_IMAGE_RESOURCE_DIRECTORY);
+ ResourceDirectory->NumberOfNamedEntries = 1;
+
+ ResourceDirectoryEntry = (EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY *) (HiiBinData + HiiBinOffset);
+ HiiBinOffset += sizeof (EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY);
+ ResourceDirectoryEntry->u1.s.NameIsString = 1;
+ ResourceDirectoryEntry->u1.s.NameOffset = HiiBinOffset;
+
+ ResourceDirectoryString = (EFI_IMAGE_RESOURCE_DIRECTORY_STRING *) (HiiBinData + HiiBinOffset);
+ ResourceDirectoryString->Length = 3;
+ ResourceDirectoryString->String[0] =L'H';
+ ResourceDirectoryString->String[1] =L'I';
+ ResourceDirectoryString->String[2] =L'I';
+ HiiBinOffset = HiiBinOffset + sizeof (ResourceDirectoryString->Length) + ResourceDirectoryString->Length * sizeof (ResourceDirectoryString->String[0]);
+
+ ResourceDirectoryEntry->u2.OffsetToData = HiiBinOffset;
+ ResourceDataEntry = (EFI_IMAGE_RESOURCE_DATA_ENTRY *) (HiiBinData + HiiBinOffset);
+ HiiBinOffset += sizeof (EFI_IMAGE_RESOURCE_DATA_ENTRY);
+ ResourceDataEntry->OffsetToData = OffsetToFile + HiiBinOffset;
+
+ while (sscanf (RcString, "0x%X", &Data16) != EOF) {
+ //
+ // Convert the string data to the binary data.
+ //
+ *(UINT16 *)(HiiBinData + HiiBinOffset) = (UINT16) Data16;
+ HiiBinOffset += 2;
+ //
+ // Jump to the next data.
+ //
+ RcString = RcString + 2 + 4;
+ Index = Index + 2 + 4;
+ //
+ // Skip space and ',' character
+ //
+ while (Index < Size && *RcString != '\0' && (isspace (*RcString) || *RcString == ',')){
+ RcString ++;
+ Index ++;
+ }
+ //
+ // '}' end character
+ //
+ if (*RcString == '}'|| Index == Size) {
+ break;
+ }
+ //
+ // Check BinBuffer size
+ //
+ if (HiiBinOffset >= HiiBinSize) {
+ HiiBinSize += 0x1000;
+ HiiBinData = (UINT8 *) realloc (HiiBinData, HiiBinSize);
+ //
+ // Memory allocation is failure.
+ //
+ if (HiiBinData == NULL) {
+ HiiBinSize = 0;
+ break;
+ }
+ }
+ }
+
+ if (HiiBinData != NULL) {
+ HiiBinSize = HiiBinOffset;
+ ResourceDataEntry->Size = HiiBinSize + OffsetToFile - ResourceDataEntry->OffsetToData;
+ }
+
+ return;
+}
+
+VOID
ScanSections(
VOID
)
@@ -605,11 +774,11 @@ ScanSections(
break;
case EM_X86_64:
case EM_IA_64:
- CoffOffset += sizeof (EFI_IMAGE_NT_HEADERS64);
+ CoffOffset += sizeof (EFI_IMAGE_NT_HEADERS64);
break;
default:
VerboseMsg ("%s unknown e_machine type. Assume IA-32", (UINTN)Ehdr->e_machine);
- CoffOffset += sizeof (EFI_IMAGE_NT_HEADERS32);
+ CoffOffset += sizeof (EFI_IMAGE_NT_HEADERS32);
break;
}
@@ -672,13 +841,41 @@ ScanSections(
Error (NULL, 0, 3000, "Invalid", "Unsupported section alignment.");
}
}
-
CoffSectionsOffset[i] = CoffOffset;
CoffOffset += shdr->sh_size;
}
}
CoffOffset = CoffAlign(CoffOffset);
+ //
+ // The HII resource sections.
+ //
+ HiiRsrcOffset = CoffOffset;
+ for (i = 0; i < Ehdr->e_shnum; i++) {
+ Elf_Shdr *shdr = GetShdrByIndex(i);
+ if (IsHiiRsrcShdr(shdr)) {
+ if ((shdr->sh_addralign != 0) && (shdr->sh_addralign != 1)) {
+ // the alignment field is valid
+ if ((shdr->sh_addr & (shdr->sh_addralign - 1)) == 0) {
+ // if the section address is aligned we must align PE/COFF
+ CoffOffset = (CoffOffset + shdr->sh_addralign - 1) & ~(shdr->sh_addralign - 1);
+ } else if ((shdr->sh_addr % shdr->sh_addralign) != (CoffOffset % shdr->sh_addralign)) {
+ // ARM RVCT tools have behavior outside of the ELF specification to try
+ // and make images smaller. If sh_addr is not aligned to sh_addralign
+ // then the section needs to preserve sh_addr MOD sh_addralign.
+ // Normally doing nothing here works great.
+ Error (NULL, 0, 3000, "Invalid", "Unsupported section alignment.");
+ }
+ }
+ GetBinaryHiiData ((CHAR8*)Ehdr + shdr->sh_offset, shdr->sh_size, HiiRsrcOffset);
+ if (HiiBinSize != 0) {
+ CoffOffset += HiiBinSize;
+ CoffOffset = CoffAlign(CoffOffset);
+ }
+ break;
+ }
+ }
+
RelocOffset = CoffOffset;
//
@@ -760,8 +957,8 @@ ScanSections(
NtHdr->Pe32.FileHeader.NumberOfSections--;
}
- if ((RelocOffset - TextOffset) > 0) {
- CreateSectionHeader (".data", DataOffset, RelocOffset - DataOffset,
+ if ((HiiRsrcOffset - DataOffset) > 0) {
+ CreateSectionHeader (".data", DataOffset, HiiRsrcOffset - DataOffset,
EFI_IMAGE_SCN_CNT_INITIALIZED_DATA
| EFI_IMAGE_SCN_MEM_WRITE
| EFI_IMAGE_SCN_MEM_READ);
@@ -769,6 +966,24 @@ ScanSections(
// Don't make a section of size 0.
NtHdr->Pe32.FileHeader.NumberOfSections--;
}
+
+ if ((RelocOffset - HiiRsrcOffset) > 0) {
+ CreateSectionHeader (".rsrc", HiiRsrcOffset, RelocOffset - HiiRsrcOffset,
+ EFI_IMAGE_SCN_CNT_INITIALIZED_DATA
+ | EFI_IMAGE_SCN_MEM_READ);
+
+ NtHdr->Pe32.OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_RESOURCE].Size = HiiBinSize;
+ NtHdr->Pe32.OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_RESOURCE].VirtualAddress = HiiRsrcOffset;
+
+ memcpy(CoffFile + HiiRsrcOffset, HiiBinData, HiiBinSize);
+ free (HiiBinData);
+ HiiBinData = NULL;
+ HiiBinSize = 0;
+ } else {
+ // Don't make a section of size 0.
+ NtHdr->Pe32.FileHeader.NumberOfSections--;
+ }
+
}
VOID
@@ -1215,141 +1430,6 @@ ConvertElf (
}
}
-void
-ZeroXdataSection (
- IN CHAR8 *ImageName,
- IN OUT UINT8 *FileBuffer,
- IN EFI_IMAGE_SECTION_HEADER *SectionHeader,
- IN UINT32 SectionTotalNumber
- )
-{
- FILE *fpMapFile;
- CHAR8 MapFileName[_MAX_PATH];
- CHAR8 Line [MAX_LINE_LEN];
- CHAR8 KeyWord [MAX_LINE_LEN];
- CHAR8 SectionName [MAX_LINE_LEN];
- UINT32 FunctionType = 0;
- unsigned SectionOffset = 0;
- unsigned SectionLength = 0;
- unsigned SectionNumber = 0;
- CHAR8 *PdbPointer;
- INT32 Index;
- UINT32 Index2;
-
- for (Index2 = 0; Index2 < SectionTotalNumber; Index2++) {
- if (stricmp ((char *)SectionHeader[Index2].Name, ".zdata") == 0) {
- //
- // try to zero the customized .zdata section, which is mapped to .xdata
- //
- memset (FileBuffer + SectionHeader[Index2].PointerToRawData, 0, SectionHeader[Index2].SizeOfRawData);
- DebugMsg (NULL, 0, 9, NULL, "Zero the .xdata section for PE image at Offset 0x%x and Length 0x%x", (unsigned) SectionHeader[Index2].PointerToRawData, (unsigned) SectionHeader[Index2].SizeOfRawData);
- return;
- }
- }
- //
- // Try to get PDB file name
- //
- PdbPointer = (CHAR8 *) PeCoffLoaderGetPdbPointer (FileBuffer);
- if (PdbPointer != NULL) {
- strcpy (MapFileName, PdbPointer);
- } else {
- strcpy (MapFileName, ImageName);
- }
-
- //
- // Construct map file name
- //
- Index = strlen (MapFileName) - 1;
- while (Index >= 0 && MapFileName[Index] != '.') {
- Index --;
- }
- if (Index < 0) {
- //
- // don't know how to costruct map file
- //
- return;
- }
-
- //
- // fill map file postfix
- //
- MapFileName[Index + 1] = 'm';
- MapFileName[Index + 2] = 'a';
- MapFileName[Index + 3] = 'p';
- MapFileName[Index + 4] = '\0';
-
- //
- // try opening Map File
- //
- fpMapFile = fopen (MapFileName, "r");
- if (fpMapFile == NULL) {
- //
- // Can't open Map file. Maybe it doesn't exist.
- //
- return;
- }
-
- //
- // Output Functions information into Fv Map file
- //
- while (fgets (Line, MAX_LINE_LEN, fpMapFile) != NULL) {
- //
- // Skip blank line
- //
- if (Line[0] == 0x0a) {
- if (FunctionType != 0) {
- //
- // read all section table data
- //
- FunctionType = 0;
- break;
- }
- FunctionType = 0;
- continue;
- }
-
- //
- // By Start keyword
- //
- if (FunctionType == 0) {
- sscanf (Line, "%s", KeyWord);
- if (stricmp (KeyWord, "Start") == 0) {
- //
- // function list
- //
- FunctionType = 1;
- }
- continue;
- }
- //
- // Printf Function Information
- //
- if (FunctionType == 1) {
- sscanf (Line, "%x:%x %xH %s", &SectionNumber, &SectionOffset, &SectionLength, SectionName);
- if (stricmp (SectionName, ".xdata") == 0) {
- FunctionType = 2;
- break;
- }
- }
- }
-
- if (FunctionType != 2) {
- //
- // no .xdata section is found
- //
- fclose (fpMapFile);
- return;
- }
-
- //
- // Zero .xdata Section data
- //
- memset (FileBuffer + SectionHeader[SectionNumber-1].PointerToRawData + SectionOffset, 0, SectionLength);
- DebugMsg (NULL, 0, 9, NULL, "Zero the .xdata section for PE image at Offset 0x%x and Length 0x%x", (unsigned) SectionHeader[SectionNumber-1].PointerToRawData + SectionOffset, SectionLength);
- fclose (fpMapFile);
- return;
-}
-
int
main (
int argc,
@@ -1413,6 +1493,14 @@ Returns:
EFI_IMAGE_OPTIONAL_HEADER64 *Optional64;
EFI_IMAGE_DOS_HEADER BackupDosHdr;
MICROCODE_IMAGE_HEADER *MciHeader;
+ UINT8 *HiiPackageListBuffer;
+ UINT8 *HiiPackageDataPointer;
+ EFI_GUID HiiPackageListGuid;
+ EFI_HII_PACKAGE_LIST_HEADER HiiPackageListHeader;
+ EFI_HII_PACKAGE_HEADER HiiPackageHeader;
+ EFI_IFR_FORM_SET IfrFormSet;
+ UINT8 NumberOfFormPacakge;
+ EFI_HII_PACKAGE_HEADER EndPackage;
SetUtilityName (UTILITY_NAME);
@@ -1445,6 +1533,12 @@ Returns:
Optional64 = NULL;
KeepExceptionTableFlag = FALSE;
KeepZeroPendingFlag = FALSE;
+ NumberOfFormPacakge = 0;
+ HiiPackageListBuffer = NULL;
+ HiiPackageDataPointer = NULL;
+ EndPackage.Length = sizeof (EFI_HII_PACKAGE_HEADER);
+ EndPackage.Type = EFI_HII_PACKAGE_END;
+ memset (&HiiPackageListGuid, 0, sizeof (HiiPackageListGuid));
if (argc == 1) {
Error (NULL, 0, 1001, "Missing options", "No input options.");
@@ -1636,6 +1730,24 @@ Returns:
continue;
}
+ if ((stricmp (argv[0], "-g") == 0) || (stricmp (argv[0], "--hiiguid") == 0)) {
+ Status = StringToGuid (argv[1], &HiiPackageListGuid);
+ if (EFI_ERROR (Status)) {
+ Error (NULL, 0, 1003, "Invalid option value", "%s = %s", argv[0], argv[1]);
+ goto Finish;
+ }
+ argc -= 2;
+ argv += 2;
+ continue;
+ }
+
+ if (stricmp (argv[0], "--hiipackage") == 0) {
+ OutImageType = FW_HII_PACKAGE_LIST_RCIMAGE;
+ argc --;
+ argv ++;
+ continue;
+ }
+
if (argv[0][0] == '-') {
Error (NULL, 0, 1000, "Unknown option", argv[0]);
goto Finish;
@@ -1700,6 +1812,14 @@ Returns:
}
//
+ // Combine HiiBinary packages to a single package list
+ //
+ if ((OutImageType == FW_HII_PACKAGE_LIST_RCIMAGE) && ReplaceFlag) {
+ Error (NULL, 0, 1002, "Conflicting option", "-r replace option cannot be used with --hiipackage merge files option.");
+ goto Finish;
+ }
+
+ //
// Input image file
//
mInImageName = InputFileName [InputFileNum - 1];
@@ -1739,6 +1859,9 @@ Returns:
case FW_MERGE_IMAGE:
VerboseMsg ("Combine the input multi microcode bin files to one bin file.");
break;
+ case FW_HII_PACKAGE_LIST_RCIMAGE:
+ VerboseMsg ("Combine the input multi hii bin packages to one text pacakge list RC file.");
+ break;
default:
break;
}
@@ -1780,6 +1903,107 @@ Returns:
}
//
+ // Combine multi binary HII package files to a single text package list RC file.
+ //
+ if (OutImageType == FW_HII_PACKAGE_LIST_RCIMAGE) {
+ //
+ // Get hii package list lenght
+ //
+ HiiPackageListHeader.PackageLength = sizeof (EFI_HII_PACKAGE_LIST_HEADER);
+ for (Index = 0; Index < InputFileNum; Index ++) {
+ fpIn = fopen (InputFileName [Index], "rb");
+ if (!fpIn) {
+ Error (NULL, 0, 0001, "Error opening file", InputFileName [Index]);
+ goto Finish;
+ }
+ FileLength = _filelength (fileno (fpIn));
+ fread (&HiiPackageHeader, 1, sizeof (HiiPackageHeader), fpIn);
+ if (HiiPackageHeader.Type == EFI_HII_PACKAGE_FORM) {
+ if (HiiPackageHeader.Length != FileLength) {
+ Error (NULL, 0, 3000, "Invalid", "The wrong package size is in HII package file %s", InputFileName [Index]);
+ fclose (fpIn);
+ goto Finish;
+ }
+ if (memcmp (&HiiPackageListGuid, &mZeroGuid, sizeof (EFI_GUID)) == 0) {
+ fread (&IfrFormSet, 1, sizeof (IfrFormSet), fpIn);
+ memcpy (&HiiPackageListGuid, &IfrFormSet.Guid, sizeof (EFI_GUID));
+ }
+ NumberOfFormPacakge ++;
+ }
+ HiiPackageListHeader.PackageLength += FileLength;
+ fclose (fpIn);
+ }
+ HiiPackageListHeader.PackageLength += sizeof (EndPackage);
+ //
+ // Check whether hii packages are valid
+ //
+ if (NumberOfFormPacakge > 1) {
+ Error (NULL, 0, 3000, "Invalid", "The input hii packages contains more than one hii form package");
+ goto Finish;
+ }
+ if (memcmp (&HiiPackageListGuid, &mZeroGuid, sizeof (EFI_GUID)) == 0) {
+ Error (NULL, 0, 3000, "Invalid", "HII pacakge list guid is not specified!");
+ goto Finish;
+ }
+ memcpy (&HiiPackageListHeader.PackageListGuid, &HiiPackageListGuid, sizeof (EFI_GUID));
+ //
+ // read hii packages
+ //
+ HiiPackageListBuffer = malloc (HiiPackageListHeader.PackageLength);
+ if (HiiPackageListBuffer == NULL) {
+ Error (NULL, 0, 4001, "Resource", "memory cannot be allocated!");
+ goto Finish;
+ }
+ memcpy (HiiPackageListBuffer, &HiiPackageListHeader, sizeof (HiiPackageListHeader));
+ HiiPackageDataPointer = HiiPackageListBuffer + sizeof (HiiPackageListHeader);
+ for (Index = 0; Index < InputFileNum; Index ++) {
+ fpIn = fopen (InputFileName [Index], "rb");
+ if (!fpIn) {
+ Error (NULL, 0, 0001, "Error opening file", InputFileName [Index]);
+ free (HiiPackageListBuffer);
+ goto Finish;
+ }
+
+ FileLength = _filelength (fileno (fpIn));
+ fread (HiiPackageDataPointer, 1, FileLength, fpIn);
+ fclose (fpIn);
+ HiiPackageDataPointer = HiiPackageDataPointer + FileLength;
+ }
+ memcpy (HiiPackageDataPointer, &EndPackage, sizeof (EndPackage));
+ //
+ // write the hii package into the text package list rc file.
+ //
+ for (Index = 0; gHiiPackageRCFileHeader[Index] != NULL; Index++) {
+ fprintf (fpOut, "%s\n", gHiiPackageRCFileHeader[Index]);
+ }
+ fprintf (fpOut, "\n%d %s\n{", HII_RESOURCE_SECTION_INDEX, HII_RESOURCE_SECTION_NAME);
+
+ HiiPackageDataPointer = HiiPackageListBuffer;
+ for (Index = 0; Index + 2 < HiiPackageListHeader.PackageLength; Index += 2) {
+ if (Index % 16 == 0) {
+ fprintf (fpOut, "\n ");
+ }
+ fprintf (fpOut, " 0x%04X,", *(UINT16 *) HiiPackageDataPointer);
+ HiiPackageDataPointer += 2;
+ }
+
+ if (Index % 16 == 0) {
+ fprintf (fpOut, "\n ");
+ }
+ if ((Index + 2) == HiiPackageListHeader.PackageLength) {
+ fprintf (fpOut, " 0x%04X\n}\n", *(UINT16 *) HiiPackageDataPointer);
+ }
+ if ((Index + 1) == HiiPackageListHeader.PackageLength) {
+ fprintf (fpOut, " 0x%04X\n}\n", *(UINT8 *) HiiPackageDataPointer);
+ }
+ free (HiiPackageListBuffer);
+ //
+ // Done successfully
+ //
+ goto Finish;
+ }
+
+ //
// Combine MciBinary files to one file
//
if (OutImageType == FW_MERGE_IMAGE) {
@@ -2471,12 +2695,13 @@ Returns:
for (Index1 = 0; Index1 < Optional64->DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION].Size / sizeof (RUNTIME_FUNCTION); Index1++, RuntimeFunction++) {
SectionHeader = (EFI_IMAGE_SECTION_HEADER *) ((UINT8 *) &(PeHdr->Pe32.OptionalHeader) + PeHdr->Pe32.FileHeader.SizeOfOptionalHeader);
for (Index2 = 0; Index2 < PeHdr->Pe32.FileHeader.NumberOfSections; Index2++, SectionHeader++) {
- if (RuntimeFunction->UnwindInfoAddress > SectionHeader->VirtualAddress && RuntimeFunction->UnwindInfoAddress < (SectionHeader->VirtualAddress + SectionHeader->SizeOfRawData)) {
+ if (RuntimeFunction->UnwindInfoAddress >= SectionHeader->VirtualAddress && RuntimeFunction->UnwindInfoAddress < (SectionHeader->VirtualAddress + SectionHeader->SizeOfRawData)) {
UnwindInfo = (UNWIND_INFO *)(FileBuffer + SectionHeader->PointerToRawData + (RuntimeFunction->UnwindInfoAddress - SectionHeader->VirtualAddress));
if (UnwindInfo->Version == 1) {
memset (UnwindInfo + 1, 0, UnwindInfo->CountOfUnwindCodes * sizeof (UINT16));
memset (UnwindInfo, 0, sizeof (UNWIND_INFO));
}
+ break;
}
}
memset (RuntimeFunction, 0, sizeof (RUNTIME_FUNCTION));
@@ -2552,7 +2777,16 @@ Returns:
//
if (!KeepExceptionTableFlag) {
SectionHeader = (EFI_IMAGE_SECTION_HEADER *) ((UINT8 *) &(PeHdr->Pe32.OptionalHeader) + PeHdr->Pe32.FileHeader.SizeOfOptionalHeader);
- ZeroXdataSection(mInImageName, FileBuffer, SectionHeader, PeHdr->Pe32.FileHeader.NumberOfSections);
+ for (Index = 0; Index < PeHdr->Pe32.FileHeader.NumberOfSections; Index++) {
+ if (stricmp ((char *)SectionHeader[Index].Name, ".xdata") == 0) {
+ //
+ // zero .xdata section
+ //
+ memset (FileBuffer + SectionHeader[Index].PointerToRawData, 0, SectionHeader[Index].SizeOfRawData);
+ DebugMsg (NULL, 0, 9, NULL, "Zero the .xdata section for PE image at Offset 0x%x and Length 0x%x", (unsigned) SectionHeader[Index].PointerToRawData, (unsigned) SectionHeader[Index].SizeOfRawData);
+ break;
+ }
+ }
}
//
diff --git a/BaseTools/Source/C/GenVtf/GenVtf.c b/BaseTools/Source/C/GenVtf/GenVtf.c
index eafbcbf002..890cfd98fd 100644
--- a/BaseTools/Source/C/GenVtf/GenVtf.c
+++ b/BaseTools/Source/C/GenVtf/GenVtf.c
@@ -1267,7 +1267,7 @@ Returns:
//
// Update the SYM file for this component based on it's start address.
//
- Status = UpdateSymFile (CompStartAddress, SymFileName, VtfInfo->CompSymName);
+ Status = UpdateSymFile (CompStartAddress, SymFileName, VtfInfo->CompSymName, FileSize);
if (EFI_ERROR (Status)) {
//
@@ -1406,7 +1406,7 @@ Returns:
//
// Update the SYM file for this component based on it's start address.
//
- Status = UpdateSymFile (PalStartAddress, SymFileName, VtfInfo->CompSymName);
+ Status = UpdateSymFile (PalStartAddress, SymFileName, VtfInfo->CompSymName, FileSize);
if (EFI_ERROR (Status)) {
//
@@ -1688,7 +1688,7 @@ Returns:
FileHeader->IntegrityCheck.Checksum.File = 0;
FileHeader->State = 0;
FileHeader->IntegrityCheck.Checksum.Header = CalculateChecksum8 ((UINT8 *) FileHeader, sizeof (EFI_FFS_FILE_HEADER));
- FileHeader->IntegrityCheck.Checksum.File = CalculateChecksum8 ((UINT8 *) FileHeader, TotalVtfSize);
+ FileHeader->IntegrityCheck.Checksum.File = CalculateChecksum8 ((UINT8 *) (FileHeader + 1), TotalVtfSize - sizeof (EFI_FFS_FILE_HEADER));
FileHeader->State = EFI_FILE_HEADER_CONSTRUCTION | EFI_FILE_HEADER_VALID | EFI_FILE_DATA_VALID;
return EFI_SUCCESS;
@@ -2153,7 +2153,9 @@ EFI_STATUS
UpdateSymFile (
IN UINT64 BaseAddress,
IN CHAR8 *DestFileName,
- IN CHAR8 *SourceFileName
+ IN CHAR8 *SourceFileName,
+ IN UINT64 FileSize
+
)
/*++
@@ -2167,6 +2169,7 @@ Arguments:
BaseAddress - The base address for the new SYM tokens.
DestFileName - The destination file.
SourceFileName - The source file.
+ FileSize - Size of bin file.
Returns:
@@ -2185,7 +2188,7 @@ Returns:
CHAR8 Token[_MAX_PATH];
CHAR8 BaseToken[_MAX_PATH];
UINT64 TokenAddress;
- long StartLocation;
+ long StartLocation;
//
// Verify input parameters.
@@ -2275,13 +2278,20 @@ Returns:
// Get the token address
//
AsciiStringToUint64 (Address, TRUE, &TokenAddress);
+ if (TokenAddress > FileSize) {
+ //
+ // Symbol offset larger than FileSize. This Symbol can't be in Bin file. Don't print them.
+ //
+ break;
+ }
//
// Add the base address, the size of the FFS file header and the size of the peim header.
//
TokenAddress += BaseAddress &~IPF_CACHE_BIT;
- fprintf (DestFile, "%s | %016llX | %s | %s%s\n", Type, (unsigned long long) TokenAddress, Section, BaseToken, Token);
+ fprintf (DestFile, "%s | %016llX | ", Type, (unsigned long long) TokenAddress);
+ fprintf (DestFile, "%s | %s\n %s\n", Section, Token, BaseToken);
}
}
diff --git a/BaseTools/Source/C/GenVtf/GenVtf.h b/BaseTools/Source/C/GenVtf/GenVtf.h
index eab14f3aa6..012ebb672a 100644
--- a/BaseTools/Source/C/GenVtf/GenVtf.h
+++ b/BaseTools/Source/C/GenVtf/GenVtf.h
@@ -205,7 +205,8 @@ EFI_STATUS
UpdateSymFile (
IN UINT64 BaseAddress,
IN CHAR8 *DestFileName,
- IN CHAR8 *SourceFileName
+ IN CHAR8 *SourceFileName,
+ IN UINT64 FileSize
)
/*++
@@ -219,6 +220,7 @@ Arguments:
BaseAddress - The base address for the new SYM tokens.
DestFileName - The destination file.
SourceFileName - The source file.
+ FileSize - Size of bin file.
Returns:
diff --git a/BaseTools/Source/C/Include/Common/PiFirmwareFile.h b/BaseTools/Source/C/Include/Common/PiFirmwareFile.h
index 158e672970..33b5645b12 100644
--- a/BaseTools/Source/C/Include/Common/PiFirmwareFile.h
+++ b/BaseTools/Source/C/Include/Common/PiFirmwareFile.h
@@ -50,7 +50,10 @@ typedef UINT8 EFI_FFS_FILE_STATE;
#define EFI_FV_FILETYPE_DRIVER 0x07
#define EFI_FV_FILETYPE_COMBINED_PEIM_DRIVER 0x08
#define EFI_FV_FILETYPE_APPLICATION 0x09
+#define EFI_FV_FILETYPE_SMM 0x0A
#define EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE 0x0B
+#define EFI_FV_FILETYPE_COMBINED_SMM_DXE 0x0C
+#define EFI_FV_FILETYPE_SMM_CORE 0x0D
#define EFI_FV_FILETYPE_OEM_MIN 0xc0
#define EFI_FV_FILETYPE_OEM_MAX 0xdf
#define EFI_FV_FILETYPE_DEBUG_MIN 0xe0
diff --git a/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h b/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h
index f54614abf2..5e926ac08d 100644
--- a/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h
+++ b/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h
@@ -3,7 +3,7 @@
IFR is primarily consumed by the EFI presentation engine, and produced by EFI
internal application and drivers as well as all add-in card option-ROM drivers
- Copyright (c) 2006 - 2008, Intel Corporation All rights reserved.
+ Copyright (c) 2006 - 2009, Intel Corporation All rights reserved.
This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License which accompanies this
@@ -268,8 +268,8 @@ typedef struct _EFI_HII_GUID_PACKAGE_HDR {
// String Package
//
-#define UEFI_CONFIG_LANG L"x-UEFI"
-#define UEFI_CONFIG_LANG2 L"x-i-UEFI" // BUGBUG, spec need to be updated.
+#define UEFI_CONFIG_LANG "x-UEFI"
+#define UEFI_CONFIG_LANG2 "x-i-UEFI"
typedef struct _EFI_HII_STRING_PACKAGE_HDR {
EFI_HII_PACKAGE_HEADER Header;
@@ -1034,12 +1034,12 @@ typedef struct _EFI_IFR_EQ_ID_VAL {
UINT16 Value;
} EFI_IFR_EQ_ID_VAL;
-typedef struct _EFI_IFR_EQ_ID_LIST {
+typedef struct _EFI_IFR_EQ_ID_VAL_LIST {
EFI_IFR_OP_HEADER Header;
EFI_QUESTION_ID QuestionId;
UINT16 ListLength;
UINT16 ValueList[1];
-} EFI_IFR_EQ_ID_LIST;
+} EFI_IFR_EQ_ID_VAL_LIST;
typedef struct _EFI_IFR_QUESTION_REF1 {
EFI_IFR_OP_HEADER Header;
diff --git a/BaseTools/Source/C/Include/IndustryStandard/PeImage.h b/BaseTools/Source/C/Include/IndustryStandard/PeImage.h
index 1595a987e1..57cbc2366b 100644
--- a/BaseTools/Source/C/Include/IndustryStandard/PeImage.h
+++ b/BaseTools/Source/C/Include/IndustryStandard/PeImage.h
@@ -657,6 +657,59 @@ typedef struct {
} UNWIND_INFO;
///
+/// Resource format.
+///
+typedef struct {
+ UINT32 Characteristics;
+ UINT32 TimeDateStamp;
+ UINT16 MajorVersion;
+ UINT16 MinorVersion;
+ UINT16 NumberOfNamedEntries;
+ UINT16 NumberOfIdEntries;
+ //
+ // Array of EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY entries goes here.
+ //
+} EFI_IMAGE_RESOURCE_DIRECTORY;
+
+///
+/// Resource directory entry format.
+///
+typedef struct {
+ union {
+ struct {
+ UINT32 NameOffset:31;
+ UINT32 NameIsString:1;
+ } s;
+ UINT32 Id;
+ } u1;
+ union {
+ UINT32 OffsetToData;
+ struct {
+ UINT32 OffsetToDirectory:31;
+ UINT32 DataIsDirectory:1;
+ } s;
+ } u2;
+} EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY;
+
+///
+/// Resource directory entry for string.
+///
+typedef struct {
+ UINT16 Length;
+ CHAR16 String[1];
+} EFI_IMAGE_RESOURCE_DIRECTORY_STRING;
+
+///
+/// Resource directory entry for data array.
+///
+typedef struct {
+ UINT32 OffsetToData;
+ UINT32 Size;
+ UINT32 CodePage;
+ UINT32 Reserved;
+} EFI_IMAGE_RESOURCE_DATA_ENTRY;
+
+///
/// Header format for TE images
///
typedef struct {
diff --git a/BaseTools/Source/C/VfrCompile/VfrCompiler.cpp b/BaseTools/Source/C/VfrCompile/VfrCompiler.cpp
index 195727c2eb..e3c150cd3d 100644
--- a/BaseTools/Source/C/VfrCompile/VfrCompiler.cpp
+++ b/BaseTools/Source/C/VfrCompile/VfrCompiler.cpp
@@ -628,23 +628,27 @@ CVfrCompiler::GenCFile (
if (!IS_RUN_STATUS(STATUS_GENBINARY)) {
goto Fail;
}
+
+ if (!mOptions.CreateIfrPkgFile || mOptions.CompatibleMode) {
+ if ((pFile = fopen (mOptions.COutputFileName, "w")) == NULL) {
+ Error (NULL, 0, 0001, "Error opening output C file", mOptions.COutputFileName);
+ goto Fail;
+ }
- if ((pFile = fopen (mOptions.COutputFileName, "w")) == NULL) {
- Error (NULL, 0, 0001, "Error opening output C file", mOptions.COutputFileName);
- goto Fail;
- }
-
- for (Index = 0; gSourceFileHeader[Index] != NULL; Index++) {
- fprintf (pFile, "%s\n", gSourceFileHeader[Index]);
- }
+ for (Index = 0; gSourceFileHeader[Index] != NULL; Index++) {
+ fprintf (pFile, "%s\n", gSourceFileHeader[Index]);
+ }
- gCVfrBufferConfig.OutputCFile (pFile, mOptions.VfrBaseFileName);
+ if (mOptions.CompatibleMode) {
+ gCVfrBufferConfig.OutputCFile (pFile, mOptions.VfrBaseFileName);
+ }
- if (gCFormPkg.GenCFile (mOptions.VfrBaseFileName, pFile, &gRBuffer) != VFR_RETURN_SUCCESS) {
+ if (gCFormPkg.GenCFile (mOptions.VfrBaseFileName, pFile, &gRBuffer) != VFR_RETURN_SUCCESS) {
+ fclose (pFile);
+ goto Fail;
+ }
fclose (pFile);
- goto Fail;
}
- fclose (pFile);
SET_RUN_STATUS (STATUS_FINISHED);
return;
diff --git a/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp b/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp
index 298eb0289b..87da95af71 100644
--- a/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp
+++ b/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp
@@ -2,7 +2,7 @@
The definition of CFormPkg's member function
-Copyright (c) 2004 - 2008, Intel Corporation
+Copyright (c) 2004 - 2009, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -1228,7 +1228,7 @@ static struct {
{ sizeof (EFI_IFR_INCONSISTENT_IF), 1 }, // EFI_IFR_INCONSISTENT_IF_OP
{ sizeof (EFI_IFR_EQ_ID_VAL), 0 }, // EFI_IFR_EQ_ID_VAL_OP
{ sizeof (EFI_IFR_EQ_ID_ID), 0 }, // EFI_IFR_EQ_ID_ID_OP
- { sizeof (EFI_IFR_EQ_ID_LIST), 0 }, // EFI_IFR_EQ_ID_LIST_OP - 0x14
+ { sizeof (EFI_IFR_EQ_ID_VAL_LIST), 0 }, // EFI_IFR_EQ_ID_LIST_OP - 0x14
{ sizeof (EFI_IFR_AND), 0 }, // EFI_IFR_AND_OP
{ sizeof (EFI_IFR_OR), 0 }, // EFI_IFR_OR_OP
{ sizeof (EFI_IFR_NOT), 0 }, // EFI_IFR_NOT_OP
diff --git a/BaseTools/Source/C/VfrCompile/VfrFormPkg.h b/BaseTools/Source/C/VfrCompile/VfrFormPkg.h
index fa671c1b1e..324078a148 100644
--- a/BaseTools/Source/C/VfrCompile/VfrFormPkg.h
+++ b/BaseTools/Source/C/VfrCompile/VfrFormPkg.h
@@ -2,7 +2,7 @@
The definition of CFormPkg's member function
-Copyright (c) 2004 - 2008, Intel Corporation
+Copyright (c) 2004 - 2009, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -1568,12 +1568,12 @@ public:
class CIfrEqIdList : public CIfrObj, public CIfrOpHeader {
private:
- EFI_IFR_EQ_ID_LIST *mEqIdVList;
+ EFI_IFR_EQ_ID_VAL_LIST *mEqIdVList;
public:
CIfrEqIdList (
IN UINT32 LineNo
- ) : CIfrObj (EFI_IFR_EQ_ID_LIST_OP, (CHAR8 **)&mEqIdVList, sizeof (EFI_IFR_EQ_ID_LIST), TRUE),
+ ) : CIfrObj (EFI_IFR_EQ_ID_LIST_OP, (CHAR8 **)&mEqIdVList, sizeof (EFI_IFR_EQ_ID_VAL_LIST), TRUE),
CIfrOpHeader (EFI_IFR_EQ_ID_LIST_OP, &mEqIdVList->Header) {
SetLineNo (LineNo);
mEqIdVList->QuestionId = EFI_QUESTION_ID_INVALID;
@@ -1584,7 +1584,7 @@ public:
VOID UpdateIfrBuffer (
) {
_EMIT_PENDING_OBJ();
- mEqIdVList = (EFI_IFR_EQ_ID_LIST *) GetObjBinAddr();
+ mEqIdVList = (EFI_IFR_EQ_ID_VAL_LIST *) GetObjBinAddr();
UpdateHeader (&mEqIdVList->Header);
}
diff --git a/BaseTools/Source/C/VfrCompile/VfrSyntax.g b/BaseTools/Source/C/VfrCompile/VfrSyntax.g
index c01f16e5d5..ea529a5e15 100644
--- a/BaseTools/Source/C/VfrCompile/VfrSyntax.g
+++ b/BaseTools/Source/C/VfrCompile/VfrSyntax.g
@@ -1911,7 +1911,7 @@ vfrStatementOrderedList :
>>
L:OrderedList << OLObj.SetLineNo(L->getLine()); >>
vfrQuestionHeader[OLObj] ","
- << OLObj.SetMaxContainers ((UINT8)_GET_CURRQEST_VARSIZE()); >>
+ << OLObj.SetMaxContainers ((UINT8) _GET_CURRQEST_ARRAY_SIZE()); >>
{
MaxContainers "=" M:Number "," << OLObj.SetMaxContainers (_STOU8(M->getText())); >>
}
@@ -3179,6 +3179,7 @@ private:
UINT8 _GET_CURRQEST_DATATYPE ();
UINT32 _GET_CURRQEST_VARSIZE ();
+ UINT32 _GET_CURRQEST_ARRAY_SIZE();
public:
VOID _PCATCH (IN INTN, IN INTN, IN ANTLRTokenPtr, IN CHAR8 *);
@@ -3286,6 +3287,37 @@ EfiVfrParser::_GET_CURRQEST_VARTINFO (
return mCurrQestVarInfo;
}
+UINT32
+EfiVfrParser::_GET_CURRQEST_ARRAY_SIZE (
+ VOID
+ )
+{
+ UINT8 Size = 1;
+
+ switch (mCurrQestVarInfo.mVarType) {
+ case EFI_IFR_TYPE_NUM_SIZE_8:
+ Size = 1;
+ break;
+
+ case EFI_IFR_TYPE_NUM_SIZE_16:
+ Size = 2;
+ break;
+
+ case EFI_IFR_TYPE_NUM_SIZE_32:
+ Size = 4;
+ break;
+
+ case EFI_IFR_TYPE_NUM_SIZE_64:
+ Size = 8;
+ break;
+
+ default:
+ break;
+ }
+
+ return (mCurrQestVarInfo.mVarTotalSize / Size);
+}
+
UINT8
EfiVfrParser::_GET_CURRQEST_DATATYPE (
VOID
diff --git a/BaseTools/Source/C/VolInfo/VolInfo.c b/BaseTools/Source/C/VolInfo/VolInfo.c
index b7237b08e8..ff61c9bd63 100644
--- a/BaseTools/Source/C/VolInfo/VolInfo.c
+++ b/BaseTools/Source/C/VolInfo/VolInfo.c
@@ -437,122 +437,126 @@ Returns:
{
CHAR8 *SectionStr;
CHAR8 *SectionTypeStringTable[] = {
- "EFI_SECTION_ALL",
//
// 0X00
//
- "EFI_SECTION_COMPRESSION",
+ "EFI_SECTION_ALL",
//
// 0x01
//
- "EFI_SECTION_GUID_DEFINED",
+ "EFI_SECTION_COMPRESSION",
//
// 0x02
//
- "Unknown section type - Reserved 0x03",
+ "EFI_SECTION_GUID_DEFINED",
//
// 0x03
//
- "Unknown section type - Reserved 0x04",
+ "Unknown section type - Reserved 0x03",
//
// 0x04
//
- "Unknown section type - Reserved 0x05",
+ "Unknown section type - Reserved 0x04",
//
// 0x05
//
- "Unknown section type - Reserved 0x06",
+ "Unknown section type - Reserved 0x05",
//
// 0x06
//
- "Unknown section type - Reserved 0x07",
+ "Unknown section type - Reserved 0x06",
//
// 0x07
//
- "Unknown section type - Reserved 0x08",
+ "Unknown section type - Reserved 0x07",
//
// 0x08
//
- "Unknown section type - Reserved 0x09",
+ "Unknown section type - Reserved 0x08",
//
// 0x09
//
- "Unknown section type - Reserved 0x0A",
+ "Unknown section type - Reserved 0x09",
//
// 0x0A
//
- "Unknown section type - Reserved 0x0B",
+ "Unknown section type - Reserved 0x0A",
//
// 0x0B
//
- "Unknown section type - Reserved 0x0C",
+ "Unknown section type - Reserved 0x0B",
//
// 0x0C
//
- "Unknown section type - Reserved 0x0D",
+ "Unknown section type - Reserved 0x0C",
//
// 0x0D
//
- "Unknown section type - Reserved 0x0E",
+ "Unknown section type - Reserved 0x0D",
//
// 0x0E
//
- "Unknown section type - Reserved 0x0F",
+ "Unknown section type - Reserved 0x0E",
//
// 0x0F
//
- "EFI_SECTION_PE32",
+ "Unknown section type - Reserved 0x0E",
//
// 0x10
//
- "EFI_SECTION_PIC",
+ "EFI_SECTION_PE32",
//
// 0x11
//
- "EFI_SECTION_TE",
+ "EFI_SECTION_PIC",
//
// 0x12
//
- "EFI_SECTION_DXE_DEPEX",
+ "EFI_SECTION_TE",
//
// 0x13
//
- "EFI_SECTION_VERSION",
+ "EFI_SECTION_DXE_DEPEX",
//
// 0x14
//
- "EFI_SECTION_USER_INTERFACE",
+ "EFI_SECTION_VERSION",
//
// 0x15
//
- "EFI_SECTION_COMPATIBILITY16",
+ "EFI_SECTION_USER_INTERFACE",
//
// 0x16
//
- "EFI_SECTION_FIRMWARE_VOLUME_IMAGE ",
+ "EFI_SECTION_COMPATIBILITY16",
//
// 0x17
//
- "EFI_SECTION_FREEFORM_SUBTYPE_GUID ",
+ "EFI_SECTION_FIRMWARE_VOLUME_IMAGE ",
//
// 0x18
//
- "EFI_SECTION_RAW",
+ "EFI_SECTION_FREEFORM_SUBTYPE_GUID ",
//
// 0x19
//
- "Unknown section type - 0x1A",
+ "EFI_SECTION_RAW",
//
// 0x1A
//
- "EFI_SECTION_PEI_DEPEX",
+ "Unknown section type - 0x1A",
//
// 0x1B
//
- "Unknown section type - Reserved - beyond last defined section"
+ "EFI_SECTION_PEI_DEPEX",
+ //
+ // 0x1C
+ //
+ "EFI_SECTION_SMM_DEPEX",
//
// 0x1C+
//
+ "Unknown section type - Reserved - beyond last defined section"
};
if (Type > EFI_SECTION_LAST_SECTION_TYPE) {
@@ -1055,15 +1059,15 @@ Returns:
//
// Calculate file checksum
//
- Checksum = CalculateSum8 ((UINT8 *) FileHeader, FileLength);
- Checksum = (UINT8) (Checksum - FileHeader->State);
+ Checksum = CalculateSum8 ((UINT8 *) (FileHeader + 1), FileLength - sizeof (EFI_FFS_FILE_HEADER));
+ Checksum = Checksum + FileHeader->IntegrityCheck.Checksum.File;
if (Checksum != 0) {
Error (NULL, 0, 0003, "error parsing FFS file", "FFS file with Guid %s has invalid file checksum", GuidBuffer);
return EFI_ABORTED;
}
} else {
if (FileHeader->IntegrityCheck.Checksum.File != FFS_FIXED_CHECKSUM) {
- Error (NULL, 0, 0003, "error parsing FFS file", "FFS file with Guid %s has invalid header checksum -- not set to fixed value of 0x5A", GuidBuffer);
+ Error (NULL, 0, 0003, "error parsing FFS file", "FFS file with Guid %s has invalid header checksum -- not set to fixed value of 0xAA", GuidBuffer);
return EFI_ABORTED;
}
}
@@ -1130,10 +1134,22 @@ Returns:
printf ("EFI_FV_FILETYPE_APPLICATION\n");
break;
+ case EFI_FV_FILETYPE_SMM:
+ printf ("EFI_FV_FILETYPE_SMM\n");
+ break;
+
case EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE:
printf ("EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE\n");
break;
+ case EFI_FV_FILETYPE_COMBINED_SMM_DXE:
+ printf ("EFI_FV_FILETYPE_COMBINED_SMM_DXE\n");
+ break;
+
+ case EFI_FV_FILETYPE_SMM_CORE:
+ printf ("EFI_FV_FILETYPE_SMM_CORE\n");
+ break;
+
case EFI_FV_FILETYPE_FFS_PAD:
printf ("EFI_FV_FILETYPE_FFS_PAD\n");
break;
@@ -1273,8 +1289,9 @@ Returns:
//
break;
- case EFI_SECTION_DXE_DEPEX:
case EFI_SECTION_PEI_DEPEX:
+ case EFI_SECTION_DXE_DEPEX:
+ case EFI_SECTION_SMM_DEPEX:
DumpDepexSection (Ptr, SectionLength);
break;
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index 647e1d0052..9594ef0cae 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -21,6 +21,7 @@ import copy
import GenC
import GenMake
import GenDepex
+from StringIO import StringIO
from StrGather import *
from BuildEngine import BuildRule
@@ -48,8 +49,8 @@ gBuildRuleFile = 'Conf/build_rule.txt'
gAutoGenCodeFileName = "AutoGen.c"
gAutoGenHeaderFileName = "AutoGen.h"
gAutoGenStringFileName = "%(module_name)sStrDefs.h"
+gAutoGenStringFormFileName = "%(module_name)sStrDefs.hpk"
gAutoGenDepexFileName = "%(module_name)s.depex"
-gAutoGenSmmDepexFileName = "%(module_name)s.smm"
## Base class for AutoGen
#
@@ -137,7 +138,8 @@ class WorkspaceAutoGen(AutoGen):
# @param SkuId SKU id from command line
#
def _Init(self, WorkspaceDir, ActivePlatform, Target, Toolchain, ArchList, MetaFileDb,
- BuildConfig, ToolDefinition, FlashDefinitionFile='', Fds=[], Fvs=[], SkuId=''):
+ BuildConfig, ToolDefinition, FlashDefinitionFile='', Fds=[], Fvs=[], SkuId='',
+ ReportFile=None, ReportType=None):
self.MetaFile = ActivePlatform.MetaFile
self.WorkspaceDir = WorkspaceDir
self.Platform = ActivePlatform
@@ -145,6 +147,8 @@ class WorkspaceAutoGen(AutoGen):
self.ToolChain = Toolchain
self.ArchList = ArchList
self.SkuId = SkuId
+ self.ReportFile = ReportFile
+ self.ReportType = ReportType
self.BuildDatabase = MetaFileDb
self.TargetTxt = BuildConfig
@@ -181,6 +185,325 @@ class WorkspaceAutoGen(AutoGen):
Pa.CollectPlatformDynamicPcds()
self.AutoGenObjectList.append(Pa)
+ AllPcds = {}
+ MaxLen = 0
+ for Pcd in Pa._DynaPcdList_ + Pa._NonDynaPcdList_:
+ if Pcd.TokenSpaceGuidCName not in AllPcds:
+ AllPcds[Pcd.TokenSpaceGuidCName] = {}
+ if Pcd.Type not in AllPcds[Pcd.TokenSpaceGuidCName]:
+ AllPcds[Pcd.TokenSpaceGuidCName][Pcd.Type] = []
+ AllPcds[Pcd.TokenSpaceGuidCName][Pcd.Type] += [Pcd]
+ if len(Pcd.TokenCName) > MaxLen:
+ MaxLen = len(Pcd.TokenCName)
+
+ if self.ReportFile <> None:
+ try:
+ if os.path.exists(self.ReportFile):
+ os.remove(self.ReportFile)
+
+ Fd = open(self.ReportFile, "w")
+
+ Fd.write ('===============================================================================\n')
+ Fd.write ('Platform Configuration Database Report\n')
+ Fd.write ('===============================================================================\n')
+ Fd.write (' *P - Platform scoped PCD override in DSC file\n')
+ Fd.write (' *F - Platform scoped PCD override in FDF file\n')
+ Fd.write (' *M - Module scoped PCD override in DSC file\n')
+ Fd.write (' *C - Library has a constructor\n')
+ Fd.write (' *D - Library has a destructor\n')
+ Fd.write (' *CD - Library has both a constructor and a destructor\n')
+ Fd.write ('===============================================================================\n')
+ Fd.write ('\n')
+ Fd.write ('===============================================================================\n')
+ Fd.write ('PLATFORM: %s\n' % (ActivePlatform.MetaFile))
+ Fd.write ('===============================================================================\n')
+ for Key in AllPcds:
+ Fd.write ('%s\n' % (Key))
+ for Type in AllPcds[Key]:
+ TypeName = ''
+ DecType = Type
+ if Type == 'FixedAtBuild':
+ TypeName = 'FIXED'
+ if Type == 'PatchableInModule':
+ TypeName = 'PATCH'
+ if Type == 'FeatureFlag':
+ TypeName = 'FLAG'
+ if Type == 'Dynamic':
+ TypeName = 'DYN'
+ if Type == 'DynamicHii':
+ TypeName = 'DYNHII'
+ DecType = 'Dynamic'
+ if Type == 'DynamicVpd':
+ TypeName = 'DYNVPD'
+ DecType = 'Dynamic'
+ if Type == 'DynamicEx':
+ TypeName = 'DEX'
+ DecType = 'Dynamic'
+ if Type == 'DynamicExHii':
+ TypeName = 'DEXHII'
+ DecType = 'Dynamic'
+ if Type == 'DynamicExVpd':
+ TypeName = 'DEXVPD'
+ DecType = 'Dynamic'
+ for Pcd in AllPcds[Key][Type]:
+
+ DecDefaultValue = None
+ for F in Pa.Platform.Modules.keys():
+ for Package in Pa.Platform.Modules[F].M.Module.Packages:
+ if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName, DecType) in Package.Pcds:
+ if DecDefaultValue == None:
+ DecDefaultValue = Package.Pcds[Pcd.TokenCName, Pcd.TokenSpaceGuidCName, DecType].DefaultValue
+
+ DscDefaultValue = None
+ if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName) in self.BuildDatabase.WorkspaceDb.PlatformList[0].Pcds:
+ DscDefaultValue = self.BuildDatabase.WorkspaceDb.PlatformList[0].Pcds[(Pcd.TokenCName, Pcd.TokenSpaceGuidCName)].DefaultValue
+
+ if Pcd.DatumType in ('UINT8', 'UINT16', 'UINT32', 'UINT64'):
+ if Pcd.DefaultValue.strip()[0:2].upper() == '0X':
+ PcdDefaultValueNumber = int(Pcd.DefaultValue.strip(), 16)
+ else:
+ PcdDefaultValueNumber = int(Pcd.DefaultValue.strip())
+
+ if DecDefaultValue == None:
+ DecMatch = True
+ else:
+ if DecDefaultValue.strip()[0:2].upper() == '0X':
+ DecDefaultValueNumber = int(DecDefaultValue.strip(), 16)
+ else:
+ DecDefaultValueNumber = int(DecDefaultValue.strip())
+ DecMatch = (DecDefaultValueNumber == PcdDefaultValueNumber)
+
+ if DscDefaultValue == None:
+ DscMatch = True
+ else:
+ if DscDefaultValue.strip()[0:2].upper() == '0X':
+ DscDefaultValueNumber = int(DscDefaultValue.strip(), 16)
+ else:
+ DscDefaultValueNumber = int(DscDefaultValue.strip())
+ DscMatch = (DscDefaultValueNumber == PcdDefaultValueNumber)
+ else:
+ if DecDefaultValue == None:
+ DecMatch = True
+ else:
+ DecMatch = (DecDefaultValue == Pcd.DefaultValue)
+
+ if DscDefaultValue == None:
+ DscMatch = True
+ else:
+ DscMatch = (DscDefaultValue == Pcd.DefaultValue)
+
+ if DecMatch:
+ Fd.write (' %-*s: %6s %10s = %-22s\n' % (MaxLen + 2, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', Pcd.DefaultValue))
+ else:
+ if DscMatch:
+ if (Pcd.TokenCName, Key) in PcdSet:
+ Fd.write (' *F %-*s: %6s %10s = %-22s\n' % (MaxLen + 2, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', Pcd.DefaultValue))
+ else:
+ Fd.write (' *P %-*s: %6s %10s = %-22s\n' % (MaxLen + 2, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', Pcd.DefaultValue))
+
+ for F in Pa.Platform.Modules.keys():
+ for ModulePcd in Pa.Platform.Modules[F].M.ModulePcdList + Pa.Platform.Modules[F].M.LibraryPcdList:
+ if ModulePcd.TokenSpaceGuidCName <> Pcd.TokenSpaceGuidCName:
+ continue
+ if ModulePcd.TokenCName <> Pcd.TokenCName:
+ continue
+ if Pcd.DatumType in ('UINT8', 'UINT16', 'UINT32', 'UINT64'):
+ if ModulePcd.DefaultValue.strip()[0:2].upper() == '0X':
+ ModulePcdDefaultValueNumber = int(ModulePcd.DefaultValue.strip(), 16)
+ else:
+ ModulePcdDefaultValueNumber = int(ModulePcd.DefaultValue.strip())
+ Match = (ModulePcdDefaultValueNumber == PcdDefaultValueNumber)
+ else:
+ Match = (ModulePcd.DefaultValue == Pcd.DefaultValue)
+ if Match:
+ continue
+ Fd.write (' *M %*s = %s\n' % (MaxLen + 21, str(F).split('\\')[-1], ModulePcd.DefaultValue))
+
+ if not DecMatch and DscMatch and DecDefaultValue <> None:
+ Fd.write (' %*s = %s\n' % (MaxLen + 21, 'DEC DEFAULT', DecDefaultValue))
+
+ Fd.write ('\n')
+
+ Fd.write ('===============================================================================\n')
+ Fd.write ('===============================================================================\n')
+
+ for F in Pa.Platform.Modules.keys():
+ Fd.write ('\n')
+ Fd.write ('===============================================================================\n')
+ Fd.write ('MODULE: %s\n' % (F))
+ Fd.write ('===============================================================================\n')
+
+ Fd.write ('PLATFORM CONFIGURATION DATABASE\n')
+ Fd.write ('-------------------------------------------------------------------------------\n')
+ ModuleFirst = True
+ for Key in AllPcds:
+ First = True
+ for Type in AllPcds[Key]:
+ TypeName = ''
+ DecType = Type
+ if Type == 'FixedAtBuild':
+ TypeName = 'FIXED'
+ if Type == 'PatchableInModule':
+ TypeName = 'PATCH'
+ if Type == 'FeatureFlag':
+ TypeName = 'FLAG'
+ if Type == 'Dynamic':
+ TypeName = 'DYN'
+ if Type == 'DynamicHii':
+ TypeName = 'DYNHII'
+ DecType = 'Dynamic'
+ if Type == 'DynamicVpd':
+ TypeName = 'DYNVPD'
+ DecType = 'Dynamic'
+ if Type == 'DynamicEx':
+ TypeName = 'DEX'
+ DecType = 'Dynamic'
+ if Type == 'DynamicExHii':
+ TypeName = 'DEXHII'
+ DecType = 'Dynamic'
+ if Type == 'DynamicExVpd':
+ TypeName = 'DEXVPD'
+ DecType = 'Dynamic'
+ for Pcd in AllPcds[Key][Type]:
+ for ModulePcd in Pa.Platform.Modules[F].M.ModulePcdList + Pa.Platform.Modules[F].M.LibraryPcdList:
+ if ModulePcd.TokenSpaceGuidCName <> Pcd.TokenSpaceGuidCName:
+ continue
+ if ModulePcd.TokenCName <> Pcd.TokenCName:
+ continue
+ if ModulePcd.Type <> Pcd.Type:
+ continue
+ if First:
+ if ModuleFirst:
+ ModuleFirst = False
+ else:
+ Fd.write ('\n')
+ Fd.write ('%s\n' % (Key))
+ First = False
+
+ InfDefaultValue = ModulePcd.InfDefaultValue
+ if InfDefaultValue == '':
+ InfDefaultValue = None
+
+ DecDefaultValue = None
+ for Package in Pa.Platform.Modules[F].M.Module.Packages:
+ if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName, DecType) in Package.Pcds:
+ if DecDefaultValue == None:
+ DecDefaultValue = Package.Pcds[Pcd.TokenCName, Pcd.TokenSpaceGuidCName, DecType].DefaultValue
+
+ DscDefaultValue = None
+ if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName) in self.BuildDatabase.WorkspaceDb.PlatformList[0].Pcds:
+ DscDefaultValue = self.BuildDatabase.WorkspaceDb.PlatformList[0].Pcds[(Pcd.TokenCName, Pcd.TokenSpaceGuidCName)].DefaultValue
+
+ DscModuleOverrideDefaultValue = None
+ if F in self.BuildDatabase.WorkspaceDb.PlatformList[0].Modules:
+ if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName) in self.BuildDatabase.WorkspaceDb.PlatformList[0].Modules[F].Pcds:
+ DscModuleOverrideDefaultValue = self.BuildDatabase.WorkspaceDb.PlatformList[0].Modules[F].Pcds[(Pcd.TokenCName, Pcd.TokenSpaceGuidCName)].DefaultValue
+
+ if Pcd.DatumType in ('UINT8', 'UINT16', 'UINT32', 'UINT64'):
+ if ModulePcd.DefaultValue.strip()[0:2].upper() == '0X':
+ ModulePcdDefaultValueNumber = int(ModulePcd.DefaultValue.strip(), 16)
+ else:
+ ModulePcdDefaultValueNumber = int(ModulePcd.DefaultValue.strip())
+
+ if DecDefaultValue == None:
+ DecMatch = True
+ else:
+ if DecDefaultValue.strip()[0:2].upper() == '0X':
+ DecDefaultValueNumber = int(DecDefaultValue.strip(), 16)
+ else:
+ DecDefaultValueNumber = int(DecDefaultValue.strip())
+ DecMatch = (DecDefaultValueNumber == ModulePcdDefaultValueNumber)
+
+ if InfDefaultValue == None:
+ InfMatch = True
+ else:
+ if InfDefaultValue.strip()[0:2].upper() == '0X':
+ InfDefaultValueNumber = int(InfDefaultValue.strip(), 16)
+ else:
+ InfDefaultValueNumber = int(InfDefaultValue.strip())
+ InfMatch = (InfDefaultValueNumber == ModulePcdDefaultValueNumber)
+
+ if DscDefaultValue == None:
+ DscMatch = True
+ else:
+ if DscDefaultValue.strip()[0:2].upper() == '0X':
+ DscDefaultValueNumber = int(DscDefaultValue.strip(), 16)
+ else:
+ DscDefaultValueNumber = int(DscDefaultValue.strip())
+ DscMatch = (DscDefaultValueNumber == ModulePcdDefaultValueNumber)
+ else:
+ if DecDefaultValue == None:
+ DecMatch = True
+ else:
+ DecMatch = (DecDefaultValue == ModulePcd.DefaultValue)
+
+ if InfDefaultValue == None:
+ InfMatch = True
+ else:
+ InfMatch = (InfDefaultValue == ModulePcd.DefaultValue)
+
+ if DscDefaultValue == None:
+ DscMatch = True
+ else:
+ DscMatch = (DscDefaultValue == ModulePcd.DefaultValue)
+
+ if DecMatch and InfMatch:
+ Fd.write (' %-*s: %6s %10s = %-22s\n' % (MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', ModulePcd.DefaultValue))
+ else:
+ if DscMatch and DscModuleOverrideDefaultValue == None:
+ if (Pcd.TokenCName, Key) in PcdSet:
+ Fd.write (' *F %-*s: %6s %10s = %-22s\n' % (MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', ModulePcd.DefaultValue))
+ else:
+ Fd.write (' *P %-*s: %6s %10s = %-22s\n' % (MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', ModulePcd.DefaultValue))
+ else:
+ Fd.write (' *M %-*s: %6s %10s = %-22s\n' % (MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', ModulePcd.DefaultValue))
+ if DscDefaultValue <> None:
+ Fd.write (' %*s = %s\n' % (MaxLen + 19, 'DSC DEFAULT', DscDefaultValue))
+ if InfDefaultValue <> None:
+ Fd.write (' %*s = %s\n' % (MaxLen + 19, 'INF DEFAULT', InfDefaultValue))
+ if DecDefaultValue <> None and not DecMatch:
+ Fd.write (' %*s = %s\n' % (MaxLen + 19, 'DEC DEFAULT', DecDefaultValue))
+ Fd.write ('-------------------------------------------------------------------------------\n')
+ Fd.write ('LIBRARIES\n')
+ Fd.write ('-------------------------------------------------------------------------------\n')
+ for Lib in Pa.Platform.Modules[F].M.DependentLibraryList:
+ if len(Lib.ConstructorList) > 0:
+ if len(Lib.DestructorList) > 0:
+ Fd.write (' *CD')
+ else:
+ Fd.write (' *C ')
+ else:
+ if len(Lib.DestructorList) > 0:
+ Fd.write (' *D ')
+ else:
+ Fd.write (' ')
+ Fd.write (' %s\n' % (Lib))
+ for Depex in Lib.DepexExpression[Pa.Platform.Modules[F].M.Arch, Pa.Platform.Modules[F].M.ModuleType]:
+ Fd.write (' DEPEX = %s\n' % (Depex))
+ Fd.write ('-------------------------------------------------------------------------------\n')
+
+ Fd.write ('MODULE DEPENDENCY EXPRESSION\n')
+ if len(Pa.Platform.Modules[F].M.Module.DepexExpression[Pa.Platform.Modules[F].M.Arch, Pa.Platform.Modules[F].M.ModuleType]) == 0:
+ Fd.write (' NONE\n')
+ else:
+ for Depex in Pa.Platform.Modules[F].M.Module.DepexExpression[Pa.Platform.Modules[F].M.Arch, Pa.Platform.Modules[F].M.ModuleType]:
+ Fd.write (' %s\n' % (Depex))
+ Fd.write ('-------------------------------------------------------------------------------\n')
+
+ Fd.write ('MODULE + LIBRARY DEPENDENCY EXPRESSION\n')
+ if Pa.Platform.Modules[F].M.ModuleType in Pa.Platform.Modules[F].M.DepexExpressionList:
+ if Pa.Platform.Modules[F].M.DepexExpressionList[Pa.Platform.Modules[F].M.ModuleType] == '':
+ Fd.write (' NONE\n')
+ else:
+ Fd.write (' %s\n' % (Pa.Platform.Modules[F].M.DepexExpressionList[Pa.Platform.Modules[F].M.ModuleType]))
+ else:
+ Fd.write (' NONE\n')
+ Fd.write ('-------------------------------------------------------------------------------\n')
+
+ Fd.close()
+ except:
+ EdkLogger.error(None, FILE_OPEN_FAILURE, ExtraData=self.ReportFile)
+
self._BuildDir = None
self._FvDir = None
self._MakeFileDir = None
@@ -421,6 +744,9 @@ class PlatformAutoGen(AutoGen):
for F in self.Platform.Modules.keys():
M = ModuleAutoGen(self.Workspace, F, self.BuildTarget, self.ToolChain, self.Arch, self.MetaFile)
#GuidValue.update(M.Guids)
+
+ self.Platform.Modules[F].M = M
+
for PcdFromModule in M.ModulePcdList+M.LibraryPcdList:
# make sure that the "VOID*" kind of datum has MaxDatumSize set
if PcdFromModule.DatumType == "VOID*" and PcdFromModule.MaxDatumSize == None:
@@ -1260,6 +1586,7 @@ class ModuleAutoGen(AutoGen):
self._ProtocolList = None
self._PpiList = None
self._DepexList = None
+ self._DepexExpressionList = None
self._BuildOption = None
self._BuildTargets = None
self._IntroBuildTargetList = None
@@ -1433,11 +1760,7 @@ class ModuleAutoGen(AutoGen):
if self.IsLibrary or TAB_DEPENDENCY_EXPRESSION_FILE in self.FileTypes:
return self._DepexList
- if self.ModuleType == "DXE_SMM_DRIVER":
- self._DepexList["DXE_DRIVER"] = []
- self._DepexList["SMM_DRIVER"] = []
- else:
- self._DepexList[self.ModuleType] = []
+ self._DepexList[self.ModuleType] = []
for ModuleType in self._DepexList:
DepexList = self._DepexList[ModuleType]
@@ -1463,6 +1786,42 @@ class ModuleAutoGen(AutoGen):
EdkLogger.verbose('')
return self._DepexList
+ ## Merge dependency expression
+ #
+ # @retval list The token list of the dependency expression after parsed
+ #
+ def _GetDepexExpressionTokenList(self):
+ if self._DepexExpressionList == None:
+ self._DepexExpressionList = {}
+ if self.IsLibrary or TAB_DEPENDENCY_EXPRESSION_FILE in self.FileTypes:
+ return self._DepexExpressionList
+
+ self._DepexExpressionList[self.ModuleType] = ''
+
+ for ModuleType in self._DepexExpressionList:
+ DepexExpressionList = self._DepexExpressionList[ModuleType]
+ #
+ # Append depex from dependent libraries, if not "BEFORE", "AFTER" expresion
+ #
+ for M in [self.Module] + self.DependentLibraryList:
+ Inherited = False
+ for D in M.DepexExpression[self.Arch, ModuleType]:
+ if DepexExpressionList != '':
+ DepexExpressionList += ' AND '
+ DepexExpressionList += '('
+ DepexExpressionList += D
+ DepexExpressionList = DepexExpressionList.rstrip('END').strip()
+ DepexExpressionList += ')'
+ Inherited = True
+ if Inherited:
+ EdkLogger.verbose("DEPEX[%s] (+%s) = %s" % (self.Name, M.BaseName, DepexExpressionList))
+ if 'BEFORE' in DepexExpressionList or 'AFTER' in DepexExpressionList:
+ break
+ if len(DepexExpressionList) > 0:
+ EdkLogger.verbose('')
+ self._DepexExpressionList[ModuleType] = DepexExpressionList
+ return self._DepexExpressionList
+
## Return the list of specification version required for the module
#
# @retval list The list of specification defined in module file
@@ -1580,12 +1939,12 @@ class ModuleAutoGen(AutoGen):
if Source != File:
CreateDirectory(Source.Dir)
- if FileType in self.BuildRules:
+ if File.IsBinary and File == Source:
+ RuleObject = self.BuildRules[TAB_DEFAULT_BINARY_FILE]
+ elif FileType in self.BuildRules:
RuleObject = self.BuildRules[FileType]
elif Source.Ext in self.BuildRules:
RuleObject = self.BuildRules[Source.Ext]
- elif File.IsBinary and File == Source:
- RuleObject = self.BuildRules[TAB_DEFAULT_BINARY_FILE]
else:
# stop at no more rules
if LastTarget:
@@ -1599,7 +1958,8 @@ class ModuleAutoGen(AutoGen):
# stop at STATIC_LIBRARY for library
if self.IsLibrary and FileType == TAB_STATIC_LIBRARY:
- self._FinalBuildTargetList.add(LastTarget)
+ if LastTarget:
+ self._FinalBuildTargetList.add(LastTarget)
break
Target = RuleObject.Apply(Source)
@@ -1668,12 +2028,17 @@ class ModuleAutoGen(AutoGen):
# @retval list The list of auto-generated file
#
def _GetAutoGenFileList(self):
+ UniStringAutoGenC = True
+ UniStringBinBuffer = None
+ if self.BuildType == 'UEFI_HII':
+ UniStringBinBuffer = StringIO()
+ UniStringAutoGenC = False
if self._AutoGenFileList == None:
self._AutoGenFileList = {}
AutoGenC = TemplateString()
AutoGenH = TemplateString()
StringH = TemplateString()
- GenC.CreateCode(self, AutoGenC, AutoGenH, StringH)
+ GenC.CreateCode(self, AutoGenC, AutoGenH, StringH, UniStringAutoGenC, UniStringBinBuffer)
if str(AutoGenC) != "" and TAB_C_CODE_FILE in self.FileTypes:
AutoFile = PathClass(gAutoGenCodeFileName, self.DebugDir)
self._AutoGenFileList[AutoFile] = str(AutoGenC)
@@ -1686,6 +2051,13 @@ class ModuleAutoGen(AutoGen):
AutoFile = PathClass(gAutoGenStringFileName % {"module_name":self.Name}, self.DebugDir)
self._AutoGenFileList[AutoFile] = str(StringH)
self._ApplyBuildRule(AutoFile, TAB_UNKNOWN_FILE)
+ if UniStringBinBuffer != None and UniStringBinBuffer.getvalue() != "":
+ AutoFile = PathClass(gAutoGenStringFormFileName % {"module_name":self.Name}, self.OutputDir)
+ self._AutoGenFileList[AutoFile] = UniStringBinBuffer.getvalue()
+ AutoFile.IsBinary = True
+ self._ApplyBuildRule(AutoFile, TAB_UNKNOWN_FILE)
+ if UniStringBinBuffer != None:
+ UniStringBinBuffer.close()
return self._AutoGenFileList
## Return the list of library modules explicitly or implicityly used by this module
@@ -1838,7 +2210,7 @@ class ModuleAutoGen(AutoGen):
IgoredAutoGenList = []
for File in self.AutoGenFileList:
- if GenC.Generate(File.Path, self.AutoGenFileList[File]):
+ if GenC.Generate(File.Path, self.AutoGenFileList[File], File.IsBinary):
#Ignore R8 AutoGen.c
if self.AutoGenVersion < 0x00010005 and File.Name == 'AutoGen.c':
continue
@@ -1855,10 +2227,7 @@ class ModuleAutoGen(AutoGen):
if len(self.DepexList[ModuleType]) == 0:
continue
Dpx = GenDepex.DependencyExpression(self.DepexList[ModuleType], ModuleType, True)
- if ModuleType == 'SMM_DRIVER':
- DpxFile = gAutoGenSmmDepexFileName % {"module_name" : self.Name}
- else:
- DpxFile = gAutoGenDepexFileName % {"module_name" : self.Name}
+ DpxFile = gAutoGenDepexFileName % {"module_name" : self.Name}
if Dpx.Generate(path.join(self.OutputDir, DpxFile)):
AutoGenList.append(str(DpxFile))
@@ -1947,6 +2316,7 @@ class ModuleAutoGen(AutoGen):
ProtocolList = property(_GetProtocolList)
PpiList = property(_GetPpiList)
DepexList = property(_GetDepexTokenList)
+ DepexExpressionList = property(_GetDepexExpressionTokenList)
BuildOption = property(_GetModuleBuildOption)
BuildCommand = property(_GetBuildCommand)
diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py
index b62a12708b..0a2bb623d8 100644
--- a/BaseTools/Source/Python/AutoGen/GenC.py
+++ b/BaseTools/Source/Python/AutoGen/GenC.py
@@ -383,28 +383,6 @@ ${Function} (
${END}
""")
-## SMM_CORE Entry Point Templates
-gSmmCoreEntryPointString = TemplateString("""
-const UINT32 _gUefiDriverRevision = 0;
-${BEGIN}
-EFI_STATUS
-${Function} (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
- );
-
-EFI_STATUS
-EFIAPI
-ProcessModuleEntryPointList (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
- )
-{
- return ${Function} (ImageHandle, SystemTable);
-}
-${END}
-""")
-
gPeimEntryPointString = [
TemplateString("""
GLOBAL_REMOVE_IF_UNREFERENCED const UINT32 _gPeimRevision = ${PiSpecVersion};
@@ -461,6 +439,35 @@ ${END}
""")
]
+## SMM_CORE Entry Point Templates
+gSmmCoreEntryPointPrototype = TemplateString("""
+${BEGIN}
+EFI_STATUS
+EFIAPI
+${Function} (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+ );
+${END}
+""")
+
+gSmmCoreEntryPointString = TemplateString("""
+${BEGIN}
+const UINT32 _gUefiDriverRevision = ${EfiSpecVersion};
+const UINT32 _gDxeRevision = ${PiSpecVersion};
+
+EFI_STATUS
+EFIAPI
+ProcessModuleEntryPointList (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+ )
+{
+ return ${Function} (ImageHandle, SystemTable);
+}
+${END}
+""")
+
## DXE SMM Entry Point Templates
gDxeSmmEntryPointPrototype = TemplateString("""
${BEGIN}
@@ -890,8 +897,7 @@ gModuleTypeHeaderFile = {
"DXE_SAL_DRIVER" : ["PiDxe.h", "Library/BaseLib.h", "Library/DebugLib.h", "Library/UefiBootServicesTableLib.h", "Library/UefiDriverEntryPoint.h"],
"UEFI_DRIVER" : ["Uefi.h", "Library/BaseLib.h", "Library/DebugLib.h", "Library/UefiBootServicesTableLib.h", "Library/UefiDriverEntryPoint.h"],
"UEFI_APPLICATION" : ["Uefi.h", "Library/BaseLib.h", "Library/DebugLib.h", "Library/UefiBootServicesTableLib.h", "Library/UefiApplicationEntryPoint.h"],
- "SMM_DRIVER" : ["PiDxe.h", "Library/BaseLib.h", "Library/DebugLib.h", "Library/SmmDriverEntryPoint.h"],
- "SMM_CORE" : ["PiDxe.h", "Library/DebugLib.h"],
+ "SMM_CORE" : ["PiDxe.h", "Library/BaseLib.h", "Library/DebugLib.h", "Library/UefiDriverEntryPoint.h"],
"USER_DEFINED" : [gBasicHeaderFile]
}
@@ -1504,7 +1510,7 @@ def CreateLibraryConstructorCode(Info, AutoGenC, AutoGenH):
ConstructorPrototypeString.Append(gLibraryStructorPrototype['PEI'].Replace(Dict))
ConstructorCallingString.Append(gLibraryStructorCall['PEI'].Replace(Dict))
elif Lib.ModuleType in ['DXE_CORE','DXE_DRIVER','DXE_SMM_DRIVER','DXE_RUNTIME_DRIVER',
- 'DXE_SAL_DRIVER','UEFI_DRIVER','UEFI_APPLICATION', 'SMM_DRIVER', 'SMM_CORE']:
+ 'DXE_SAL_DRIVER','UEFI_DRIVER','UEFI_APPLICATION','SMM_CORE']:
ConstructorPrototypeString.Append(gLibraryStructorPrototype['DXE'].Replace(Dict))
ConstructorCallingString.Append(gLibraryStructorCall['DXE'].Replace(Dict))
@@ -1530,7 +1536,7 @@ def CreateLibraryConstructorCode(Info, AutoGenC, AutoGenH):
elif Info.ModuleType in ['PEI_CORE','PEIM']:
AutoGenC.Append(gLibraryString['PEI'].Replace(Dict))
elif Info.ModuleType in ['DXE_CORE','DXE_DRIVER','DXE_SMM_DRIVER','DXE_RUNTIME_DRIVER',
- 'DXE_SAL_DRIVER','UEFI_DRIVER','UEFI_APPLICATION', 'SMM_DRIVER', 'SMM_CORE']:
+ 'DXE_SAL_DRIVER','UEFI_DRIVER','UEFI_APPLICATION','SMM_CORE']:
AutoGenC.Append(gLibraryString['DXE'].Replace(Dict))
## Create code for library destructor
@@ -1561,7 +1567,7 @@ def CreateLibraryDestructorCode(Info, AutoGenC, AutoGenH):
DestructorPrototypeString.Append(gLibraryStructorPrototype['PEI'].Replace(Dict))
DestructorCallingString.Append(gLibraryStructorCall['PEI'].Replace(Dict))
elif Lib.ModuleType in ['DXE_CORE','DXE_DRIVER','DXE_SMM_DRIVER','DXE_RUNTIME_DRIVER',
- 'DXE_SAL_DRIVER','UEFI_DRIVER','UEFI_APPLICATION', 'SMM_DRIVER', 'SMM_CORE']:
+ 'DXE_SAL_DRIVER','UEFI_DRIVER','UEFI_APPLICATION', 'SMM_CORE']:
DestructorPrototypeString.Append(gLibraryStructorPrototype['DXE'].Replace(Dict))
DestructorCallingString.Append(gLibraryStructorCall['DXE'].Replace(Dict))
@@ -1587,7 +1593,7 @@ def CreateLibraryDestructorCode(Info, AutoGenC, AutoGenH):
elif Info.ModuleType in ['PEI_CORE','PEIM']:
AutoGenC.Append(gLibraryString['PEI'].Replace(Dict))
elif Info.ModuleType in ['DXE_CORE','DXE_DRIVER','DXE_SMM_DRIVER','DXE_RUNTIME_DRIVER',
- 'DXE_SAL_DRIVER','UEFI_DRIVER','UEFI_APPLICATION', 'SMM_DRIVER', 'SMM_CORE']:
+ 'DXE_SAL_DRIVER','UEFI_DRIVER','UEFI_APPLICATION','SMM_CORE']:
AutoGenC.Append(gLibraryString['DXE'].Replace(Dict))
@@ -1635,26 +1641,25 @@ def CreateModuleEntryPointCode(Info, AutoGenC, AutoGenH):
AutoGenH.Append(gDxeCoreEntryPointPrototype.Replace(Dict))
elif Info.ModuleType == 'SMM_CORE':
AutoGenC.Append(gSmmCoreEntryPointString.Replace(Dict))
+ AutoGenH.Append(gSmmCoreEntryPointPrototype.Replace(Dict))
elif Info.ModuleType == 'PEIM':
if NumEntryPoints < 2:
AutoGenC.Append(gPeimEntryPointString[NumEntryPoints].Replace(Dict))
else:
AutoGenC.Append(gPeimEntryPointString[2].Replace(Dict))
AutoGenH.Append(gPeimEntryPointPrototype.Replace(Dict))
- elif Info.ModuleType in ['DXE_RUNTIME_DRIVER','DXE_DRIVER','DXE_SMM_DRIVER',
- 'DXE_SAL_DRIVER','UEFI_DRIVER', 'SMM_DRIVER']:
- if Info.ModuleType in ['DXE_SMM_DRIVER', 'SMM_DRIVER']:
- if NumEntryPoints == 0:
- AutoGenC.Append(gDxeSmmEntryPointString[0].Replace(Dict))
- else:
- AutoGenC.Append(gDxeSmmEntryPointString[1].Replace(Dict))
- AutoGenH.Append(gDxeSmmEntryPointPrototype.Replace(Dict))
+ elif Info.ModuleType in ['DXE_RUNTIME_DRIVER','DXE_DRIVER','DXE_SAL_DRIVER','UEFI_DRIVER']:
+ if NumEntryPoints < 2:
+ AutoGenC.Append(gUefiDriverEntryPointString[NumEntryPoints].Replace(Dict))
else:
- if NumEntryPoints < 2:
- AutoGenC.Append(gUefiDriverEntryPointString[NumEntryPoints].Replace(Dict))
- else:
- AutoGenC.Append(gUefiDriverEntryPointString[2].Replace(Dict))
- AutoGenH.Append(gUefiDriverEntryPointPrototype.Replace(Dict))
+ AutoGenC.Append(gUefiDriverEntryPointString[2].Replace(Dict))
+ AutoGenH.Append(gUefiDriverEntryPointPrototype.Replace(Dict))
+ elif Info.ModuleType == 'DXE_SMM_DRIVER':
+ if NumEntryPoints == 0:
+ AutoGenC.Append(gDxeSmmEntryPointString[0].Replace(Dict))
+ else:
+ AutoGenC.Append(gDxeSmmEntryPointString[1].Replace(Dict))
+ AutoGenH.Append(gDxeSmmEntryPointPrototype.Replace(Dict))
elif Info.ModuleType == 'UEFI_APPLICATION':
if NumEntryPoints < 2:
AutoGenC.Append(gUefiApplicationEntryPointString[NumEntryPoints].Replace(Dict))
@@ -1782,8 +1787,10 @@ def CreatePcdCode(Info, AutoGenC, AutoGenH):
# @param Info The ModuleAutoGen object
# @param AutoGenC The TemplateString object for C code
# @param AutoGenH The TemplateString object for header file
+# @param UniGenCFlag UniString is generated into AutoGen C file when it is set to True
+# @param UniGenBinBuffer Buffer to store uni string package data
#
-def CreateUnicodeStringCode(Info, AutoGenC, AutoGenH):
+def CreateUnicodeStringCode(Info, AutoGenC, AutoGenH, UniGenCFlag, UniGenBinBuffer):
WorkingDir = os.getcwd()
os.chdir(Info.WorkspaceDir)
@@ -1823,13 +1830,15 @@ def CreateUnicodeStringCode(Info, AutoGenC, AutoGenH):
else:
ShellMode = False
- Header, Code = GetStringFiles(Info.UnicodeFileList, SrcList, IncList, ['.uni', '.inf'], Info.Name, CompatibleMode, ShellMode)
- AutoGenC.Append("\n//\n//Unicode String Pack Definition\n//\n")
- AutoGenC.Append(Code)
- AutoGenC.Append("\n")
+ Header, Code = GetStringFiles(Info.UnicodeFileList, SrcList, IncList, ['.uni', '.inf'], Info.Name, CompatibleMode, ShellMode, UniGenCFlag, UniGenBinBuffer)
+ if CompatibleMode or UniGenCFlag:
+ AutoGenC.Append("\n//\n//Unicode String Pack Definition\n//\n")
+ AutoGenC.Append(Code)
+ AutoGenC.Append("\n")
AutoGenH.Append("\n//\n//Unicode String ID\n//\n")
AutoGenH.Append(Header)
- AutoGenH.Append("\n#define STRING_ARRAY_NAME %sStrings\n" % Info.Name)
+ if CompatibleMode or UniGenCFlag:
+ AutoGenH.Append("\n#define STRING_ARRAY_NAME %sStrings\n" % Info.Name)
os.chdir(WorkingDir)
## Create common code
@@ -1890,8 +1899,10 @@ def CreateFooterCode(Info, AutoGenC, AutoGenH):
# @param Info The ModuleAutoGen object
# @param AutoGenC The TemplateString object for C code
# @param AutoGenH The TemplateString object for header file
+# @param UniGenCFlag UniString is generated into AutoGen C file when it is set to True
+# @param UniGenBinBuffer Buffer to store uni string package data
#
-def CreateCode(Info, AutoGenC, AutoGenH, StringH):
+def CreateCode(Info, AutoGenC, AutoGenH, StringH, UniGenCFlag, UniGenBinBuffer):
CreateHeaderCode(Info, AutoGenC, AutoGenH)
if Info.AutoGenVersion >= 0x00010005:
@@ -1908,7 +1919,7 @@ def CreateCode(Info, AutoGenC, AutoGenH, StringH):
FileName = "%sStrDefs.h" % Info.Name
StringH.Append(gAutoGenHeaderString.Replace({'FileName':FileName}))
StringH.Append(gAutoGenHPrologueString.Replace({'File':'STRDEFS', 'Guid':Info.Guid.replace('-','_')}))
- CreateUnicodeStringCode(Info, AutoGenC, StringH)
+ CreateUnicodeStringCode(Info, AutoGenC, StringH, UniGenCFlag, UniGenBinBuffer)
StringH.Append("\n#endif\n")
AutoGenH.Append('#include "%s"\n' % FileName)
@@ -1920,12 +1931,13 @@ def CreateCode(Info, AutoGenC, AutoGenH, StringH):
## Create the code file
#
-# @param FilePath The path of code file
-# @param Content The content of code file
+# @param FilePath The path of code file
+# @param Content The content of code file
+# @param IsBinaryFile The flag indicating if the file is binary file or not
#
# @retval True If file content is changed or file doesn't exist
# @retval False If the file exists and the content is not changed
#
-def Generate(FilePath, Content):
- return SaveFileOnChange(FilePath, Content, False)
+def Generate(FilePath, Content, IsBinaryFile):
+ return SaveFileOnChange(FilePath, Content, IsBinaryFile)
diff --git a/BaseTools/Source/Python/AutoGen/GenDepex.py b/BaseTools/Source/Python/AutoGen/GenDepex.py
index a3d07b83f2..9ee615cdc8 100644
--- a/BaseTools/Source/Python/AutoGen/GenDepex.py
+++ b/BaseTools/Source/Python/AutoGen/GenDepex.py
@@ -41,7 +41,7 @@ gType2Phase = {
"DXE_SAL_DRIVER" : "DXE",
"UEFI_DRIVER" : "DXE",
"UEFI_APPLICATION" : "DXE",
- "SMM_DRIVER" : "DXE",
+ "SMM_CORE" : "DXE",
}
## Convert dependency expression string into EFI internal representation
diff --git a/BaseTools/Source/Python/AutoGen/StrGather.py b/BaseTools/Source/Python/AutoGen/StrGather.py
index 0f644445dc..903ac3cd0d 100644
--- a/BaseTools/Source/Python/AutoGen/StrGather.py
+++ b/BaseTools/Source/Python/AutoGen/StrGather.py
@@ -18,6 +18,8 @@ import re
import Common.EdkLogger as EdkLogger
from Common.BuildToolError import *
from UniClassObject import *
+from StringIO import StringIO
+from struct import pack
##
# Static definitions
@@ -60,6 +62,7 @@ OFFSET = 'offset'
STRING = 'string'
TO = 'to'
STRING_TOKEN = re.compile('STRING_TOKEN *\(([A-Z0-9_]+) *\)', re.MULTILINE | re.UNICODE)
+COMPATIBLE_STRING_TOKEN = re.compile('STRING_TOKEN *\(([A-Za-z0-9_]+) *\)', re.MULTILINE | re.UNICODE)
EFI_HII_ARRAY_SIZE_LENGTH = 4
EFI_HII_PACKAGE_HEADER_LENGTH = 4
@@ -151,12 +154,14 @@ def CreateHFileHeader(BaseName):
#
# Create content of .h file
#
-# @param BaseName: The basename of strings
-# @param UniObjectClass: A UniObjectClass instance
+# @param BaseName: The basename of strings
+# @param UniObjectClass A UniObjectClass instance
+# @param IsCompatibleMode Compatible mode
+# @param UniGenCFlag UniString is generated into AutoGen C file when it is set to True
#
# @retval Str: A string of .h file content
#
-def CreateHFileContent(BaseName, UniObjectClass):
+def CreateHFileContent(BaseName, UniObjectClass, IsCompatibleMode, UniGenCFlag):
Str = ''
ValueStartPtr = 60
Line = COMMENT_DEFINE_STR + ' ' + LANGUAGE_NAME_STRING_NAME + ' ' * (ValueStartPtr - len(DEFINE_STR + LANGUAGE_NAME_STRING_NAME)) + DecToHexStr(0, 4) + COMMENT_NOT_REFERENCED
@@ -182,21 +187,24 @@ def CreateHFileContent(BaseName, UniObjectClass):
Line = COMMENT_DEFINE_STR + ' ' + Name + ' ' * (ValueStartPtr - len(DEFINE_STR + Name)) + DecToHexStr(Token, 4) + COMMENT_NOT_REFERENCED
Str = WriteLine(Str, Line)
- Str = WriteLine(Str, '')
- Str = WriteLine(Str, 'extern unsigned char ' + BaseName + 'Strings[];')
+ Str = WriteLine(Str, '')
+ if IsCompatibleMode or UniGenCFlag:
+ Str = WriteLine(Str, 'extern unsigned char ' + BaseName + 'Strings[];')
return Str
## Create a complete .h file
#
# Create a complet .h file with file header and file content
#
-# @param BaseName: The basename of strings
-# @param UniObjectClass: A UniObjectClass instance
+# @param BaseName: The basename of strings
+# @param UniObjectClass A UniObjectClass instance
+# @param IsCompatibleMode Compatible mode
+# @param UniGenCFlag UniString is generated into AutoGen C file when it is set to True
#
# @retval Str: A string of complete .h file
#
-def CreateHFile(BaseName, UniObjectClass):
- HFile = WriteLine('', CreateHFileContent(BaseName, UniObjectClass))
+def CreateHFile(BaseName, UniObjectClass, IsCompatibleMode, UniGenCFlag):
+ HFile = WriteLine('', CreateHFileContent(BaseName, UniObjectClass, IsCompatibleMode, UniGenCFlag))
return HFile
@@ -213,6 +221,15 @@ def CreateCFileHeader():
return Str
+## Create a buffer to store all items in an array
+#
+# @param BinBuffer Buffer to contain Binary data.
+# @param Array: The array need to be formatted
+#
+def CreateBinBuffer(BinBuffer, Array):
+ for Item in Array:
+ BinBuffer.write(pack("B", int(Item,16)))
+
## Create a formatted string all items in an array
#
# Use ',' to join each item in an array, and break an new line when reaching the width (default is 16)
@@ -260,12 +277,14 @@ def CreateCFileStringValue(Value):
#
# Create content of .c file
#
-# @param BaseName: The basename of strings
-# @param UniObjectClass: A UniObjectClass instance
+# @param BaseName: The basename of strings
+# @param UniObjectClass A UniObjectClass instance
+# @param IsCompatibleMode Compatible mode
+# @param UniBinBuffer UniBinBuffer to contain UniBinary data.
#
# @retval Str: A string of .c file content
#
-def CreateCFileContent(BaseName, UniObjectClass, IsCompatibleMode):
+def CreateCFileContent(BaseName, UniObjectClass, IsCompatibleMode, UniBinBuffer=None):
#
# Init array length
#
@@ -280,9 +299,10 @@ def CreateCFileContent(BaseName, UniObjectClass, IsCompatibleMode):
Language = UniObjectClass.LanguageDef[IndexI][0]
LangPrintName = UniObjectClass.LanguageDef[IndexI][1]
+ StringBuffer = StringIO()
StrStringValue = ''
ArrayLength = 0
- NumberOfUseOhterLangDef = 0
+ NumberOfUseOtherLangDef = 0
Index = 0
for IndexJ in range(1, len(UniObjectClass.OrderedStringList[UniObjectClass.LanguageDef[IndexI][0]])):
Item = UniObjectClass.FindByToken(IndexJ, Language)
@@ -294,18 +314,19 @@ def CreateCFileContent(BaseName, UniObjectClass, IsCompatibleMode):
UseOtherLangDef = Item.UseOtherLangDef
if UseOtherLangDef != '' and Referenced:
- NumberOfUseOhterLangDef = NumberOfUseOhterLangDef + 1
+ NumberOfUseOtherLangDef = NumberOfUseOtherLangDef + 1
Index = Index + 1
else:
- if NumberOfUseOhterLangDef > 0:
- StrStringValue = WriteLine(StrStringValue, CreateArrayItem([StringSkipType] + DecToHexList(NumberOfUseOhterLangDef, 4)))
- NumberOfUseOhterLangDef = 0
+ if NumberOfUseOtherLangDef > 0:
+ StrStringValue = WriteLine(StrStringValue, CreateArrayItem([StringSkipType] + DecToHexList(NumberOfUseOtherLangDef, 4)))
+ CreateBinBuffer (StringBuffer, ([StringSkipType] + DecToHexList(NumberOfUseOtherLangDef, 4)))
+ NumberOfUseOtherLangDef = 0
ArrayLength = ArrayLength + 3
if Referenced and Item.Token > 0:
Index = Index + 1
StrStringValue = WriteLine(StrStringValue, "// %s: %s:%s" % (DecToHexStr(Index, 4), Name, DecToHexStr(Token, 4)))
StrStringValue = Write(StrStringValue, CreateCFileStringValue(Value))
- Offset = Offset + Length
+ CreateBinBuffer (StringBuffer, [StringBlockType] + Value)
ArrayLength = ArrayLength + Item.Length + 1 # 1 is for the length of string type
#
@@ -340,6 +361,15 @@ def CreateCFileContent(BaseName, UniObjectClass, IsCompatibleMode):
# Add an EFI_HII_SIBT_END at last
#
Str = WriteLine(Str, ' ' + EFI_HII_SIBT_END + ",")
+
+ #
+ # Create binary UNI string
+ #
+ if UniBinBuffer:
+ CreateBinBuffer (UniBinBuffer, List)
+ UniBinBuffer.write (StringBuffer.getvalue())
+ UniBinBuffer.write (pack("B", int(EFI_HII_SIBT_END,16)))
+ StringBuffer.close()
#
# Create line for string variable name
@@ -347,19 +377,18 @@ def CreateCFileContent(BaseName, UniObjectClass, IsCompatibleMode):
#
AllStr = WriteLine('', CHAR_ARRAY_DEFIN + ' ' + BaseName + COMMON_FILE_NAME + '[] = {\n' )
- #
- # Create FRAMEWORK_EFI_HII_PACK_HEADER in compatible mode
- #
if IsCompatibleMode:
+ #
+ # Create FRAMEWORK_EFI_HII_PACK_HEADER in compatible mode
+ #
AllStr = WriteLine(AllStr, '// FRAMEWORK PACKAGE HEADER Length')
AllStr = WriteLine(AllStr, CreateArrayItem(DecToHexList(TotalLength + 2)) + '\n')
AllStr = WriteLine(AllStr, '// FRAMEWORK PACKAGE HEADER Type')
AllStr = WriteLine(AllStr, CreateArrayItem(DecToHexList(2, 4)) + '\n')
-
- #
- # Create whole array length in UEFI mode
- #
- if not IsCompatibleMode:
+ else:
+ #
+ # Create whole array length in UEFI mode
+ #
AllStr = WriteLine(AllStr, '// STRGATHER_OUTPUT_HEADER')
AllStr = WriteLine(AllStr, CreateArrayItem(DecToHexList(TotalLength)) + '\n')
@@ -384,8 +413,9 @@ def CreateCFileEnd():
#
# Create a complete .c file
#
-# @param BaseName: The basename of strings
-# @param UniObjectClass: A UniObjectClass instance
+# @param BaseName: The basename of strings
+# @param UniObjectClass A UniObjectClass instance
+# @param IsCompatibleMode Compatible Mode
#
# @retval CFile: A string of complete .c file
#
@@ -447,10 +477,11 @@ def GetFileList(SourceFileList, IncludeList, SkipList):
#
# @param UniObjectClass: Input UniObjectClass
# @param FileList: Search path list
+# @param IsCompatibleMode Compatible Mode
#
# @retval UniObjectClass: UniObjectClass after searched
#
-def SearchString(UniObjectClass, FileList):
+def SearchString(UniObjectClass, FileList, IsCompatibleMode):
if FileList == []:
return UniObjectClass
@@ -458,7 +489,10 @@ def SearchString(UniObjectClass, FileList):
if os.path.isfile(File):
Lines = open(File, 'r')
for Line in Lines:
- StringTokenList = STRING_TOKEN.findall(Line)
+ if not IsCompatibleMode:
+ StringTokenList = STRING_TOKEN.findall(Line)
+ else:
+ StringTokenList = COMPATIBLE_STRING_TOKEN.findall(Line)
for StrName in StringTokenList:
EdkLogger.debug(EdkLogger.DEBUG_5, "Found string identifier: " + StrName)
UniObjectClass.SetStringReferenced(StrName)
@@ -472,7 +506,7 @@ def SearchString(UniObjectClass, FileList):
# This function is used for UEFI2.1 spec
#
#
-def GetStringFiles(UniFilList, SourceFileList, IncludeList, SkipList, BaseName, IsCompatibleMode = False, ShellMode = False):
+def GetStringFiles(UniFilList, SourceFileList, IncludeList, SkipList, BaseName, IsCompatibleMode = False, ShellMode = False, UniGenCFlag = True, UniGenBinBuffer = None):
Status = True
ErrorMessage = ''
@@ -489,10 +523,14 @@ def GetStringFiles(UniFilList, SourceFileList, IncludeList, SkipList, BaseName,
FileList = GetFileList(SourceFileList, IncludeList, SkipList)
- Uni = SearchString(Uni, FileList)
+ Uni = SearchString(Uni, FileList, IsCompatibleMode)
- HFile = CreateHFile(BaseName, Uni)
- CFile = CreateCFile(BaseName, Uni, IsCompatibleMode)
+ HFile = CreateHFile(BaseName, Uni, IsCompatibleMode, UniGenCFlag)
+ CFile = None
+ if IsCompatibleMode or UniGenCFlag:
+ CFile = CreateCFile(BaseName, Uni, IsCompatibleMode)
+ if UniGenBinBuffer:
+ CreateCFileContent(BaseName, Uni, IsCompatibleMode, UniGenBinBuffer)
return HFile, CFile
diff --git a/BaseTools/Source/Python/AutoGen/UniClassObject.py b/BaseTools/Source/Python/AutoGen/UniClassObject.py
index 412fa72df0..dcfa264025 100644
--- a/BaseTools/Source/Python/AutoGen/UniClassObject.py
+++ b/BaseTools/Source/Python/AutoGen/UniClassObject.py
@@ -234,6 +234,11 @@ class UniFileClassObject(object):
Value = ''
Name = Item.split()[1]
+ # Check the string name is the upper character
+ if not self.IsCompatibleMode and Name != '':
+ MatchString = re.match('[A-Z0-9_]+', Name, re.UNICODE)
+ if MatchString == None or MatchString.end(0) != len(Name):
+ EdkLogger.error('Unicode File Parser', FORMAT_INVALID, 'The string token name %s defined in UNI file %s contains the invalid lower case character.' %(Name, self.File))
LanguageList = Item.split(u'#language ')
for IndexI in range(len(LanguageList)):
if IndexI == 0:
@@ -365,6 +370,11 @@ class UniFileClassObject(object):
break
# Value = Value.replace(u'\r\n', u'')
Language = GetLanguageCode(Language, self.IsCompatibleMode, self.File)
+ # Check the string name is the upper character
+ if not self.IsCompatibleMode and Name != '':
+ MatchString = re.match('[A-Z0-9_]+', Name, re.UNICODE)
+ if MatchString == None or MatchString.end(0) != len(Name):
+ EdkLogger.error('Unicode File Parser', FORMAT_INVALID, 'The string token name %s defined in UNI file %s contains the invalid lower case character.' %(Name, self.File))
self.AddStringToList(Name, Language, Value)
continue
diff --git a/BaseTools/Source/Python/Common/DataType.py b/BaseTools/Source/Python/Common/DataType.py
index 8b6c4e4921..c2da992059 100644
--- a/BaseTools/Source/Python/Common/DataType.py
+++ b/BaseTools/Source/Python/Common/DataType.py
@@ -56,12 +56,11 @@ SUP_MODULE_DXE_SMM_DRIVER = 'DXE_SMM_DRIVER'
SUP_MODULE_UEFI_DRIVER = 'UEFI_DRIVER'
SUP_MODULE_UEFI_APPLICATION = 'UEFI_APPLICATION'
SUP_MODULE_USER_DEFINED = 'USER_DEFINED'
-SUP_MODULE_SMM_DRIVER = 'SMM_DRIVER'
SUP_MODULE_SMM_CORE = 'SMM_CORE'
SUP_MODULE_LIST = [SUP_MODULE_BASE, SUP_MODULE_SEC, SUP_MODULE_PEI_CORE, SUP_MODULE_PEIM, SUP_MODULE_DXE_CORE, SUP_MODULE_DXE_DRIVER, \
SUP_MODULE_DXE_RUNTIME_DRIVER, SUP_MODULE_DXE_SAL_DRIVER, SUP_MODULE_DXE_SMM_DRIVER, SUP_MODULE_UEFI_DRIVER, \
- SUP_MODULE_UEFI_APPLICATION, SUP_MODULE_USER_DEFINED, SUP_MODULE_SMM_DRIVER, SUP_MODULE_SMM_CORE]
+ SUP_MODULE_UEFI_APPLICATION, SUP_MODULE_USER_DEFINED, SUP_MODULE_SMM_CORE]
SUP_MODULE_LIST_STRING = TAB_VALUE_SPLIT.join(l for l in SUP_MODULE_LIST)
EDK_COMPONENT_TYPE_LIBRARY = 'LIBRARY'
@@ -86,6 +85,7 @@ BINARY_FILE_TYPE_PE32 = 'PE32'
BINARY_FILE_TYPE_PIC = 'PIC'
BINARY_FILE_TYPE_PEI_DEPEX = 'PEI_DEPEX'
BINARY_FILE_TYPE_DXE_DEPEX = 'DXE_DEPEX'
+BINARY_FILE_TYPE_SMM_DEPEX = 'SMM_DEPEX'
BINARY_FILE_TYPE_TE = 'TE'
BINARY_FILE_TYPE_VER = 'VER'
BINARY_FILE_TYPE_UI = 'UI'
diff --git a/BaseTools/Source/Python/Common/FdfParserLite.py b/BaseTools/Source/Python/Common/FdfParserLite.py
index 5099ed611c..b397b16b42 100644
--- a/BaseTools/Source/Python/Common/FdfParserLite.py
+++ b/BaseTools/Source/Python/Common/FdfParserLite.py
@@ -2408,7 +2408,7 @@ class FdfParser(object):
Obj.SectionList.append(FvImageSectionObj)
- elif self.__IsKeyword("PEI_DEPEX_EXP") or self.__IsKeyword("DXE_DEPEX_EXP"):
+ elif self.__IsKeyword("PEI_DEPEX_EXP") or self.__IsKeyword("DXE_DEPEX_EXP") or self.__IsKeyword("SMM_DEPEX_EXP"):
DepexSectionObj = CommonDataClass.FdfClass.DepexSectionClassObject()
DepexSectionObj.Alignment = AlignValue
DepexSectionObj.DepexType = self.__Token
@@ -2798,7 +2798,7 @@ class FdfParser(object):
"DXE_SMM_DRIVER", "DXE_RUNTIME_DRIVER", \
"UEFI_DRIVER", "UEFI_APPLICATION", "USER_DEFINED", "DEFAULT", "BASE", \
"SECURITY_CORE", "COMBINED_PEIM_DRIVER", "PIC_PEIM", "RELOCATABLE_PEIM", \
- "PE32_PEIM", "BS_DRIVER", "RT_DRIVER", "SAL_RT_DRIVER", "APPLICATION", "ACPITABLE", "SMM_DRIVER", "SMM_CORE"):
+ "PE32_PEIM", "BS_DRIVER", "RT_DRIVER", "SAL_RT_DRIVER", "APPLICATION", "ACPITABLE", "SMM_CORE"):
raise Warning("Unknown Module type At line ", self.FileName, self.CurrentLineNumber)
return self.__Token
@@ -2842,7 +2842,7 @@ class FdfParser(object):
Type = self.__Token.strip().upper()
if Type not in ("RAW", "FREEFORM", "SEC", "PEI_CORE", "PEIM",\
- "PEI_DXE_COMBO", "DRIVER", "DXE_CORE", "APPLICATION", "FV_IMAGE", "SMM_DXE_COMBO", "SMM", "SMM_CORE"):
+ "PEI_DXE_COMBO", "DRIVER", "DXE_CORE", "APPLICATION", "FV_IMAGE", "SMM", "SMM_CORE"):
raise Warning("Unknown FV type At line ", self.FileName, self.CurrentLineNumber)
if not self.__IsToken("="):
@@ -3221,8 +3221,8 @@ class FdfParser(object):
elif SectionType == "RAW":
if FileType not in ("BIN", "SEC_BIN", "RAW", "ASL", "ACPI"):
raise Warning("Incorrect section file type At Line ", self.FileName, self.CurrentLineNumber)
- elif SectionType == "DXE_DEPEX":
- if FileType not in ("DXE_DEPEX", "SEC_DXE_DEPEX"):
+ elif SectionType == "DXE_DEPEX" or SectionType == "SMM_DEPEX":
+ if FileType not in ("DXE_DEPEX", "SEC_DXE_DEPEX", "SMM_DEPEX"):
raise Warning("Incorrect section file type At Line ", self.FileName, self.CurrentLineNumber)
elif SectionType == "UI":
if FileType not in ("UI", "SEC_UI"):
diff --git a/BaseTools/Source/Python/Common/InfClassObject.py b/BaseTools/Source/Python/Common/InfClassObject.py
index a772840227..27e67f3a1d 100644
--- a/BaseTools/Source/Python/Common/InfClassObject.py
+++ b/BaseTools/Source/Python/Common/InfClassObject.py
@@ -66,8 +66,6 @@ gComponentType2ModuleType = {
"BS_DRIVER" : "DXE_DRIVER",
"RT_DRIVER" : "DXE_RUNTIME_DRIVER",
"SAL_RT_DRIVER" : "DXE_SAL_DRIVER",
-# "BS_DRIVER" : "DXE_SMM_DRIVER",
-# "BS_DRIVER" : "UEFI_DRIVER",
"APPLICATION" : "UEFI_APPLICATION",
"LOGO" : "BASE",
}
diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py
index 2c1041c55b..76dfbb665e 100644
--- a/BaseTools/Source/Python/Common/Misc.py
+++ b/BaseTools/Source/Python/Common/Misc.py
@@ -316,12 +316,14 @@ def DataRestore(File):
# @retval None If path doesn't exist
#
class DirCache:
- _CACHE_ = {}
+ _CACHE_ = set()
+ _UPPER_CACHE_ = {}
def __init__(self, Root):
self._Root = Root
for F in os.listdir(Root):
- self._CACHE_[F.upper()] = F
+ self._CACHE_.add(F)
+ self._UPPER_CACHE_[F.upper()] = F
# =[] operator
def __getitem__(self, Path):
@@ -330,16 +332,18 @@ class DirCache:
return self._Root
if Path and Path[0] == os.path.sep:
Path = Path[1:]
- Path = Path.upper()
if Path in self._CACHE_:
- return os.path.join(self._Root, self._CACHE_[Path])
+ return os.path.join(self._Root, Path)
+ UpperPath = Path.upper()
+ if UpperPath in self._UPPER_CACHE_:
+ return os.path.join(self._Root, self._UPPER_CACHE_[UpperPath])
IndexList = []
LastSepIndex = -1
SepIndex = Path.find(os.path.sep)
while SepIndex > -1:
- Parent = Path[:SepIndex]
- if Parent not in self._CACHE_:
+ Parent = UpperPath[:SepIndex]
+ if Parent not in self._UPPER_CACHE_:
break
LastSepIndex = SepIndex
SepIndex = Path.find(os.path.sep, LastSepIndex + 1)
@@ -351,22 +355,29 @@ class DirCache:
os.chdir(self._Root)
SepIndex = LastSepIndex
while SepIndex > -1:
- ParentKey = Path[:SepIndex]
- if ParentKey not in self._CACHE_:
+ Parent = Path[:SepIndex]
+ ParentKey = UpperPath[:SepIndex]
+ if ParentKey not in self._UPPER_CACHE_:
os.chdir(Cwd)
return None
- ParentDir = self._CACHE_[ParentKey]
+ if Parent in self._CACHE_:
+ ParentDir = Parent
+ else:
+ ParentDir = self._UPPER_CACHE_[ParentKey]
for F in os.listdir(ParentDir):
Dir = os.path.join(ParentDir, F)
- self._CACHE_[Dir.upper()] = Dir
+ self._CACHE_.add(Dir)
+ self._UPPER_CACHE_[Dir.upper()] = Dir
SepIndex = Path.find(os.path.sep, SepIndex + 1)
os.chdir(Cwd)
- if Path not in self._CACHE_:
- return None
- return os.path.join(self._Root, self._CACHE_[Path])
+ if Path in self._CACHE_:
+ return os.path.join(self._Root, Path)
+ elif UpperPath in self._UPPER_CACHE_:
+ return os.path.join(self._Root, self._UPPER_CACHE_[UpperPath])
+ return None
## Get all files of a directory
#
@@ -683,6 +694,7 @@ class TemplateString(object):
## Constructor
def __init__(self, Template=None):
self.String = ''
+ self.IsBinary = False
self._Template = Template
self._TemplateSectionList = self._Parse(Template)
diff --git a/BaseTools/Source/Python/CommonDataClass/CommonClass.py b/BaseTools/Source/Python/CommonDataClass/CommonClass.py
index 763550fe47..e226f1b0d6 100644
--- a/BaseTools/Source/Python/CommonDataClass/CommonClass.py
+++ b/BaseTools/Source/Python/CommonDataClass/CommonClass.py
@@ -174,7 +174,7 @@ class IncludeStatementClass(object):
# @var GuidTypeList: To store value for GuidTypeList, selection scope is in below list
# DATA_HUB_RECORD | EFI_EVENT | EFI_SYSTEM_CONFIGURATION_TABLE | EFI_VARIABLE | GUID | HII_PACKAGE_LIST | HOB | TOKEN_SPACE_GUID
# @var SupModuleList: To store value for SupModuleList, selection scope is in below list
-# BASE | SEC | PEI_CORE | PEIM | DXE_CORE | DXE_DRIVER | DXE_RUNTIME_DRIVER | DXE_SAL_DRIVER | DXE_SMM_DRIVER | UEFI_DRIVER | UEFI_APPLICATION | USER_DEFINED
+# BASE | SEC | PEI_CORE | PEIM | DXE_CORE | DXE_DRIVER | DXE_RUNTIME_DRIVER | DXE_SAL_DRIVER | DXE_SMM_DRIVER | UEFI_DRIVER | UEFI_APPLICATION | USER_DEFINED | SMM_CORE
#
class GuidProtocolPpiCommonClass(CommonClass):
def __init__(self):
@@ -202,7 +202,7 @@ class GuidProtocolPpiCommonClass(CommonClass):
# @var RecommendedInstance: To store value for RecommendedInstance, selection scope is in below list
# DATA_HUB_RECORD | EFI_EVENT | EFI_SYSTEM_CONFIGURATION_TABLE | EFI_VARIABLE | GUID | HII_PACKAGE_LIST | HOB | TOKEN_SPACE_GUID
# @var SupModuleList: To store value for SupModuleList, selection scope is in below list
-# BASE | SEC | PEI_CORE | PEIM | DXE_CORE | DXE_DRIVER | DXE_RUNTIME_DRIVER | DXE_SAL_DRIVER | DXE_SMM_DRIVER | UEFI_DRIVER | UEFI_APPLICATION | USER_DEFINED
+# BASE | SEC | PEI_CORE | PEIM | DXE_CORE | DXE_DRIVER | DXE_RUNTIME_DRIVER | DXE_SAL_DRIVER | DXE_SMM_DRIVER | UEFI_DRIVER | UEFI_APPLICATION | USER_DEFINED | SMM_CORE
#
class LibraryClassClass(CommonClass, DefineClass):
def __init__(self):
@@ -353,7 +353,7 @@ class PcdErrorClass(object):
# @var SkuInfoList: To store value for SkuInfoList
# It is a set structure as { [SkuIdName] : SkuInfoClass }
# @var SupModuleList: To store value for SupModuleList, selection scope is in below list
-# BASE | SEC | PEI_CORE | PEIM | DXE_CORE | DXE_DRIVER | DXE_RUNTIME_DRIVER | DXE_SAL_DRIVER | DXE_SMM_DRIVER | UEFI_DRIVER | UEFI_APPLICATION | USER_DEFINED
+# BASE | SEC | PEI_CORE | PEIM | DXE_CORE | DXE_DRIVER | DXE_RUNTIME_DRIVER | DXE_SAL_DRIVER | DXE_SMM_DRIVER | UEFI_DRIVER | UEFI_APPLICATION | USER_DEFINED | SMM_CORE
#
class PcdClass(CommonClass):
def __init__(self, CName = '', Token = '', TokenSpaceGuidCName = '', DatumType = '', MaxDatumSize = '', DefaultValue = '', ItemType = '', ValidUsage = None, SkuInfoList = None, SupModuleList = None):
diff --git a/BaseTools/Source/Python/CommonDataClass/ModuleClass.py b/BaseTools/Source/Python/CommonDataClass/ModuleClass.py
index 9d780725b9..49d052dc45 100644
--- a/BaseTools/Source/Python/CommonDataClass/ModuleClass.py
+++ b/BaseTools/Source/Python/CommonDataClass/ModuleClass.py
@@ -121,7 +121,7 @@ class ModuleSourceFileClass(CommonClass):
#
# @var BinaryFile: To store value for BinaryFile
# @var FileType: To store value for FileType, selection scope is in below list
-# FW | GUID | PREEFORM | UEFI_APP | UNI_UI | UNI_VER | LIB | PE32 | PIC | PEI_DEPEX | DXE_DEPEX | TE | VER | UI | BIN | FV
+# FW | GUID | PREEFORM | UEFI_APP | UNI_UI | UNI_VER | LIB | PE32 | PIC | PEI_DEPEX | DXE_DEPEX | SMM_DEPEX| TE | VER | UI | BIN | FV
# @var Target: To store value for Target
# @var ToolChainFamily: To store value for ToolChainFamily
#
diff --git a/BaseTools/Source/Python/CommonDataClass/PackageClass.py b/BaseTools/Source/Python/CommonDataClass/PackageClass.py
index c064f25ddb..1382b80839 100644
--- a/BaseTools/Source/Python/CommonDataClass/PackageClass.py
+++ b/BaseTools/Source/Python/CommonDataClass/PackageClass.py
@@ -62,7 +62,7 @@ class PackageIndustryStdHeaderClass(CommonClass):
#
# @var IncludeHeader: To store value for IncludeHeader
# @var ModuleType: To store value for ModuleType, it is a set structure as
-# BASE | SEC | PEI_CORE | PEIM | DXE_CORE | DXE_DRIVER | DXE_RUNTIME_DRIVER | DXE_SAL_DRIVER | DXE_SMM_DRIVER | TOOL | UEFI_DRIVER | UEFI_APPLICATION | USER_DEFINED
+# BASE | SEC | PEI_CORE | PEIM | DXE_CORE | DXE_DRIVER | DXE_RUNTIME_DRIVER | DXE_SAL_DRIVER | DXE_SMM_DRIVER | TOOL | UEFI_DRIVER | UEFI_APPLICATION | USER_DEFINED | SMM_CORE
#
class PackageIncludePkgHeaderClass(object):
def __init__(self):
diff --git a/BaseTools/Source/Python/GenFds/DepexSection.py b/BaseTools/Source/Python/GenFds/DepexSection.py
index 1c8c82a72e..a0a1905dfa 100644
--- a/BaseTools/Source/Python/GenFds/DepexSection.py
+++ b/BaseTools/Source/Python/GenFds/DepexSection.py
@@ -80,23 +80,27 @@ class DepexSection (DepexSectionClassObject):
self.Expression = self.Expression.replace(Item, ExpGuidDict[Item])
self.Expression = self.Expression.strip()
- ModuleType = (self.DepexType.startswith('PEI') and ['PEIM'] or ['DXE_DRIVER'])[0]
- if self.DepexType.startswith('SMM'):
- ModuleType = 'SMM_DRIVER'
- InputFile = os.path.join (OutputPath, ModuleName + 'SEC' + SecNum + '.dpx')
- InputFile = os.path.normpath(InputFile)
+ if self.DepexType == 'PEI_DEPEX_EXP':
+ ModuleType = 'PEIM'
+ SecType = 'PEI_DEPEX'
+ elif self.DepexType == 'DXE_DEPEX_EXP':
+ ModuleType = 'DXE_DRIVER'
+ SecType = 'DXE_DEPEX'
+ elif self.DepexType == 'SMM_DEPEX_EXP':
+ ModuleType = 'DXE_SMM_DRIVER'
+ SecType = 'SMM_DEPEX'
+ else:
+ EdkLogger.error("GenFds", FORMAT_INVALID,
+ "Depex type %s is not valid for module %s" % (self.DepexType, ModuleName))
- Dpx = DependencyExpression(self.Expression, ModuleType)
- Dpx.Generate(InputFile)
+ InputFile = os.path.join (OutputPath, ModuleName + 'SEC' + SecNum + '.depex')
+ InputFile = os.path.normpath(InputFile)
+ Depex = DependencyExpression(self.Expression, ModuleType)
+ Depex.Generate(InputFile)
- OutputFile = os.path.join (OutputPath, ModuleName + 'SEC' + SecNum + '.depex')
- if self.DepexType.startswith('SMM'):
- OutputFile = os.path.join (OutputPath, ModuleName + 'SEC' + SecNum + '.smm')
+ OutputFile = os.path.join (OutputPath, ModuleName + 'SEC' + SecNum + '.dpx')
OutputFile = os.path.normpath(OutputFile)
- SecType = (self.DepexType.startswith('PEI') and ['PEI_DEPEX'] or ['DXE_DEPEX'])[0]
- if self.DepexType.startswith('SMM'):
- SecType = 'SMM_DEPEX'
-
+
GenFdsGlobalVariable.GenerateSection(OutputFile, [InputFile], Section.Section.SectionType.get (SecType))
FileList = [OutputFile]
return FileList, self.Alignment
diff --git a/BaseTools/Source/Python/GenFds/Fd.py b/BaseTools/Source/Python/GenFds/Fd.py
index 370008c918..26de500d9b 100644
--- a/BaseTools/Source/Python/GenFds/Fd.py
+++ b/BaseTools/Source/Python/GenFds/Fd.py
@@ -65,6 +65,33 @@ class FD(FDClassObject):
GenFdsGlobalVariable.VerboseLogger('################### Gen VTF ####################')
self.GenVtfFile()
+ TempFdBuffer = StringIO.StringIO('')
+ PreviousRegionStart = -1
+ PreviousRegionSize = 1
+
+ for RegionObj in self.RegionList :
+ if RegionObj.RegionType == 'CAPSULE':
+ continue
+ if RegionObj.Offset + RegionObj.Size <= PreviousRegionStart:
+ pass
+ elif RegionObj.Offset <= PreviousRegionStart or (RegionObj.Offset >=PreviousRegionStart and RegionObj.Offset < PreviousRegionStart + PreviousRegionSize):
+ pass
+ elif RegionObj.Offset > PreviousRegionStart + PreviousRegionSize:
+ GenFdsGlobalVariable.InfLogger('Padding region starting from offset 0x%X, with size 0x%X' %(PreviousRegionStart + PreviousRegionSize, RegionObj.Offset - (PreviousRegionStart + PreviousRegionSize)))
+ PadRegion = Region.Region()
+ PadRegion.Offset = PreviousRegionStart + PreviousRegionSize
+ PadRegion.Size = RegionObj.Offset - PadRegion.Offset
+ PadRegion.AddToBuffer(TempFdBuffer, self.BaseAddress, self.BlockSizeList, self.ErasePolarity, GenFds.ImageBinDict, self.vtfRawDict, self.DefineVarDict)
+ PreviousRegionStart = RegionObj.Offset
+ PreviousRegionSize = RegionObj.Size
+ #
+ # Call each region's AddToBuffer function
+ #
+ if PreviousRegionSize > self.Size:
+ pass
+ GenFdsGlobalVariable.VerboseLogger('Call each region\'s AddToBuffer function')
+ RegionObj.AddToBuffer (TempFdBuffer, self.BaseAddress, self.BlockSizeList, self.ErasePolarity, GenFds.ImageBinDict, self.vtfRawDict, self.DefineVarDict)
+
FdBuffer = StringIO.StringIO('')
PreviousRegionStart = -1
PreviousRegionSize = 1
diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py
index 07de92610a..24732a0d5e 100644
--- a/BaseTools/Source/Python/GenFds/FdfParser.py
+++ b/BaseTools/Source/Python/GenFds/FdfParser.py
@@ -1877,6 +1877,14 @@ class FdfParser:
self.__GetFvNameGuid(FvObj)
+ FvObj.FvExtEntryTypeValue = []
+ FvObj.FvExtEntryType = []
+ FvObj.FvExtEntryData = []
+ while True:
+ isFvExtEntry = self.__GetFvExtEntryStatement(FvObj)
+ if not isFvExtEntry:
+ break
+
self.__GetAprioriSection(FvObj, FvObj.DefineVarDict.copy())
self.__GetAprioriSection(FvObj, FvObj.DefineVarDict.copy())
@@ -1970,6 +1978,79 @@ class FdfParser:
return
+ def __GetFvExtEntryStatement(self, FvObj):
+
+ if not self.__IsKeyword( "FV_EXT_ENTRY"):
+ return False
+
+ if not self.__IsKeyword ("TYPE"):
+ raise Warning("expected 'TYPE'", self.FileName, self.CurrentLineNumber)
+
+ if not self.__IsToken( "="):
+ raise Warning("expected '='", self.FileName, self.CurrentLineNumber)
+
+ if not self.__GetNextHexNumber() and not self.__GetNextDecimalNumber():
+ raise Warning("expected Hex FV extension entry type value At Line ", self.FileName, self.CurrentLineNumber)
+
+ FvObj.FvExtEntryTypeValue += [self.__Token]
+
+ if not self.__IsToken( "{"):
+ raise Warning("expected '{'", self.FileName, self.CurrentLineNumber)
+
+ if not self.__IsKeyword ("FILE") and not self.__IsKeyword ("DATA"):
+ raise Warning("expected 'FILE' or 'DATA'", self.FileName, self.CurrentLineNumber)
+
+ FvObj.FvExtEntryType += [self.__Token]
+
+ if self.__Token == 'DATA':
+
+ if not self.__IsToken( "="):
+ raise Warning("expected '='", self.FileName, self.CurrentLineNumber)
+
+ if not self.__IsToken( "{"):
+ raise Warning("expected '{'", self.FileName, self.CurrentLineNumber)
+
+ if not self.__GetNextHexNumber():
+ raise Warning("expected Hex byte", self.FileName, self.CurrentLineNumber)
+
+ if len(self.__Token) > 4:
+ raise Warning("Hex byte(must be 2 digits) too long", self.FileName, self.CurrentLineNumber)
+
+ DataString = self.__Token
+ DataString += ","
+
+ while self.__IsToken(","):
+ if not self.__GetNextHexNumber():
+ raise Warning("Invalid Hex number", self.FileName, self.CurrentLineNumber)
+ if len(self.__Token) > 4:
+ raise Warning("Hex byte(must be 2 digits) too long", self.FileName, self.CurrentLineNumber)
+ DataString += self.__Token
+ DataString += ","
+
+ if not self.__IsToken( "}"):
+ raise Warning("expected '}'", self.FileName, self.CurrentLineNumber)
+
+ if not self.__IsToken( "}"):
+ raise Warning("expected '}'", self.FileName, self.CurrentLineNumber)
+
+ DataString = DataString.rstrip(",")
+ FvObj.FvExtEntryData += [DataString]
+
+ if self.__Token == 'FILE':
+
+ if not self.__IsToken( "="):
+ raise Warning("expected '='", self.FileName, self.CurrentLineNumber)
+
+ if not self.__GetNextToken():
+ raise Warning("expected FV Extension Entry file path At Line ", self.FileName, self.CurrentLineNumber)
+
+ FvObj.FvExtEntryData += [self.__Token]
+
+ if not self.__IsToken( "}"):
+ raise Warning("expected '}'", self.FileName, self.CurrentLineNumber)
+
+ return True
+
## __GetAprioriSection() method
#
# Get token statements
@@ -2683,15 +2764,31 @@ class FdfParser:
# @param Obj for whom token statements are got
#
def __GetCapsuleTokens(self, Obj):
-
- if not self.__IsKeyword("CAPSULE_GUID"):
- raise Warning("expected 'CAPSULE_GUID'", self.FileName, self.CurrentLineNumber)
-
- while self.__CurrentLine().find("=") != -1:
- NameValue = self.__CurrentLine().split("=")
- Obj.TokensDict[NameValue[0].strip()] = NameValue[1].strip()
- self.CurrentLineNumber += 1
- self.CurrentOffsetWithinLine = 0
+ if not self.__GetNextToken():
+ return False
+ while self.__Token in ("CAPSULE_GUID", "CAPSULE_HEADER_SIZE", "CAPSULE_FLAGS"):
+ Name = self.__Token.strip()
+ if not self.__IsToken("="):
+ raise Warning("expected '='", self.FileName, self.CurrentLineNumber)
+ if not self.__GetNextToken():
+ raise Warning("expected value", self.FileName, self.CurrentLineNumber)
+ if Name == 'CAPSULE_FLAGS':
+ if not self.__Token in ("PersistAcrossReset", "PopulateSystemTable", "InitiateReset"):
+ raise Warning("expected PersistAcrossReset, PopulateSystemTable, or InitiateReset", self.FileName, self.CurrentLineNumber)
+ Value = self.__Token.strip()
+ while self.__IsToken(","):
+ Value += ','
+ if not self.__GetNextToken():
+ raise Warning("expected value", self.FileName, self.CurrentLineNumber)
+ if not self.__Token in ("PersistAcrossReset", "PopulateSystemTable", "InitiateReset"):
+ raise Warning("expected PersistAcrossReset, PopulateSystemTable, or InitiateReset", self.FileName, self.CurrentLineNumber)
+ Value += self.__Token.strip()
+ else:
+ Value = self.__Token.strip()
+ Obj.TokensDict[Name] = Value
+ if not self.__GetNextToken():
+ return False
+ self.__UndoToken()
## __GetCapsuleData() method
#
@@ -2815,7 +2912,7 @@ class FdfParser:
"DXE_SMM_DRIVER", "DXE_RUNTIME_DRIVER", \
"UEFI_DRIVER", "UEFI_APPLICATION", "USER_DEFINED", "DEFAULT", "BASE", \
"SECURITY_CORE", "COMBINED_PEIM_DRIVER", "PIC_PEIM", "RELOCATABLE_PEIM", \
- "PE32_PEIM", "BS_DRIVER", "RT_DRIVER", "SAL_RT_DRIVER", "APPLICATION", "ACPITABLE", "SMM_DRIVER", "SMM_CORE"):
+ "PE32_PEIM", "BS_DRIVER", "RT_DRIVER", "SAL_RT_DRIVER", "APPLICATION", "ACPITABLE", "SMM_CORE"):
raise Warning("Unknown Module type '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)
return self.__Token
@@ -2859,7 +2956,7 @@ class FdfParser:
Type = self.__Token.strip().upper()
if Type not in ("RAW", "FREEFORM", "SEC", "PEI_CORE", "PEIM",\
- "PEI_DXE_COMBO", "DRIVER", "DXE_CORE", "APPLICATION", "FV_IMAGE", "SMM_DXE_COMBO", "SMM", "SMM_CORE"):
+ "PEI_DXE_COMBO", "DRIVER", "DXE_CORE", "APPLICATION", "FV_IMAGE", "SMM", "SMM_CORE"):
raise Warning("Unknown FV type '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)
if not self.__IsToken("="):
@@ -3238,8 +3335,8 @@ class FdfParser:
elif SectionType == "RAW":
if FileType not in ("BIN", "SEC_BIN", "RAW", "ASL", "ACPI"):
raise Warning("Incorrect section file type '%s'" % FileType, self.FileName, self.CurrentLineNumber)
- elif SectionType == "DXE_DEPEX":
- if FileType not in ("DXE_DEPEX", "SEC_DXE_DEPEX"):
+ elif SectionType == "DXE_DEPEX" or SectionType == "SMM_DEPEX":
+ if FileType not in ("DXE_DEPEX", "SEC_DXE_DEPEX", "SMM_DEPEX"):
raise Warning("Incorrect section file type '%s'" % FileType, self.FileName, self.CurrentLineNumber)
elif SectionType == "UI":
if FileType not in ("UI", "SEC_UI"):
diff --git a/BaseTools/Source/Python/GenFds/Ffs.py b/BaseTools/Source/Python/GenFds/Ffs.py
index aaa791763b..438bd186dc 100644
--- a/BaseTools/Source/Python/GenFds/Ffs.py
+++ b/BaseTools/Source/Python/GenFds/Ffs.py
@@ -34,7 +34,6 @@ class Ffs(FDClassObject):
'DXE_RUNTIME_DRIVER': 'EFI_FV_FILETYPE_DRIVER',
'UEFI_DRIVER' : 'EFI_FV_FILETYPE_DRIVER',
'UEFI_APPLICATION' : 'EFI_FV_FILETYPE_APPLICATION',
- 'SMM_DRIVER' : 'EFI_FV_FILETYPE_SMM',
'SMM_CORE' : 'EFI_FV_FILETYPE_SMM_CORE'
}
@@ -50,7 +49,6 @@ class Ffs(FDClassObject):
'FV_IMAGE' : 'EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE',
'RAW' : 'EFI_FV_FILETYPE_RAW',
'PEI_DXE_COMBO' : 'EFI_FV_FILETYPE_COMBINED_PEIM_DRIVER',
- 'SMM_DXE_COMBO' : 'EFI_FV_FILETYPE_COMBINED_SMM_DXE',
'SMM' : 'EFI_FV_FILETYPE_SMM',
'SMM_CORE' : 'EFI_FV_FILETYPE_SMM_CORE'
}
@@ -70,7 +68,7 @@ class Ffs(FDClassObject):
'COMPRESS' : '.com',
'GUIDED' : '.guided',
'PEI_DEPEX' : '.dpx',
- 'SMM_DEPEX' : '.smm'
+ 'SMM_DEPEX' : '.dpx'
}
## The constructor
diff --git a/BaseTools/Source/Python/GenFds/FfsInfStatement.py b/BaseTools/Source/Python/GenFds/FfsInfStatement.py
index 0dcd96da2e..ac13e4d7d9 100644
--- a/BaseTools/Source/Python/GenFds/FfsInfStatement.py
+++ b/BaseTools/Source/Python/GenFds/FfsInfStatement.py
@@ -47,6 +47,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
self.KeepRelocFromRule = None
self.InDsc = True
self.OptRomDefs = {}
+ self.PiSpecVersion = 0
## __InfParse() method
#
@@ -89,6 +90,8 @@ class FfsInfStatement(FfsInfStatementClassObject):
self.BaseName = Inf.BaseName
self.ModuleGuid = Inf.Guid
self.ModuleType = Inf.ModuleType
+ if Inf.Specification != None and 'PI_SPECIFICATION_VERSION' in Inf.Specification:
+ self.PiSpecVersion = Inf.Specification['PI_SPECIFICATION_VERSION']
if Inf.AutoGenVersion < 0x00010005:
self.ModuleType = Inf.ComponentType
self.VersionString = Inf.Version
@@ -102,6 +105,8 @@ class FfsInfStatement(FfsInfStatementClassObject):
self.BaseName = Inf.BaseName
self.ModuleGuid = Inf.Guid
self.ModuleType = Inf.ModuleType
+ if Inf.Specification != None and 'PI_SPECIFICATION_VERSION' in Inf.Specification:
+ self.PiSpecVersion = Inf.Specification['PI_SPECIFICATION_VERSION']
self.VersionString = Inf.Version
self.BinFileList = Inf.Binaries
self.SourceFileList = Inf.Sources
@@ -113,6 +118,9 @@ class FfsInfStatement(FfsInfStatementClassObject):
if len(self.SourceFileList) != 0 and not self.InDsc:
EdkLogger.warn("GenFds", GENFDS_ERROR, "Module %s NOT found in DSC file; Is it really a binary module?" % (self.InfFileName))
+ if self.ModuleType == 'SMM_CORE' and self.PiSpecVersion < 0x0001000A:
+ EdkLogger.error("GenFds", FORMAT_NOT_SUPPORTED, "SMM_CORE module type can't be used in the module with PI_SPECIFICATION_VERSION less than 0x0001000A", File=self.InfFileName)
+
if Inf._Defs != None and len(Inf._Defs) > 0:
self.OptRomDefs.update(Inf._Defs)
@@ -153,7 +161,18 @@ class FfsInfStatement(FfsInfStatementClassObject):
#
Rule = self.__GetRule__()
GenFdsGlobalVariable.VerboseLogger( "Packing binaries from inf file : %s" %self.InfFileName)
- #FileType = Ffs.Ffs.ModuleTypeToFileType[Rule.ModuleType]
+ #
+ # Convert Fv File Type for PI1.1 SMM driver.
+ #
+ if self.ModuleType == 'DXE_SMM_DRIVER' and self.PiSpecVersion >= 0x0001000A:
+ if Rule.FvFileType == 'DRIVER':
+ Rule.FvFileType = 'SMM'
+ #
+ # Framework SMM Driver has no SMM FV file type
+ #
+ if self.ModuleType == 'DXE_SMM_DRIVER' and self.PiSpecVersion < 0x0001000A:
+ if Rule.FvFileType == 'SMM' or Rule.FvFileType == 'SMM_CORE':
+ EdkLogger.error("GenFds", FORMAT_NOT_SUPPORTED, "Framework SMM module doesn't support SMM or SMM_CORE FV file type", File=self.InfFileName)
#
# For the rule only has simpleFile
#
@@ -380,7 +399,19 @@ class FfsInfStatement(FfsInfStatementClassObject):
FileList, IsSect = Section.Section.GetFileList(self, '', Rule.FileExtension)
Index = 1
- SectionType = Rule.SectionType
+ SectionType = Rule.SectionType
+ #
+ # Convert Fv Section Type for PI1.1 SMM driver.
+ #
+ if self.ModuleType == 'DXE_SMM_DRIVER' and self.PiSpecVersion >= 0x0001000A:
+ if SectionType == 'DXE_DEPEX':
+ SectionType = 'SMM_DEPEX'
+ #
+ # Framework SMM Driver has no SMM_DEPEX section type
+ #
+ if self.ModuleType == 'DXE_SMM_DRIVER' and self.PiSpecVersion < 0x0001000A:
+ if SectionType == 'SMM_DEPEX':
+ EdkLogger.error("GenFds", FORMAT_NOT_SUPPORTED, "Framework SMM module doesn't support SMM_DEPEX section type", File=self.InfFileName)
NoStrip = True
if self.ModuleType in ('SEC', 'PEI_CORE', 'PEIM'):
if self.KeepReloc != None:
@@ -517,6 +548,18 @@ class FfsInfStatement(FfsInfStatementClassObject):
for Sect in Rule.SectionList:
SecIndex = '%d' %Index
SectList = []
+ #
+ # Convert Fv Section Type for PI1.1 SMM driver.
+ #
+ if self.ModuleType == 'DXE_SMM_DRIVER' and self.PiSpecVersion >= 0x0001000A:
+ if Sect.SectionType == 'DXE_DEPEX':
+ Sect.SectionType = 'SMM_DEPEX'
+ #
+ # Framework SMM Driver has no SMM_DEPEX section type
+ #
+ if self.ModuleType == 'DXE_SMM_DRIVER' and self.PiSpecVersion < 0x0001000A:
+ if Sect.SectionType == 'SMM_DEPEX':
+ EdkLogger.error("GenFds", FORMAT_NOT_SUPPORTED, "Framework SMM module doesn't support SMM_DEPEX section type", File=self.InfFileName)
if Rule.KeyStringList != []:
SectList, Align = Sect.GenSection(self.OutputPath , self.ModuleGuid, SecIndex, Rule.KeyStringList, self)
else :
diff --git a/BaseTools/Source/Python/GenFds/Fv.py b/BaseTools/Source/Python/GenFds/Fv.py
index 23ec58200b..a9ff26e597 100644
--- a/BaseTools/Source/Python/GenFds/Fv.py
+++ b/BaseTools/Source/Python/GenFds/Fv.py
@@ -19,6 +19,7 @@ import os
import shutil
import subprocess
import StringIO
+from struct import *
import Ffs
import AprioriSection
@@ -70,8 +71,8 @@ class FV (FvClassObject):
# If yes, return error. Doesn't support FV in Capsule image is also in FD flash region.
#
if self.CapsuleName != None:
- for FdName in GenFdsGlobalVariable.FdfParser.Profile.FdDict.keys():
- FdObj = GenFdsGlobalVariable.FdfParser.Profile.FdDict[FdName]
+ for FdName in GenFdsGlobalVariable.FdfParser.Profile.FdDict.keys():
+ FdObj = GenFdsGlobalVariable.FdfParser.Profile.FdDict[FdName]
for RegionObj in FdObj.RegionList:
if RegionObj.RegionType == 'FV':
for RegionData in RegionObj.RegionDataList:
@@ -215,19 +216,81 @@ class FV (FvClassObject):
self.FvAlignment.strip() + \
" = TRUE" + \
T_CHAR_LF)
-
- if self.FvNameGuid != None:
- self.FvInfFile.writelines("EFI_FVNAME_GUID" + \
- " = %s" % self.FvNameGuid + \
- T_CHAR_LF)
+
#
- # Add [Files]
+ # Generate FV extension header file
#
+ if self.FvNameGuid == None or self.FvNameGuid == '':
+ if len(self.FvExtEntryType) > 0:
+ GenFdsGlobalVariable.ErrorLogger("FV Extension Header Entries declared for %s with no FvNameGuid declaration." % (self.UiFvName))
+
+ if self.FvNameGuid <> None and self.FvNameGuid <> '':
+ TotalSize = 16 + 4
+ Buffer = ''
+ for Index in range (0, len(self.FvExtEntryType)):
+ if self.FvExtEntryType[Index] == 'FILE':
+ # check if the path is absolute or relative
+ if os.path.isabs(self.FvExtEntryData[Index]):
+ FileFullPath = os.path.normpath(self.FvExtEntryData[Index])
+ else:
+ FileFullPath = os.path.normpath(os.path.join(GenFdsGlobalVariable.WorkSpaceDir, self.FvExtEntryData[Index]))
+ # check if the file path exists or not
+ if not os.path.isfile(FileFullPath):
+ GenFdsGlobalVariable.ErrorLogger("Error opening FV Extension Header Entry file %s." % (self.FvExtEntryData[Index]))
+ FvExtFile = open (FileFullPath,'rb')
+ FvExtFile.seek(0,2)
+ Size = FvExtFile.tell()
+ if Size >= 0x10000:
+ GenFdsGlobalVariable.ErrorLogger("The size of FV Extension Header Entry file %s exceeds 0x10000." % (self.FvExtEntryData[Index]))
+ TotalSize += (Size + 4)
+ FvExtFile.seek(0)
+ Buffer += pack('HH', (Size + 4), int(self.FvExtEntryTypeValue[Index], 16))
+ Buffer += FvExtFile.read()
+ FvExtFile.close()
+ if self.FvExtEntryType[Index] == 'DATA':
+ ByteList = self.FvExtEntryData[Index].split(',')
+ Size = len (ByteList)
+ if Size >= 0x10000:
+ GenFdsGlobalVariable.ErrorLogger("The size of FV Extension Header Entry data %s exceeds 0x10000." % (self.FvExtEntryData[Index]))
+ TotalSize += (Size + 4)
+ Buffer += pack('HH', (Size + 4), int(self.FvExtEntryTypeValue[Index], 16))
+ for Index1 in range (0, Size):
+ Buffer += pack('B', int(ByteList[Index1], 16))
+
+ Guid = self.FvNameGuid.split('-')
+ Buffer = pack('LHHBBBBBBBBL',
+ int(Guid[0], 16),
+ int(Guid[1], 16),
+ int(Guid[2], 16),
+ int(Guid[3][-4:-2], 16),
+ int(Guid[3][-2:], 16),
+ int(Guid[4][-12:-10], 16),
+ int(Guid[4][-10:-8], 16),
+ int(Guid[4][-8:-6], 16),
+ int(Guid[4][-6:-4], 16),
+ int(Guid[4][-4:-2], 16),
+ int(Guid[4][-2:], 16),
+ TotalSize
+ ) + Buffer
+
+ #
+ # Generate FV extension header file if the total size is not zero
+ #
+ if TotalSize > 0:
+ FvExtHeaderFileName = os.path.join(GenFdsGlobalVariable.FvDir, self.UiFvName + '.ext')
+ FvExtHeaderFile = open (FvExtHeaderFileName,'wb')
+ FvExtHeaderFile.write(Buffer)
+ FvExtHeaderFile.close()
+ self.FvInfFile.writelines("EFI_FV_EXT_HEADER_FILE_NAME = " + \
+ FvExtHeaderFileName + \
+ T_CHAR_LF)
+
+ #
+ # Add [Files]
+ #
self.FvInfFile.writelines("[files]" + T_CHAR_LF)
if VtfDict != None and self.UiFvName in VtfDict.keys():
self.FvInfFile.writelines("EFI_FILE_NAME = " + \
VtfDict.get(self.UiFvName) + \
T_CHAR_LF)
-
-
diff --git a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
index 77c8821a05..b54e8c88e2 100644
--- a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
+++ b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
@@ -294,10 +294,7 @@ class GenFdsGlobalVariable:
@staticmethod
def GenerateOptionRom(Output, EfiInput, BinaryInput, Compress=False, ClassCode=None,
Revision=None, DeviceId=None, VendorId=None):
-# if not GenFdsGlobalVariable.NeedsUpdate(Output, Input):
-# return
-# GenFdsGlobalVariable.DebugLogger(EdkLogger.DEBUG_5, "%s needs update because of newer %s" % (Output, Input))
-
+ InputList = []
Cmd = ["EfiRom"]
if len(EfiInput) > 0:
@@ -308,11 +305,18 @@ class GenFdsGlobalVariable:
for EfiFile in EfiInput:
Cmd += [EfiFile]
+ InputList.append (EfiFile)
if len(BinaryInput) > 0:
Cmd += ["-b"]
for BinFile in BinaryInput:
Cmd += [BinFile]
+ InputList.append (BinFile)
+
+ # Check List
+ if not GenFdsGlobalVariable.NeedsUpdate(Output, InputList):
+ return
+ GenFdsGlobalVariable.DebugLogger(EdkLogger.DEBUG_5, "%s needs update because of newer %s" % (Output, InputList))
if ClassCode != None:
Cmd += ["-l", ClassCode]
diff --git a/BaseTools/Source/Python/GenFds/Section.py b/BaseTools/Source/Python/GenFds/Section.py
index ffca3a11fe..1905935ebf 100644
--- a/BaseTools/Source/Python/GenFds/Section.py
+++ b/BaseTools/Source/Python/GenFds/Section.py
@@ -129,7 +129,7 @@ class Section (SectionClassObject):
if FileType != None:
for File in FfsInf.BinFileList:
if File.Arch == "COMMON" or FfsInf.CurrentArch == File.Arch:
- if File.Type == FileType:
+ if File.Type == FileType or (FfsInf.PiSpecVersion >= 0x0001000A and FileType == 'DXE_DPEX'and File.Type == 'SMM_DEPEX'):
if '*' in FfsInf.TargetOverrideList or File.Target == '*' or File.Target in FfsInf.TargetOverrideList or FfsInf.TargetOverrideList == []:
FileList.append(File.Path)
else:
diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/Source/Python/Workspace/MetaFileParser.py
index 40eb82656d..cf165ff507 100644
--- a/BaseTools/Source/Python/Workspace/MetaFileParser.py
+++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py
@@ -824,7 +824,7 @@ class DscParser(MetaFileParser):
# [PcdsDynamicHii]
#
def _PcdParser(self):
- TokenList = GetSplitValueList(self._CurrentLine, TAB_VALUE_SPLIT, 1)
+ TokenList = GetSplitValueList(ReplaceMacro(self._CurrentLine, self._Macros), TAB_VALUE_SPLIT, 1)
self._ValueList[0:1] = GetSplitValueList(TokenList[0], TAB_SPLIT)
if len(TokenList) == 2:
self._ValueList[2] = TokenList[1]
@@ -1109,7 +1109,8 @@ class DecParser(MetaFileParser):
if not IsValid:
EdkLogger.error('Parser', FORMAT_INVALID, Cause, ExtraData=self._CurrentLine,
File=self.MetaFile, Line=self._LineIndex+1)
- self._ValueList[2] = TokenList[1]
+
+ self._ValueList[2] = ValueList[0].strip() + '|' + ValueList[1].strip() + '|' + ValueList[2].strip()
_SectionParser = {
MODEL_META_DATA_HEADER : MetaFileParser._DefineParser,
diff --git a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
index 348d219aa9..2f2e8126c8 100644
--- a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
+++ b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
@@ -1111,7 +1111,7 @@ class InfBuildData(ModuleBuildClassObject):
"BS_DRIVER" : "DXE_DRIVER",
"RT_DRIVER" : "DXE_RUNTIME_DRIVER",
"SAL_RT_DRIVER" : "DXE_SAL_DRIVER",
- "SMM_DRIVER" : "SMM_DRIVER",
+ # "SMM_DRIVER" : "DXE_SMM_DRIVER",
# "BS_DRIVER" : "DXE_SMM_DRIVER",
# "BS_DRIVER" : "UEFI_DRIVER",
"APPLICATION" : "UEFI_APPLICATION",
@@ -1198,6 +1198,7 @@ class InfBuildData(ModuleBuildClassObject):
self._Pcds = None
self._BuildOptions = None
self._Depex = None
+ self._DepexExpression = None
#self._SourceOverridePath = None
## Get architecture
@@ -1317,9 +1318,15 @@ class InfBuildData(ModuleBuildClassObject):
if not self._ModuleType:
EdkLogger.error("build", ATTRIBUTE_NOT_AVAILABLE,
"MODULE_TYPE is not given", File=self.MetaFile)
+ if (self._Specification == None) or (not 'PI_SPECIFICATION_VERSION' in self._Specification) or (self._Specification['PI_SPECIFICATION_VERSION'] < 0x0001000A):
+ if self._ModuleType == SUP_MODULE_SMM_CORE:
+ EdkLogger.error("build", FORMAT_NOT_SUPPORTED, "SMM_CORE module type can't be used in the module with PI_SPECIFICATION_VERSION less than 0x0001000A", File=self.MetaFile)
if self._Defs and 'PCI_DEVICE_ID' in self._Defs and 'PCI_VENDOR_ID' in self._Defs \
and 'PCI_CLASS_CODE' in self._Defs:
self._BuildType = 'UEFI_OPTIONROM'
+ elif self._Defs and 'UEFI_HII_RESOURCE_SECTION' in self._Defs \
+ and self._Defs['UEFI_HII_RESOURCE_SECTION'] == 'TRUE':
+ self._BuildType = 'UEFI_HII'
else:
self._BuildType = self._ModuleType.upper()
else:
@@ -1824,6 +1831,25 @@ class InfBuildData(ModuleBuildClassObject):
self._Depex[Arch, ModuleType] = Depex[Arch, ModuleType]
return self._Depex
+ ## Retrieve depedency expression
+ def _GetDepexExpression(self):
+ if self._DepexExpression == None:
+ self._DepexExpression = tdict(False, 2)
+ RecordList = self._RawData[MODEL_EFI_DEPEX, self._Arch]
+ DepexExpression = {}
+ for Record in RecordList:
+ Record = ReplaceMacros(Record, GlobalData.gEdkGlobal, False)
+ Arch = Record[3]
+ ModuleType = Record[4]
+ TokenList = Record[0].split()
+ if (Arch, ModuleType) not in DepexExpression:
+ DepexExpression[Arch, ModuleType] = ''
+ for Token in TokenList:
+ DepexExpression[Arch, ModuleType] = DepexExpression[Arch, ModuleType] + Token.strip() + ' '
+ for Arch, ModuleType in DepexExpression:
+ self._DepexExpression[Arch, ModuleType] = DepexExpression[Arch, ModuleType]
+ return self._DepexExpression
+
## Retrieve PCD for given type
def _GetPcd(self, Type):
Pcds = {}
@@ -1889,6 +1915,7 @@ class InfBuildData(ModuleBuildClassObject):
Pcd.TokenValue = PcdInPackage.TokenValue
Pcd.DatumType = PcdInPackage.DatumType
Pcd.MaxDatumSize = PcdInPackage.MaxDatumSize
+ Pcd.InfDefaultValue = Pcd.DefaultValue
if Pcd.DefaultValue in [None, '']:
Pcd.DefaultValue = PcdInPackage.DefaultValue
break
@@ -1936,6 +1963,7 @@ class InfBuildData(ModuleBuildClassObject):
Pcds = property(_GetPcds)
BuildOptions = property(_GetBuildOptions)
Depex = property(_GetDepex)
+ DepexExpression = property(_GetDepexExpression)
## Database
#
diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py
index 7d14e15420..5f470de926 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -676,7 +676,8 @@ class Build():
def __init__(self, Target, WorkspaceDir, Platform, Module, Arch, ToolChain,
BuildTarget, FlashDefinition, FdList=[], FvList=[],
MakefileType="nmake", SilentMode=False, ThreadNumber=2,
- SkipAutoGen=False, Reparse=False, SkuId=None):
+ SkipAutoGen=False, Reparse=False, SkuId=None,
+ ReportFile=None, ReportType=None):
self.WorkspaceDir = WorkspaceDir
self.Target = Target
@@ -695,6 +696,11 @@ class Build():
self.Reparse = Reparse
self.SkuId = SkuId
self.SpawnMode = True
+ self.ReportFile = ReportFile
+ if ReportType == None:
+ self.ReportType = ['ALL']
+ else:
+ self.ReportType = ReportType
self.TargetTxt = TargetTxtClassObject()
self.ToolDef = ToolDefClassObject()
@@ -954,7 +960,9 @@ class Build():
self.Fdf,
self.FdList,
self.FvList,
- self.SkuId
+ self.SkuId,
+ self.ReportFile,
+ self.ReportType
)
self.Progress.Stop("done!")
self._Build(self.Target, Wa)
@@ -980,7 +988,9 @@ class Build():
self.Fdf,
self.FdList,
self.FvList,
- self.SkuId
+ self.SkuId,
+ self.ReportFile,
+ self.ReportType
)
Wa.CreateMakeFile(False)
self.Progress.Stop("done!")
@@ -1018,7 +1028,9 @@ class Build():
self.Fdf,
self.FdList,
self.FvList,
- self.SkuId
+ self.SkuId,
+ self.ReportFile,
+ self.ReportType
)
Wa.CreateMakeFile(False)
@@ -1253,6 +1265,10 @@ def MyOptionParser():
Parser.add_option("-d", "--debug", action="store", type="int", help="Enable debug messages at specified level.")
Parser.add_option("-D", "--define", action="append", type="string", dest="Macros", help="Macro: \"Name [= Value]\".")
+ Parser.add_option("-y", "--report-file", action="store", dest="ReportFile", help="Put build report in specified file.")
+ Parser.add_option("-Y", "--report-type", action="append", type="choice", choices=['ALL','PCD',], dest="ReportType",
+ help="Flags that control the type of build report to generate. Must be one of [ALL, PCD]. To specify more flags, please repeat this option.")
+
(Opt, Args)=Parser.parse_args()
return (Opt, Args)
@@ -1358,7 +1374,8 @@ def Main():
Option.TargetArch, Option.ToolChain, Option.BuildTarget,
Option.FdfFile, Option.RomImage, Option.FvImage,
None, Option.SilentMode, Option.ThreadNumber,
- Option.SkipAutoGen, Option.Reparse, Option.SkuId)
+ Option.SkipAutoGen, Option.Reparse, Option.SkuId,
+ Option.ReportFile, Option.ReportType)
MyBuild.Launch()
#MyBuild.DumpBuildData()
except FatalError, X: