Discussion:
[edk2] [Patch] BaseTools: Added extern declaration for protocols/PPI/GUID in AutoGhen.h
Yingke Liu
2015-06-08 07:39:46 UTC
Permalink
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Source/Python/AutoGen/GenC.py | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py
index 9bdb036..e73ba79 100644
--- a/BaseTools/Source/Python/AutoGen/GenC.py
+++ b/BaseTools/Source/Python/AutoGen/GenC.py
@@ -1319,11 +1319,13 @@ def CreateGuidDefinitionCode(Info, AutoGenC, AutoGenH):

if Info.GuidList:
AutoGenC.Append("\n// Guids\n")
+ AutoGenH.Append("\n// Guids\n")
#
# GUIDs
#
for Key in Info.GuidList:
AutoGenC.Append('GLOBAL_REMOVE_IF_UNREFERENCED %s %s = %s;\n' % (GuidType, Key, Info.GuidList[Key]))
+ AutoGenH.Append('extern %s %s;\n' % (GuidType, Key))

## Create code for protocol
#
@@ -1342,11 +1344,13 @@ def CreateProtocolDefinitionCode(Info, AutoGenC, AutoGenH):

if Info.ProtocolList:
AutoGenC.Append("\n// Protocols\n")
+ AutoGenH.Append("\n// Protocols\n")
#
# Protocol GUIDs
#
for Key in Info.ProtocolList:
AutoGenC.Append('GLOBAL_REMOVE_IF_UNREFERENCED %s %s = %s;\n' % (GuidType, Key, Info.ProtocolList[Key]))
+ AutoGenH.Append('extern %s %s;\n' % (GuidType, Key))

## Create code for PPI
#
@@ -1365,11 +1369,13 @@ def CreatePpiDefinitionCode(Info, AutoGenC, AutoGenH):

if Info.PpiList:
AutoGenC.Append("\n// PPIs\n")
+ AutoGenH.Append("\n// PPIs\n")
#
# PPI GUIDs
#
for Key in Info.PpiList:
AutoGenC.Append('GLOBAL_REMOVE_IF_UNREFERENCED %s %s = %s;\n' % (GuidType, Key, Info.PpiList[Key]))
+ AutoGenH.Append('extern %s %s;\n' % (GuidType, Key))

## Create code for PCD
#
--
1.9.5.msysgit.0


------------------------------------------------------------------------------
Gao, Liming
2015-06-08 07:52:49 UTC
Permalink
Reviewed-by: Liming Gao <***@intel.com>

-----Original Message-----
From: Yingke Liu [mailto:***@intel.com]
Sent: Monday, June 08, 2015 3:40 PM
To: edk2-***@lists.sourceforge.net
Subject: [edk2] [Patch] BaseTools: Added extern declaration for protocols/PPI/GUID in AutoGhen.h

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Source/Python/AutoGen/GenC.py | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py
index 9bdb036..e73ba79 100644
--- a/BaseTools/Source/Python/AutoGen/GenC.py
+++ b/BaseTools/Source/Python/AutoGen/GenC.py
@@ -1319,11 +1319,13 @@ def CreateGuidDefinitionCode(Info, AutoGenC, AutoGenH):

if Info.GuidList:
AutoGenC.Append("\n// Guids\n")
+ AutoGenH.Append("\n// Guids\n")
#
# GUIDs
#
for Key in Info.GuidList:
AutoGenC.Append('GLOBAL_REMOVE_IF_UNREFERENCED %s %s = %s;\n' % (GuidType, Key, Info.GuidList[Key]))
+ AutoGenH.Append('extern %s %s;\n' % (GuidType, Key))

## Create code for protocol
#
@@ -1342,11 +1344,13 @@ def CreateProtocolDefinitionCode(Info, AutoGenC, AutoGenH):

if Info.ProtocolList:
AutoGenC.Append("\n// Protocols\n")
+ AutoGenH.Append("\n// Protocols\n")
#
# Protocol GUIDs
#
for Key in Info.ProtocolList:
AutoGenC.Append('GLOBAL_REMOVE_IF_UNREFERENCED %s %s = %s;\n' % (GuidType, Key, Info.ProtocolList[Key]))
+ AutoGenH.Append('extern %s %s;\n' % (GuidType, Key))

## Create code for PPI
#
@@ -1365,11 +1369,13 @@ def CreatePpiDefinitionCode(Info, AutoGenC, AutoGenH):

if Info.PpiList:
AutoGenC.Append("\n// PPIs\n")
+ AutoGenH.Append("\n// PPIs\n")
#
# PPI GUIDs
#
for Key in Info.PpiList:
AutoGenC.Append('GLOBAL_REMOVE_IF_UNREFERENCED %s %s = %s;\n' % (GuidType, Key, Info.PpiList[Key]))
+ AutoGenH.Append('extern %s %s;\n' % (GuidType, Key))

## Create code for PCD
#
--
1.9.5.msysgit.0
Yingke Liu
2015-06-09 05:30:54 UTC
Permalink
This patch makes sure the EFI file in $(BIN_DIR) is unique. If there are modules with same BaseName, the FILE_GUID is appended.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Conf/build_rule.template | 14 ++++++++------
BaseTools/Source/Python/AutoGen/AutoGen.py | 15 +++++++++++++++
BaseTools/Source/Python/AutoGen/GenMake.py | 4 ++++
3 files changed, 27 insertions(+), 6 deletions(-)

diff --git a/BaseTools/Conf/build_rule.template b/BaseTools/Conf/build_rule.template
index 3b054c4..596d41d 100644
--- a/BaseTools/Conf/build_rule.template
+++ b/BaseTools/Conf/build_rule.template
@@ -66,6 +66,8 @@
# $(LIBS) Static library files of current module
# $(<tool>_FLAGS) Tools flags of current module
# $(MODULE_NAME) Current module name
+# $(MODULE_NAME_GUID) Current module name with module FILE_GUID if same $(MODULE_NAME) exists
+# in different modules, otherwise its value is same as $(MODULE_NAME)
# $(MODULE_TYPE) Current module type
# $(MODULE_GUID) Current module guid
# $(ARCH) Architecture of current module
@@ -334,7 +336,7 @@
<Command.MSFT, Command.INTEL, Command.RVCT, Command.ARMGCC, Command.ARMLINUXGCC>
"$(GENFW)" -e $(MODULE_TYPE) -o ${dst} ${src} $(GENFW_FLAGS)
$(CP) ${dst} $(OUTPUT_DIR)
- $(CP) ${dst} $(BIN_DIR)
+ $(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).efi
-$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
-$(CP) $(DEBUG_DIR)(+)*.pdb $(OUTPUT_DIR)
<Command.GCC>
@@ -345,11 +347,11 @@
#The below 2 lines are only needed for UNIXGCC tool chain, which genereates PE image directly
#
-$(OBJCOPY) $(OBJCOPY_ADDDEBUGFLAG) ${src}
- -$(CP) $(DEBUG_DIR)(+)$(MODULE_NAME).debug $(BIN_DIR)
+ -$(CP) $(DEBUG_DIR)(+)$(MODULE_NAME).debug $(BIN_DIR)(+)$(MODULE_NAME_GUID).debug

"$(GENFW)" -e $(MODULE_TYPE) -o ${dst} ${src} $(GENFW_FLAGS)
$(CP) ${dst} $(OUTPUT_DIR)
- $(CP) ${dst} $(BIN_DIR)
+ $(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).efi
-$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)

<Command.XCODE>
@@ -359,7 +361,7 @@
-$(DSYMUTIL) ${src}
"$(GENFW)" -e $(MODULE_TYPE) -o ${dst} $(DEBUG_DIR)(+)$(MODULE_NAME).pecoff $(GENFW_FLAGS)
$(CP) ${dst} $(OUTPUT_DIR)
- $(CP) ${dst} $(BIN_DIR)
+ $(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).efi
-$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)

[Dependency-Expression-File]
@@ -516,7 +518,7 @@

<Command>
"$(GENFW)" -o ${dst} -j $(MICROCODE_BINARY_FILES) $(GENFW_FLAGS)
- -$(CP) ${dst} $(BIN_DIR)
+ -$(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).bin

[EFI-Image-File]
<InputFile>
@@ -542,7 +544,7 @@
?.efi, ?.EFI, ?.Efi

<OutputFile>
- $(BIN_DIR)(+)$(MODULE_NAME).rom
+ $(BIN_DIR)(+)$(MODULE_NAME_GUID).rom

<Command>
$(OPTROM) -i $(PCI_DEVICE_ID) -f $(PCI_VENDOR_ID) -l $(PCI_CLASS_CODE) -r $(PCI_REVISION) -o $dst $(OPTROM_FLAGS) $src
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index b2d9f6a..d1ed0a6 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -17,6 +17,7 @@ import Common.LongFilePathOs as os
import re
import os.path as path
import copy
+import uuid

import GenC
import GenMake
@@ -2285,12 +2286,26 @@ class ModuleAutoGen(AutoGen):

return self._FixedAtBuildPcds

+ def _GetUniqueBaseName(self):
+ BaseName = self.Name
+ for Module in self.PlatformInfo.ModuleAutoGenList:
+ if Module.MetaFile == self.MetaFile:
+ continue
+ if Module.Name == self.Name:
+ EdkLogger.warn('build', 'Modules have same BaseName:\n %s\n %s' % (Module.MetaFile, self.MetaFile))
+ if uuid.UUID(Module.Guid) == uuid.UUID(self.Guid):
+ EdkLogger.error("build", FILE_DUPLICATED, 'Modules have same BaseName and FILE_GUID:\n'
+ ' %s\n %s' % (Module.MetaFile, self.MetaFile))
+ BaseName = '%s_%s' % (self.Name, self.Guid)
+ return BaseName
+
# Macros could be used in build_rule.txt (also Makefile)
def _GetMacros(self):
if self._Macro == None:
self._Macro = sdict()
self._Macro["WORKSPACE" ] = self.WorkspaceDir
self._Macro["MODULE_NAME" ] = self.Name
+ self._Macro["MODULE_NAME_GUID" ] = self._GetUniqueBaseName()
self._Macro["MODULE_GUID" ] = self.Guid
self._Macro["MODULE_VERSION" ] = self.Version
self._Macro["MODULE_TYPE" ] = self.ModuleType
diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/Python/AutoGen/GenMake.py
index edbf243..1d49a03 100644
--- a/BaseTools/Source/Python/AutoGen/GenMake.py
+++ b/BaseTools/Source/Python/AutoGen/GenMake.py
@@ -241,6 +241,7 @@ PLATFORM_OUTPUT_DIR = ${platform_output_directory}
#
MODULE_NAME = ${module_name}
MODULE_GUID = ${module_guid}
+MODULE_NAME_GUID = ${module_name_guid}
MODULE_VERSION = ${module_version}
MODULE_TYPE = ${module_type}
MODULE_FILE = ${module_file}
@@ -569,6 +570,7 @@ cleanlib:

"module_name" : self._AutoGenObject.Name,
"module_guid" : self._AutoGenObject.Guid,
+ "module_name_guid" : self._AutoGenObject._GetUniqueBaseName(),
"module_version" : self._AutoGenObject.Version,
"module_type" : self._AutoGenObject.ModuleType,
"module_file" : self._AutoGenObject.MetaFile.Name,
@@ -846,6 +848,7 @@ PLATFORM_OUTPUT_DIR = ${platform_output_directory}
#
MODULE_NAME = ${module_name}
MODULE_GUID = ${module_guid}
+MODULE_NAME_GUID = ${module_name_guid}
MODULE_VERSION = ${module_version}
MODULE_TYPE = ${module_type}
MODULE_FILE = ${module_file}
@@ -970,6 +973,7 @@ ${BEGIN}\t-@${create_directory_command}\n${END}\

"module_name" : self._AutoGenObject.Name,
"module_guid" : self._AutoGenObject.Guid,
+ "module_name_guid" : self._AutoGenObject._GetUniqueBaseName(),
"module_version" : self._AutoGenObject.Version,
"module_type" : self._AutoGenObject.ModuleType,
"module_file" : self._AutoGenObject.MetaFile,
--
1.9.5.msysgit.0


------------------------------------------------------------------------------
Gao, Liming
2015-06-10 07:42:17 UTC
Permalink
Reviewed-by: Liming Gao <***@intel.com>

-----Original Message-----
From: Yingke Liu [mailto:***@intel.com]
Sent: Tuesday, June 09, 2015 1:31 PM
To: edk2-***@lists.sourceforge.net
Subject: [edk2] [Patch] BaseTools: Append FILE_GUID to BaseName.

This patch makes sure the EFI file in $(BIN_DIR) is unique. If there are modules with same BaseName, the FILE_GUID is appended.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Conf/build_rule.template | 14 ++++++++------
BaseTools/Source/Python/AutoGen/AutoGen.py | 15 +++++++++++++++ BaseTools/Source/Python/AutoGen/GenMake.py | 4 ++++
3 files changed, 27 insertions(+), 6 deletions(-)

diff --git a/BaseTools/Conf/build_rule.template b/BaseTools/Conf/build_rule.template
index 3b054c4..596d41d 100644
--- a/BaseTools/Conf/build_rule.template
+++ b/BaseTools/Conf/build_rule.template
@@ -66,6 +66,8 @@
# $(LIBS) Static library files of current module
# $(<tool>_FLAGS) Tools flags of current module
# $(MODULE_NAME) Current module name
+# $(MODULE_NAME_GUID) Current module name with module FILE_GUID if same $(MODULE_NAME) exists
+# in different modules, otherwise its value is same as $(MODULE_NAME)
# $(MODULE_TYPE) Current module type
# $(MODULE_GUID) Current module guid
# $(ARCH) Architecture of current module
@@ -334,7 +336,7 @@
<Command.MSFT, Command.INTEL, Command.RVCT, Command.ARMGCC, Command.ARMLINUXGCC>
"$(GENFW)" -e $(MODULE_TYPE) -o ${dst} ${src} $(GENFW_FLAGS)
$(CP) ${dst} $(OUTPUT_DIR)
- $(CP) ${dst} $(BIN_DIR)
+ $(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).efi
-$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
-$(CP) $(DEBUG_DIR)(+)*.pdb $(OUTPUT_DIR)
<Command.GCC>
@@ -345,11 +347,11 @@
#The below 2 lines are only needed for UNIXGCC tool chain, which genereates PE image directly
#
-$(OBJCOPY) $(OBJCOPY_ADDDEBUGFLAG) ${src}
- -$(CP) $(DEBUG_DIR)(+)$(MODULE_NAME).debug $(BIN_DIR)
+ -$(CP) $(DEBUG_DIR)(+)$(MODULE_NAME).debug
+ $(BIN_DIR)(+)$(MODULE_NAME_GUID).debug

"$(GENFW)" -e $(MODULE_TYPE) -o ${dst} ${src} $(GENFW_FLAGS)
$(CP) ${dst} $(OUTPUT_DIR)
- $(CP) ${dst} $(BIN_DIR)
+ $(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).efi
-$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)

<Command.XCODE>
@@ -359,7 +361,7 @@
-$(DSYMUTIL) ${src}
"$(GENFW)" -e $(MODULE_TYPE) -o ${dst} $(DEBUG_DIR)(+)$(MODULE_NAME).pecoff $(GENFW_FLAGS)
$(CP) ${dst} $(OUTPUT_DIR)
- $(CP) ${dst} $(BIN_DIR)
+ $(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).efi
-$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)

[Dependency-Expression-File]
@@ -516,7 +518,7 @@

<Command>
"$(GENFW)" -o ${dst} -j $(MICROCODE_BINARY_FILES) $(GENFW_FLAGS)
- -$(CP) ${dst} $(BIN_DIR)
+ -$(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).bin

[EFI-Image-File]
<InputFile>
@@ -542,7 +544,7 @@
?.efi, ?.EFI, ?.Efi

<OutputFile>
- $(BIN_DIR)(+)$(MODULE_NAME).rom
+ $(BIN_DIR)(+)$(MODULE_NAME_GUID).rom

<Command>
$(OPTROM) -i $(PCI_DEVICE_ID) -f $(PCI_VENDOR_ID) -l $(PCI_CLASS_CODE) -r $(PCI_REVISION) -o $dst $(OPTROM_FLAGS) $src diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index b2d9f6a..d1ed0a6 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -17,6 +17,7 @@ import Common.LongFilePathOs as os import re import os.path as path import copy
+import uuid

import GenC
import GenMake
@@ -2285,12 +2286,26 @@ class ModuleAutoGen(AutoGen):

return self._FixedAtBuildPcds

+ def _GetUniqueBaseName(self):
+ BaseName = self.Name
+ for Module in self.PlatformInfo.ModuleAutoGenList:
+ if Module.MetaFile == self.MetaFile:
+ continue
+ if Module.Name == self.Name:
+ EdkLogger.warn('build', 'Modules have same BaseName:\n %s\n %s' % (Module.MetaFile, self.MetaFile))
+ if uuid.UUID(Module.Guid) == uuid.UUID(self.Guid):
+ EdkLogger.error("build", FILE_DUPLICATED, 'Modules have same BaseName and FILE_GUID:\n'
+ ' %s\n %s' % (Module.MetaFile, self.MetaFile))
+ BaseName = '%s_%s' % (self.Name, self.Guid)
+ return BaseName
+
# Macros could be used in build_rule.txt (also Makefile)
def _GetMacros(self):
if self._Macro == None:
self._Macro = sdict()
self._Macro["WORKSPACE" ] = self.WorkspaceDir
self._Macro["MODULE_NAME" ] = self.Name
+ self._Macro["MODULE_NAME_GUID" ] = self._GetUniqueBaseName()
self._Macro["MODULE_GUID" ] = self.Guid
self._Macro["MODULE_VERSION" ] = self.Version
self._Macro["MODULE_TYPE" ] = self.ModuleType
diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/Python/AutoGen/GenMake.py
index edbf243..1d49a03 100644
--- a/BaseTools/Source/Python/AutoGen/GenMake.py
+++ b/BaseTools/Source/Python/AutoGen/GenMake.py
@@ -241,6 +241,7 @@ PLATFORM_OUTPUT_DIR = ${platform_output_directory} # MODULE_NAME = ${module_name} MODULE_GUID = ${module_guid}
+MODULE_NAME_GUID = ${module_name_guid}
MODULE_VERSION = ${module_version}
MODULE_TYPE = ${module_type}
MODULE_FILE = ${module_file}
@@ -569,6 +570,7 @@ cleanlib:

"module_name" : self._AutoGenObject.Name,
"module_guid" : self._AutoGenObject.Guid,
+ "module_name_guid" : self._AutoGenObject._GetUniqueBaseName(),
"module_version" : self._AutoGenObject.Version,
"module_type" : self._AutoGenObject.ModuleType,
"module_file" : self._AutoGenObject.MetaFile.Name,
@@ -846,6 +848,7 @@ PLATFORM_OUTPUT_DIR = ${platform_output_directory} # MODULE_NAME = ${module_name} MODULE_GUID = ${module_guid}
+MODULE_NAME_GUID = ${module_name_guid}
MODULE_VERSION = ${module_version}
MODULE_TYPE = ${module_type}
MODULE_FILE = ${module_file}
@@ -970,6 +973,7 @@ ${BEGIN}\t-@${create_directory_command}\n${END}\

"module_name" : self._AutoGenObject.Name,
"module_guid" : self._AutoGenObject.Guid,
+ "module_name_guid" : self._AutoGenObject._GetUniqueBaseName(),
"module_version" : self._AutoGenObject.Version,
"module_type" : self._AutoGenObject.ModuleType,
"module_file" : self._AutoGenObject.MetaFile,
--
1.9.5.msysgit.0
Yingke Liu
2015-06-10 02:20:23 UTC
Permalink
This patch extended BuildOptions section in DSC to support [BuildOptions.$(arch).CodeBase.$(MODULE_TYPE)]

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Source/Python/AutoGen/AutoGen.py | 11 ++++++++---
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py | 14 ++++++++++++++
2 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index d1ed0a6..a2a8e7e 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -2074,8 +2074,11 @@ class PlatformAutoGen(AutoGen):
# Get the different options for the different style module
if Module.AutoGenVersion < 0x00010005:
PlatformOptions = self.EdkBuildOption
+ ModuleTypeOptions = self.Platform.GetBuildOptionsByModuleType(EDK_NAME, Module.ModuleType)
else:
PlatformOptions = self.EdkIIBuildOption
+ ModuleTypeOptions = self.Platform.GetBuildOptionsByModuleType(EDKII_NAME, Module.ModuleType)
+ ModuleTypeOptions = self._ExpandBuildOption(ModuleTypeOptions)
ModuleOptions = self._ExpandBuildOption(Module.BuildOptions)
if Module in self.Platform.Modules:
PlatformModule = self.Platform.Modules[str(Module)]
@@ -2084,19 +2087,21 @@ class PlatformAutoGen(AutoGen):
PlatformModuleOptions = {}

BuildRuleOrder = None
- for Options in [self.ToolDefinition, ModuleOptions, PlatformOptions, PlatformModuleOptions]:
+ for Options in [self.ToolDefinition, ModuleOptions, PlatformOptions, ModuleTypeOptions, PlatformModuleOptions]:
for Tool in Options:
for Attr in Options[Tool]:
if Attr == TAB_TOD_DEFINES_BUILDRULEORDER:
BuildRuleOrder = Options[Tool][Attr]

- AllTools = set(ModuleOptions.keys() + PlatformOptions.keys() + PlatformModuleOptions.keys() + self.ToolDefinition.keys())
+ AllTools = set(ModuleOptions.keys() + PlatformOptions.keys() +
+ PlatformModuleOptions.keys() + ModuleTypeOptions.keys() +
+ self.ToolDefinition.keys())
BuildOptions = {}
for Tool in AllTools:
if Tool not in BuildOptions:
BuildOptions[Tool] = {}

- for Options in [self.ToolDefinition, ModuleOptions, PlatformOptions, PlatformModuleOptions]:
+ for Options in [self.ToolDefinition, ModuleOptions, PlatformOptions, ModuleTypeOptions, PlatformModuleOptions]:
if Tool not in Options:
continue
for Attr in Options[Tool]:
diff --git a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
index 14cd22d..1371bb0 100644
--- a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
+++ b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
@@ -147,6 +147,7 @@ class DscBuildData(PlatformBuildClassObject):
self._Pcds = None
self._DecPcds = None
self._BuildOptions = None
+ self._ModuleTypeOptions = None
self._LoadFixAddress = None
self._RFCLanguages = None
self._ISOLanguages = None
@@ -767,6 +768,19 @@ class DscBuildData(PlatformBuildClassObject):
self._BuildOptions[ToolChainFamily, ToolChain, EDK_NAME] = Option
return self._BuildOptions

+ def GetBuildOptionsByModuleType(self, Edk, ModuleType):
+ if self._ModuleTypeOptions == None:
+ self._ModuleTypeOptions = sdict()
+ if (Edk, ModuleType) not in self._ModuleTypeOptions:
+ options = sdict()
+ self._ModuleTypeOptions[Edk, ModuleType] = options
+ DriverType = '%s.%s' % (Edk, ModuleType)
+ RecordList = self._RawData[MODEL_META_DATA_BUILD_OPTION, self._Arch, DriverType]
+ for ToolChainFamily, ToolChain, Option, Arch, Type, Dummy3, Dummy4 in RecordList:
+ if Arch == self._Arch and Type == DriverType:
+ options[ToolChainFamily, ToolChain, Edk] = Option
+ return self._ModuleTypeOptions[Edk, ModuleType]
+
## Retrieve non-dynamic PCD settings
#
# @param Type PCD type
--
1.9.5.msysgit.0


------------------------------------------------------------------------------
Gao, Liming
2015-06-11 04:32:50 UTC
Permalink
Reviewed-by: Liming Gao <***@intel.com>

-----Original Message-----
From: Yingke Liu [mailto:***@intel.com]
Sent: Wednesday, June 10, 2015 10:20 AM
To: edk2-***@lists.sourceforge.net
Subject: [edk2] [Patch] BaseTools: Support build options for specific module type in DSC.

This patch extended BuildOptions section in DSC to support [BuildOptions.$(arch).CodeBase.$(MODULE_TYPE)]

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Source/Python/AutoGen/AutoGen.py | 11 ++++++++---
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py | 14 ++++++++++++++
2 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index d1ed0a6..a2a8e7e 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -2074,8 +2074,11 @@ class PlatformAutoGen(AutoGen):
# Get the different options for the different style module
if Module.AutoGenVersion < 0x00010005:
PlatformOptions = self.EdkBuildOption
+ ModuleTypeOptions = self.Platform.GetBuildOptionsByModuleType(EDK_NAME, Module.ModuleType)
else:
PlatformOptions = self.EdkIIBuildOption
+ ModuleTypeOptions = self.Platform.GetBuildOptionsByModuleType(EDKII_NAME, Module.ModuleType)
+ ModuleTypeOptions = self._ExpandBuildOption(ModuleTypeOptions)
ModuleOptions = self._ExpandBuildOption(Module.BuildOptions)
if Module in self.Platform.Modules:
PlatformModule = self.Platform.Modules[str(Module)]
@@ -2084,19 +2087,21 @@ class PlatformAutoGen(AutoGen):
PlatformModuleOptions = {}

BuildRuleOrder = None
- for Options in [self.ToolDefinition, ModuleOptions, PlatformOptions, PlatformModuleOptions]:
+ for Options in [self.ToolDefinition, ModuleOptions, PlatformOptions, ModuleTypeOptions, PlatformModuleOptions]:
for Tool in Options:
for Attr in Options[Tool]:
if Attr == TAB_TOD_DEFINES_BUILDRULEORDER:
BuildRuleOrder = Options[Tool][Attr]

- AllTools = set(ModuleOptions.keys() + PlatformOptions.keys() + PlatformModuleOptions.keys() + self.ToolDefinition.keys())
+ AllTools = set(ModuleOptions.keys() + PlatformOptions.keys() +
+ PlatformModuleOptions.keys() + ModuleTypeOptions.keys() +
+ self.ToolDefinition.keys())
BuildOptions = {}
for Tool in AllTools:
if Tool not in BuildOptions:
BuildOptions[Tool] = {}

- for Options in [self.ToolDefinition, ModuleOptions, PlatformOptions, PlatformModuleOptions]:
+ for Options in [self.ToolDefinition, ModuleOptions, PlatformOptions, ModuleTypeOptions, PlatformModuleOptions]:
if Tool not in Options:
continue
for Attr in Options[Tool]:
diff --git a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
index 14cd22d..1371bb0 100644
--- a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
+++ b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
@@ -147,6 +147,7 @@ class DscBuildData(PlatformBuildClassObject):
self._Pcds = None
self._DecPcds = None
self._BuildOptions = None
+ self._ModuleTypeOptions = None
self._LoadFixAddress = None
self._RFCLanguages = None
self._ISOLanguages = None
@@ -767,6 +768,19 @@ class DscBuildData(PlatformBuildClassObject):
self._BuildOptions[ToolChainFamily, ToolChain, EDK_NAME] = Option
return self._BuildOptions

+ def GetBuildOptionsByModuleType(self, Edk, ModuleType):
+ if self._ModuleTypeOptions == None:
+ self._ModuleTypeOptions = sdict()
+ if (Edk, ModuleType) not in self._ModuleTypeOptions:
+ options = sdict()
+ self._ModuleTypeOptions[Edk, ModuleType] = options
+ DriverType = '%s.%s' % (Edk, ModuleType)
+ RecordList = self._RawData[MODEL_META_DATA_BUILD_OPTION, self._Arch, DriverType]
+ for ToolChainFamily, ToolChain, Option, Arch, Type, Dummy3, Dummy4 in RecordList:
+ if Arch == self._Arch and Type == DriverType:
+ options[ToolChainFamily, ToolChain, Edk] = Option
+ return self._ModuleTypeOptions[Edk, ModuleType]
+
## Retrieve non-dynamic PCD settings
#
# @param Type PCD type
--
1.9.5.msysgit.0
Yingke Liu
2015-06-10 07:25:11 UTC
Permalink
This binary file contains offset of VFR and UNI data.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Source/Python/AutoGen/AutoGen.py | 74 ++++++++++++++++++++++++++++++
1 file changed, 74 insertions(+)

diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index a2a8e7e..996b654 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -3116,6 +3116,76 @@ class ModuleAutoGen(AutoGen):

return HiiExPcds

+ def _GenOffsetBin(self):
+ VfrUniBaseName = {}
+ for SourceFile in self.Module.Sources:
+ if SourceFile.Type.upper() == ".VFR" :
+ #
+ # search the .map file to find the offset of vfr binary in the PE32+/TE file.
+ #
+ VfrUniBaseName[SourceFile.BaseName] = (SourceFile.BaseName + "Bin")
+ if SourceFile.Type.upper() == ".UNI" :
+ #
+ # search the .map file to find the offset of Uni strings binary in the PE32+/TE file.
+ #
+ VfrUniBaseName["UniOffsetName"] = (self.Name + "Strings")
+
+ if len(VfrUniBaseName) == 0:
+ return None
+ MapFileName = os.path.join(self.OutputDir, self.Name + ".map")
+ EfiFileName = os.path.join(self.OutputDir, self.Name + ".efi")
+ VfrUniOffsetList = GetVariableOffset(MapFileName, EfiFileName, VfrUniBaseName.values())
+ if not VfrUniOffsetList:
+ return None
+
+ OutputName = '%sOffset.bin' % self.Name
+ UniVfrOffsetFileName = os.path.join( self.OutputDir, OutputName)
+
+ try:
+ fInputfile = open(UniVfrOffsetFileName, "wb+", 0)
+ except:
+ EdkLogger.error("build", FILE_OPEN_FAILURE, "File open failed for %s" % UniVfrOffsetFileName,None)
+
+ # Use a instance of StringIO to cache data
+ fStringIO = StringIO('')
+
+ for Item in VfrUniOffsetList:
+ if (Item[0].find("Strings") != -1):
+ #
+ # UNI offset in image.
+ # GUID + Offset
+ # { 0x8913c5e0, 0x33f6, 0x4d86, { 0x9b, 0xf1, 0x43, 0xef, 0x89, 0xfc, 0x6, 0x66 } }
+ #
+ UniGuid = [0xe0, 0xc5, 0x13, 0x89, 0xf6, 0x33, 0x86, 0x4d, 0x9b, 0xf1, 0x43, 0xef, 0x89, 0xfc, 0x6, 0x66]
+ UniGuid = [chr(ItemGuid) for ItemGuid in UniGuid]
+ fStringIO.write(''.join(UniGuid))
+ UniValue = pack ('Q', int (Item[1], 16))
+ fStringIO.write (UniValue)
+ else:
+ #
+ # VFR binary offset in image.
+ # GUID + Offset
+ # { 0xd0bc7cb4, 0x6a47, 0x495f, { 0xaa, 0x11, 0x71, 0x7, 0x46, 0xda, 0x6, 0xa2 } };
+ #
+ VfrGuid = [0xb4, 0x7c, 0xbc, 0xd0, 0x47, 0x6a, 0x5f, 0x49, 0xaa, 0x11, 0x71, 0x7, 0x46, 0xda, 0x6, 0xa2]
+ VfrGuid = [chr(ItemGuid) for ItemGuid in VfrGuid]
+ fStringIO.write(''.join(VfrGuid))
+ type (Item[1])
+ VfrValue = pack ('Q', int (Item[1], 16))
+ fStringIO.write (VfrValue)
+ #
+ # write data into file.
+ #
+ try :
+ fInputfile.write (fStringIO.getvalue())
+ except:
+ EdkLogger.error("build", FILE_WRITE_FAILURE, "Write data to file %s failed, please check whether the "
+ "file been locked or using by other applications." %UniVfrOffsetFileName,None)
+
+ fStringIO.close ()
+ fInputfile.close ()
+ return OutputName
+
## Create AsBuilt INF file the module
#
def CreateAsBuiltInf(self):
@@ -3270,6 +3340,10 @@ class ModuleAutoGen(AutoGen):
if self.ModuleType in ['DXE_SMM_DRIVER']:
AsBuiltInfDict['binary_item'] += ['SMM_DEPEX|' + self.Name + '.depex']

+ Bin = self._GenOffsetBin()
+ if Bin:
+ AsBuiltInfDict['binary_item'] += ['BIN|%s' % Bin]
+
for Root, Dirs, Files in os.walk(OutputDir):
for File in Files:
if File.lower().endswith('.pdb'):
--
1.9.5.msysgit.0


------------------------------------------------------------------------------
Gao, Liming
2015-06-11 04:33:00 UTC
Permalink
Reviewed-by: Liming Gao <***@intel.com>

-----Original Message-----
From: Yingke Liu [mailto:***@intel.com]
Sent: Wednesday, June 10, 2015 3:25 PM
To: edk2-***@lists.sourceforge.net
Subject: [edk2] [Patch] BaseTools: Generate a binary file and list it in Binary section of As Built INF.

This binary file contains offset of VFR and UNI data.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Source/Python/AutoGen/AutoGen.py | 74 ++++++++++++++++++++++++++++++
1 file changed, 74 insertions(+)

diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index a2a8e7e..996b654 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -3116,6 +3116,76 @@ class ModuleAutoGen(AutoGen):

return HiiExPcds

+ def _GenOffsetBin(self):
+ VfrUniBaseName = {}
+ for SourceFile in self.Module.Sources:
+ if SourceFile.Type.upper() == ".VFR" :
+ #
+ # search the .map file to find the offset of vfr binary in the PE32+/TE file.
+ #
+ VfrUniBaseName[SourceFile.BaseName] = (SourceFile.BaseName + "Bin")
+ if SourceFile.Type.upper() == ".UNI" :
+ #
+ # search the .map file to find the offset of Uni strings binary in the PE32+/TE file.
+ #
+ VfrUniBaseName["UniOffsetName"] = (self.Name + "Strings")
+
+ if len(VfrUniBaseName) == 0:
+ return None
+ MapFileName = os.path.join(self.OutputDir, self.Name + ".map")
+ EfiFileName = os.path.join(self.OutputDir, self.Name + ".efi")
+ VfrUniOffsetList = GetVariableOffset(MapFileName, EfiFileName, VfrUniBaseName.values())
+ if not VfrUniOffsetList:
+ return None
+
+ OutputName = '%sOffset.bin' % self.Name
+ UniVfrOffsetFileName = os.path.join( self.OutputDir, OutputName)
+
+ try:
+ fInputfile = open(UniVfrOffsetFileName, "wb+", 0)
+ except:
+ EdkLogger.error("build", FILE_OPEN_FAILURE, "File open failed for %s" % UniVfrOffsetFileName,None)
+
+ # Use a instance of StringIO to cache data
+ fStringIO = StringIO('')
+
+ for Item in VfrUniOffsetList:
+ if (Item[0].find("Strings") != -1):
+ #
+ # UNI offset in image.
+ # GUID + Offset
+ # { 0x8913c5e0, 0x33f6, 0x4d86, { 0x9b, 0xf1, 0x43, 0xef, 0x89, 0xfc, 0x6, 0x66 } }
+ #
+ UniGuid = [0xe0, 0xc5, 0x13, 0x89, 0xf6, 0x33, 0x86, 0x4d, 0x9b, 0xf1, 0x43, 0xef, 0x89, 0xfc, 0x6, 0x66]
+ UniGuid = [chr(ItemGuid) for ItemGuid in UniGuid]
+ fStringIO.write(''.join(UniGuid))
+ UniValue = pack ('Q', int (Item[1], 16))
+ fStringIO.write (UniValue)
+ else:
+ #
+ # VFR binary offset in image.
+ # GUID + Offset
+ # { 0xd0bc7cb4, 0x6a47, 0x495f, { 0xaa, 0x11, 0x71, 0x7, 0x46, 0xda, 0x6, 0xa2 } };
+ #
+ VfrGuid = [0xb4, 0x7c, 0xbc, 0xd0, 0x47, 0x6a, 0x5f, 0x49, 0xaa, 0x11, 0x71, 0x7, 0x46, 0xda, 0x6, 0xa2]
+ VfrGuid = [chr(ItemGuid) for ItemGuid in VfrGuid]
+ fStringIO.write(''.join(VfrGuid))
+ type (Item[1])
+ VfrValue = pack ('Q', int (Item[1], 16))
+ fStringIO.write (VfrValue)
+ #
+ # write data into file.
+ #
+ try :
+ fInputfile.write (fStringIO.getvalue())
+ except:
+ EdkLogger.error("build", FILE_WRITE_FAILURE, "Write data to file %s failed, please check whether the "
+ "file been locked or using by other applications." %UniVfrOffsetFileName,None)
+
+ fStringIO.close ()
+ fInputfile.close ()
+ return OutputName
+
## Create AsBuilt INF file the module
#
def CreateAsBuiltInf(self):
@@ -3270,6 +3340,10 @@ class ModuleAutoGen(AutoGen):
if self.ModuleType in ['DXE_SMM_DRIVER']:
AsBuiltInfDict['binary_item'] += ['SMM_DEPEX|' + self.Name + '.depex']

+ Bin = self._GenOffsetBin()
+ if Bin:
+ AsBuiltInfDict['binary_item'] += ['BIN|%s' % Bin]
+
for Root, Dirs, Files in os.walk(OutputDir):
for File in Files:
if File.lower().endswith('.pdb'):
--
1.9.5.msysgit.0
Yingke Liu
2015-06-10 11:27:42 UTC
Permalink
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Source/Python/build/BuildReport.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Source/Python/build/BuildReport.py
index 327d5a5..264607b 100644
--- a/BaseTools/Source/Python/build/BuildReport.py
+++ b/BaseTools/Source/Python/build/BuildReport.py
@@ -1237,10 +1237,10 @@ class FdRegionReport(object):
#
# Collect PCDs defined in DSC common section
#
- for Platform in Wa.BuildDatabase.WorkspaceDb.PlatformList:
- for (TokenCName, TokenSpaceGuidCName) in Platform.Pcds:
- DscDefaultValue = Platform.Pcds[(TokenCName, TokenSpaceGuidCName)].DefaultValue
- PlatformPcds[(TokenCName, TokenSpaceGuidCName)] = DscDefaultValue
+ Platform = Wa.BuildDatabase[Wa.MetaFile, 'COMMON']
+ for (TokenCName, TokenSpaceGuidCName) in Platform.Pcds:
+ DscDefaultValue = Platform.Pcds[(TokenCName, TokenSpaceGuidCName)].DefaultValue
+ PlatformPcds[(TokenCName, TokenSpaceGuidCName)] = DscDefaultValue

#
# Add PEI and DXE a priori files GUIDs defined in PI specification.
--
1.9.5.msysgit.0


------------------------------------------------------------------------------
Gao, Liming
2015-06-11 04:32:34 UTC
Permalink
Reviewed-by: Liming Gao <***@intel.com>

-----Original Message-----
From: Yingke Liu [mailto:***@intel.com]
Sent: Wednesday, June 10, 2015 7:28 PM
To: edk2-***@lists.sourceforge.net
Subject: [edk2] [Patch] BaseTools: Fixed an error reported during generating report.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Source/Python/build/BuildReport.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Source/Python/build/BuildReport.py
index 327d5a5..264607b 100644
--- a/BaseTools/Source/Python/build/BuildReport.py
+++ b/BaseTools/Source/Python/build/BuildReport.py
@@ -1237,10 +1237,10 @@ class FdRegionReport(object):
#
# Collect PCDs defined in DSC common section
#
- for Platform in Wa.BuildDatabase.WorkspaceDb.PlatformList:
- for (TokenCName, TokenSpaceGuidCName) in Platform.Pcds:
- DscDefaultValue = Platform.Pcds[(TokenCName, TokenSpaceGuidCName)].DefaultValue
- PlatformPcds[(TokenCName, TokenSpaceGuidCName)] = DscDefaultValue
+ Platform = Wa.BuildDatabase[Wa.MetaFile, 'COMMON']
+ for (TokenCName, TokenSpaceGuidCName) in Platform.Pcds:
+ DscDefaultValue = Platform.Pcds[(TokenCName, TokenSpaceGuidCName)].DefaultValue
+ PlatformPcds[(TokenCName, TokenSpaceGuidCName)] = DscDefaultValue

#
# Add PEI and DXE a priori files GUIDs defined in PI specification.
--
1.9.5.msysgit.0
Yingke Liu
2015-06-11 08:20:58 UTC
Permalink
This patch also removed a warning message.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Source/Python/AutoGen/AutoGen.py | 1 -
BaseTools/Source/Python/GenFds/Fv.py | 21 +++++++++++++++++++++
2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index 996b654..0e7482a 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -2297,7 +2297,6 @@ class ModuleAutoGen(AutoGen):
if Module.MetaFile == self.MetaFile:
continue
if Module.Name == self.Name:
- EdkLogger.warn('build', 'Modules have same BaseName:\n %s\n %s' % (Module.MetaFile, self.MetaFile))
if uuid.UUID(Module.Guid) == uuid.UUID(self.Guid):
EdkLogger.error("build", FILE_DUPLICATED, 'Modules have same BaseName and FILE_GUID:\n'
' %s\n %s' % (Module.MetaFile, self.MetaFile))
diff --git a/BaseTools/Source/Python/GenFds/Fv.py b/BaseTools/Source/Python/GenFds/Fv.py
index 03a7426..8f341d3 100644
--- a/BaseTools/Source/Python/GenFds/Fv.py
+++ b/BaseTools/Source/Python/GenFds/Fv.py
@@ -30,6 +30,7 @@ from Common.LongFilePathSupport import CopyLongFilePath
from Common.LongFilePathSupport import OpenLongFilePath as open

T_CHAR_LF = '\n'
+FV_UI_EXT_ENTY_GUID = 'A67DF1FA-8DE8-4E98-AF09-4BDF2EFFBC7C'

## generate FV
#
@@ -295,6 +296,26 @@ class FV (FvClassObject):
if self.FvNameGuid <> None and self.FvNameGuid <> '':
TotalSize = 16 + 4
Buffer = ''
+ #
+ # Create EXT entry for FV UI name
+ # This GUID is used: A67DF1FA-8DE8-4E98-AF09-4BDF2EFFBC7C
+ #
+ FvUiLen = len(self.UiFvName)
+ TotalSize += (FvUiLen + 16 + 4)
+ Guid = FV_UI_EXT_ENTY_GUID.split('-')
+ #
+ # Layout:
+ # EFI_FIRMWARE_VOLUME_EXT_ENTRY : size 4
+ # GUID : size 16
+ # FV UI name
+ #
+ Buffer += (pack('HH', (FvUiLen + 16 + 4), 0x0002)
+ + pack('=LHHBBBBBBBB', 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))
+ + self.UiFvName)
+
for Index in range (0, len(self.FvExtEntryType)):
if self.FvExtEntryType[Index] == 'FILE':
# check if the path is absolute or relative
--
1.9.5.msysgit.0


------------------------------------------------------------------------------
Gao, Liming
2015-06-11 15:17:54 UTC
Permalink
Dennis:
Two comments are here.
1) Do you update EXT header size filed to include this EXT entry?
2) EXT entry size is recorded in totalsize. How about directly use totalsize in the following code?

-----Original Message-----
From: Yingke Liu [mailto:***@intel.com]
Sent: Thursday, June 11, 2015 4:21 PM
To: edk2-***@lists.sourceforge.net
Subject: [edk2] [Patch] BaseTools: Generate a FV EXT entry for FV UI name.

This patch also removed a warning message.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Source/Python/AutoGen/AutoGen.py | 1 -
BaseTools/Source/Python/GenFds/Fv.py | 21 +++++++++++++++++++++
2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index 996b654..0e7482a 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -2297,7 +2297,6 @@ class ModuleAutoGen(AutoGen):
if Module.MetaFile == self.MetaFile:
continue
if Module.Name == self.Name:
- EdkLogger.warn('build', 'Modules have same BaseName:\n %s\n %s' % (Module.MetaFile, self.MetaFile))
if uuid.UUID(Module.Guid) == uuid.UUID(self.Guid):
EdkLogger.error("build", FILE_DUPLICATED, 'Modules have same BaseName and FILE_GUID:\n'
' %s\n %s' % (Module.MetaFile, self.MetaFile)) diff --git a/BaseTools/Source/Python/GenFds/Fv.py b/BaseTools/Source/Python/GenFds/Fv.py
index 03a7426..8f341d3 100644
--- a/BaseTools/Source/Python/GenFds/Fv.py
+++ b/BaseTools/Source/Python/GenFds/Fv.py
@@ -30,6 +30,7 @@ from Common.LongFilePathSupport import CopyLongFilePath from Common.LongFilePathSupport import OpenLongFilePath as open

T_CHAR_LF = '\n'
+FV_UI_EXT_ENTY_GUID = 'A67DF1FA-8DE8-4E98-AF09-4BDF2EFFBC7C'

## generate FV
#
@@ -295,6 +296,26 @@ class FV (FvClassObject):
if self.FvNameGuid <> None and self.FvNameGuid <> '':
TotalSize = 16 + 4
Buffer = ''
+ #
+ # Create EXT entry for FV UI name
+ # This GUID is used: A67DF1FA-8DE8-4E98-AF09-4BDF2EFFBC7C
+ #
+ FvUiLen = len(self.UiFvName)
+ TotalSize += (FvUiLen + 16 + 4)
+ Guid = FV_UI_EXT_ENTY_GUID.split('-')
+ #
+ # Layout:
+ # EFI_FIRMWARE_VOLUME_EXT_ENTRY : size 4
+ # GUID : size 16
+ # FV UI name
+ #
+ Buffer += (pack('HH', (FvUiLen + 16 + 4), 0x0002)
+ + pack('=LHHBBBBBBBB', 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))
+ + self.UiFvName)
+
for Index in range (0, len(self.FvExtEntryType)):
if self.FvExtEntryType[Index] == 'FILE':
# check if the path is absolute or relative
--
1.9.5.msysgit.0
Liu, Yingke D
2015-06-12 00:43:47 UTC
Permalink
Liming,

1) TotalSize is the EXT header size
2) TotalSize is the whole EXT header size, and it is initianlized with 16 + 4 which is the size of EFI_FIRMWARE_VOLUME_EXT_HEADER.

Dennis

-----Original Message-----
From: Gao, Liming [mailto:***@intel.com]
Sent: Thursday, June 11, 2015 23:18
To: edk2-***@lists.sourceforge.net
Subject: Re: [edk2] [Patch] BaseTools: Generate a FV EXT entry for FV UI name.

Dennis:
Two comments are here.
1) Do you update EXT header size filed to include this EXT entry?
2) EXT entry size is recorded in totalsize. How about directly use totalsize in the following code?

-----Original Message-----
From: Yingke Liu [mailto:***@intel.com]
Sent: Thursday, June 11, 2015 4:21 PM
To: edk2-***@lists.sourceforge.net
Subject: [edk2] [Patch] BaseTools: Generate a FV EXT entry for FV UI name.

This patch also removed a warning message.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Source/Python/AutoGen/AutoGen.py | 1 -
BaseTools/Source/Python/GenFds/Fv.py | 21 +++++++++++++++++++++
2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index 996b654..0e7482a 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -2297,7 +2297,6 @@ class ModuleAutoGen(AutoGen):
if Module.MetaFile == self.MetaFile:
continue
if Module.Name == self.Name:
- EdkLogger.warn('build', 'Modules have same BaseName:\n %s\n %s' % (Module.MetaFile, self.MetaFile))
if uuid.UUID(Module.Guid) == uuid.UUID(self.Guid):
EdkLogger.error("build", FILE_DUPLICATED, 'Modules have same BaseName and FILE_GUID:\n'
' %s\n %s' % (Module.MetaFile, self.MetaFile)) diff --git a/BaseTools/Source/Python/GenFds/Fv.py b/BaseTools/Source/Python/GenFds/Fv.py
index 03a7426..8f341d3 100644
--- a/BaseTools/Source/Python/GenFds/Fv.py
+++ b/BaseTools/Source/Python/GenFds/Fv.py
@@ -30,6 +30,7 @@ from Common.LongFilePathSupport import CopyLongFilePath from Common.LongFilePathSupport import OpenLongFilePath as open

T_CHAR_LF = '\n'
+FV_UI_EXT_ENTY_GUID = 'A67DF1FA-8DE8-4E98-AF09-4BDF2EFFBC7C'

## generate FV
#
@@ -295,6 +296,26 @@ class FV (FvClassObject):
if self.FvNameGuid <> None and self.FvNameGuid <> '':
TotalSize = 16 + 4
Buffer = ''
+ #
+ # Create EXT entry for FV UI name
+ # This GUID is used: A67DF1FA-8DE8-4E98-AF09-4BDF2EFFBC7C
+ #
+ FvUiLen = len(self.UiFvName)
+ TotalSize += (FvUiLen + 16 + 4)
+ Guid = FV_UI_EXT_ENTY_GUID.split('-')
+ #
+ # Layout:
+ # EFI_FIRMWARE_VOLUME_EXT_ENTRY : size 4
+ # GUID : size 16
+ # FV UI name
+ #
+ Buffer += (pack('HH', (FvUiLen + 16 + 4), 0x0002)
+ + pack('=LHHBBBBBBBB', 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))
+ + self.UiFvName)
+
for Index in range (0, len(self.FvExtEntryType)):
if self.FvExtEntryType[Index] == 'FILE':
# check if the path is absolute or relative
--
1.9.5.msysgit.0


------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Gao, Liming
2015-06-12 00:50:06 UTC
Permalink
Got it. Reviewed-by: Liming Gao <***@intel.com>

-----Original Message-----
From: Liu, Yingke D [mailto:***@intel.com]
Sent: Friday, June 12, 2015 8:44 AM
To: edk2-***@lists.sourceforge.net
Subject: Re: [edk2] [Patch] BaseTools: Generate a FV EXT entry for FV UI name.

Liming,

1) TotalSize is the EXT header size
2) TotalSize is the whole EXT header size, and it is initianlized with 16 + 4 which is the size of EFI_FIRMWARE_VOLUME_EXT_HEADER.

Dennis

-----Original Message-----
From: Gao, Liming [mailto:***@intel.com]
Sent: Thursday, June 11, 2015 23:18
To: edk2-***@lists.sourceforge.net
Subject: Re: [edk2] [Patch] BaseTools: Generate a FV EXT entry for FV UI name.

Dennis:
Two comments are here.
1) Do you update EXT header size filed to include this EXT entry?
2) EXT entry size is recorded in totalsize. How about directly use totalsize in the following code?

-----Original Message-----
From: Yingke Liu [mailto:***@intel.com]
Sent: Thursday, June 11, 2015 4:21 PM
To: edk2-***@lists.sourceforge.net
Subject: [edk2] [Patch] BaseTools: Generate a FV EXT entry for FV UI name.

This patch also removed a warning message.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Source/Python/AutoGen/AutoGen.py | 1 -
BaseTools/Source/Python/GenFds/Fv.py | 21 +++++++++++++++++++++
2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index 996b654..0e7482a 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -2297,7 +2297,6 @@ class ModuleAutoGen(AutoGen):
if Module.MetaFile == self.MetaFile:
continue
if Module.Name == self.Name:
- EdkLogger.warn('build', 'Modules have same BaseName:\n %s\n %s' % (Module.MetaFile, self.MetaFile))
if uuid.UUID(Module.Guid) == uuid.UUID(self.Guid):
EdkLogger.error("build", FILE_DUPLICATED, 'Modules have same BaseName and FILE_GUID:\n'
' %s\n %s' % (Module.MetaFile, self.MetaFile)) diff --git a/BaseTools/Source/Python/GenFds/Fv.py b/BaseTools/Source/Python/GenFds/Fv.py
index 03a7426..8f341d3 100644
--- a/BaseTools/Source/Python/GenFds/Fv.py
+++ b/BaseTools/Source/Python/GenFds/Fv.py
@@ -30,6 +30,7 @@ from Common.LongFilePathSupport import CopyLongFilePath from Common.LongFilePathSupport import OpenLongFilePath as open

T_CHAR_LF = '\n'
+FV_UI_EXT_ENTY_GUID = 'A67DF1FA-8DE8-4E98-AF09-4BDF2EFFBC7C'

## generate FV
#
@@ -295,6 +296,26 @@ class FV (FvClassObject):
if self.FvNameGuid <> None and self.FvNameGuid <> '':
TotalSize = 16 + 4
Buffer = ''
+ #
+ # Create EXT entry for FV UI name
+ # This GUID is used: A67DF1FA-8DE8-4E98-AF09-4BDF2EFFBC7C
+ #
+ FvUiLen = len(self.UiFvName)
+ TotalSize += (FvUiLen + 16 + 4)
+ Guid = FV_UI_EXT_ENTY_GUID.split('-')
+ #
+ # Layout:
+ # EFI_FIRMWARE_VOLUME_EXT_ENTRY : size 4
+ # GUID : size 16
+ # FV UI name
+ #
+ Buffer += (pack('HH', (FvUiLen + 16 + 4), 0x0002)
+ + pack('=LHHBBBBBBBB', 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))
+ + self.UiFvName)
+
for Index in range (0, len(self.FvExtEntryType)):
if self.FvExtEntryType[Index] == 'FILE':
# check if the path is absolute or relative
--
1.9.5.msysgit.0


------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Yingke Liu
2015-06-15 07:39:26 UTC
Permalink
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Source/Python/Common/Misc.py | 21 ++++
.../Source/Python/CommonDataClass/FdfClass.py | 1 +
BaseTools/Source/Python/GenFds/Capsule.py | 89 +++++++++++++++
BaseTools/Source/Python/GenFds/CapsuleData.py | 72 +++++++++++-
BaseTools/Source/Python/GenFds/FdfParser.py | 122 ++++++++++++++++++---
5 files changed, 288 insertions(+), 17 deletions(-)

diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py
index fc1680b..8ba5819 100644
--- a/BaseTools/Source/Python/Common/Misc.py
+++ b/BaseTools/Source/Python/Common/Misc.py
@@ -24,6 +24,7 @@ import re
import cPickle
import array
import shutil
+from struct import pack
from UserDict import IterableUserDict
from UserList import UserList

@@ -2007,6 +2008,26 @@ class SkuClass():
AvailableSkuIdSet = property(__GetAvailableSkuIds)
SkuUsageType = property(__SkuUsageType)
AvailableSkuIdNumSet = property(__GetAvailableSkuIdNumber)
+
+#
+# Pack a registry format GUID
+#
+def PackRegistryFormatGuid(Guid):
+ Guid = Guid.split('-')
+ return pack('=LHHBBBBBBBB',
+ 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)
+ )
+
##
#
# This acts like the main() function for the script, unless it is 'import'ed into another
diff --git a/BaseTools/Source/Python/CommonDataClass/FdfClass.py b/BaseTools/Source/Python/CommonDataClass/FdfClass.py
index ce3df12..f758d35 100644
--- a/BaseTools/Source/Python/CommonDataClass/FdfClass.py
+++ b/BaseTools/Source/Python/CommonDataClass/FdfClass.py
@@ -360,6 +360,7 @@ class CapsuleClassObject :
# TokensDict[var] = value
self.TokensDict = {}
self.CapsuleDataList = []
+ self.FmpPayloadList = []

## VTF data in FDF
#
diff --git a/BaseTools/Source/Python/GenFds/Capsule.py b/BaseTools/Source/Python/GenFds/Capsule.py
index 85f95a6..1683433 100644
--- a/BaseTools/Source/Python/GenFds/Capsule.py
+++ b/BaseTools/Source/Python/GenFds/Capsule.py
@@ -22,6 +22,9 @@ import subprocess
import StringIO
from Common.Misc import SaveFileOnChange
from GenFds import GenFds
+from Common.Misc import PackRegistryFormatGuid
+import uuid
+from struct import pack


T_CHAR_LF = '\n'
@@ -42,6 +45,88 @@ class Capsule (CapsuleClassObject) :
self.BlockNum = None
self.CapsuleName = None

+ ## Generate FMP capsule
+ #
+ # @retval string Generated Capsule file path
+ #
+ def GenFmpCapsule(self):
+ #
+ # Generate capsule header
+ # typedef struct {
+ # EFI_GUID CapsuleGuid;
+ # UINT32 HeaderSize;
+ # UINT32 Flags;
+ # UINT32 CapsuleImageSize;
+ # } EFI_CAPSULE_HEADER;
+ #
+ Header = StringIO.StringIO()
+ #
+ # Use FMP capsule GUID: 6DCBD5ED-E82D-4C44-BDA1-7194199AD92A
+ #
+ Header.write(PackRegistryFormatGuid('6DCBD5ED-E82D-4C44-BDA1-7194199AD92A'))
+ HdrSize = 0
+ if 'CAPSULE_HEADER_SIZE' in self.TokensDict:
+ Header.write(pack('=I', int(self.TokensDict['CAPSULE_HEADER_SIZE'], 16)))
+ HdrSize = int(self.TokensDict['CAPSULE_HEADER_SIZE'], 16)
+ else:
+ Header.write(pack('=I', 0x20))
+ HdrSize = 0x20
+ Flags = 0
+ if 'CAPSULE_FLAGS' in self.TokensDict:
+ for flag in self.TokensDict['CAPSULE_FLAGS'].split(','):
+ flag = flag.strip()
+ if flag == 'PopulateSystemTable':
+ Flags |= 0x00010000 | 0x00020000
+ elif flag == 'PersistAcrossReset':
+ Flags |= 0x00010000
+ elif flag == 'InitiateReset':
+ Flags |= 0x00040000
+ Header.write(pack('=I', Flags))
+ #
+ # typedef struct {
+ # UINT32 Version;
+ # UINT16 EmbeddedDriverCount;
+ # UINT16 PayloadItemCount;
+ # // UINT64 ItemOffsetList[];
+ # } EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER;
+ #
+ FwMgrHdr = StringIO.StringIO()
+ if 'CAPSULE_HEADER_INIT_VERSION' in self.TokensDict:
+ FwMgrHdr.write(pack('=I', int(self.TokensDict['CAPSULE_HEADER_INIT_VERSION'], 16)))
+ else:
+ FwMgrHdr.write(pack('=I', 0x00000001))
+ FwMgrHdr.write(pack('=HH', len(self.CapsuleDataList), len(self.FmpPayloadList)))
+ FwMgrHdrSize = 4+2+2+8*(len(self.CapsuleDataList)+len(self.FmpPayloadList))
+
+ PreSize = FwMgrHdrSize
+ Content = StringIO.StringIO()
+ for driver in self.CapsuleDataList:
+ FileName = driver.GenCapsuleSubItem()
+ FwMgrHdr.write(pack('=Q', PreSize))
+ PreSize += os.path.getsize(FileName)
+ File = open(FileName, 'rb')
+ Content.write(File.read())
+ File.close()
+ for fmp in self.FmpPayloadList:
+ payload = fmp.GenCapsuleSubItem()
+ FwMgrHdr.write(pack('=Q', PreSize))
+ PreSize += len(payload)
+ Content.write(payload)
+ BodySize = len(FwMgrHdr.getvalue()) + len(Content.getvalue())
+ Header.write(pack('=I', HdrSize + BodySize))
+ #
+ # The real capsule header structure is 28 bytes
+ #
+ Header.write('\x00'*(HdrSize-28))
+ Header.write(FwMgrHdr.getvalue())
+ Header.write(Content.getvalue())
+ #
+ # Generate FMP capsule file
+ #
+ CapOutputFile = os.path.join(GenFdsGlobalVariable.FvDir, self.UiCapsuleName) + '.Cap'
+ SaveFileOnChange(CapOutputFile, Header.getvalue(), True)
+ return CapOutputFile
+
## Generate capsule
#
# @param self The object pointer
@@ -52,6 +137,10 @@ class Capsule (CapsuleClassObject) :
return GenFds.ImageBinDict[self.UiCapsuleName.upper() + 'cap']

GenFdsGlobalVariable.InfLogger( "\nGenerate %s Capsule" %self.UiCapsuleName)
+ if ('CAPSULE_GUID' in self.TokensDict and
+ uuid.UUID(self.TokensDict['CAPSULE_GUID']) == uuid.UUID('6DCBD5ED-E82D-4C44-BDA1-7194199AD92A')):
+ return self.GenFmpCapsule()
+
CapInfFile = self.GenCapInf()
CapInfFile.writelines("[files]" + T_CHAR_LF)
CapFileList = []
diff --git a/BaseTools/Source/Python/GenFds/CapsuleData.py b/BaseTools/Source/Python/GenFds/CapsuleData.py
index 2d532be..efc2812 100644
--- a/BaseTools/Source/Python/GenFds/CapsuleData.py
+++ b/BaseTools/Source/Python/GenFds/CapsuleData.py
@@ -18,6 +18,9 @@
import Ffs
from GenFdsGlobalVariable import GenFdsGlobalVariable
import StringIO
+from struct import pack
+import os
+from Common.Misc import SaveFileOnChange

## base class for capsule data
#
@@ -154,4 +157,71 @@ class CapsuleAfile (CapsuleData):
# @retval string Generated file name
#
def GenCapsuleSubItem(self):
- return self.FileName
\ No newline at end of file
+ return self.FileName
+
+class CapsulePayload(CapsuleData):
+ '''Generate payload file, the header is defined below:
+ #pragma pack(1)
+ typedef struct {
+ UINT32 Version;
+ EFI_GUID UpdateImageTypeId;
+ UINT8 UpdateImageIndex;
+ UINT8 reserved_bytes[3];
+ UINT32 UpdateImageSize;
+ UINT32 UpdateVendorCodeSize;
+ UINT64 UpdateHardwareInstance; //Introduced in v2
+ } EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER;
+ '''
+ def __init__(self):
+ self.UiName = None
+ self.Version = None
+ self.ImageTypeId = None
+ self.ImageIndex = None
+ self.HardwareInstance = None
+ self.ImageFile = None
+ self.VendorCodeFile = None
+
+ def GenCapsuleSubItem(self):
+ if not self.Version:
+ self.Version = 0x00000002
+ ImageFileSize = os.path.getsize(self.ImageFile)
+ VendorFileSize = 0
+ if self.VendorCodeFile:
+ VendorFileSize = os.path.getsize(self.VendorCodeFile)
+
+ #
+ # Fill structure
+ #
+ Guid = self.ImageTypeId.split('-')
+ Buffer = pack('=ILHHBBBBBBBBBBBBIIQ',
+ int(self.Version,16),
+ 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),
+ int(self.ImageIndex, 16),
+ 0,
+ 0,
+ 0,
+ ImageFileSize,
+ VendorFileSize,
+ int(self.HardwareInstance, 16)
+ )
+ #
+ # Append file content to the structure
+ #
+ ImageFile = open(self.ImageFile, 'rb')
+ Buffer += ImageFile.read()
+ ImageFile.close()
+ if self.VendorCodeFile:
+ VendorFile = open(self.VendorCodeFile, 'rb')
+ Buffer += VendorFile.read()
+ VendorFile.close()
+ return Buffer
diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py
index 8091a51..ffc54ab 100644
--- a/BaseTools/Source/Python/GenFds/FdfParser.py
+++ b/BaseTools/Source/Python/GenFds/FdfParser.py
@@ -194,6 +194,7 @@ class FileProfile :
self.VtfList = []
self.RuleDict = {}
self.OptRomDict = {}
+ self.FmpPayloadDict = {}

## The syntax parser for FDF
#
@@ -1304,6 +1305,9 @@ class FdfParser:
while self.__GetFv():
pass

+ while self.__GetFmp():
+ pass
+
while self.__GetCapsule():
pass

@@ -1387,7 +1391,7 @@ class FdfParser:

S = self.__Token.upper()
if S.startswith("[") and not S.startswith("[FD."):
- if not S.startswith("[FV.") and not S.startswith("[CAPSULE.") \
+ if not S.startswith("[FV.") and not S.startswith('[FMPPAYLOAD.') and not S.startswith("[CAPSULE.") \
and not S.startswith("[VTF.") and not S.startswith("[RULE.") and not S.startswith("[OPTIONROM."):
raise Warning("Unknown section", self.FileName, self.CurrentLineNumber)
self.__UndoToken()
@@ -2024,7 +2028,7 @@ class FdfParser:

S = self.__Token.upper()
if S.startswith("[") and not S.startswith("[FV."):
- if not S.startswith("[CAPSULE.") \
+ if not S.startswith('[FMPPAYLOAD.') and not S.startswith("[CAPSULE.") \
and not S.startswith("[VTF.") and not S.startswith("[RULE.") and not S.startswith("[OPTIONROM."):
raise Warning("Unknown section or section appear sequence error (The correct sequence should be [FD.], [FV.], [Capsule.], [VTF.], [Rule.], [OptionRom.])", self.FileName, self.CurrentLineNumber)
self.__UndoToken()
@@ -2996,6 +3000,67 @@ class FdfParser:
else:
return True

+ def __GetFmp(self):
+ if not self.__GetNextToken():
+ return False
+ S = self.__Token.upper()
+ if not S.startswith("[FMPPAYLOAD."):
+ if not S.startswith("[CAPSULE.") and not S.startswith("[VTF.") and not S.startswith("[RULE.") and not S.startswith("[OPTIONROM."):
+ raise Warning("Unknown section or section appear sequence error (The correct sequence should be [FD.], [FV.], [FmpPayload.], [Capsule.], [VTF.], [Rule.], [OptionRom.])", self.FileName, self.CurrentLineNumber)
+ self.__UndoToken()
+ return False
+
+ self.__UndoToken()
+ self.__SkipToToken("[FMPPAYLOAD.", True)
+ FmpUiName = self.__GetUiName().upper()
+ if FmpUiName in self.Profile.FmpPayloadDict:
+ raise Warning("Duplicated FMP UI name found: %s" % FmpUiName, self.FileName, self.CurrentLineNumber)
+
+ FmpData = CapsuleData.CapsulePayload()
+ FmpData.UiName = FmpUiName
+
+ if not self.__IsToken( "]"):
+ raise Warning("expected ']'", self.FileName, self.CurrentLineNumber)
+
+ if not self.__GetNextToken():
+ raise Warning("The FMP payload section is empty!", self.FileName, self.CurrentLineNumber)
+ FmpKeyList = ['IMAGE_HEADER_INIT_VERSION', 'IMAGE_TYPE_ID', 'IMAGE_INDEX', 'HARDWARE_INSTANCE']
+ while self.__Token in FmpKeyList:
+ Name = self.__Token
+ FmpKeyList.remove(Name)
+ if not self.__IsToken("="):
+ raise Warning("expected '='", self.FileName, self.CurrentLineNumber)
+ if Name == 'IMAGE_TYPE_ID':
+ if not self.__GetNextGuid():
+ raise Warning("expected GUID value for IMAGE_TYPE_ID", self.FileName, self.CurrentLineNumber)
+ FmpData.ImageTypeId = self.__Token
+ else:
+ if not self.__GetNextToken():
+ raise Warning("expected value of %s" % Name, self.FileName, self.CurrentLineNumber)
+ Value = self.__Token
+ if Name == 'IMAGE_HEADER_INIT_VERSION':
+ FmpData.Version = Value
+ elif Name == 'IMAGE_INDEX':
+ FmpData.ImageIndex = Value
+ elif Name == 'HARDWARE_INSTANCE':
+ FmpData.HardwareInstance = Value
+ if not self.__GetNextToken():
+ break
+ else:
+ self.__UndoToken()
+
+ if FmpKeyList:
+ raise Warning("Missing keywords %s in FMP payload section" % ', '.join(FmpKeyList), self.FileName, self.CurrentLineNumber)
+ ImageFile = self.__ParseRawFileStatement()
+ if not ImageFile:
+ raise Warning("Missing image file in FMP payload section", self.FileName, self.CurrentLineNumber)
+ FmpData.ImageFile = ImageFile
+ VendorCodeFile = self.__ParseRawFileStatement()
+ if VendorCodeFile:
+ FmpData.VendorCodeFile = VendorCodeFile
+ self.Profile.FmpPayloadDict[FmpUiName] = FmpData
+ return True
+
## __GetCapsule() method
#
# Get capsule section contents and store its data into capsule list of self.Profile
@@ -3070,7 +3135,7 @@ class FdfParser:
def __GetCapsuleTokens(self, Obj):
if not self.__GetNextToken():
return False
- while self.__Token in ("CAPSULE_GUID", "CAPSULE_HEADER_SIZE", "CAPSULE_FLAGS", "OEM_CAPSULE_FLAGS"):
+ while self.__Token in ("CAPSULE_GUID", "CAPSULE_HEADER_SIZE", "CAPSULE_FLAGS", "OEM_CAPSULE_FLAGS", "CAPSULE_HEADER_INIT_VERSION"):
Name = self.__Token.strip()
if not self.__IsToken("="):
raise Warning("expected '='", self.FileName, self.CurrentLineNumber)
@@ -3121,7 +3186,8 @@ class FdfParser:
IsFd = self.__GetFdStatement(Obj)
IsAnyFile = self.__GetAnyFileStatement(Obj)
IsAfile = self.__GetAfileStatement(Obj)
- if not (IsInf or IsFile or IsFv or IsFd or IsAnyFile or IsAfile):
+ IsFmp = self.__GetFmpStatement(Obj)
+ if not (IsInf or IsFile or IsFv or IsFd or IsAnyFile or IsAfile or IsFmp):
break

## __GetFvStatement() method
@@ -3180,23 +3246,32 @@ class FdfParser:
CapsuleObj.CapsuleDataList.append(CapsuleFd)
return True

- ## __GetAnyFileStatement() method
- #
- # Get AnyFile for capsule
- #
- # @param self The object pointer
- # @param CapsuleObj for whom AnyFile is got
- # @retval True Successfully find a Anyfile statement
- # @retval False Not able to find a AnyFile statement
- #
- def __GetAnyFileStatement(self, CapsuleObj):
+ def __GetFmpStatement(self, CapsuleObj):
+ if not self.__IsKeyword("FMP"):
+ return False

- if not self.__IsKeyword("FILE"):
+ if not self.__IsKeyword("PAYLOAD"):
+ self.__UndoToken()
return False

+ if not self.__IsToken("="):
+ raise Warning("expected '='", self.FileName, self.CurrentLineNumber)
+
+ if not self.__GetNextToken():
+ raise Warning("expected payload name after FMP PAYLOAD =", self.FileName, self.CurrentLineNumber)
+ Payload = self.__Token.upper()
+ if Payload not in self.Profile.FmpPayloadDict:
+ raise Warning("This FMP Payload does not exist: %s" % self.__Token, self.FileName, self.CurrentLineNumber)
+ CapsuleObj.FmpPayloadList.append(self.Profile.FmpPayloadDict[Payload])
+ return True
+
+ def __ParseRawFileStatement(self):
+ if not self.__IsKeyword("FILE"):
+ return None
+
if not self.__IsKeyword("DATA"):
self.__UndoToken()
- return False
+ return None

if not self.__IsToken("="):
raise Warning("expected '='", self.FileName, self.CurrentLineNumber)
@@ -3208,6 +3283,21 @@ class FdfParser:
AnyFileName = GenFdsGlobalVariable.ReplaceWorkspaceMacro(AnyFileName)
if not os.path.exists(AnyFileName):
raise Warning("File %s not exists"%AnyFileName, self.FileName, self.CurrentLineNumber)
+ return AnyFileName
+
+ ## __GetAnyFileStatement() method
+ #
+ # Get AnyFile for capsule
+ #
+ # @param self The object pointer
+ # @param CapsuleObj for whom AnyFile is got
+ # @retval True Successfully find a Anyfile statement
+ # @retval False Not able to find a AnyFile statement
+ #
+ def __GetAnyFileStatement(self, CapsuleObj):
+ AnyFileName = self.__ParseRawFileStatement()
+ if not AnyFileName:
+ return False

CapsuleAnyFile = CapsuleData.CapsuleAnyFile()
CapsuleAnyFile.FileName = AnyFileName
--
1.9.5.msysgit.0


------------------------------------------------------------------------------
Gao, Liming
2015-06-16 10:09:01 UTC
Permalink
Hi, all
This BaseTool feature is to help generate UEFI FMP format capsule image. It reuses Capsule section and bases on specific capsule GUID to know this is FMP capsule image. The following is sample in FDF file for FMP capsule. It will be documented in FDF spec. If you have any comments for it, please let me know.

Platform.fdf file:
[FmpPayload.Payload1]
IMAGE_HEADER_INIT_VERSION = 0x02 # FMP payload header
IMAGE_TYPE_ID = 938A6F2E-9711-49CE-90D5-7ED68AC96501 # FMP payload header
IMAGE_INDEX = 0x1 # FMP payload header
HARDWARE_INSTANCE = 0x0 # FMP payload header

FILE DATA = UpdateImage.bin
FILE DATA = VendorCodeByes.bin # optional

[Capsule.FmpCapsuleImage]
CAPSULE_GUID = 6dcbd5ed-e82d-4c44-bda1-7194199ad92a # normal header FMP special Guid defined in UEFI spec
CAPSULE_FLAGS = PersistAcrossReset,InitiateReset # normal header
CAPSULE_HEADER_SIZE = 0x20 # normal header
CAPSULE_HEADER_INIT_VERSION = 0x1 # FMP header

FILE DATA = Driver1.efi
FILE DATA = Driver2.efi # zero or more
FMP_PAYLOAD = Payload1 # zero or more

Thanks
Liming
-----Original Message-----
From: Yingke Liu [mailto:***@intel.com]
Sent: Monday, June 15, 2015 3:39 PM
To: edk2-***@lists.sourceforge.net
Subject: [edk2] [Patch] BaseTools: Supported FMP capsule image.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Source/Python/Common/Misc.py | 21 ++++
.../Source/Python/CommonDataClass/FdfClass.py | 1 +
BaseTools/Source/Python/GenFds/Capsule.py | 89 +++++++++++++++
BaseTools/Source/Python/GenFds/CapsuleData.py | 72 +++++++++++-
BaseTools/Source/Python/GenFds/FdfParser.py | 122 ++++++++++++++++++---
5 files changed, 288 insertions(+), 17 deletions(-)

diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py
index fc1680b..8ba5819 100644
--- a/BaseTools/Source/Python/Common/Misc.py
+++ b/BaseTools/Source/Python/Common/Misc.py
@@ -24,6 +24,7 @@ import re
import cPickle
import array
import shutil
+from struct import pack
from UserDict import IterableUserDict
from UserList import UserList

@@ -2007,6 +2008,26 @@ class SkuClass():
AvailableSkuIdSet = property(__GetAvailableSkuIds)
SkuUsageType = property(__SkuUsageType)
AvailableSkuIdNumSet = property(__GetAvailableSkuIdNumber)
+
+#
+# Pack a registry format GUID
+#
+def PackRegistryFormatGuid(Guid):
+ Guid = Guid.split('-')
+ return pack('=LHHBBBBBBBB',
+ 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)
+ )
+
##
#
# This acts like the main() function for the script, unless it is 'import'ed into another diff --git a/BaseTools/Source/Python/CommonDataClass/FdfClass.py b/BaseTools/Source/Python/CommonDataClass/FdfClass.py
index ce3df12..f758d35 100644
--- a/BaseTools/Source/Python/CommonDataClass/FdfClass.py
+++ b/BaseTools/Source/Python/CommonDataClass/FdfClass.py
@@ -360,6 +360,7 @@ class CapsuleClassObject :
# TokensDict[var] = value
self.TokensDict = {}
self.CapsuleDataList = []
+ self.FmpPayloadList = []

## VTF data in FDF
#
diff --git a/BaseTools/Source/Python/GenFds/Capsule.py b/BaseTools/Source/Python/GenFds/Capsule.py
index 85f95a6..1683433 100644
--- a/BaseTools/Source/Python/GenFds/Capsule.py
+++ b/BaseTools/Source/Python/GenFds/Capsule.py
@@ -22,6 +22,9 @@ import subprocess
import StringIO
from Common.Misc import SaveFileOnChange from GenFds import GenFds
+from Common.Misc import PackRegistryFormatGuid import uuid from struct
+import pack


T_CHAR_LF = '\n'
@@ -42,6 +45,88 @@ class Capsule (CapsuleClassObject) :
self.BlockNum = None
self.CapsuleName = None

+ ## Generate FMP capsule
+ #
+ # @retval string Generated Capsule file path
+ #
+ def GenFmpCapsule(self):
+ #
+ # Generate capsule header
+ # typedef struct {
+ # EFI_GUID CapsuleGuid;
+ # UINT32 HeaderSize;
+ # UINT32 Flags;
+ # UINT32 CapsuleImageSize;
+ # } EFI_CAPSULE_HEADER;
+ #
+ Header = StringIO.StringIO()
+ #
+ # Use FMP capsule GUID: 6DCBD5ED-E82D-4C44-BDA1-7194199AD92A
+ #
+ Header.write(PackRegistryFormatGuid('6DCBD5ED-E82D-4C44-BDA1-7194199AD92A'))
+ HdrSize = 0
+ if 'CAPSULE_HEADER_SIZE' in self.TokensDict:
+ Header.write(pack('=I', int(self.TokensDict['CAPSULE_HEADER_SIZE'], 16)))
+ HdrSize = int(self.TokensDict['CAPSULE_HEADER_SIZE'], 16)
+ else:
+ Header.write(pack('=I', 0x20))
+ HdrSize = 0x20
+ Flags = 0
+ if 'CAPSULE_FLAGS' in self.TokensDict:
+ for flag in self.TokensDict['CAPSULE_FLAGS'].split(','):
+ flag = flag.strip()
+ if flag == 'PopulateSystemTable':
+ Flags |= 0x00010000 | 0x00020000
+ elif flag == 'PersistAcrossReset':
+ Flags |= 0x00010000
+ elif flag == 'InitiateReset':
+ Flags |= 0x00040000
+ Header.write(pack('=I', Flags))
+ #
+ # typedef struct {
+ # UINT32 Version;
+ # UINT16 EmbeddedDriverCount;
+ # UINT16 PayloadItemCount;
+ # // UINT64 ItemOffsetList[];
+ # } EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER;
+ #
+ FwMgrHdr = StringIO.StringIO()
+ if 'CAPSULE_HEADER_INIT_VERSION' in self.TokensDict:
+ FwMgrHdr.write(pack('=I', int(self.TokensDict['CAPSULE_HEADER_INIT_VERSION'], 16)))
+ else:
+ FwMgrHdr.write(pack('=I', 0x00000001))
+ FwMgrHdr.write(pack('=HH', len(self.CapsuleDataList), len(self.FmpPayloadList)))
+ FwMgrHdrSize =
+ 4+2+2+8*(len(self.CapsuleDataList)+len(self.FmpPayloadList))
+
+ PreSize = FwMgrHdrSize
+ Content = StringIO.StringIO()
+ for driver in self.CapsuleDataList:
+ FileName = driver.GenCapsuleSubItem()
+ FwMgrHdr.write(pack('=Q', PreSize))
+ PreSize += os.path.getsize(FileName)
+ File = open(FileName, 'rb')
+ Content.write(File.read())
+ File.close()
+ for fmp in self.FmpPayloadList:
+ payload = fmp.GenCapsuleSubItem()
+ FwMgrHdr.write(pack('=Q', PreSize))
+ PreSize += len(payload)
+ Content.write(payload)
+ BodySize = len(FwMgrHdr.getvalue()) + len(Content.getvalue())
+ Header.write(pack('=I', HdrSize + BodySize))
+ #
+ # The real capsule header structure is 28 bytes
+ #
+ Header.write('\x00'*(HdrSize-28))
+ Header.write(FwMgrHdr.getvalue())
+ Header.write(Content.getvalue())
+ #
+ # Generate FMP capsule file
+ #
+ CapOutputFile = os.path.join(GenFdsGlobalVariable.FvDir, self.UiCapsuleName) + '.Cap'
+ SaveFileOnChange(CapOutputFile, Header.getvalue(), True)
+ return CapOutputFile
+
## Generate capsule
#
# @param self The object pointer
@@ -52,6 +137,10 @@ class Capsule (CapsuleClassObject) :
return GenFds.ImageBinDict[self.UiCapsuleName.upper() + 'cap']

GenFdsGlobalVariable.InfLogger( "\nGenerate %s Capsule" %self.UiCapsuleName)
+ if ('CAPSULE_GUID' in self.TokensDict and
+ uuid.UUID(self.TokensDict['CAPSULE_GUID']) == uuid.UUID('6DCBD5ED-E82D-4C44-BDA1-7194199AD92A')):
+ return self.GenFmpCapsule()
+
CapInfFile = self.GenCapInf()
CapInfFile.writelines("[files]" + T_CHAR_LF)
CapFileList = []
diff --git a/BaseTools/Source/Python/GenFds/CapsuleData.py b/BaseTools/Source/Python/GenFds/CapsuleData.py
index 2d532be..efc2812 100644
--- a/BaseTools/Source/Python/GenFds/CapsuleData.py
+++ b/BaseTools/Source/Python/GenFds/CapsuleData.py
@@ -18,6 +18,9 @@
import Ffs
from GenFdsGlobalVariable import GenFdsGlobalVariable import StringIO
+from struct import pack
+import os
+from Common.Misc import SaveFileOnChange

## base class for capsule data
#
@@ -154,4 +157,71 @@ class CapsuleAfile (CapsuleData):
# @retval string Generated file name
#
def GenCapsuleSubItem(self):
- return self.FileName
\ No newline at end of file
+ return self.FileName
+
+class CapsulePayload(CapsuleData):
+ '''Generate payload file, the header is defined below:
+ #pragma pack(1)
+ typedef struct {
+ UINT32 Version;
+ EFI_GUID UpdateImageTypeId;
+ UINT8 UpdateImageIndex;
+ UINT8 reserved_bytes[3];
+ UINT32 UpdateImageSize;
+ UINT32 UpdateVendorCodeSize;
+ UINT64 UpdateHardwareInstance; //Introduced in v2
+ } EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER;
+ '''
+ def __init__(self):
+ self.UiName = None
+ self.Version = None
+ self.ImageTypeId = None
+ self.ImageIndex = None
+ self.HardwareInstance = None
+ self.ImageFile = None
+ self.VendorCodeFile = None
+
+ def GenCapsuleSubItem(self):
+ if not self.Version:
+ self.Version = 0x00000002
+ ImageFileSize = os.path.getsize(self.ImageFile)
+ VendorFileSize = 0
+ if self.VendorCodeFile:
+ VendorFileSize = os.path.getsize(self.VendorCodeFile)
+
+ #
+ # Fill structure
+ #
+ Guid = self.ImageTypeId.split('-')
+ Buffer = pack('=ILHHBBBBBBBBBBBBIIQ',
+ int(self.Version,16),
+ 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),
+ int(self.ImageIndex, 16),
+ 0,
+ 0,
+ 0,
+ ImageFileSize,
+ VendorFileSize,
+ int(self.HardwareInstance, 16)
+ )
+ #
+ # Append file content to the structure
+ #
+ ImageFile = open(self.ImageFile, 'rb')
+ Buffer += ImageFile.read()
+ ImageFile.close()
+ if self.VendorCodeFile:
+ VendorFile = open(self.VendorCodeFile, 'rb')
+ Buffer += VendorFile.read()
+ VendorFile.close()
+ return Buffer
diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py
index 8091a51..ffc54ab 100644
--- a/BaseTools/Source/Python/GenFds/FdfParser.py
+++ b/BaseTools/Source/Python/GenFds/FdfParser.py
@@ -194,6 +194,7 @@ class FileProfile :
self.VtfList = []
self.RuleDict = {}
self.OptRomDict = {}
+ self.FmpPayloadDict = {}

## The syntax parser for FDF
#
@@ -1304,6 +1305,9 @@ class FdfParser:
while self.__GetFv():
pass

+ while self.__GetFmp():
+ pass
+
while self.__GetCapsule():
pass

@@ -1387,7 +1391,7 @@ class FdfParser:

S = self.__Token.upper()
if S.startswith("[") and not S.startswith("[FD."):
- if not S.startswith("[FV.") and not S.startswith("[CAPSULE.") \
+ if not S.startswith("[FV.") and not
+ S.startswith('[FMPPAYLOAD.') and not S.startswith("[CAPSULE.") \
and not S.startswith("[VTF.") and not S.startswith("[RULE.") and not S.startswith("[OPTIONROM."):
raise Warning("Unknown section", self.FileName, self.CurrentLineNumber)
self.__UndoToken()
@@ -2024,7 +2028,7 @@ class FdfParser:

S = self.__Token.upper()
if S.startswith("[") and not S.startswith("[FV."):
- if not S.startswith("[CAPSULE.") \
+ if not S.startswith('[FMPPAYLOAD.') and not
+ S.startswith("[CAPSULE.") \
and not S.startswith("[VTF.") and not S.startswith("[RULE.") and not S.startswith("[OPTIONROM."):
raise Warning("Unknown section or section appear sequence error (The correct sequence should be [FD.], [FV.], [Capsule.], [VTF.], [Rule.], [OptionRom.])", self.FileName, self.CurrentLineNumber)
self.__UndoToken()
@@ -2996,6 +3000,67 @@ class FdfParser:
else:
return True

+ def __GetFmp(self):
+ if not self.__GetNextToken():
+ return False
+ S = self.__Token.upper()
+ if not S.startswith("[FMPPAYLOAD."):
+ if not S.startswith("[CAPSULE.") and not S.startswith("[VTF.") and not S.startswith("[RULE.") and not S.startswith("[OPTIONROM."):
+ raise Warning("Unknown section or section appear sequence error (The correct sequence should be [FD.], [FV.], [FmpPayload.], [Capsule.], [VTF.], [Rule.], [OptionRom.])", self.FileName, self.CurrentLineNumber)
+ self.__UndoToken()
+ return False
+
+ self.__UndoToken()
+ self.__SkipToToken("[FMPPAYLOAD.", True)
+ FmpUiName = self.__GetUiName().upper()
+ if FmpUiName in self.Profile.FmpPayloadDict:
+ raise Warning("Duplicated FMP UI name found: %s" %
+ FmpUiName, self.FileName, self.CurrentLineNumber)
+
+ FmpData = CapsuleData.CapsulePayload()
+ FmpData.UiName = FmpUiName
+
+ if not self.__IsToken( "]"):
+ raise Warning("expected ']'", self.FileName,
+ self.CurrentLineNumber)
+
+ if not self.__GetNextToken():
+ raise Warning("The FMP payload section is empty!", self.FileName, self.CurrentLineNumber)
+ FmpKeyList = ['IMAGE_HEADER_INIT_VERSION', 'IMAGE_TYPE_ID', 'IMAGE_INDEX', 'HARDWARE_INSTANCE']
+ while self.__Token in FmpKeyList:
+ Name = self.__Token
+ FmpKeyList.remove(Name)
+ if not self.__IsToken("="):
+ raise Warning("expected '='", self.FileName, self.CurrentLineNumber)
+ if Name == 'IMAGE_TYPE_ID':
+ if not self.__GetNextGuid():
+ raise Warning("expected GUID value for IMAGE_TYPE_ID", self.FileName, self.CurrentLineNumber)
+ FmpData.ImageTypeId = self.__Token
+ else:
+ if not self.__GetNextToken():
+ raise Warning("expected value of %s" % Name, self.FileName, self.CurrentLineNumber)
+ Value = self.__Token
+ if Name == 'IMAGE_HEADER_INIT_VERSION':
+ FmpData.Version = Value
+ elif Name == 'IMAGE_INDEX':
+ FmpData.ImageIndex = Value
+ elif Name == 'HARDWARE_INSTANCE':
+ FmpData.HardwareInstance = Value
+ if not self.__GetNextToken():
+ break
+ else:
+ self.__UndoToken()
+
+ if FmpKeyList:
+ raise Warning("Missing keywords %s in FMP payload section" % ', '.join(FmpKeyList), self.FileName, self.CurrentLineNumber)
+ ImageFile = self.__ParseRawFileStatement()
+ if not ImageFile:
+ raise Warning("Missing image file in FMP payload section", self.FileName, self.CurrentLineNumber)
+ FmpData.ImageFile = ImageFile
+ VendorCodeFile = self.__ParseRawFileStatement()
+ if VendorCodeFile:
+ FmpData.VendorCodeFile = VendorCodeFile
+ self.Profile.FmpPayloadDict[FmpUiName] = FmpData
+ return True
+
## __GetCapsule() method
#
# Get capsule section contents and store its data into capsule list of self.Profile
@@ -3070,7 +3135,7 @@ class FdfParser:
def __GetCapsuleTokens(self, Obj):
if not self.__GetNextToken():
return False
- while self.__Token in ("CAPSULE_GUID", "CAPSULE_HEADER_SIZE", "CAPSULE_FLAGS", "OEM_CAPSULE_FLAGS"):
+ while self.__Token in ("CAPSULE_GUID", "CAPSULE_HEADER_SIZE", "CAPSULE_FLAGS", "OEM_CAPSULE_FLAGS", "CAPSULE_HEADER_INIT_VERSION"):
Name = self.__Token.strip()
if not self.__IsToken("="):
raise Warning("expected '='", self.FileName, self.CurrentLineNumber) @@ -3121,7 +3186,8 @@ class FdfParser:
IsFd = self.__GetFdStatement(Obj)
IsAnyFile = self.__GetAnyFileStatement(Obj)
IsAfile = self.__GetAfileStatement(Obj)
- if not (IsInf or IsFile or IsFv or IsFd or IsAnyFile or IsAfile):
+ IsFmp = self.__GetFmpStatement(Obj)
+ if not (IsInf or IsFile or IsFv or IsFd or IsAnyFile or IsAfile or IsFmp):
break

## __GetFvStatement() method
@@ -3180,23 +3246,32 @@ class FdfParser:
CapsuleObj.CapsuleDataList.append(CapsuleFd)
return True

- ## __GetAnyFileStatement() method
- #
- # Get AnyFile for capsule
- #
- # @param self The object pointer
- # @param CapsuleObj for whom AnyFile is got
- # @retval True Successfully find a Anyfile statement
- # @retval False Not able to find a AnyFile statement
- #
- def __GetAnyFileStatement(self, CapsuleObj):
+ def __GetFmpStatement(self, CapsuleObj):
+ if not self.__IsKeyword("FMP"):
+ return False

- if not self.__IsKeyword("FILE"):
+ if not self.__IsKeyword("PAYLOAD"):
+ self.__UndoToken()
return False

+ if not self.__IsToken("="):
+ raise Warning("expected '='", self.FileName,
+ self.CurrentLineNumber)
+
+ if not self.__GetNextToken():
+ raise Warning("expected payload name after FMP PAYLOAD =", self.FileName, self.CurrentLineNumber)
+ Payload = self.__Token.upper()
+ if Payload not in self.Profile.FmpPayloadDict:
+ raise Warning("This FMP Payload does not exist: %s" % self.__Token, self.FileName, self.CurrentLineNumber)
+ CapsuleObj.FmpPayloadList.append(self.Profile.FmpPayloadDict[Payload])
+ return True
+
+ def __ParseRawFileStatement(self):
+ if not self.__IsKeyword("FILE"):
+ return None
+
if not self.__IsKeyword("DATA"):
self.__UndoToken()
- return False
+ return None

if not self.__IsToken("="):
raise Warning("expected '='", self.FileName, self.CurrentLineNumber) @@ -3208,6 +3283,21 @@ class FdfParser:
AnyFileName = GenFdsGlobalVariable.ReplaceWorkspaceMacro(AnyFileName)
if not os.path.exists(AnyFileName):
raise Warning("File %s not exists"%AnyFileName, self.FileName, self.CurrentLineNumber)
+ return AnyFileName
+
+ ## __GetAnyFileStatement() method
+ #
+ # Get AnyFile for capsule
+ #
+ # @param self The object pointer
+ # @param CapsuleObj for whom AnyFile is got
+ # @retval True Successfully find a Anyfile statement
+ # @retval False Not able to find a AnyFile statement
+ #
+ def __GetAnyFileStatement(self, CapsuleObj):
+ AnyFileName = self.__ParseRawFileStatement()
+ if not AnyFileName:
+ return False

CapsuleAnyFile = CapsuleData.CapsuleAnyFile()
CapsuleAnyFile.FileName = AnyFileName
--
1.9.5.msysgit.0
Gao, Liming
2015-06-23 06:17:10 UTC
Permalink
Reviewed-by: Liming Gao <***@intel.com>

-----Original Message-----
From: Gao, Liming [mailto:***@intel.com]
Sent: Tuesday, June 16, 2015 6:09 PM
To: edk2-***@lists.sourceforge.net
Subject: Re: [edk2] [Patch] BaseTools: Supported FMP capsule image.

Hi, all
This BaseTool feature is to help generate UEFI FMP format capsule image. It reuses Capsule section and bases on specific capsule GUID to know this is FMP capsule image. The following is sample in FDF file for FMP capsule. It will be documented in FDF spec. If you have any comments for it, please let me know.

Platform.fdf file:
[FmpPayload.Payload1]
IMAGE_HEADER_INIT_VERSION = 0x02 # FMP payload header
IMAGE_TYPE_ID = 938A6F2E-9711-49CE-90D5-7ED68AC96501 # FMP payload header
IMAGE_INDEX = 0x1 # FMP payload header
HARDWARE_INSTANCE = 0x0 # FMP payload header

FILE DATA = UpdateImage.bin
FILE DATA = VendorCodeByes.bin # optional

[Capsule.FmpCapsuleImage]
CAPSULE_GUID = 6dcbd5ed-e82d-4c44-bda1-7194199ad92a # normal header FMP special Guid defined in UEFI spec
CAPSULE_FLAGS = PersistAcrossReset,InitiateReset # normal header
CAPSULE_HEADER_SIZE = 0x20 # normal header
CAPSULE_HEADER_INIT_VERSION = 0x1 # FMP header

FILE DATA = Driver1.efi
FILE DATA = Driver2.efi # zero or more
FMP_PAYLOAD = Payload1 # zero or more

Thanks
Liming
-----Original Message-----
From: Yingke Liu [mailto:***@intel.com]
Sent: Monday, June 15, 2015 3:39 PM
To: edk2-***@lists.sourceforge.net
Subject: [edk2] [Patch] BaseTools: Supported FMP capsule image.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Source/Python/Common/Misc.py | 21 ++++
.../Source/Python/CommonDataClass/FdfClass.py | 1 +
BaseTools/Source/Python/GenFds/Capsule.py | 89 +++++++++++++++
BaseTools/Source/Python/GenFds/CapsuleData.py | 72 +++++++++++-
BaseTools/Source/Python/GenFds/FdfParser.py | 122 ++++++++++++++++++---
5 files changed, 288 insertions(+), 17 deletions(-)

diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py
index fc1680b..8ba5819 100644
--- a/BaseTools/Source/Python/Common/Misc.py
+++ b/BaseTools/Source/Python/Common/Misc.py
@@ -24,6 +24,7 @@ import re
import cPickle
import array
import shutil
+from struct import pack
from UserDict import IterableUserDict
from UserList import UserList

@@ -2007,6 +2008,26 @@ class SkuClass():
AvailableSkuIdSet = property(__GetAvailableSkuIds)
SkuUsageType = property(__SkuUsageType)
AvailableSkuIdNumSet = property(__GetAvailableSkuIdNumber)
+
+#
+# Pack a registry format GUID
+#
+def PackRegistryFormatGuid(Guid):
+ Guid = Guid.split('-')
+ return pack('=LHHBBBBBBBB',
+ 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)
+ )
+
##
#
# This acts like the main() function for the script, unless it is 'import'ed into another diff --git a/BaseTools/Source/Python/CommonDataClass/FdfClass.py b/BaseTools/Source/Python/CommonDataClass/FdfClass.py
index ce3df12..f758d35 100644
--- a/BaseTools/Source/Python/CommonDataClass/FdfClass.py
+++ b/BaseTools/Source/Python/CommonDataClass/FdfClass.py
@@ -360,6 +360,7 @@ class CapsuleClassObject :
# TokensDict[var] = value
self.TokensDict = {}
self.CapsuleDataList = []
+ self.FmpPayloadList = []

## VTF data in FDF
#
diff --git a/BaseTools/Source/Python/GenFds/Capsule.py b/BaseTools/Source/Python/GenFds/Capsule.py
index 85f95a6..1683433 100644
--- a/BaseTools/Source/Python/GenFds/Capsule.py
+++ b/BaseTools/Source/Python/GenFds/Capsule.py
@@ -22,6 +22,9 @@ import subprocess
import StringIO
from Common.Misc import SaveFileOnChange from GenFds import GenFds
+from Common.Misc import PackRegistryFormatGuid import uuid from struct
+import pack


T_CHAR_LF = '\n'
@@ -42,6 +45,88 @@ class Capsule (CapsuleClassObject) :
self.BlockNum = None
self.CapsuleName = None

+ ## Generate FMP capsule
+ #
+ # @retval string Generated Capsule file path
+ #
+ def GenFmpCapsule(self):
+ #
+ # Generate capsule header
+ # typedef struct {
+ # EFI_GUID CapsuleGuid;
+ # UINT32 HeaderSize;
+ # UINT32 Flags;
+ # UINT32 CapsuleImageSize;
+ # } EFI_CAPSULE_HEADER;
+ #
+ Header = StringIO.StringIO()
+ #
+ # Use FMP capsule GUID: 6DCBD5ED-E82D-4C44-BDA1-7194199AD92A
+ #
+ Header.write(PackRegistryFormatGuid('6DCBD5ED-E82D-4C44-BDA1-7194199AD92A'))
+ HdrSize = 0
+ if 'CAPSULE_HEADER_SIZE' in self.TokensDict:
+ Header.write(pack('=I', int(self.TokensDict['CAPSULE_HEADER_SIZE'], 16)))
+ HdrSize = int(self.TokensDict['CAPSULE_HEADER_SIZE'], 16)
+ else:
+ Header.write(pack('=I', 0x20))
+ HdrSize = 0x20
+ Flags = 0
+ if 'CAPSULE_FLAGS' in self.TokensDict:
+ for flag in self.TokensDict['CAPSULE_FLAGS'].split(','):
+ flag = flag.strip()
+ if flag == 'PopulateSystemTable':
+ Flags |= 0x00010000 | 0x00020000
+ elif flag == 'PersistAcrossReset':
+ Flags |= 0x00010000
+ elif flag == 'InitiateReset':
+ Flags |= 0x00040000
+ Header.write(pack('=I', Flags))
+ #
+ # typedef struct {
+ # UINT32 Version;
+ # UINT16 EmbeddedDriverCount;
+ # UINT16 PayloadItemCount;
+ # // UINT64 ItemOffsetList[];
+ # } EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER;
+ #
+ FwMgrHdr = StringIO.StringIO()
+ if 'CAPSULE_HEADER_INIT_VERSION' in self.TokensDict:
+ FwMgrHdr.write(pack('=I', int(self.TokensDict['CAPSULE_HEADER_INIT_VERSION'], 16)))
+ else:
+ FwMgrHdr.write(pack('=I', 0x00000001))
+ FwMgrHdr.write(pack('=HH', len(self.CapsuleDataList), len(self.FmpPayloadList)))
+ FwMgrHdrSize =
+ 4+2+2+8*(len(self.CapsuleDataList)+len(self.FmpPayloadList))
+
+ PreSize = FwMgrHdrSize
+ Content = StringIO.StringIO()
+ for driver in self.CapsuleDataList:
+ FileName = driver.GenCapsuleSubItem()
+ FwMgrHdr.write(pack('=Q', PreSize))
+ PreSize += os.path.getsize(FileName)
+ File = open(FileName, 'rb')
+ Content.write(File.read())
+ File.close()
+ for fmp in self.FmpPayloadList:
+ payload = fmp.GenCapsuleSubItem()
+ FwMgrHdr.write(pack('=Q', PreSize))
+ PreSize += len(payload)
+ Content.write(payload)
+ BodySize = len(FwMgrHdr.getvalue()) + len(Content.getvalue())
+ Header.write(pack('=I', HdrSize + BodySize))
+ #
+ # The real capsule header structure is 28 bytes
+ #
+ Header.write('\x00'*(HdrSize-28))
+ Header.write(FwMgrHdr.getvalue())
+ Header.write(Content.getvalue())
+ #
+ # Generate FMP capsule file
+ #
+ CapOutputFile = os.path.join(GenFdsGlobalVariable.FvDir, self.UiCapsuleName) + '.Cap'
+ SaveFileOnChange(CapOutputFile, Header.getvalue(), True)
+ return CapOutputFile
+
## Generate capsule
#
# @param self The object pointer
@@ -52,6 +137,10 @@ class Capsule (CapsuleClassObject) :
return GenFds.ImageBinDict[self.UiCapsuleName.upper() + 'cap']

GenFdsGlobalVariable.InfLogger( "\nGenerate %s Capsule" %self.UiCapsuleName)
+ if ('CAPSULE_GUID' in self.TokensDict and
+ uuid.UUID(self.TokensDict['CAPSULE_GUID']) == uuid.UUID('6DCBD5ED-E82D-4C44-BDA1-7194199AD92A')):
+ return self.GenFmpCapsule()
+
CapInfFile = self.GenCapInf()
CapInfFile.writelines("[files]" + T_CHAR_LF)
CapFileList = []
diff --git a/BaseTools/Source/Python/GenFds/CapsuleData.py b/BaseTools/Source/Python/GenFds/CapsuleData.py
index 2d532be..efc2812 100644
--- a/BaseTools/Source/Python/GenFds/CapsuleData.py
+++ b/BaseTools/Source/Python/GenFds/CapsuleData.py
@@ -18,6 +18,9 @@
import Ffs
from GenFdsGlobalVariable import GenFdsGlobalVariable import StringIO
+from struct import pack
+import os
+from Common.Misc import SaveFileOnChange

## base class for capsule data
#
@@ -154,4 +157,71 @@ class CapsuleAfile (CapsuleData):
# @retval string Generated file name
#
def GenCapsuleSubItem(self):
- return self.FileName
\ No newline at end of file
+ return self.FileName
+
+class CapsulePayload(CapsuleData):
+ '''Generate payload file, the header is defined below:
+ #pragma pack(1)
+ typedef struct {
+ UINT32 Version;
+ EFI_GUID UpdateImageTypeId;
+ UINT8 UpdateImageIndex;
+ UINT8 reserved_bytes[3];
+ UINT32 UpdateImageSize;
+ UINT32 UpdateVendorCodeSize;
+ UINT64 UpdateHardwareInstance; //Introduced in v2
+ } EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER;
+ '''
+ def __init__(self):
+ self.UiName = None
+ self.Version = None
+ self.ImageTypeId = None
+ self.ImageIndex = None
+ self.HardwareInstance = None
+ self.ImageFile = None
+ self.VendorCodeFile = None
+
+ def GenCapsuleSubItem(self):
+ if not self.Version:
+ self.Version = 0x00000002
+ ImageFileSize = os.path.getsize(self.ImageFile)
+ VendorFileSize = 0
+ if self.VendorCodeFile:
+ VendorFileSize = os.path.getsize(self.VendorCodeFile)
+
+ #
+ # Fill structure
+ #
+ Guid = self.ImageTypeId.split('-')
+ Buffer = pack('=ILHHBBBBBBBBBBBBIIQ',
+ int(self.Version,16),
+ 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),
+ int(self.ImageIndex, 16),
+ 0,
+ 0,
+ 0,
+ ImageFileSize,
+ VendorFileSize,
+ int(self.HardwareInstance, 16)
+ )
+ #
+ # Append file content to the structure
+ #
+ ImageFile = open(self.ImageFile, 'rb')
+ Buffer += ImageFile.read()
+ ImageFile.close()
+ if self.VendorCodeFile:
+ VendorFile = open(self.VendorCodeFile, 'rb')
+ Buffer += VendorFile.read()
+ VendorFile.close()
+ return Buffer
diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py
index 8091a51..ffc54ab 100644
--- a/BaseTools/Source/Python/GenFds/FdfParser.py
+++ b/BaseTools/Source/Python/GenFds/FdfParser.py
@@ -194,6 +194,7 @@ class FileProfile :
self.VtfList = []
self.RuleDict = {}
self.OptRomDict = {}
+ self.FmpPayloadDict = {}

## The syntax parser for FDF
#
@@ -1304,6 +1305,9 @@ class FdfParser:
while self.__GetFv():
pass

+ while self.__GetFmp():
+ pass
+
while self.__GetCapsule():
pass

@@ -1387,7 +1391,7 @@ class FdfParser:

S = self.__Token.upper()
if S.startswith("[") and not S.startswith("[FD."):
- if not S.startswith("[FV.") and not S.startswith("[CAPSULE.") \
+ if not S.startswith("[FV.") and not
+ S.startswith('[FMPPAYLOAD.') and not S.startswith("[CAPSULE.") \
and not S.startswith("[VTF.") and not S.startswith("[RULE.") and not S.startswith("[OPTIONROM."):
raise Warning("Unknown section", self.FileName, self.CurrentLineNumber)
self.__UndoToken()
@@ -2024,7 +2028,7 @@ class FdfParser:

S = self.__Token.upper()
if S.startswith("[") and not S.startswith("[FV."):
- if not S.startswith("[CAPSULE.") \
+ if not S.startswith('[FMPPAYLOAD.') and not
+ S.startswith("[CAPSULE.") \
and not S.startswith("[VTF.") and not S.startswith("[RULE.") and not S.startswith("[OPTIONROM."):
raise Warning("Unknown section or section appear sequence error (The correct sequence should be [FD.], [FV.], [Capsule.], [VTF.], [Rule.], [OptionRom.])", self.FileName, self.CurrentLineNumber)
self.__UndoToken()
@@ -2996,6 +3000,67 @@ class FdfParser:
else:
return True

+ def __GetFmp(self):
+ if not self.__GetNextToken():
+ return False
+ S = self.__Token.upper()
+ if not S.startswith("[FMPPAYLOAD."):
+ if not S.startswith("[CAPSULE.") and not S.startswith("[VTF.") and not S.startswith("[RULE.") and not S.startswith("[OPTIONROM."):
+ raise Warning("Unknown section or section appear sequence error (The correct sequence should be [FD.], [FV.], [FmpPayload.], [Capsule.], [VTF.], [Rule.], [OptionRom.])", self.FileName, self.CurrentLineNumber)
+ self.__UndoToken()
+ return False
+
+ self.__UndoToken()
+ self.__SkipToToken("[FMPPAYLOAD.", True)
+ FmpUiName = self.__GetUiName().upper()
+ if FmpUiName in self.Profile.FmpPayloadDict:
+ raise Warning("Duplicated FMP UI name found: %s" %
+ FmpUiName, self.FileName, self.CurrentLineNumber)
+
+ FmpData = CapsuleData.CapsulePayload()
+ FmpData.UiName = FmpUiName
+
+ if not self.__IsToken( "]"):
+ raise Warning("expected ']'", self.FileName,
+ self.CurrentLineNumber)
+
+ if not self.__GetNextToken():
+ raise Warning("The FMP payload section is empty!", self.FileName, self.CurrentLineNumber)
+ FmpKeyList = ['IMAGE_HEADER_INIT_VERSION', 'IMAGE_TYPE_ID', 'IMAGE_INDEX', 'HARDWARE_INSTANCE']
+ while self.__Token in FmpKeyList:
+ Name = self.__Token
+ FmpKeyList.remove(Name)
+ if not self.__IsToken("="):
+ raise Warning("expected '='", self.FileName, self.CurrentLineNumber)
+ if Name == 'IMAGE_TYPE_ID':
+ if not self.__GetNextGuid():
+ raise Warning("expected GUID value for IMAGE_TYPE_ID", self.FileName, self.CurrentLineNumber)
+ FmpData.ImageTypeId = self.__Token
+ else:
+ if not self.__GetNextToken():
+ raise Warning("expected value of %s" % Name, self.FileName, self.CurrentLineNumber)
+ Value = self.__Token
+ if Name == 'IMAGE_HEADER_INIT_VERSION':
+ FmpData.Version = Value
+ elif Name == 'IMAGE_INDEX':
+ FmpData.ImageIndex = Value
+ elif Name == 'HARDWARE_INSTANCE':
+ FmpData.HardwareInstance = Value
+ if not self.__GetNextToken():
+ break
+ else:
+ self.__UndoToken()
+
+ if FmpKeyList:
+ raise Warning("Missing keywords %s in FMP payload section" % ', '.join(FmpKeyList), self.FileName, self.CurrentLineNumber)
+ ImageFile = self.__ParseRawFileStatement()
+ if not ImageFile:
+ raise Warning("Missing image file in FMP payload section", self.FileName, self.CurrentLineNumber)
+ FmpData.ImageFile = ImageFile
+ VendorCodeFile = self.__ParseRawFileStatement()
+ if VendorCodeFile:
+ FmpData.VendorCodeFile = VendorCodeFile
+ self.Profile.FmpPayloadDict[FmpUiName] = FmpData
+ return True
+
## __GetCapsule() method
#
# Get capsule section contents and store its data into capsule list of self.Profile
@@ -3070,7 +3135,7 @@ class FdfParser:
def __GetCapsuleTokens(self, Obj):
if not self.__GetNextToken():
return False
- while self.__Token in ("CAPSULE_GUID", "CAPSULE_HEADER_SIZE", "CAPSULE_FLAGS", "OEM_CAPSULE_FLAGS"):
+ while self.__Token in ("CAPSULE_GUID", "CAPSULE_HEADER_SIZE", "CAPSULE_FLAGS", "OEM_CAPSULE_FLAGS", "CAPSULE_HEADER_INIT_VERSION"):
Name = self.__Token.strip()
if not self.__IsToken("="):
raise Warning("expected '='", self.FileName, self.CurrentLineNumber) @@ -3121,7 +3186,8 @@ class FdfParser:
IsFd = self.__GetFdStatement(Obj)
IsAnyFile = self.__GetAnyFileStatement(Obj)
IsAfile = self.__GetAfileStatement(Obj)
- if not (IsInf or IsFile or IsFv or IsFd or IsAnyFile or IsAfile):
+ IsFmp = self.__GetFmpStatement(Obj)
+ if not (IsInf or IsFile or IsFv or IsFd or IsAnyFile or IsAfile or IsFmp):
break

## __GetFvStatement() method
@@ -3180,23 +3246,32 @@ class FdfParser:
CapsuleObj.CapsuleDataList.append(CapsuleFd)
return True

- ## __GetAnyFileStatement() method
- #
- # Get AnyFile for capsule
- #
- # @param self The object pointer
- # @param CapsuleObj for whom AnyFile is got
- # @retval True Successfully find a Anyfile statement
- # @retval False Not able to find a AnyFile statement
- #
- def __GetAnyFileStatement(self, CapsuleObj):
+ def __GetFmpStatement(self, CapsuleObj):
+ if not self.__IsKeyword("FMP"):
+ return False

- if not self.__IsKeyword("FILE"):
+ if not self.__IsKeyword("PAYLOAD"):
+ self.__UndoToken()
return False

+ if not self.__IsToken("="):
+ raise Warning("expected '='", self.FileName,
+ self.CurrentLineNumber)
+
+ if not self.__GetNextToken():
+ raise Warning("expected payload name after FMP PAYLOAD =", self.FileName, self.CurrentLineNumber)
+ Payload = self.__Token.upper()
+ if Payload not in self.Profile.FmpPayloadDict:
+ raise Warning("This FMP Payload does not exist: %s" % self.__Token, self.FileName, self.CurrentLineNumber)
+ CapsuleObj.FmpPayloadList.append(self.Profile.FmpPayloadDict[Payload])
+ return True
+
+ def __ParseRawFileStatement(self):
+ if not self.__IsKeyword("FILE"):
+ return None
+
if not self.__IsKeyword("DATA"):
self.__UndoToken()
- return False
+ return None

if not self.__IsToken("="):
raise Warning("expected '='", self.FileName, self.CurrentLineNumber) @@ -3208,6 +3283,21 @@ class FdfParser:
AnyFileName = GenFdsGlobalVariable.ReplaceWorkspaceMacro(AnyFileName)
if not os.path.exists(AnyFileName):
raise Warning("File %s not exists"%AnyFileName, self.FileName, self.CurrentLineNumber)
+ return AnyFileName
+
+ ## __GetAnyFileStatement() method
+ #
+ # Get AnyFile for capsule
+ #
+ # @param self The object pointer
+ # @param CapsuleObj for whom AnyFile is got
+ # @retval True Successfully find a Anyfile statement
+ # @retval False Not able to find a AnyFile statement
+ #
+ def __GetAnyFileStatement(self, CapsuleObj):
+ AnyFileName = self.__ParseRawFileStatement()
+ if not AnyFileName:
+ return False

CapsuleAnyFile = CapsuleData.CapsuleAnyFile()
CapsuleAnyFile.FileName = AnyFileName
--
1.9.5.msysgit.0


------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Yingke Liu
2015-06-16 03:22:16 UTC
Permalink
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Source/Python/AutoGen/GenMake.py | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/Python/AutoGen/GenMake.py
index 1d49a03..0342709 100644
--- a/BaseTools/Source/Python/AutoGen/GenMake.py
+++ b/BaseTools/Source/Python/AutoGen/GenMake.py
@@ -555,8 +555,16 @@ cleanlib:
LibraryMakeCommandList.append(Command)

package_rel_dir = self._AutoGenObject.SourceDir
- if os.sep in package_rel_dir:
- package_rel_dir = package_rel_dir[package_rel_dir.index(os.sep) + 1:]
+ current_dir = self.Macros["WORKSPACE"]
+ found = False
+ while not found and os.sep in package_rel_dir:
+ index = package_rel_dir.index(os.sep)
+ current_dir = os.path.join(current_dir, package_rel_dir[:index])
+ for fl in os.listdir(current_dir):
+ if fl.endswith('.dec'):
+ found = True
+ break
+ package_rel_dir = package_rel_dir[index + 1:]

MakefileTemplateDict = {
"makefile_header" : self._FILE_HEADER_[self._FileType],
--
1.9.5.msysgit.0


------------------------------------------------------------------------------
Gao, Liming
2015-06-16 03:26:52 UTC
Permalink
Reviewed-by: Liming Gao <***@intel.com>

-----Original Message-----
From: Yingke Liu [mailto:***@intel.com]
Sent: Tuesday, June 16, 2015 11:22 AM
To: edk2-***@lists.sourceforge.net
Subject: [edk2] [Patch] BaseTools: Fixed a bug to generate correct path of PACKAGE_RELATIVE_PATH

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Source/Python/AutoGen/GenMake.py | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/Python/AutoGen/GenMake.py
index 1d49a03..0342709 100644
--- a/BaseTools/Source/Python/AutoGen/GenMake.py
+++ b/BaseTools/Source/Python/AutoGen/GenMake.py
@@ -555,8 +555,16 @@ cleanlib:
LibraryMakeCommandList.append(Command)

package_rel_dir = self._AutoGenObject.SourceDir
- if os.sep in package_rel_dir:
- package_rel_dir = package_rel_dir[package_rel_dir.index(os.sep) + 1:]
+ current_dir = self.Macros["WORKSPACE"]
+ found = False
+ while not found and os.sep in package_rel_dir:
+ index = package_rel_dir.index(os.sep)
+ current_dir = os.path.join(current_dir, package_rel_dir[:index])
+ for fl in os.listdir(current_dir):
+ if fl.endswith('.dec'):
+ found = True
+ break
+ package_rel_dir = package_rel_dir[index + 1:]

MakefileTemplateDict = {
"makefile_header" : self._FILE_HEADER_[self._FileType],
--
1.9.5.msysgit.0
Yingke Liu
2015-06-16 08:35:59 UTC
Permalink
if '==' is specified, it overrides all options that specified by '='; if no '==' is specified, all options that match current build criteria are combined.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Source/Python/AutoGen/AutoGen.py | 20 ++++++++----
.../Source/Python/Workspace/WorkspaceDatabase.py | 36 ++++++++++++++--------
2 files changed, 38 insertions(+), 18 deletions(-)

diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index 0e7482a..ca7d5ab 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -1963,7 +1963,8 @@ class PlatformAutoGen(AutoGen):
# Key[0] -- tool family
# Key[1] -- TARGET_TOOLCHAIN_ARCH_COMMANDTYPE_ATTRIBUTE
#
- if Key[0] == self.BuildRuleFamily :
+ if (Key[0] == self.BuildRuleFamily and
+ (ModuleStyle == None or len(Key) < 3 or (len(Key) > 2 and Key[2] == ModuleStyle))):
Target, ToolChain, Arch, CommandType, Attr = Key[1].split('_')
if Target == self.BuildTarget or Target == "*":
if ToolChain == self.ToolChain or ToolChain == "*":
@@ -1999,7 +2000,7 @@ class PlatformAutoGen(AutoGen):
if Options.get((self.BuildRuleFamily, NowKey)) != None:
Options.pop((self.BuildRuleFamily, NowKey))

-
+ OverrideOpt = set()
for Key in Options:
if ModuleStyle != None and len (Key) > 2:
# Check Module style is EDK or EDKII.
@@ -2025,7 +2026,9 @@ class PlatformAutoGen(AutoGen):
if Arch == "*" or Arch == self.Arch:
if Tool not in BuildOptions:
BuildOptions[Tool] = {}
- if Attr != "FLAGS" or Attr not in BuildOptions[Tool]:
+ if Options[Key].startswith('='):
+ OverrideOpt.add((Tool, Attr))
+ if Attr != "FLAGS" or Attr not in BuildOptions[Tool] or (Tool, Attr) in OverrideOpt:
BuildOptions[Tool][Attr] = Options[Key]
else:
# append options for the same tool
@@ -2033,7 +2036,8 @@ class PlatformAutoGen(AutoGen):
# Build Option Family has been checked, which need't to be checked again for family.
if FamilyMatch or FamilyIsNull:
return BuildOptions
-
+
+ OverrideOpt = set()
for Key in Options:
if ModuleStyle != None and len (Key) > 2:
# Check Module style is EDK or EDKII.
@@ -2057,7 +2061,9 @@ class PlatformAutoGen(AutoGen):
if Arch == "*" or Arch == self.Arch:
if Tool not in BuildOptions:
BuildOptions[Tool] = {}
- if Attr != "FLAGS" or Attr not in BuildOptions[Tool]:
+ if Options[Key].startswith('='):
+ OverrideOpt.add((Tool, Attr))
+ if Attr != "FLAGS" or Attr not in BuildOptions[Tool] or (Tool, Attr) in OverrideOpt:
BuildOptions[Tool][Attr] = Options[Key]
else:
# append options for the same tool
@@ -2097,6 +2103,7 @@ class PlatformAutoGen(AutoGen):
PlatformModuleOptions.keys() + ModuleTypeOptions.keys() +
self.ToolDefinition.keys())
BuildOptions = {}
+ OverrideTool = set()
for Tool in AllTools:
if Tool not in BuildOptions:
BuildOptions[Tool] = {}
@@ -2115,8 +2122,9 @@ class PlatformAutoGen(AutoGen):
BuildOptions[Tool][Attr] = ""
# check if override is indicated
if Value.startswith('='):
+ OverrideTool.add((Tool, Attr))
BuildOptions[Tool][Attr] = Value[1:]
- else:
+ elif (Tool, Attr) not in OverrideTool:
BuildOptions[Tool][Attr] += " " + Value
if Module.AutoGenVersion < 0x00010005 and self.Workspace.UniFlag != None:
#
diff --git a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
index 1371bb0..6c1d518 100644
--- a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
+++ b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
@@ -753,19 +753,24 @@ class DscBuildData(PlatformBuildClassObject):
## Retrieve [BuildOptions]
def _GetBuildOptions(self):
if self._BuildOptions == None:
+ OverrideTool = set()
self._BuildOptions = sdict()
#
- # Retrieve build option for EDKII style module
+ # Retrieve build option for EDKII and EDK style module
#
- RecordList = self._RawData[MODEL_META_DATA_BUILD_OPTION, self._Arch, EDKII_NAME]
- for ToolChainFamily, ToolChain, Option, Dummy1, Dummy2, Dummy3, Dummy4 in RecordList:
- self._BuildOptions[ToolChainFamily, ToolChain, EDKII_NAME] = Option
- #
- # Retrieve build option for EDK style module
- #
- RecordList = self._RawData[MODEL_META_DATA_BUILD_OPTION, self._Arch, EDK_NAME]
- for ToolChainFamily, ToolChain, Option, Dummy1, Dummy2, Dummy3, Dummy4 in RecordList:
- self._BuildOptions[ToolChainFamily, ToolChain, EDK_NAME] = Option
+ for CodeBase in (EDKII_NAME, EDK_NAME):
+ RecordList = self._RawData[MODEL_META_DATA_BUILD_OPTION, self._Arch, CodeBase]
+ for ToolChainFamily, ToolChain, Option, Dummy1, Dummy2, Dummy3, Dummy4 in RecordList:
+ CurKey = (ToolChainFamily, ToolChain, CodeBase)
+ if Option.startswith('='):
+ OverrideTool.add(CurKey)
+ #
+ # Only flags can be appended
+ #
+ if CurKey not in self._BuildOptions or not ToolChain.endswith('_FLAGS') or CurKey in OverrideTool:
+ self._BuildOptions[CurKey] = Option
+ else:
+ self._BuildOptions[CurKey] += ' ' + Option
return self._BuildOptions

def GetBuildOptionsByModuleType(self, Edk, ModuleType):
@@ -773,12 +778,19 @@ class DscBuildData(PlatformBuildClassObject):
self._ModuleTypeOptions = sdict()
if (Edk, ModuleType) not in self._ModuleTypeOptions:
options = sdict()
+ OverrideTool = set()
self._ModuleTypeOptions[Edk, ModuleType] = options
DriverType = '%s.%s' % (Edk, ModuleType)
RecordList = self._RawData[MODEL_META_DATA_BUILD_OPTION, self._Arch, DriverType]
for ToolChainFamily, ToolChain, Option, Arch, Type, Dummy3, Dummy4 in RecordList:
if Arch == self._Arch and Type == DriverType:
- options[ToolChainFamily, ToolChain, Edk] = Option
+ Key = (ToolChainFamily, ToolChain, Edk)
+ if Option.startswith('='):
+ OverrideTool.add(Key)
+ if Key not in options or not ToolChain.endswith('_FLAGS') or Key in OverrideTool:
+ options[Key] = Option
+ else:
+ options[Key] += ' ' + Option
return self._ModuleTypeOptions[Edk, ModuleType]

## Retrieve non-dynamic PCD settings
@@ -2007,7 +2019,7 @@ class InfBuildData(ModuleBuildClassObject):
if self._Header_ == None:
self._GetHeaderInfo()
if self._Guid == None:
- self._Guid = '00000000-0000-0000-000000000000'
+ self._Guid = '00000000-0000-0000-0000-000000000000'
return self._Guid

## Retrieve module version
--
1.9.5.msysgit.0


------------------------------------------------------------------------------
Andrew Fish
2015-06-16 16:10:32 UTC
Permalink
Post by Yingke Liu
if '==' is specified, it overrides all options that specified by '='; if no '==' is specified, all options that match current build criteria are combined.
Does this fix the bug I reported with an ‘=‘ getting lost if two of the same form are in a DSC?

Thanks,

Andrew Fish
Post by Yingke Liu
Contributed-under: TianoCore Contribution Agreement 1.0
---
BaseTools/Source/Python/AutoGen/AutoGen.py | 20 ++++++++----
.../Source/Python/Workspace/WorkspaceDatabase.py | 36 ++++++++++++++--------
2 files changed, 38 insertions(+), 18 deletions(-)
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index 0e7482a..ca7d5ab 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
# Key[0] -- tool family
# Key[1] -- TARGET_TOOLCHAIN_ARCH_COMMANDTYPE_ATTRIBUTE
#
+ if (Key[0] == self.BuildRuleFamily and
Target, ToolChain, Arch, CommandType, Attr = Key[1].split('_')
Options.pop((self.BuildRuleFamily, NowKey))
-
+ OverrideOpt = set()
# Check Module style is EDK or EDKII.
BuildOptions[Tool] = {}
+ OverrideOpt.add((Tool, Attr))
BuildOptions[Tool][Attr] = Options[Key]
# append options for the same tool
# Build Option Family has been checked, which need't to be checked again for family.
return BuildOptions
-
+
+ OverrideOpt = set()
# Check Module style is EDK or EDKII.
BuildOptions[Tool] = {}
+ OverrideOpt.add((Tool, Attr))
BuildOptions[Tool][Attr] = Options[Key]
# append options for the same tool
PlatformModuleOptions.keys() + ModuleTypeOptions.keys() +
self.ToolDefinition.keys())
BuildOptions = {}
+ OverrideTool = set()
BuildOptions[Tool] = {}
BuildOptions[Tool][Attr] = ""
# check if override is indicated
+ OverrideTool.add((Tool, Attr))
BuildOptions[Tool][Attr] = Value[1:]
BuildOptions[Tool][Attr] += " " + Value
#
diff --git a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
index 1371bb0..6c1d518 100644
--- a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
+++ b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
## Retrieve [BuildOptions]
+ OverrideTool = set()
self._BuildOptions = sdict()
#
- # Retrieve build option for EDKII style module
+ # Retrieve build option for EDKII and EDK style module
#
- RecordList = self._RawData[MODEL_META_DATA_BUILD_OPTION, self._Arch, EDKII_NAME]
- self._BuildOptions[ToolChainFamily, ToolChain, EDKII_NAME] = Option
- #
- # Retrieve build option for EDK style module
- #
- RecordList = self._RawData[MODEL_META_DATA_BUILD_OPTION, self._Arch, EDK_NAME]
- self._BuildOptions[ToolChainFamily, ToolChain, EDK_NAME] = Option
+ RecordList = self._RawData[MODEL_META_DATA_BUILD_OPTION, self._Arch, CodeBase]
+ CurKey = (ToolChainFamily, ToolChain, CodeBase)
+ OverrideTool.add(CurKey)
+ #
+ # Only flags can be appended
+ #
+ self._BuildOptions[CurKey] = Option
+ self._BuildOptions[CurKey] += ' ' + Option
return self._BuildOptions
self._ModuleTypeOptions = sdict()
options = sdict()
+ OverrideTool = set()
self._ModuleTypeOptions[Edk, ModuleType] = options
DriverType = '%s.%s' % (Edk, ModuleType)
RecordList = self._RawData[MODEL_META_DATA_BUILD_OPTION, self._Arch, DriverType]
- options[ToolChainFamily, ToolChain, Edk] = Option
+ Key = (ToolChainFamily, ToolChain, Edk)
+ OverrideTool.add(Key)
+ options[Key] = Option
+ options[Key] += ' ' + Option
return self._ModuleTypeOptions[Edk, ModuleType]
## Retrieve non-dynamic PCD settings
self._GetHeaderInfo()
- self._Guid = '00000000-0000-0000-000000000000'
+ self._Guid = '00000000-0000-0000-0000-000000000000'
return self._Guid
## Retrieve module version
--
1.9.5.msysgit.0
------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Liu, Yingke D
2015-06-17 01:28:48 UTC
Permalink
Yes, after this patch checked in, the bug you reported should be fixed.


Thanks,

Dennis

-----Original Message-----
From: Andrew Fish [mailto:***@apple.com]
Sent: Wednesday, June 17, 2015 0:11
To: edk2-***@lists.sourceforge.net
Subject: Re: [edk2] [Patch] BaseTools: Fixed Build Option override bugs.
Post by Yingke Liu
if '==' is specified, it overrides all options that specified by '='; if no '==' is specified, all options that match current build criteria are combined.
Does this fix the bug I reported with an ‘=‘ getting lost if two of the same form are in a DSC?

Thanks,

Andrew Fish
Post by Yingke Liu
Contributed-under: TianoCore Contribution Agreement 1.0
---
BaseTools/Source/Python/AutoGen/AutoGen.py | 20 ++++++++----
.../Source/Python/Workspace/WorkspaceDatabase.py | 36 ++++++++++++++--------
2 files changed, 38 insertions(+), 18 deletions(-)
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py
b/BaseTools/Source/Python/AutoGen/AutoGen.py
index 0e7482a..ca7d5ab 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
# Key[0] -- tool family
# Key[1] -- TARGET_TOOLCHAIN_ARCH_COMMANDTYPE_ATTRIBUTE
#
+ if (Key[0] == self.BuildRuleFamily and
Target, ToolChain, Arch, CommandType, Attr = Key[1].split('_')
Options.pop((self.BuildRuleFamily, NowKey))
-
+ OverrideOpt = set()
# Check Module style is EDK or EDKII.
BuildOptions[Tool] = {}
+ OverrideOpt.add((Tool, Attr))
BuildOptions[Tool][Attr] = Options[Key]
# Build Option Family has been checked, which need't to be checked again for family.
return BuildOptions
-
+
+ OverrideOpt = set()
# Check Module style is EDK or EDKII.
BuildOptions[Tool] = {}
+ OverrideOpt.add((Tool, Attr))
BuildOptions[Tool][Attr] = Options[Key]
PlatformModuleOptions.keys() + ModuleTypeOptions.keys() +
self.ToolDefinition.keys())
BuildOptions = {}
+ OverrideTool = set()
BuildOptions[Tool][Attr] = ""
# check if override is indicated
+ OverrideTool.add((Tool, Attr))
BuildOptions[Tool][Attr] = Value[1:]
BuildOptions[Tool][Attr] += " " + Value
#
diff --git a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
index 1371bb0..6c1d518 100644
--- a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
+++ b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
## Retrieve [BuildOptions]
+ OverrideTool = set()
self._BuildOptions = sdict()
#
- # Retrieve build option for EDKII style module
+ # Retrieve build option for EDKII and EDK style module
#
- RecordList = self._RawData[MODEL_META_DATA_BUILD_OPTION, self._Arch, EDKII_NAME]
- self._BuildOptions[ToolChainFamily, ToolChain, EDKII_NAME] = Option
- #
- # Retrieve build option for EDK style module
- #
- RecordList = self._RawData[MODEL_META_DATA_BUILD_OPTION, self._Arch, EDK_NAME]
- self._BuildOptions[ToolChainFamily, ToolChain, EDK_NAME] = Option
+ RecordList = self._RawData[MODEL_META_DATA_BUILD_OPTION, self._Arch, CodeBase]
+ CurKey = (ToolChainFamily, ToolChain, CodeBase)
+ OverrideTool.add(CurKey)
+ #
+ # Only flags can be appended
+ #
+ self._BuildOptions[CurKey] = Option
+ self._BuildOptions[CurKey] += ' ' + Option
return self._BuildOptions
self._ModuleTypeOptions = sdict()
options = sdict()
+ OverrideTool = set()
self._ModuleTypeOptions[Edk, ModuleType] = options
DriverType = '%s.%s' % (Edk, ModuleType)
RecordList = self._RawData[MODEL_META_DATA_BUILD_OPTION, self._Arch, DriverType]
- options[ToolChainFamily, ToolChain, Edk] = Option
+ Key = (ToolChainFamily, ToolChain, Edk)
+ OverrideTool.add(Key)
+ options[Key] = Option
+ options[Key] += ' ' + Option
return self._ModuleTypeOptions[Edk, ModuleType]
self._GetHeaderInfo()
- self._Guid = '00000000-0000-0000-000000000000'
+ self._Guid = '00000000-0000-0000-0000-000000000000'
return self._Guid
## Retrieve module version
--
1.9.5.msysgit.0
----------------------------------------------------------------------
-------- _______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Gao, Liming
2015-06-17 03:10:26 UTC
Permalink
Reviewed-by: Liming Gao <***@intel.com>

-----Original Message-----
From: Yingke Liu [mailto:***@intel.com]
Sent: Tuesday, June 16, 2015 4:36 PM
To: edk2-***@lists.sourceforge.net
Subject: [edk2] [Patch] BaseTools: Fixed Build Option override bugs.

if '==' is specified, it overrides all options that specified by '='; if no '==' is specified, all options that match current build criteria are combined.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Source/Python/AutoGen/AutoGen.py | 20 ++++++++----
.../Source/Python/Workspace/WorkspaceDatabase.py | 36 ++++++++++++++--------
2 files changed, 38 insertions(+), 18 deletions(-)

diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index 0e7482a..ca7d5ab 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -1963,7 +1963,8 @@ class PlatformAutoGen(AutoGen):
# Key[0] -- tool family
# Key[1] -- TARGET_TOOLCHAIN_ARCH_COMMANDTYPE_ATTRIBUTE
#
- if Key[0] == self.BuildRuleFamily :
+ if (Key[0] == self.BuildRuleFamily and
+ (ModuleStyle == None or len(Key) < 3 or (len(Key) > 2 and Key[2] == ModuleStyle))):
Target, ToolChain, Arch, CommandType, Attr = Key[1].split('_')
if Target == self.BuildTarget or Target == "*":
if ToolChain == self.ToolChain or ToolChain == "*":
@@ -1999,7 +2000,7 @@ class PlatformAutoGen(AutoGen):
if Options.get((self.BuildRuleFamily, NowKey)) != None:
Options.pop((self.BuildRuleFamily, NowKey))

-
+ OverrideOpt = set()
for Key in Options:
if ModuleStyle != None and len (Key) > 2:
# Check Module style is EDK or EDKII.
@@ -2025,7 +2026,9 @@ class PlatformAutoGen(AutoGen):
if Arch == "*" or Arch == self.Arch:
if Tool not in BuildOptions:
BuildOptions[Tool] = {}
- if Attr != "FLAGS" or Attr not in BuildOptions[Tool]:
+ if Options[Key].startswith('='):
+ OverrideOpt.add((Tool, Attr))
+ if Attr != "FLAGS" or Attr not in BuildOptions[Tool] or (Tool, Attr) in OverrideOpt:
BuildOptions[Tool][Attr] = Options[Key]
else:
# append options for the same tool @@ -2033,7 +2036,8 @@ class PlatformAutoGen(AutoGen):
# Build Option Family has been checked, which need't to be checked again for family.
if FamilyMatch or FamilyIsNull:
return BuildOptions
-
+
+ OverrideOpt = set()
for Key in Options:
if ModuleStyle != None and len (Key) > 2:
# Check Module style is EDK or EDKII.
@@ -2057,7 +2061,9 @@ class PlatformAutoGen(AutoGen):
if Arch == "*" or Arch == self.Arch:
if Tool not in BuildOptions:
BuildOptions[Tool] = {}
- if Attr != "FLAGS" or Attr not in BuildOptions[Tool]:
+ if Options[Key].startswith('='):
+ OverrideOpt.add((Tool, Attr))
+ if Attr != "FLAGS" or Attr not in BuildOptions[Tool] or (Tool, Attr) in OverrideOpt:
BuildOptions[Tool][Attr] = Options[Key]
else:
# append options for the same tool @@ -2097,6 +2103,7 @@ class PlatformAutoGen(AutoGen):
PlatformModuleOptions.keys() + ModuleTypeOptions.keys() +
self.ToolDefinition.keys())
BuildOptions = {}
+ OverrideTool = set()
for Tool in AllTools:
if Tool not in BuildOptions:
BuildOptions[Tool] = {} @@ -2115,8 +2122,9 @@ class PlatformAutoGen(AutoGen):
BuildOptions[Tool][Attr] = ""
# check if override is indicated
if Value.startswith('='):
+ OverrideTool.add((Tool, Attr))
BuildOptions[Tool][Attr] = Value[1:]
- else:
+ elif (Tool, Attr) not in OverrideTool:
BuildOptions[Tool][Attr] += " " + Value
if Module.AutoGenVersion < 0x00010005 and self.Workspace.UniFlag != None:
#
diff --git a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
index 1371bb0..6c1d518 100644
--- a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
+++ b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
@@ -753,19 +753,24 @@ class DscBuildData(PlatformBuildClassObject):
## Retrieve [BuildOptions]
def _GetBuildOptions(self):
if self._BuildOptions == None:
+ OverrideTool = set()
self._BuildOptions = sdict()
#
- # Retrieve build option for EDKII style module
+ # Retrieve build option for EDKII and EDK style module
#
- RecordList = self._RawData[MODEL_META_DATA_BUILD_OPTION, self._Arch, EDKII_NAME]
- for ToolChainFamily, ToolChain, Option, Dummy1, Dummy2, Dummy3, Dummy4 in RecordList:
- self._BuildOptions[ToolChainFamily, ToolChain, EDKII_NAME] = Option
- #
- # Retrieve build option for EDK style module
- #
- RecordList = self._RawData[MODEL_META_DATA_BUILD_OPTION, self._Arch, EDK_NAME]
- for ToolChainFamily, ToolChain, Option, Dummy1, Dummy2, Dummy3, Dummy4 in RecordList:
- self._BuildOptions[ToolChainFamily, ToolChain, EDK_NAME] = Option
+ for CodeBase in (EDKII_NAME, EDK_NAME):
+ RecordList = self._RawData[MODEL_META_DATA_BUILD_OPTION, self._Arch, CodeBase]
+ for ToolChainFamily, ToolChain, Option, Dummy1, Dummy2, Dummy3, Dummy4 in RecordList:
+ CurKey = (ToolChainFamily, ToolChain, CodeBase)
+ if Option.startswith('='):
+ OverrideTool.add(CurKey)
+ #
+ # Only flags can be appended
+ #
+ if CurKey not in self._BuildOptions or not ToolChain.endswith('_FLAGS') or CurKey in OverrideTool:
+ self._BuildOptions[CurKey] = Option
+ else:
+ self._BuildOptions[CurKey] += ' ' + Option
return self._BuildOptions

def GetBuildOptionsByModuleType(self, Edk, ModuleType):
@@ -773,12 +778,19 @@ class DscBuildData(PlatformBuildClassObject):
self._ModuleTypeOptions = sdict()
if (Edk, ModuleType) not in self._ModuleTypeOptions:
options = sdict()
+ OverrideTool = set()
self._ModuleTypeOptions[Edk, ModuleType] = options
DriverType = '%s.%s' % (Edk, ModuleType)
RecordList = self._RawData[MODEL_META_DATA_BUILD_OPTION, self._Arch, DriverType]
for ToolChainFamily, ToolChain, Option, Arch, Type, Dummy3, Dummy4 in RecordList:
if Arch == self._Arch and Type == DriverType:
- options[ToolChainFamily, ToolChain, Edk] = Option
+ Key = (ToolChainFamily, ToolChain, Edk)
+ if Option.startswith('='):
+ OverrideTool.add(Key)
+ if Key not in options or not ToolChain.endswith('_FLAGS') or Key in OverrideTool:
+ options[Key] = Option
+ else:
+ options[Key] += ' ' + Option
return self._ModuleTypeOptions[Edk, ModuleType]

## Retrieve non-dynamic PCD settings @@ -2007,7 +2019,7 @@ class InfBuildData(ModuleBuildClassObject):
if self._Header_ == None:
self._GetHeaderInfo()
if self._Guid == None:
- self._Guid = '00000000-0000-0000-000000000000'
+ self._Guid = '00000000-0000-0000-0000-000000000000'
return self._Guid

## Retrieve module version
--
1.9.5.msysgit.0
Yingke Liu
2015-06-19 05:26:30 UTC
Permalink
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Source/Python/build/build.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py
index 9b48ac0..33b45ba 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -1965,6 +1965,7 @@ def Main():
EdkLogger.quiet(time.strftime("Build start time: %H:%M:%S, %b.%d %Y\n", time.localtime()));
ReturnCode = 0
MyBuild = None
+ BuildError = True
try:
if len(Target) == 0:
Target = "all"
@@ -2035,6 +2036,10 @@ def Main():
SqlCommand = """drop table IF EXISTS %s""" % TmpTableName
TmpTableDict[TmpTableName].execute(SqlCommand)
#MyBuild.DumpBuildData()
+ #
+ # All job done, no error found and no exception raised
+ #
+ BuildError = False
except FatalError, X:
if MyBuild != None:
# for multi-thread build exits safely
@@ -2095,7 +2100,8 @@ def Main():
else:
BuildDurationStr = time.strftime("%H:%M:%S", BuildDuration)
if MyBuild != None:
- MyBuild.BuildReport.GenerateReport(BuildDurationStr)
+ if not BuildError:
+ MyBuild.BuildReport.GenerateReport(BuildDurationStr)
MyBuild.Db.Close()
EdkLogger.SetLevel(EdkLogger.QUIET)
EdkLogger.quiet("\n- %s -" % Conclusion)
--
1.9.5.msysgit.0


------------------------------------------------------------------------------
Gao, Liming
2015-06-23 06:18:48 UTC
Permalink
Reviewed-by: Liming Gao <***@intel.com>

-----Original Message-----
From: Yingke Liu [mailto:***@intel.com]
Sent: Friday, June 19, 2015 1:27 PM
To: edk2-***@lists.sourceforge.net
Subject: [edk2] [Patch] BaseTools: Build report should not be generated if build failed.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Source/Python/build/build.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py
index 9b48ac0..33b45ba 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -1965,6 +1965,7 @@ def Main():
EdkLogger.quiet(time.strftime("Build start time: %H:%M:%S, %b.%d %Y\n", time.localtime()));
ReturnCode = 0
MyBuild = None
+ BuildError = True
try:
if len(Target) == 0:
Target = "all"
@@ -2035,6 +2036,10 @@ def Main():
SqlCommand = """drop table IF EXISTS %s""" % TmpTableName
TmpTableDict[TmpTableName].execute(SqlCommand)
#MyBuild.DumpBuildData()
+ #
+ # All job done, no error found and no exception raised
+ #
+ BuildError = False
except FatalError, X:
if MyBuild != None:
# for multi-thread build exits safely @@ -2095,7 +2100,8 @@ def Main():
else:
BuildDurationStr = time.strftime("%H:%M:%S", BuildDuration)
if MyBuild != None:
- MyBuild.BuildReport.GenerateReport(BuildDurationStr)
+ if not BuildError:
+ MyBuild.BuildReport.GenerateReport(BuildDurationStr)
MyBuild.Db.Close()
EdkLogger.SetLevel(EdkLogger.QUIET)
EdkLogger.quiet("\n- %s -" % Conclusion)
--
1.9.5.msysgit.0


------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Yingke Liu
2015-06-19 07:15:46 UTC
Permalink
The include regular expression cannot match spaces before or after this statement.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Source/Python/AutoGen/UniClassObject.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Source/Python/AutoGen/UniClassObject.py b/BaseTools/Source/Python/AutoGen/UniClassObject.py
index aa54f4f..f900eac 100644
--- a/BaseTools/Source/Python/AutoGen/UniClassObject.py
+++ b/BaseTools/Source/Python/AutoGen/UniClassObject.py
@@ -293,8 +293,8 @@ class UniFileClassObject(object):
if ((Line.count(u'"', 0, CommentPos) - Line.count(u'\\"', 0, CommentPos)) & 1) == 1:
CommentPos = Line.find (Comment, CommentPos + 1)
else:
- return Line[:CommentPos]
- return Line
+ return Line[:CommentPos].strip()
+ return Line.strip()


#
--
1.9.5.msysgit.0


------------------------------------------------------------------------------
Gao, Liming
2015-06-23 06:20:02 UTC
Permalink
Reviewed-by: Liming Gao <***@intel.com>

-----Original Message-----
From: Yingke Liu [mailto:***@intel.com]
Sent: Friday, June 19, 2015 3:16 PM
To: edk2-***@lists.sourceforge.net
Subject: [edk2] [Patch] BaseTools: Fix a bug that UNI file can't have comment after #include "file.uni"

The include regular expression cannot match spaces before or after this statement.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Source/Python/AutoGen/UniClassObject.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Source/Python/AutoGen/UniClassObject.py b/BaseTools/Source/Python/AutoGen/UniClassObject.py
index aa54f4f..f900eac 100644
--- a/BaseTools/Source/Python/AutoGen/UniClassObject.py
+++ b/BaseTools/Source/Python/AutoGen/UniClassObject.py
@@ -293,8 +293,8 @@ class UniFileClassObject(object):
if ((Line.count(u'"', 0, CommentPos) - Line.count(u'\\"', 0, CommentPos)) & 1) == 1:
CommentPos = Line.find (Comment, CommentPos + 1)
else:
- return Line[:CommentPos]
- return Line
+ return Line[:CommentPos].strip()
+ return Line.strip()


#
--
1.9.5.msysgit.0


------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Yingke Liu
2015-06-19 08:14:04 UTC
Permalink
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
index 6c1d518..9da6ac7 100644
--- a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
+++ b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
@@ -1142,7 +1142,7 @@ class DscBuildData(PlatformBuildClassObject):
TokenSpaceGuid,
self._PCD_TYPE_STRING_[Type],
'',
- '',
+ InitialValue,
'',
MaxDatumSize,
{SkuName : SkuInfo},
--
1.9.5.msysgit.0


------------------------------------------------------------------------------
Gao, Liming
2015-06-23 06:17:39 UTC
Permalink
Reviewed-by: Liming Gao <***@intel.com>

-----Original Message-----
From: Yingke Liu [mailto:***@intel.com]
Sent: Friday, June 19, 2015 4:14 PM
To: edk2-***@lists.sourceforge.net
Subject: [edk2] [Patch] BaseTools: Fixed a bug that Build Report always uses DEC default value for VPD PCD.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
index 6c1d518..9da6ac7 100644
--- a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
+++ b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
@@ -1142,7 +1142,7 @@ class DscBuildData(PlatformBuildClassObject):
TokenSpaceGuid,
self._PCD_TYPE_STRING_[Type],
'',
- '',
+ InitialValue,
'',
MaxDatumSize,
{SkuName : SkuInfo},
--
1.9.5.msysgit.0


------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Yingke Liu
2015-06-23 02:51:18 UTC
Permalink
Current check only compared string format of toke value.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Source/Python/AutoGen/AutoGen.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index ca7d5ab..7fb1a88 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -651,7 +651,7 @@ class WorkspaceAutoGen(AutoGen):
for Pa in self.AutoGenObjectList:
for Package in Pa.PackageList:
PcdList = Package.Pcds.values()
- PcdList.sort(lambda x, y: cmp(x.TokenValue, y.TokenValue))
+ PcdList.sort(lambda x, y: cmp(int(x.TokenValue, 0), int(y.TokenValue, 0)))
Count = 0
while (Count < len(PcdList) - 1) :
Item = PcdList[Count]
@@ -659,13 +659,13 @@ class WorkspaceAutoGen(AutoGen):
#
# Make sure in the same token space the TokenValue should be unique
#
- if (Item.TokenValue == ItemNext.TokenValue):
+ if (int(Item.TokenValue, 0) == int(ItemNext.TokenValue, 0)):
SameTokenValuePcdList = []
SameTokenValuePcdList.append(Item)
SameTokenValuePcdList.append(ItemNext)
RemainPcdListLength = len(PcdList) - Count - 2
for ValueSameCount in range(RemainPcdListLength):
- if PcdList[len(PcdList) - RemainPcdListLength + ValueSameCount].TokenValue == Item.TokenValue:
+ if int(PcdList[len(PcdList) - RemainPcdListLength + ValueSameCount].TokenValue, 0) == int(Item.TokenValue, 0):
SameTokenValuePcdList.append(PcdList[len(PcdList) - RemainPcdListLength + ValueSameCount])
else:
break;
@@ -699,7 +699,7 @@ class WorkspaceAutoGen(AutoGen):
#
# Check PCDs with same TokenSpaceGuidCName.TokenCName have same token value as well.
#
- if (Item.TokenSpaceGuidCName == ItemNext.TokenSpaceGuidCName) and (Item.TokenCName == ItemNext.TokenCName) and (Item.TokenValue != ItemNext.TokenValue):
+ if (Item.TokenSpaceGuidCName == ItemNext.TokenSpaceGuidCName) and (Item.TokenCName == ItemNext.TokenCName) and (int(Item.TokenValue, 0) != int(ItemNext.TokenValue, 0)):
EdkLogger.error(
'build',
FORMAT_INVALID,
--
1.9.5.msysgit.0
Gao, Liming
2015-06-23 05:55:31 UTC
Permalink
Reviewed-by: Liming Gao <***@intel.com>

-----Original Message-----
From: Yingke Liu [mailto:***@intel.com]
Sent: Tuesday, June 23, 2015 10:51 AM
To: edk2-***@lists.sourceforge.net
Subject: [edk2] [Patch] BaseTools: The token values cannot be numeric same with different PCDs.

Current check only compared string format of toke value.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Source/Python/AutoGen/AutoGen.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index ca7d5ab..7fb1a88 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -651,7 +651,7 @@ class WorkspaceAutoGen(AutoGen):
for Pa in self.AutoGenObjectList:
for Package in Pa.PackageList:
PcdList = Package.Pcds.values()
- PcdList.sort(lambda x, y: cmp(x.TokenValue, y.TokenValue))
+ PcdList.sort(lambda x, y: cmp(int(x.TokenValue, 0),
+ int(y.TokenValue, 0)))
Count = 0
while (Count < len(PcdList) - 1) :
Item = PcdList[Count] @@ -659,13 +659,13 @@ class WorkspaceAutoGen(AutoGen):
#
# Make sure in the same token space the TokenValue should be unique
#
- if (Item.TokenValue == ItemNext.TokenValue):
+ if (int(Item.TokenValue, 0) == int(ItemNext.TokenValue, 0)):
SameTokenValuePcdList = []
SameTokenValuePcdList.append(Item)
SameTokenValuePcdList.append(ItemNext)
RemainPcdListLength = len(PcdList) - Count - 2
for ValueSameCount in range(RemainPcdListLength):
- if PcdList[len(PcdList) - RemainPcdListLength + ValueSameCount].TokenValue == Item.TokenValue:
+ if int(PcdList[len(PcdList) - RemainPcdListLength + ValueSameCount].TokenValue, 0) == int(Item.TokenValue, 0):
SameTokenValuePcdList.append(PcdList[len(PcdList) - RemainPcdListLength + ValueSameCount])
else:
break;
@@ -699,7 +699,7 @@ class WorkspaceAutoGen(AutoGen):
#
# Check PCDs with same TokenSpaceGuidCName.TokenCName have same token value as well.
#
- if (Item.TokenSpaceGuidCName == ItemNext.TokenSpaceGuidCName) and (Item.TokenCName == ItemNext.TokenCName) and (Item.TokenValue != ItemNext.TokenValue):
+ if (Item.TokenSpaceGuidCName == ItemNext.TokenSpaceGuidCName) and (Item.TokenCName == ItemNext.TokenCName) and (int(Item.TokenValue, 0) != int(ItemNext.TokenValue, 0)):
EdkLogger.error(
'build',
FORMAT_INVALID,
--
1.9.5.msysgit.0


------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Yingke Liu
2015-06-23 06:33:13 UTC
Permalink
The version of IASL compiler in the tools_def.template file no longer exists on the acpica.org site. Update the tools_def.template file to remove the specific version info from the tools_def.template file.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Conf/tools_def.template | 120 +++++++++++++++++++-------------------
1 file changed, 60 insertions(+), 60 deletions(-)

diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index fd7b4b5..52864ef 100644
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -246,8 +246,8 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G
# Required to build EBC drivers:
# Intel(r) Compiler for Efi Byte Code (Intel(r) EBC Compiler)
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# VS2005 -win32- Requires:
# Microsoft Visual Studio 2005 Team Suite Edition
# Microsoft Windows Server 2003 Driver Development Kit (Microsoft WINDDK) version 3790.1830
@@ -255,8 +255,8 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G
# Required to build EBC drivers:
# Intel(r) Compiler for Efi Byte Code (Intel(r) EBC Compiler)
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# VS2008 -win32- Requires:
# Microsoft Visual Studio 2008 Team Suite Edition
# Microsoft Windows Server 2003 Driver Development Kit (Microsoft WINDDK) version 3790.1830
@@ -264,8 +264,8 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G
# Required to build EBC drivers:
# Intel(r) Compiler for Efi Byte Code (Intel(r) EBC Compiler)
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# VS2010 -win32- Requires:
# Microsoft Visual Studio 2010 Premium Edition
# Microsoft Windows Server 2003 Driver Development Kit (Microsoft WINDDK) version 3790.1830
@@ -273,8 +273,8 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G
# Required to build EBC drivers:
# Intel(r) Compiler for Efi Byte Code (Intel(r) EBC Compiler)
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# VS2012 -win32- Requires:
# Microsoft Visual Studio 2012 Professional Edition
# Microsoft Windows Server 2003 Driver Development Kit (Microsoft WINDDK) version 3790.1830
@@ -282,8 +282,8 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G
# Required to build EBC drivers:
# Intel(r) Compiler for Efi Byte Code (Intel(r) EBC Compiler)
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# VS2013 -win32- Requires:
# Microsoft Visual Studio 2013 Professional Edition
# Microsoft Windows Server 2003 Driver Development Kit (Microsoft WINDDK) version 3790.1830
@@ -291,65 +291,65 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G
# Required to build EBC drivers:
# Intel(r) Compiler for Efi Byte Code (Intel(r) EBC Compiler)
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# DDK3790 -win32- Requires:
# Microsoft Windows Server 2003 Driver Development Kit (Microsoft WINDDK) version 3790.1830
# Optional:
# Required to build EBC drivers:
# Intel(r) Compiler for Efi Byte Code (Intel(r) EBC Compiler)
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# UNIXGCC -UNIX- Requires:
# GCC 4.3.0
# binutils 2.20.51.0.5
# Optional:
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler from
+# https://acpica.org/downloads
# GCC44 -Linux,Windows- Requires:
# GCC 4.4 targeting x86_64-linux-gnu
# Optional:
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler from
+# https://acpica.org/downloads
# GCC45 -Linux,Windows- Requires:
# GCC 4.5 targeting x86_64-linux-gnu
# Optional:
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler from
+# https://acpica.org/downloads
# GCC46 -Linux,Windows- Requires:
# GCC 4.6 targeting x86_64-linux-gnu or arm-linux-gnueabi
# Optional:
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler from
+# https://acpica.org/downloads
# GCC47 -Linux,Windows- Requires:
# GCC 4.7 targeting x86_64-linux-gnu, aarch64-linux-gnu, or arm-linux-gnueabi
# Optional:
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler from
+# https://acpica.org/downloads
# GCC48 -Linux,Windows- Requires:
# GCC 4.8 targeting x86_64-linux-gnu, aarch64-linux-gnu, or arm-linux-gnueabi
# Optional:
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler from
+# https://acpica.org/downloads
# GCC49 -Linux,Windows- Requires:
# GCC 4.9 targeting x86_64-linux-gnu, aarch64-linux-gnu, or arm-linux-gnueabi
# Optional:
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler from
+# https://acpica.org/downloads
# ELFGCC -Linux- Requires:
# GCC(this tool chain uses whatever version of gcc and binutils that is installed in /usr/bin)
# Optional:
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler from
+# https://acpica.org/downloads
# CYGGCC -win32- Requires:
# CygWin, GCC 4.3.0, binutils 2.20.51.0.5
# Microsoft Visual Studio 2005 or 2008
@@ -357,8 +357,8 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G
# Required to build EBC drivers:
# Intel(r) Compiler for Efi Byte Code (Intel(r) EBC Compiler)
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# ICC -win32- Requires:
# Intel C Compiler V9.1
# Dependencies:
@@ -369,8 +369,8 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G
# Required to build EBC drivers:
# Intel(r) Compiler for Efi Byte Code (Intel(r) EBC Compiler)
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# ICC11 -win32- Requires:
# Intel C Compiler V11.1
# Dependencies:
@@ -381,8 +381,8 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G
# Required to build EBC drivers:
# Intel(r) Compiler for Efi Byte Code (Intel(r) EBC Compiler)
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# MYTOOLS -win32- Requires:
# Microsoft Visual Studio 2008 for IA32/X64
# Microsoft Windows Server 2003 Driver Development Kit (Microsoft WINDDK) version 3790.1830 for IPF
@@ -390,8 +390,8 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G
# Required to build EBC drivers:
# Intel(r) Compiler for Efi Byte Code (Intel(r) EBC Compiler)
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# VS2003xASL -win32- Requires:
# Microsoft Visual Studio .NET 2003
# Microsoft Windows Server 2003 Driver Development Kit (Microsoft WINDDK) version 3790.1830
@@ -494,36 +494,36 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G
# Required to build EBC drivers:
# Intel(r) Compiler for Efi Byte Code (Intel(r) EBC Compiler)
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# VS2008x86 -win64- Requires:
# Microsoft Visual Studio 2008 (x86)
# Microsoft Windows Server 2003 Driver Development Kit (Microsoft WINDDK) version 3790.1830
# Optional:
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# VS2010x86 -win64- Requires:
# Microsoft Visual Studio 2010 (x86) Premium Edition
# Microsoft Windows Server 2003 Driver Development Kit (Microsoft WINDDK) version 3790.1830
# Optional:
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# VS2012x86 -win64- Requires:
# Microsoft Visual Studio 2012 (x86) Professional Edition
# Microsoft Windows Server 2003 Driver Development Kit (Microsoft WINDDK) version 3790.1830
# Optional:
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# VS2013x86 -win64- Requires:
# Microsoft Visual Studio 2013 (x86) Professional Edition
# Microsoft Windows Server 2003 Driver Development Kit (Microsoft WINDDK) version 3790.1830
# Optional:
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# ICCx86 -win64- Requires:
# Intel C Compiler V9.1(x86)
# Dependencies:
@@ -534,8 +534,8 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G
# Required to build EBC drivers:
# Intel(r) Compiler for Efi Byte Code (Intel(r) EBC Compiler)
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# ICC11x86 -win64- Requires:
# Intel C Compiler V11.1(x86)
# Dependencies:
@@ -546,8 +546,8 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G
# Required to build EBC drivers:
# Intel(r) Compiler for Efi Byte Code (Intel(r) EBC Compiler)
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# VS2005x86xASL -win64- Requires:
# Microsoft Visual Studio 2005 Team Suite Edition (x86)
# Microsoft Windows Server 2003 Driver Development Kit(Microsoft WINDDK) version 3790.1830
@@ -616,8 +616,8 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G
# Required to build EBC drivers:
# Intel(r) Compiler for Efi Byte Code (Intel(r) EBC Compiler)
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# CYGGCCx86xASL -win64- Requires:
# CygWin, GCC 4.3.0, binutils 2.20.51.0.5
# Microsoft Visual Studio 2005 or 2008
@@ -631,14 +631,14 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G
# ARM None EABI GCC 4.6.0
# Optional:
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler from
+# https://acpica.org/downloads
# ARMLINUXGCC -unix- Requires:
# ARM Linux GNU EABI GCC 4.6.0
# Optional:
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler from
+# https://acpica.org/downloads
# RVCT -win- Requires:
# ARM C/C++ Compiler, 5.00
# Optional:
@@ -651,8 +651,8 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G
# ARM C/C++ Compiler, 5.00
# Optional:
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler from
+# https://acpica.org/downloads
# * Commented out - All versions of VS2005 use the same standard install directory
#
####################################################################################
--
1.9.5.msysgit.0
Gao, Liming
2015-06-29 02:42:52 UTC
Permalink
Reviewed-by: Liming Gao <***@intel.com>

-----Original Message-----
From: Yingke Liu [mailto:***@intel.com]
Sent: Tuesday, June 23, 2015 2:33 PM
To: edk2-***@lists.sourceforge.net
Subject: [edk2] [Patch] BaseTools: Update IASL download link and remove specific version info.

The version of IASL compiler in the tools_def.template file no longer exists on the acpica.org site. Update the tools_def.template file to remove the specific version info from the tools_def.template file.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Conf/tools_def.template | 120 +++++++++++++++++++-------------------
1 file changed, 60 insertions(+), 60 deletions(-)

diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index fd7b4b5..52864ef 100644
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -246,8 +246,8 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G
# Required to build EBC drivers:
# Intel(r) Compiler for Efi Byte Code (Intel(r) EBC Compiler)
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# VS2005 -win32- Requires:
# Microsoft Visual Studio 2005 Team Suite Edition
# Microsoft Windows Server 2003 Driver Development Kit (Microsoft WINDDK) version 3790.1830
@@ -255,8 +255,8 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G
# Required to build EBC drivers:
# Intel(r) Compiler for Efi Byte Code (Intel(r) EBC Compiler)
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# VS2008 -win32- Requires:
# Microsoft Visual Studio 2008 Team Suite Edition
# Microsoft Windows Server 2003 Driver Development Kit (Microsoft WINDDK) version 3790.1830
@@ -264,8 +264,8 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G
# Required to build EBC drivers:
# Intel(r) Compiler for Efi Byte Code (Intel(r) EBC Compiler)
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# VS2010 -win32- Requires:
# Microsoft Visual Studio 2010 Premium Edition
# Microsoft Windows Server 2003 Driver Development Kit (Microsoft WINDDK) version 3790.1830
@@ -273,8 +273,8 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G
# Required to build EBC drivers:
# Intel(r) Compiler for Efi Byte Code (Intel(r) EBC Compiler)
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# VS2012 -win32- Requires:
# Microsoft Visual Studio 2012 Professional Edition
# Microsoft Windows Server 2003 Driver Development Kit (Microsoft WINDDK) version 3790.1830
@@ -282,8 +282,8 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G
# Required to build EBC drivers:
# Intel(r) Compiler for Efi Byte Code (Intel(r) EBC Compiler)
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# VS2013 -win32- Requires:
# Microsoft Visual Studio 2013 Professional Edition
# Microsoft Windows Server 2003 Driver Development Kit (Microsoft WINDDK) version 3790.1830
@@ -291,65 +291,65 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G
# Required to build EBC drivers:
# Intel(r) Compiler for Efi Byte Code (Intel(r) EBC Compiler)
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# DDK3790 -win32- Requires:
# Microsoft Windows Server 2003 Driver Development Kit (Microsoft WINDDK) version 3790.1830
# Optional:
# Required to build EBC drivers:
# Intel(r) Compiler for Efi Byte Code (Intel(r) EBC Compiler)
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# UNIXGCC -UNIX- Requires:
# GCC 4.3.0
# binutils 2.20.51.0.5
# Optional:
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler from
+# https://acpica.org/downloads
# GCC44 -Linux,Windows- Requires:
# GCC 4.4 targeting x86_64-linux-gnu
# Optional:
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler from
+# https://acpica.org/downloads
# GCC45 -Linux,Windows- Requires:
# GCC 4.5 targeting x86_64-linux-gnu
# Optional:
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler from
+# https://acpica.org/downloads
# GCC46 -Linux,Windows- Requires:
# GCC 4.6 targeting x86_64-linux-gnu or arm-linux-gnueabi
# Optional:
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler from
+# https://acpica.org/downloads
# GCC47 -Linux,Windows- Requires:
# GCC 4.7 targeting x86_64-linux-gnu, aarch64-linux-gnu, or arm-linux-gnueabi
# Optional:
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler from
+# https://acpica.org/downloads
# GCC48 -Linux,Windows- Requires:
# GCC 4.8 targeting x86_64-linux-gnu, aarch64-linux-gnu, or arm-linux-gnueabi
# Optional:
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler from
+# https://acpica.org/downloads
# GCC49 -Linux,Windows- Requires:
# GCC 4.9 targeting x86_64-linux-gnu, aarch64-linux-gnu, or arm-linux-gnueabi
# Optional:
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler from
+# https://acpica.org/downloads
# ELFGCC -Linux- Requires:
# GCC(this tool chain uses whatever version of gcc and binutils that is installed in /usr/bin)
# Optional:
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler from
+# https://acpica.org/downloads
# CYGGCC -win32- Requires:
# CygWin, GCC 4.3.0, binutils 2.20.51.0.5
# Microsoft Visual Studio 2005 or 2008
@@ -357,8 +357,8 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G
# Required to build EBC drivers:
# Intel(r) Compiler for Efi Byte Code (Intel(r) EBC Compiler)
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# ICC -win32- Requires:
# Intel C Compiler V9.1
# Dependencies:
@@ -369,8 +369,8 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G
# Required to build EBC drivers:
# Intel(r) Compiler for Efi Byte Code (Intel(r) EBC Compiler)
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# ICC11 -win32- Requires:
# Intel C Compiler V11.1
# Dependencies:
@@ -381,8 +381,8 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G
# Required to build EBC drivers:
# Intel(r) Compiler for Efi Byte Code (Intel(r) EBC Compiler)
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# MYTOOLS -win32- Requires:
# Microsoft Visual Studio 2008 for IA32/X64
# Microsoft Windows Server 2003 Driver Development Kit (Microsoft WINDDK) version 3790.1830 for IPF
@@ -390,8 +390,8 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G
# Required to build EBC drivers:
# Intel(r) Compiler for Efi Byte Code (Intel(r) EBC Compiler)
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# VS2003xASL -win32- Requires:
# Microsoft Visual Studio .NET 2003
# Microsoft Windows Server 2003 Driver Development Kit (Microsoft WINDDK) version 3790.1830
@@ -494,36 +494,36 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G
# Required to build EBC drivers:
# Intel(r) Compiler for Efi Byte Code (Intel(r) EBC Compiler)
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# VS2008x86 -win64- Requires:
# Microsoft Visual Studio 2008 (x86)
# Microsoft Windows Server 2003 Driver Development Kit (Microsoft WINDDK) version 3790.1830
# Optional:
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# VS2010x86 -win64- Requires:
# Microsoft Visual Studio 2010 (x86) Premium Edition
# Microsoft Windows Server 2003 Driver Development Kit (Microsoft WINDDK) version 3790.1830
# Optional:
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# VS2012x86 -win64- Requires:
# Microsoft Visual Studio 2012 (x86) Professional Edition
# Microsoft Windows Server 2003 Driver Development Kit (Microsoft WINDDK) version 3790.1830
# Optional:
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# VS2013x86 -win64- Requires:
# Microsoft Visual Studio 2013 (x86) Professional Edition
# Microsoft Windows Server 2003 Driver Development Kit (Microsoft WINDDK) version 3790.1830
# Optional:
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# ICCx86 -win64- Requires:
# Intel C Compiler V9.1(x86)
# Dependencies:
@@ -534,8 +534,8 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G
# Required to build EBC drivers:
# Intel(r) Compiler for Efi Byte Code (Intel(r) EBC Compiler)
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# ICC11x86 -win64- Requires:
# Intel C Compiler V11.1(x86)
# Dependencies:
@@ -546,8 +546,8 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G
# Required to build EBC drivers:
# Intel(r) Compiler for Efi Byte Code (Intel(r) EBC Compiler)
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# VS2005x86xASL -win64- Requires:
# Microsoft Visual Studio 2005 Team Suite Edition (x86)
# Microsoft Windows Server 2003 Driver Development Kit(Microsoft WINDDK) version 3790.1830
@@ -616,8 +616,8 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G
# Required to build EBC drivers:
# Intel(r) Compiler for Efi Byte Code (Intel(r) EBC Compiler)
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler (iasl.exe) from
+# https://acpica.org/downloads
# CYGGCCx86xASL -win64- Requires:
# CygWin, GCC 4.3.0, binutils 2.20.51.0.5
# Microsoft Visual Studio 2005 or 2008
@@ -631,14 +631,14 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G
# ARM None EABI GCC 4.6.0
# Optional:
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler from
+# https://acpica.org/downloads
# ARMLINUXGCC -unix- Requires:
# ARM Linux GNU EABI GCC 4.6.0
# Optional:
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler from
+# https://acpica.org/downloads
# RVCT -win- Requires:
# ARM C/C++ Compiler, 5.00
# Optional:
@@ -651,8 +651,8 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G
# ARM C/C++ Compiler, 5.00
# Optional:
# Required to build platforms or ACPI tables:
-# Intel(r) ACPI Compiler v20101013 from
-# http://www.acpica.org/downloads/previous_releases.php
+# Intel(r) ACPI Compiler from
+# https://acpica.org/downloads
# * Commented out - All versions of VS2005 use the same standard install directory # ####################################################################################
--
1.9.5.msysgit.0


------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Yingke Liu
2015-06-23 08:16:14 UTC
Permalink
This is for UEFI 2.5 properties table feature.

Runtime driver need have 4K aligned code/data section, but now the tool hardcode 32bytes.
For GCC, a ld script was added to generate 4K aligned ELF file, and if GenFw detected ELF was 4K aligned, the PE converted from this ELF should also be 4K aligned;
For others, updated link option to merge .data and .rdata

Yingke Liu (3):
BaseTools: Updated tool_def to support 4K alignment.
BaseTools: Update GenFw to support 4K alignment.
BaseTools: Added GCC ld script to support 4K alignment.

BaseTools/Conf/tools_def.template | 128 +++++++++++++++----------------
BaseTools/Scripts/gcc-4K-align-ld-script | 44 +++++++++++
BaseTools/Source/C/GenFw/Elf32Convert.c | 8 +-
BaseTools/Source/C/GenFw/Elf64Convert.c | 6 +-
4 files changed, 119 insertions(+), 67 deletions(-)
create mode 100644 BaseTools/Scripts/gcc-4K-align-ld-script
--
1.9.5.msysgit.0
Yingke Liu
2015-06-23 08:19:04 UTC
Permalink
Replace '/MERGE:.data=.text /MERGE:.rdata=.text' with /MERGE:.rdata=.data

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Conf/tools_def.template | 128 +++++++++++++++++++-------------------
1 file changed, 64 insertions(+), 64 deletions(-)

diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index 52864ef..88ec2e1 100644
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -765,7 +765,7 @@ NOOPT_VS2003_IA32_NASM_FLAGS = -O0 -f win32 -g

*_VS2003_IA32_SLINK_FLAGS = /nologo /LTCG
DEBUG_VS2003_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2003_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4078 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2003_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4078 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2003_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -843,7 +843,7 @@ NOOPT_VS2003xASL_IA32_NASM_FLAGS = -O0 -f win32 -g

*_VS2003xASL_IA32_SLINK_FLAGS = /nologo /LTCG
DEBUG_VS2003xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2003xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4078 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2003xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4078 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2003xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -927,7 +927,7 @@ RELEASE_VS2005_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2005_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2005_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2005_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2005_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2005_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -959,7 +959,7 @@ RELEASE_VS2005_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2005_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2005_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2005_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2005_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2005_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -1071,7 +1071,7 @@ RELEASE_VS2005xASL_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2005xASL_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2005xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2005xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2005xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2005xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -1103,7 +1103,7 @@ RELEASE_VS2005xASL_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2005xASL_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2005xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2005xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2005xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2005xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -1215,7 +1215,7 @@ RELEASE_VS2005x86_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2005x86_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2005x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2005x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2005x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2005x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -1247,7 +1247,7 @@ RELEASE_VS2005x86_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2005x86_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2005x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2005x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2005x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2005x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -1359,7 +1359,7 @@ RELEASE_VS2005x86xASL_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2005x86xASL_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2005x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2005x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2005x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2005x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -1391,7 +1391,7 @@ RELEASE_VS2005x86xASL_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2005x86xASL_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2005x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2005x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2005x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2005x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -1504,7 +1504,7 @@ RELEASE_VS2008_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2008_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -1536,7 +1536,7 @@ RELEASE_VS2008_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2008_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -1650,7 +1650,7 @@ RELEASE_VS2008xASL_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2008xASL_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2008xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2008xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2008xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2008xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -1682,7 +1682,7 @@ RELEASE_VS2008xASL_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2008xASL_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2008xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2008xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2008xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2008xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -1794,7 +1794,7 @@ RELEASE_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2008x86_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -1826,7 +1826,7 @@ RELEASE_VS2008x86_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2008x86_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -1937,7 +1937,7 @@ RELEASE_VS2008xASL_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2008xASL_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2008x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2008x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2008x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2008x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -1969,7 +1969,7 @@ RELEASE_VS2008xASL_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2008xASL_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2008x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2008x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2008x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2008x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -2083,7 +2083,7 @@ RELEASE_VS2010_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2010_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -2115,7 +2115,7 @@ RELEASE_VS2010_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2010_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -2229,7 +2229,7 @@ RELEASE_VS2010xASL_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2010xASL_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2010xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2010xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2010xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2010xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -2261,7 +2261,7 @@ RELEASE_VS2010xASL_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2010xASL_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2010xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2010xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2010xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2010xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -2373,7 +2373,7 @@ RELEASE_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2010x86_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -2405,7 +2405,7 @@ RELEASE_VS2010x86_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2010x86_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -2516,7 +2516,7 @@ RELEASE_VS2010x86xASL_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2010x86xASL_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2010x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2010x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2010x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2010x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -2548,7 +2548,7 @@ RELEASE_VS2010x86xASL_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2010x86xASL_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2010x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2010x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2010x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2010x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -2662,7 +2662,7 @@ RELEASE_VS2012_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2012_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -2694,7 +2694,7 @@ RELEASE_VS2012_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2012_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -2780,7 +2780,7 @@ RELEASE_VS2012xASL_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2012xASL_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2012xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2012xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2012xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2012xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -2812,7 +2812,7 @@ RELEASE_VS2012xASL_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2012xASL_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2012xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2012xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2012xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2012xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -2896,7 +2896,7 @@ RELEASE_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2012x86_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -2928,7 +2928,7 @@ RELEASE_VS2012x86_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2012x86_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -3011,7 +3011,7 @@ RELEASE_VS2012x86xASL_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2012x86xASL_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2012x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2012x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2012x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2012x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -3043,7 +3043,7 @@ RELEASE_VS2012x86xASL_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2012x86xASL_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2012x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2012x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2012x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2012x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -3128,7 +3128,7 @@ RELEASE_VS2013_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2013_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -3160,7 +3160,7 @@ RELEASE_VS2013_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2013_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -3246,7 +3246,7 @@ RELEASE_VS2013xASL_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2013xASL_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2013xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2013xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2013xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2013xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -3278,7 +3278,7 @@ RELEASE_VS2013xASL_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2013xASL_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2013xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2013xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2013xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2013xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -3362,7 +3362,7 @@ RELEASE_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2013x86_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -3394,7 +3394,7 @@ RELEASE_VS2013x86_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2013x86_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -3477,7 +3477,7 @@ RELEASE_VS2013x86xASL_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2013x86xASL_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2013x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2013x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2013x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2013x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -3509,7 +3509,7 @@ RELEASE_VS2013x86xASL_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2013x86xASL_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2013x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2013x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2013x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2013x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -3592,7 +3592,7 @@ RELEASE_DDK3790_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_DDK3790_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_DDK3790_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_DDK3790_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4078 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_DDK3790_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4078 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_DDK3790_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -3622,7 +3622,7 @@ RELEASE_DDK3790_X64_NASM_FLAGS = -Ox -f win64
NOOPT_DDK3790_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_DDK3790_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_DDK3790_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4078 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_DDK3790_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4078 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_DDK3790_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -3726,7 +3726,7 @@ RELEASE_DDK3790xASL_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_DDK3790xASL_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_DDK3790xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_DDK3790xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4078 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_DDK3790xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4078 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_DDK3790xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -3756,7 +3756,7 @@ RELEASE_DDK3790xASL_X64_NASM_FLAGS = -Ox -f win64
NOOPT_DDK3790xASL_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_DDK3790xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_DDK3790xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4078 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_DDK3790xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4078 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_DDK3790xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -4973,7 +4973,7 @@ NOOPT_ICC_IA32_NASM_FLAGS = -O0 -f win32 -g

*_ICC_IA32_SLINK_FLAGS = /nologo
DEBUG_ICC_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICC_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_ICC_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_ICC_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -5006,7 +5006,7 @@ RELEASE_ICC_X64_NASM_FLAGS = -Ox -f win64
NOOPT_ICC_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_ICC_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICC_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_ICC_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_ICC_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

*_ICC_X64_SLINK_FLAGS = /nologo /LTCG
@@ -5125,7 +5125,7 @@ NOOPT_ICCxASL_IA32_NASM_FLAGS = -O0 -f win32 -g

*_ICCxASL_IA32_SLINK_FLAGS = /nologo
DEBUG_ICCxASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICCxASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_ICCxASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_ICCxASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -5158,7 +5158,7 @@ RELEASE_ICCxASL_X64_NASM_FLAGS = -Ox -f win64
NOOPT_ICCxASL_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_ICCxASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICCxASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_ICCxASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_ICCxASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

*_ICCxASL_X64_SLINK_FLAGS = /nologo /LTCG
@@ -5278,7 +5278,7 @@ NOOPT_ICCx86_IA32_NASM_FLAGS = -O0 -f win32 -g

*_ICCx86_IA32_SLINK_FLAGS = /nologo
DEBUG_ICCx86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICCx86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_ICCx86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_ICCx86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -5311,7 +5311,7 @@ RELEASE_ICCx86_X64_NASM_FLAGS = -Ox -f win64
NOOPT_ICCx86_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_ICCx86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICCx86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_ICCx86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_ICCx86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

*_ICCx86_X64_SLINK_FLAGS = /nologo /LTCG
@@ -5431,7 +5431,7 @@ NOOPT_ICCx86xASL_IA32_NASM_FLAGS = -O0 -f win32 -g

*_ICCx86xASL_IA32_SLINK_FLAGS = /nologo
DEBUG_ICCx86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICCx86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_ICCx86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_ICCx86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -5464,7 +5464,7 @@ RELEASE_ICCx86xASL_X64_NASM_FLAGS = -Ox -f win64
NOOPT_ICCx86xASL_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_ICCx86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICCx86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_ICCx86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_ICCx86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

*_ICCx86xASL_X64_SLINK_FLAGS = /nologo /LTCG
@@ -5585,7 +5585,7 @@ NOOPT_ICC11_IA32_NASM_FLAGS = -O0 -f win32 -g

*_ICC11_IA32_SLINK_FLAGS = /nologo
DEBUG_ICC11_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICC11_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_ICC11_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_ICC11_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -5618,7 +5618,7 @@ RELEASE_ICC11_X64_NASM_FLAGS = -Ox -f win64
NOOPT_ICC11_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_ICC11_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICC11_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_ICC11_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_ICC11_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

*_ICC11_X64_SLINK_FLAGS = /nologo /LTCG
@@ -5738,7 +5738,7 @@ NOOPT_ICC11xASL_IA32_NASM_FLAGS = -O0 -f win32 -g

*_ICC11xASL_IA32_SLINK_FLAGS = /nologo
DEBUG_ICC11xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICC11xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_ICC11xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_ICC11xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -5771,7 +5771,7 @@ RELEASE_ICC11xASL_X64_NASM_FLAGS = -Ox -f win64
NOOPT_ICC11xASL_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_ICC11xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICC11xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_ICC11xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_ICC11xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

*_ICC11xASL_X64_SLINK_FLAGS = /nologo /LTCG
@@ -5890,7 +5890,7 @@ RELEASE_ICC11x86_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_ICC11x86_IA32_NASM_FLAGS = -O0 -f win32 -g
*_ICC11x86_IA32_SLINK_FLAGS = /nologo
DEBUG_ICC11x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICC11x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_ICC11x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_ICC11x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -5920,7 +5920,7 @@ NOOPT_ICC11x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
RELEASE_ICC11x86_X64_NASM_FLAGS = -Ox -f win64
NOOPT_ICC11x86_X64_NASM_FLAGS = -O0 -f win64 -g
DEBUG_ICC11x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICC11x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_ICC11x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_ICC11x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

*_ICC11x86_X64_SLINK_FLAGS = /nologo /LTCG
@@ -6039,7 +6039,7 @@ RELEASE_ICC11x86xASL_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_ICC11x86xASL_IA32_NASM_FLAGS = -O0 -f win32 -g
*_ICC11x86xASL_IA32_SLINK_FLAGS = /nologo
DEBUG_ICC11x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICC11x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_ICC11x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_ICC11x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -6071,7 +6071,7 @@ RELEASE_ICC11x86xASL_X64_NASM_FLAGS = -Ox -f win64
NOOPT_ICC11x86xASL_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_ICC11x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICC11x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_ICC11x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_ICC11x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

*_ICC11x86xASL_X64_SLINK_FLAGS = /nologo /LTCG
@@ -6185,7 +6185,7 @@ NOOPT_MYTOOLS_IA32_ASM_FLAGS = /nologo /c /WX /W3 /coff /Cx /Zd /Zi
RELEASE_MYTOOLS_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_MYTOOLS_IA32_NASM_FLAGS = -O0 -f win32 -g
DEBUG_MYTOOLS_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb
-RELEASE_MYTOOLS_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb
+RELEASE_MYTOOLS_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb
NOOPT_MYTOOLS_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb

##################
@@ -6216,7 +6216,7 @@ NOOPT_MYTOOLS_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
RELEASE_MYTOOLS_X64_NASM_FLAGS = -Ox -f win64
NOOPT_MYTOOLS_X64_NASM_FLAGS = -O0 -f win64 -g
DEBUG_MYTOOLS_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_MYTOOLS_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_MYTOOLS_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_MYTOOLS_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
--
1.9.5.msysgit.0
Gao, Liming
2015-06-29 02:43:24 UTC
Permalink
Reviewed-by: Liming Gao <***@intel.com>

-----Original Message-----
From: Yingke Liu [mailto:***@intel.com]
Sent: Tuesday, June 23, 2015 4:19 PM
To: edk2-***@lists.sourceforge.net
Subject: [edk2] [Patch 1/3] BaseTools: Updated tool_def to support 4K alignment.

Replace '/MERGE:.data=.text /MERGE:.rdata=.text' with /MERGE:.rdata=.data

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Conf/tools_def.template | 128 +++++++++++++++++++-------------------
1 file changed, 64 insertions(+), 64 deletions(-)

diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index 52864ef..88ec2e1 100644
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -765,7 +765,7 @@ NOOPT_VS2003_IA32_NASM_FLAGS = -O0 -f win32 -g

*_VS2003_IA32_SLINK_FLAGS = /nologo /LTCG
DEBUG_VS2003_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2003_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4078 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2003_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4078 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2003_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -843,7 +843,7 @@ NOOPT_VS2003xASL_IA32_NASM_FLAGS = -O0 -f win32 -g

*_VS2003xASL_IA32_SLINK_FLAGS = /nologo /LTCG
DEBUG_VS2003xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2003xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4078 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2003xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4078 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2003xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -927,7 +927,7 @@ RELEASE_VS2005_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2005_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2005_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2005_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2005_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2005_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -959,7 +959,7 @@ RELEASE_VS2005_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2005_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2005_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2005_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2005_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2005_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -1071,7 +1071,7 @@ RELEASE_VS2005xASL_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2005xASL_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2005xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2005xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2005xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2005xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -1103,7 +1103,7 @@ RELEASE_VS2005xASL_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2005xASL_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2005xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2005xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2005xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2005xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -1215,7 +1215,7 @@ RELEASE_VS2005x86_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2005x86_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2005x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2005x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2005x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2005x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -1247,7 +1247,7 @@ RELEASE_VS2005x86_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2005x86_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2005x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2005x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2005x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2005x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -1359,7 +1359,7 @@ RELEASE_VS2005x86xASL_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2005x86xASL_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2005x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2005x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2005x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2005x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -1391,7 +1391,7 @@ RELEASE_VS2005x86xASL_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2005x86xASL_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2005x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2005x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2005x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2005x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -1504,7 +1504,7 @@ RELEASE_VS2008_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2008_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -1536,7 +1536,7 @@ RELEASE_VS2008_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2008_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -1650,7 +1650,7 @@ RELEASE_VS2008xASL_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2008xASL_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2008xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2008xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2008xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2008xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -1682,7 +1682,7 @@ RELEASE_VS2008xASL_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2008xASL_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2008xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2008xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2008xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2008xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -1794,7 +1794,7 @@ RELEASE_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2008x86_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -1826,7 +1826,7 @@ RELEASE_VS2008x86_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2008x86_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -1937,7 +1937,7 @@ RELEASE_VS2008xASL_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2008xASL_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2008x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2008x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2008x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2008x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -1969,7 +1969,7 @@ RELEASE_VS2008xASL_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2008xASL_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2008x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2008x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2008x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2008x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -2083,7 +2083,7 @@ RELEASE_VS2010_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2010_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -2115,7 +2115,7 @@ RELEASE_VS2010_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2010_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -2229,7 +2229,7 @@ RELEASE_VS2010xASL_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2010xASL_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2010xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2010xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2010xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2010xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -2261,7 +2261,7 @@ RELEASE_VS2010xASL_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2010xASL_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2010xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2010xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2010xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2010xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -2373,7 +2373,7 @@ RELEASE_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2010x86_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -2405,7 +2405,7 @@ RELEASE_VS2010x86_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2010x86_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -2516,7 +2516,7 @@ RELEASE_VS2010x86xASL_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2010x86xASL_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2010x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2010x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2010x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2010x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -2548,7 +2548,7 @@ RELEASE_VS2010x86xASL_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2010x86xASL_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2010x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2010x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2010x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2010x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -2662,7 +2662,7 @@ RELEASE_VS2012_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2012_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -2694,7 +2694,7 @@ RELEASE_VS2012_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2012_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -2780,7 +2780,7 @@ RELEASE_VS2012xASL_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2012xASL_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2012xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2012xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2012xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2012xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -2812,7 +2812,7 @@ RELEASE_VS2012xASL_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2012xASL_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2012xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2012xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2012xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2012xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -2896,7 +2896,7 @@ RELEASE_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2012x86_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -2928,7 +2928,7 @@ RELEASE_VS2012x86_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2012x86_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -3011,7 +3011,7 @@ RELEASE_VS2012x86xASL_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2012x86xASL_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2012x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2012x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2012x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2012x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -3043,7 +3043,7 @@ RELEASE_VS2012x86xASL_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2012x86xASL_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2012x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2012x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2012x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2012x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -3128,7 +3128,7 @@ RELEASE_VS2013_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2013_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -3160,7 +3160,7 @@ RELEASE_VS2013_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2013_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -3246,7 +3246,7 @@ RELEASE_VS2013xASL_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2013xASL_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2013xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2013xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2013xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2013xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -3278,7 +3278,7 @@ RELEASE_VS2013xASL_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2013xASL_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2013xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2013xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2013xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2013xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -3362,7 +3362,7 @@ RELEASE_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2013x86_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -3394,7 +3394,7 @@ RELEASE_VS2013x86_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2013x86_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -3477,7 +3477,7 @@ RELEASE_VS2013x86xASL_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_VS2013x86xASL_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_VS2013x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2013x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2013x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2013x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -3509,7 +3509,7 @@ RELEASE_VS2013x86xASL_X64_NASM_FLAGS = -Ox -f win64
NOOPT_VS2013x86xASL_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_VS2013x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2013x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_VS2013x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_VS2013x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -3592,7 +3592,7 @@ RELEASE_DDK3790_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_DDK3790_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_DDK3790_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_DDK3790_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4078 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_DDK3790_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4078 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_DDK3790_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -3622,7 +3622,7 @@ RELEASE_DDK3790_X64_NASM_FLAGS = -Ox -f win64
NOOPT_DDK3790_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_DDK3790_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_DDK3790_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4078 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_DDK3790_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4078 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_DDK3790_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -3726,7 +3726,7 @@ RELEASE_DDK3790xASL_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_DDK3790xASL_IA32_NASM_FLAGS = -O0 -f win32 -g

DEBUG_DDK3790xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_DDK3790xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4078 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_DDK3790xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4078 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_DDK3790xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -3756,7 +3756,7 @@ RELEASE_DDK3790xASL_X64_NASM_FLAGS = -Ox -f win64
NOOPT_DDK3790xASL_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_DDK3790xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_DDK3790xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4078 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_DDK3790xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4078 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_DDK3790xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -4973,7 +4973,7 @@ NOOPT_ICC_IA32_NASM_FLAGS = -O0 -f win32 -g

*_ICC_IA32_SLINK_FLAGS = /nologo
DEBUG_ICC_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICC_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_ICC_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_ICC_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -5006,7 +5006,7 @@ RELEASE_ICC_X64_NASM_FLAGS = -Ox -f win64
NOOPT_ICC_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_ICC_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICC_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_ICC_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_ICC_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

*_ICC_X64_SLINK_FLAGS = /nologo /LTCG
@@ -5125,7 +5125,7 @@ NOOPT_ICCxASL_IA32_NASM_FLAGS = -O0 -f win32 -g

*_ICCxASL_IA32_SLINK_FLAGS = /nologo
DEBUG_ICCxASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICCxASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_ICCxASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_ICCxASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -5158,7 +5158,7 @@ RELEASE_ICCxASL_X64_NASM_FLAGS = -Ox -f win64
NOOPT_ICCxASL_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_ICCxASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICCxASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_ICCxASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_ICCxASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

*_ICCxASL_X64_SLINK_FLAGS = /nologo /LTCG
@@ -5278,7 +5278,7 @@ NOOPT_ICCx86_IA32_NASM_FLAGS = -O0 -f win32 -g

*_ICCx86_IA32_SLINK_FLAGS = /nologo
DEBUG_ICCx86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICCx86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_ICCx86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_ICCx86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -5311,7 +5311,7 @@ RELEASE_ICCx86_X64_NASM_FLAGS = -Ox -f win64
NOOPT_ICCx86_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_ICCx86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICCx86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_ICCx86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_ICCx86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

*_ICCx86_X64_SLINK_FLAGS = /nologo /LTCG
@@ -5431,7 +5431,7 @@ NOOPT_ICCx86xASL_IA32_NASM_FLAGS = -O0 -f win32 -g

*_ICCx86xASL_IA32_SLINK_FLAGS = /nologo
DEBUG_ICCx86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICCx86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_ICCx86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_ICCx86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -5464,7 +5464,7 @@ RELEASE_ICCx86xASL_X64_NASM_FLAGS = -Ox -f win64
NOOPT_ICCx86xASL_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_ICCx86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICCx86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_ICCx86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_ICCx86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

*_ICCx86xASL_X64_SLINK_FLAGS = /nologo /LTCG
@@ -5585,7 +5585,7 @@ NOOPT_ICC11_IA32_NASM_FLAGS = -O0 -f win32 -g

*_ICC11_IA32_SLINK_FLAGS = /nologo
DEBUG_ICC11_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICC11_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_ICC11_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_ICC11_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -5618,7 +5618,7 @@ RELEASE_ICC11_X64_NASM_FLAGS = -Ox -f win64
NOOPT_ICC11_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_ICC11_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICC11_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_ICC11_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_ICC11_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

*_ICC11_X64_SLINK_FLAGS = /nologo /LTCG
@@ -5738,7 +5738,7 @@ NOOPT_ICC11xASL_IA32_NASM_FLAGS = -O0 -f win32 -g

*_ICC11xASL_IA32_SLINK_FLAGS = /nologo
DEBUG_ICC11xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICC11xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_ICC11xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_ICC11xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -5771,7 +5771,7 @@ RELEASE_ICC11xASL_X64_NASM_FLAGS = -Ox -f win64
NOOPT_ICC11xASL_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_ICC11xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICC11xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_ICC11xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_ICC11xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

*_ICC11xASL_X64_SLINK_FLAGS = /nologo /LTCG
@@ -5890,7 +5890,7 @@ RELEASE_ICC11x86_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_ICC11x86_IA32_NASM_FLAGS = -O0 -f win32 -g
*_ICC11x86_IA32_SLINK_FLAGS = /nologo
DEBUG_ICC11x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICC11x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_ICC11x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_ICC11x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -5920,7 +5920,7 @@ NOOPT_ICC11x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
RELEASE_ICC11x86_X64_NASM_FLAGS = -Ox -f win64
NOOPT_ICC11x86_X64_NASM_FLAGS = -O0 -f win64 -g
DEBUG_ICC11x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICC11x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_ICC11x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_ICC11x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

*_ICC11x86_X64_SLINK_FLAGS = /nologo /LTCG
@@ -6039,7 +6039,7 @@ RELEASE_ICC11x86xASL_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_ICC11x86xASL_IA32_NASM_FLAGS = -O0 -f win32 -g
*_ICC11x86xASL_IA32_SLINK_FLAGS = /nologo
DEBUG_ICC11x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICC11x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_ICC11x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_ICC11x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
@@ -6071,7 +6071,7 @@ RELEASE_ICC11x86xASL_X64_NASM_FLAGS = -Ox -f win64
NOOPT_ICC11x86xASL_X64_NASM_FLAGS = -O0 -f win64 -g

DEBUG_ICC11x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_ICC11x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_ICC11x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_ICC11x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

*_ICC11x86xASL_X64_SLINK_FLAGS = /nologo /LTCG
@@ -6185,7 +6185,7 @@ NOOPT_MYTOOLS_IA32_ASM_FLAGS = /nologo /c /WX /W3 /coff /Cx /Zd /Zi
RELEASE_MYTOOLS_IA32_NASM_FLAGS = -Ox -f win32
NOOPT_MYTOOLS_IA32_NASM_FLAGS = -O0 -f win32 -g
DEBUG_MYTOOLS_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb
-RELEASE_MYTOOLS_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb
+RELEASE_MYTOOLS_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb
NOOPT_MYTOOLS_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb

##################
@@ -6216,7 +6216,7 @@ NOOPT_MYTOOLS_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
RELEASE_MYTOOLS_X64_NASM_FLAGS = -Ox -f win64
NOOPT_MYTOOLS_X64_NASM_FLAGS = -O0 -f win64 -g
DEBUG_MYTOOLS_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_MYTOOLS_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+RELEASE_MYTOOLS_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
NOOPT_MYTOOLS_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG

##################
--
1.9.5.msysgit.0


------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Yingke Liu
2015-06-23 08:19:35 UTC
Permalink
This script can be used to generate 4K aligned ELF file.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Scripts/gcc-4K-align-ld-script | 44 ++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
create mode 100644 BaseTools/Scripts/gcc-4K-align-ld-script

diff --git a/BaseTools/Scripts/gcc-4K-align-ld-script b/BaseTools/Scripts/gcc-4K-align-ld-script
new file mode 100644
index 0000000..1338433
--- /dev/null
+++ b/BaseTools/Scripts/gcc-4K-align-ld-script
@@ -0,0 +1,44 @@
+/* OUTPUT_FORMAT(efi-bsdrv-x86_64) */
+SECTIONS
+{
+ /* . = 0 + SIZEOF_HEADERS; */
+ . = 0x280;
+ .text ALIGN(0x1000) :
+ {
+ *(.text .stub .text.* .gnu.linkonce.t.*)
+ . = ALIGN(0x20);
+ } =0x90909090
+ .data ALIGN(0x1000) :
+ {
+ *(
+ .rodata .rodata.* .gnu.linkonce.r.*
+ .data .data.* .gnu.linkonce.d.*
+ .bss .bss.*
+ *COM*
+ )
+ . = ALIGN(0x20);
+ }
+ .eh_frame ALIGN(0x1000) :
+ {
+ KEEP (*(.eh_frame))
+ }
+ .got ALIGN(0x1000) :
+ {
+ *(.got .got.*)
+ . = ALIGN(0x20);
+ }
+ .rela ALIGN(0x1000) :
+ {
+ *(.rela .rela.*)
+ }
+ /DISCARD/ : {
+ *(.note.GNU-stack) *(.gnu_debuglink)
+ *(.interp)
+ *(.dynsym)
+ *(.dynstr)
+ *(.dynamic)
+ *(.hash)
+ *(.comment)
+ }
+}
+
--
1.9.5.msysgit.0
Ard Biesheuvel
2015-06-23 09:17:05 UTC
Permalink
Post by Yingke Liu
This script can be used to generate 4K aligned ELF file.
Contributed-under: TianoCore Contribution Agreement 1.0
---
BaseTools/Scripts/gcc-4K-align-ld-script | 44 ++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
create mode 100644 BaseTools/Scripts/gcc-4K-align-ld-script
diff --git a/BaseTools/Scripts/gcc-4K-align-ld-script b/BaseTools/Scripts/gcc-4K-align-ld-script
new file mode 100644
index 0000000..1338433
--- /dev/null
+++ b/BaseTools/Scripts/gcc-4K-align-ld-script
@@ -0,0 +1,44 @@
+/* OUTPUT_FORMAT(efi-bsdrv-x86_64) */
+SECTIONS
+{
+ /* . = 0 + SIZEOF_HEADERS; */
+ . = 0x280;
This puts the .text section at a fixed offset of 0x1000, but doesn't
annotate the .text section as being 4K aligned.

You should probably use

.text : ALIGN(0x1000)

here instead. Same below.

However, can you explain why the text section needs the hole here?
Isn't it enough to simply align .data ?
Post by Yingke Liu
+ {
+ *(.text .stub .text.* .gnu.linkonce.t.*)
+ . = ALIGN(0x20);
+ } =0x90909090
+ {
+ *(
+ .rodata .rodata.* .gnu.linkonce.r.*
I realize that this was in the original file that you copied, but
could anyone comment on the reason .rodata was put into the .data
section?
Post by Yingke Liu
+ .data .data.* .gnu.linkonce.d.*
+ .bss .bss.*
+ *COM*
+ )
+ . = ALIGN(0x20);
+ }
+ {
+ KEEP (*(.eh_frame))
+ }
+ {
+ *(.got .got.*)
+ . = ALIGN(0x20);
+ }
+ {
+ *(.rela .rela.*)
+ }
+ /DISCARD/ : {
+ *(.note.GNU-stack) *(.gnu_debuglink)
+ *(.interp)
+ *(.dynsym)
+ *(.dynstr)
+ *(.dynamic)
+ *(.hash)
+ *(.comment)
+ }
+}
+
--
1.9.5.msysgit.0
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Gao, Liming
2015-06-24 08:21:19 UTC
Permalink
Ard:
I am not sure who remember the detail history. If no one knows it, I suggest to keep them as-is.

On alignment, do you suggest use ".text 0x1000 : ALIGN(0x1000) {"?

Thanks
Liming
-----Original Message-----
From: Ard Biesheuvel [mailto:***@linaro.org]
Sent: Tuesday, June 23, 2015 5:17 PM
To: edk2-***@lists.sourceforge.net
Subject: Re: [edk2] [Patch 3/3] BaseTools: Added GCC ld script to support 4K alignment.
Post by Yingke Liu
This script can be used to generate 4K aligned ELF file.
Contributed-under: TianoCore Contribution Agreement 1.0
---
BaseTools/Scripts/gcc-4K-align-ld-script | 44
++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
create mode 100644 BaseTools/Scripts/gcc-4K-align-ld-script
diff --git a/BaseTools/Scripts/gcc-4K-align-ld-script
b/BaseTools/Scripts/gcc-4K-align-ld-script
new file mode 100644
index 0000000..1338433
--- /dev/null
+++ b/BaseTools/Scripts/gcc-4K-align-ld-script
@@ -0,0 +1,44 @@
+/* OUTPUT_FORMAT(efi-bsdrv-x86_64) */ SECTIONS {
+ /* . = 0 + SIZEOF_HEADERS; */
+ . = 0x280;
This puts the .text section at a fixed offset of 0x1000, but doesn't annotate the .text section as being 4K aligned.

You should probably use

.text : ALIGN(0x1000)

here instead. Same below.

However, can you explain why the text section needs the hole here?
Isn't it enough to simply align .data ?
Post by Yingke Liu
+ {
+ *(.text .stub .text.* .gnu.linkonce.t.*)
+ . = ALIGN(0x20);
+ } =0x90909090
+ {
+ *(
+ .rodata .rodata.* .gnu.linkonce.r.*
I realize that this was in the original file that you copied, but could anyone comment on the reason .rodata was put into the .data section?
Post by Yingke Liu
+ .data .data.* .gnu.linkonce.d.*
+ .bss .bss.*
+ *COM*
+ )
+ . = ALIGN(0x20);
+ }
+ {
+ KEEP (*(.eh_frame))
+ }
+ {
+ *(.got .got.*)
+ . = ALIGN(0x20);
+ }
+ {
+ *(.rela .rela.*)
+ }
+ /DISCARD/ : {
+ *(.note.GNU-stack) *(.gnu_debuglink)
+ *(.interp)
+ *(.dynsym)
+ *(.dynstr)
+ *(.dynamic)
+ *(.hash)
+ *(.comment)
+ }
+}
+
--
1.9.5.msysgit.0
----------------------------------------------------------------------
-------- Monitor 25 network devices or servers for free with
OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download
now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Ard Biesheuvel
2015-06-24 08:36:27 UTC
Permalink
Post by Gao, Liming
I am not sure who remember the detail history. If no one knows it, I suggest to keep them as-is.
Well, with the new 2.5 feature that actually makes code RO and data
XP, I think it would be nice to make sure that rodata lives in the
former region. But I won't insist.

Another thing I should point out is that the =0x90909090 should
probably be removed as well: it basically puts a NOP slide into every
padded region, which only makes it easier for the hackers. If correct
operation of the firmware relies on these NOPs, it is broken anyway
and should be fixed.
Post by Gao, Liming
On alignment, do you suggest use ".text 0x1000 : ALIGN(0x1000) {"?
Well, the former 0x1000 is implied by the alignment, since the header
consumes around 0x260 bytes at the beginning of the image. The
important part is that ALIGN() comes /after/ the colon, so it results
in the section being annotated with this alignment. Putting ALIGN()
before the colon just aligns the current placement of the section, but
the value is not recorded as the section alignment.
--
Ard.
Post by Gao, Liming
-----Original Message-----
Sent: Tuesday, June 23, 2015 5:17 PM
Subject: Re: [edk2] [Patch 3/3] BaseTools: Added GCC ld script to support 4K alignment.
Post by Yingke Liu
This script can be used to generate 4K aligned ELF file.
Contributed-under: TianoCore Contribution Agreement 1.0
---
BaseTools/Scripts/gcc-4K-align-ld-script | 44
++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
create mode 100644 BaseTools/Scripts/gcc-4K-align-ld-script
diff --git a/BaseTools/Scripts/gcc-4K-align-ld-script
b/BaseTools/Scripts/gcc-4K-align-ld-script
new file mode 100644
index 0000000..1338433
--- /dev/null
+++ b/BaseTools/Scripts/gcc-4K-align-ld-script
@@ -0,0 +1,44 @@
+/* OUTPUT_FORMAT(efi-bsdrv-x86_64) */ SECTIONS {
+ /* . = 0 + SIZEOF_HEADERS; */
+ . = 0x280;
This puts the .text section at a fixed offset of 0x1000, but doesn't annotate the .text section as being 4K aligned.
You should probably use
.text : ALIGN(0x1000)
here instead. Same below.
However, can you explain why the text section needs the hole here?
Isn't it enough to simply align .data ?
Post by Yingke Liu
+ {
+ *(.text .stub .text.* .gnu.linkonce.t.*)
+ . = ALIGN(0x20);
+ } =0x90909090
+ {
+ *(
+ .rodata .rodata.* .gnu.linkonce.r.*
I realize that this was in the original file that you copied, but could anyone comment on the reason .rodata was put into the .data section?
Post by Yingke Liu
+ .data .data.* .gnu.linkonce.d.*
+ .bss .bss.*
+ *COM*
+ )
+ . = ALIGN(0x20);
+ }
+ {
+ KEEP (*(.eh_frame))
+ }
+ {
+ *(.got .got.*)
+ . = ALIGN(0x20);
+ }
+ {
+ *(.rela .rela.*)
+ }
+ /DISCARD/ : {
+ *(.note.GNU-stack) *(.gnu_debuglink)
+ *(.interp)
+ *(.dynsym)
+ *(.dynstr)
+ *(.dynamic)
+ *(.hash)
+ *(.comment)
+ }
+}
+
--
1.9.5.msysgit.0
----------------------------------------------------------------------
-------- Monitor 25 network devices or servers for free with
OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download
now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Liu, Yingke D
2015-06-24 08:57:47 UTC
Permalink
Ard:

Thanks for your comments, update the script as following:

/* OUTPUT_FORMAT(efi-bsdrv-x86_64) */
SECTIONS
{
/* . = 0 + SIZEOF_HEADERS; */
. = 0x280;
.text:ALIGN(0x1000)
{
*(.text .stub .text.* .gnu.linkonce.t.*)
. = ALIGN(0x20);
}
.data: ALIGN(0x1000)
{
*(
.rodata .rodata.* .gnu.linkonce.r.*
.data .data.* .gnu.linkonce.d.*
.bss .bss.*
*COM*
)
. = ALIGN(0x20);
}
.eh_frame: ALIGN(0x1000)
{
KEEP (*(.eh_frame))
}
.got: ALIGN(0x1000)
{
*(.got .got.*)
. = ALIGN(0x20);
}
.rela: ALIGN(0x1000)
{
*(.rela .rela.*)
}
/DISCARD/ : {
*(.note.GNU-stack) *(.gnu_debuglink)
*(.interp)
*(.dynsym)
*(.dynstr)
*(.dynamic)
*(.hash)
*(.comment)
}
}

Dennis

-----Original Message-----
From: Ard Biesheuvel [mailto:***@linaro.org]
Sent: Wednesday, June 24, 2015 16:36
To: edk2-***@lists.sourceforge.net; Laszlo Ersek
Subject: Re: [edk2] [Patch 3/3] BaseTools: Added GCC ld script to support 4K alignment.
Post by Gao, Liming
I am not sure who remember the detail history. If no one knows it, I suggest to keep them as-is.
Well, with the new 2.5 feature that actually makes code RO and data XP, I think it would be nice to make sure that rodata lives in the former region. But I won't insist.

Another thing I should point out is that the =0x90909090 should probably be removed as well: it basically puts a NOP slide into every padded region, which only makes it easier for the hackers. If correct operation of the firmware relies on these NOPs, it is broken anyway and should be fixed.
Post by Gao, Liming
On alignment, do you suggest use ".text 0x1000 : ALIGN(0x1000) {"?
Well, the former 0x1000 is implied by the alignment, since the header consumes around 0x260 bytes at the beginning of the image. The important part is that ALIGN() comes /after/ the colon, so it results in the section being annotated with this alignment. Putting ALIGN() before the colon just aligns the current placement of the section, but the value is not recorded as the section alignment.

--
Ard.
Post by Gao, Liming
-----Original Message-----
Sent: Tuesday, June 23, 2015 5:17 PM
Subject: Re: [edk2] [Patch 3/3] BaseTools: Added GCC ld script to support 4K alignment.
Post by Yingke Liu
This script can be used to generate 4K aligned ELF file.
Contributed-under: TianoCore Contribution Agreement 1.0
---
BaseTools/Scripts/gcc-4K-align-ld-script | 44
++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
create mode 100644 BaseTools/Scripts/gcc-4K-align-ld-script
diff --git a/BaseTools/Scripts/gcc-4K-align-ld-script
b/BaseTools/Scripts/gcc-4K-align-ld-script
new file mode 100644
index 0000000..1338433
--- /dev/null
+++ b/BaseTools/Scripts/gcc-4K-align-ld-script
@@ -0,0 +1,44 @@
+/* OUTPUT_FORMAT(efi-bsdrv-x86_64) */ SECTIONS {
+ /* . = 0 + SIZEOF_HEADERS; */
+ . = 0x280;
This puts the .text section at a fixed offset of 0x1000, but doesn't annotate the .text section as being 4K aligned.
You should probably use
.text : ALIGN(0x1000)
here instead. Same below.
However, can you explain why the text section needs the hole here?
Isn't it enough to simply align .data ?
Post by Yingke Liu
+ {
+ *(.text .stub .text.* .gnu.linkonce.t.*)
+ . = ALIGN(0x20);
+ } =0x90909090
+ {
+ *(
+ .rodata .rodata.* .gnu.linkonce.r.*
I realize that this was in the original file that you copied, but could anyone comment on the reason .rodata was put into the .data section?
Post by Yingke Liu
+ .data .data.* .gnu.linkonce.d.*
+ .bss .bss.*
+ *COM*
+ )
+ . = ALIGN(0x20);
+ }
+ {
+ KEEP (*(.eh_frame))
+ }
+ {
+ *(.got .got.*)
+ . = ALIGN(0x20);
+ }
+ {
+ *(.rela .rela.*)
+ }
+ /DISCARD/ : {
+ *(.note.GNU-stack) *(.gnu_debuglink)
+ *(.interp)
+ *(.dynsym)
+ *(.dynstr)
+ *(.dynamic)
+ *(.hash)
+ *(.comment)
+ }
+}
+
--
1.9.5.msysgit.0
----------------------------------------------------------------------
-------- Monitor 25 network devices or servers for free with
OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download
now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Gao, Liming
2015-06-29 02:50:52 UTC
Permalink
Reviewed-by: Liming Gao <***@intel.com>

-----Original Message-----
From: Liu, Yingke D [mailto:***@intel.com]
Sent: Wednesday, June 24, 2015 4:58 PM
To: edk2-***@lists.sourceforge.net; Laszlo Ersek
Subject: Re: [edk2] [Patch 3/3] BaseTools: Added GCC ld script to support 4K alignment.

Ard:

Thanks for your comments, update the script as following:

/* OUTPUT_FORMAT(efi-bsdrv-x86_64) */
SECTIONS
{
/* . = 0 + SIZEOF_HEADERS; */
. = 0x280;
.text:ALIGN(0x1000)
{
*(.text .stub .text.* .gnu.linkonce.t.*)
. = ALIGN(0x20);
}
.data: ALIGN(0x1000)
{
*(
.rodata .rodata.* .gnu.linkonce.r.*
.data .data.* .gnu.linkonce.d.*
.bss .bss.*
*COM*
)
. = ALIGN(0x20);
}
.eh_frame: ALIGN(0x1000)
{
KEEP (*(.eh_frame))
}
.got: ALIGN(0x1000)
{
*(.got .got.*)
. = ALIGN(0x20);
}
.rela: ALIGN(0x1000)
{
*(.rela .rela.*)
}
/DISCARD/ : {
*(.note.GNU-stack) *(.gnu_debuglink)
*(.interp)
*(.dynsym)
*(.dynstr)
*(.dynamic)
*(.hash)
*(.comment)
}
}

Dennis

-----Original Message-----
From: Ard Biesheuvel [mailto:***@linaro.org]
Sent: Wednesday, June 24, 2015 16:36
To: edk2-***@lists.sourceforge.net; Laszlo Ersek
Subject: Re: [edk2] [Patch 3/3] BaseTools: Added GCC ld script to support 4K alignment.
Post by Gao, Liming
I am not sure who remember the detail history. If no one knows it, I suggest to keep them as-is.
Well, with the new 2.5 feature that actually makes code RO and data XP, I think it would be nice to make sure that rodata lives in the former region. But I won't insist.

Another thing I should point out is that the =0x90909090 should probably be removed as well: it basically puts a NOP slide into every padded region, which only makes it easier for the hackers. If correct operation of the firmware relies on these NOPs, it is broken anyway and should be fixed.
Post by Gao, Liming
On alignment, do you suggest use ".text 0x1000 : ALIGN(0x1000) {"?
Well, the former 0x1000 is implied by the alignment, since the header consumes around 0x260 bytes at the beginning of the image. The important part is that ALIGN() comes /after/ the colon, so it results in the section being annotated with this alignment. Putting ALIGN() before the colon just aligns the current placement of the section, but the value is not recorded as the section alignment.

--
Ard.
Post by Gao, Liming
-----Original Message-----
Sent: Tuesday, June 23, 2015 5:17 PM
Subject: Re: [edk2] [Patch 3/3] BaseTools: Added GCC ld script to support 4K alignment.
Post by Yingke Liu
This script can be used to generate 4K aligned ELF file.
Contributed-under: TianoCore Contribution Agreement 1.0
---
BaseTools/Scripts/gcc-4K-align-ld-script | 44
++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
create mode 100644 BaseTools/Scripts/gcc-4K-align-ld-script
diff --git a/BaseTools/Scripts/gcc-4K-align-ld-script
b/BaseTools/Scripts/gcc-4K-align-ld-script
new file mode 100644
index 0000000..1338433
--- /dev/null
+++ b/BaseTools/Scripts/gcc-4K-align-ld-script
@@ -0,0 +1,44 @@
+/* OUTPUT_FORMAT(efi-bsdrv-x86_64) */ SECTIONS {
+ /* . = 0 + SIZEOF_HEADERS; */
+ . = 0x280;
This puts the .text section at a fixed offset of 0x1000, but doesn't annotate the .text section as being 4K aligned.
You should probably use
.text : ALIGN(0x1000)
here instead. Same below.
However, can you explain why the text section needs the hole here?
Isn't it enough to simply align .data ?
Post by Yingke Liu
+ {
+ *(.text .stub .text.* .gnu.linkonce.t.*)
+ . = ALIGN(0x20);
+ } =0x90909090
+ {
+ *(
+ .rodata .rodata.* .gnu.linkonce.r.*
I realize that this was in the original file that you copied, but could anyone comment on the reason .rodata was put into the .data section?
Post by Yingke Liu
+ .data .data.* .gnu.linkonce.d.*
+ .bss .bss.*
+ *COM*
+ )
+ . = ALIGN(0x20);
+ }
+ {
+ KEEP (*(.eh_frame))
+ }
+ {
+ *(.got .got.*)
+ . = ALIGN(0x20);
+ }
+ {
+ *(.rela .rela.*)
+ }
+ /DISCARD/ : {
+ *(.note.GNU-stack) *(.gnu_debuglink)
+ *(.interp)
+ *(.dynsym)
+ *(.dynstr)
+ *(.dynamic)
+ *(.hash)
+ *(.comment)
+ }
+}
+
--
1.9.5.msysgit.0
---------------------------------------------------------------------
-
-------- Monitor 25 network devices or servers for free with
OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email &
sms for fault. Monitor 25 devices for free with no restriction.
Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
----------------------------------------------------------------------
-------- Monitor 25 network devices or servers for free with
OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download
now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
----------------------------------------------------------------------
-------- Monitor 25 network devices or servers for free with
OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download
now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Yingke Liu
2015-06-23 08:19:19 UTC
Permalink
If current ELF file is 4K aligned, the converted PE should also be 4K aligned.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Source/C/GenFw/Elf32Convert.c | 8 ++++++--
BaseTools/Source/C/GenFw/Elf64Convert.c | 6 +++++-
2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/BaseTools/Source/C/GenFw/Elf32Convert.c b/BaseTools/Source/C/GenFw/Elf32Convert.c
index 5c7b689..9245851 100644
--- a/BaseTools/Source/C/GenFw/Elf32Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf32Convert.c
@@ -96,7 +96,7 @@ STATIC Elf_Phdr *mPhdrBase;
//
// Coff information
//
-STATIC const UINT32 mCoffAlignment = 0x20;
+STATIC UINT32 mCoffAlignment = 0x20;

//
// PE section alignment.
@@ -154,7 +154,11 @@ InitializeElf32 (
Error (NULL, 0, 3000, "Unsupported", "ELF e_version (%u) not EV_CURRENT (%d)", (unsigned) mEhdr->e_version, EV_CURRENT);
return FALSE;
}
-
+
+ if ((mEhdr->e_entry & 0xFFF) == 0) {
+ mCoffAlignment = 0x1000;
+ }
+
//
// Update section header pointers
//
diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c b/BaseTools/Source/C/GenFw/Elf64Convert.c
index 25b90e2..8737e30 100644
--- a/BaseTools/Source/C/GenFw/Elf64Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf64Convert.c
@@ -97,7 +97,7 @@ STATIC Elf_Phdr *mPhdrBase;
//
// Coff information
//
-STATIC const UINT32 mCoffAlignment = 0x20;
+STATIC UINT32 mCoffAlignment = 0x20;

//
// PE section alignment.
@@ -158,6 +158,10 @@ InitializeElf64 (
return FALSE;
}

+ if ((mEhdr->e_entry & 0xFFF) == 0) {
+ mCoffAlignment = 0x1000;
+ }
+
//
// Update section header pointers
//
--
1.9.5.msysgit.0
Ard Biesheuvel
2015-06-23 09:14:11 UTC
Permalink
Post by Yingke Liu
If current ELF file is 4K aligned, the converted PE should also be 4K aligned.
Contributed-under: TianoCore Contribution Agreement 1.0
---
BaseTools/Source/C/GenFw/Elf32Convert.c | 8 ++++++--
BaseTools/Source/C/GenFw/Elf64Convert.c | 6 +++++-
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/BaseTools/Source/C/GenFw/Elf32Convert.c b/BaseTools/Source/C/GenFw/Elf32Convert.c
index 5c7b689..9245851 100644
--- a/BaseTools/Source/C/GenFw/Elf32Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf32Convert.c
@@ -96,7 +96,7 @@ STATIC Elf_Phdr *mPhdrBase;
//
// Coff information
//
-STATIC const UINT32 mCoffAlignment = 0x20;
+STATIC UINT32 mCoffAlignment = 0x20;
//
// PE section alignment.
@@ -154,7 +154,11 @@ InitializeElf32 (
Error (NULL, 0, 3000, "Unsupported", "ELF e_version (%u) not EV_CURRENT (%d)", (unsigned) mEhdr->e_version, EV_CURRENT);
return FALSE;
}
-
+
+ if ((mEhdr->e_entry & 0xFFF) == 0) {
+ mCoffAlignment = 0x1000;
+ }
+
Can you explain why you are using the alignment of the entry point
here? Wouldn't it be much better if mCoffAlignment is simply the max()
of the alignments of all the sections?
Post by Yingke Liu
//
// Update section header pointers
//
diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c b/BaseTools/Source/C/GenFw/Elf64Convert.c
index 25b90e2..8737e30 100644
--- a/BaseTools/Source/C/GenFw/Elf64Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf64Convert.c
@@ -97,7 +97,7 @@ STATIC Elf_Phdr *mPhdrBase;
//
// Coff information
//
-STATIC const UINT32 mCoffAlignment = 0x20;
+STATIC UINT32 mCoffAlignment = 0x20;
//
// PE section alignment.
@@ -158,6 +158,10 @@ InitializeElf64 (
return FALSE;
}
+ if ((mEhdr->e_entry & 0xFFF) == 0) {
+ mCoffAlignment = 0x1000;
+ }
+
//
// Update section header pointers
//
--
1.9.5.msysgit.0
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Gao, Liming
2015-06-24 08:15:27 UTC
Permalink
Ard:
Good suggestion. How about go through every Shdr and choose the max Shdr->sh_addralign? The alignment should be power of 2.

Thanks
Liming
-----Original Message-----
From: Ard Biesheuvel [mailto:***@linaro.org]
Sent: Tuesday, June 23, 2015 5:14 PM
To: edk2-***@lists.sourceforge.net
Subject: Re: [edk2] [Patch 2/3] BaseTools: Update GenFw to support 4K alignment.
Post by Yingke Liu
If current ELF file is 4K aligned, the converted PE should also be 4K aligned.
Contributed-under: TianoCore Contribution Agreement 1.0
---
BaseTools/Source/C/GenFw/Elf32Convert.c | 8 ++++++--
BaseTools/Source/C/GenFw/Elf64Convert.c | 6 +++++-
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/BaseTools/Source/C/GenFw/Elf32Convert.c
b/BaseTools/Source/C/GenFw/Elf32Convert.c
index 5c7b689..9245851 100644
--- a/BaseTools/Source/C/GenFw/Elf32Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf32Convert.c
@@ -96,7 +96,7 @@ STATIC Elf_Phdr *mPhdrBase; // // Coff information
// -STATIC const UINT32 mCoffAlignment = 0x20;
+STATIC UINT32 mCoffAlignment = 0x20;
//
// PE section alignment.
@@ -154,7 +154,11 @@ InitializeElf32 (
Error (NULL, 0, 3000, "Unsupported", "ELF e_version (%u) not EV_CURRENT (%d)", (unsigned) mEhdr->e_version, EV_CURRENT);
return FALSE;
}
-
+
+ if ((mEhdr->e_entry & 0xFFF) == 0) {
+ mCoffAlignment = 0x1000;
+ }
+
Can you explain why you are using the alignment of the entry point here? Wouldn't it be much better if mCoffAlignment is simply the max() of the alignments of all the sections?
Post by Yingke Liu
//
// Update section header pointers
//
diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c
b/BaseTools/Source/C/GenFw/Elf64Convert.c
index 25b90e2..8737e30 100644
--- a/BaseTools/Source/C/GenFw/Elf64Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf64Convert.c
@@ -97,7 +97,7 @@ STATIC Elf_Phdr *mPhdrBase; // // Coff information
// -STATIC const UINT32 mCoffAlignment = 0x20;
+STATIC UINT32 mCoffAlignment = 0x20;
//
// PE section alignment.
@@ -158,6 +158,10 @@ InitializeElf64 (
return FALSE;
}
+ if ((mEhdr->e_entry & 0xFFF) == 0) {
+ mCoffAlignment = 0x1000;
+ }
+
//
// Update section header pointers
//
--
1.9.5.msysgit.0
----------------------------------------------------------------------
-------- Monitor 25 network devices or servers for free with
OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download
now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Ard Biesheuvel
2015-06-24 08:18:51 UTC
Permalink
Post by Gao, Liming
Good suggestion. How about go through every Shdr and choose the max Shdr->sh_addralign? The alignment should be power of 2.
Indeed. Something like this seems to work fine:

"""
diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c
b/BaseTools/Source/C/GenFw/Elf64Convert.c
index 2266e487cec7..4025191e868e 100644
--- a/BaseTools/Source/C/GenFw/Elf64Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf64Convert.c
@@ -97,7 +97,7 @@ STATIC Elf_Phdr *mPhdrBase;
//
// Coff information
//
-STATIC const UINT32 mCoffAlignment = 0x20;
+STATIC UINT32 mCoffAlignment = 0x20;

//
// PE section alignment.
@@ -286,6 +286,20 @@ ScanSections64 (
mCoffOffset += mCoffNbrSections * sizeof(EFI_IMAGE_SECTION_HEADER);

//
+ // Set mCoffAlignment to the maximum alignment of the input sections
+ // we care about
+ //
+ for (i = 0; i < mEhdr->e_shnum; i++) {
+ Elf_Shdr *shdr = GetShdrByIndex(i);
+ if (shdr->sh_addralign <= mCoffAlignment) {
+ continue;
+ }
+ if (IsTextShdr(shdr) || IsDataShdr(shdr) || IsHiiRsrcShdr(shdr)) {
+ mCoffAlignment = shdr->sh_addralign;
+ }
+ }
+
+ //
// First text sections.
//
mCoffOffset = CoffAlign(mCoffOffset);
"""

Note that we may want to use 64 KB instead of 4 KB on AArch64, since
the OS may use 64 KB pages. So we should avoid hardcoding 4 KB values
for section alignment.
--
Ard.
Post by Gao, Liming
Thanks
Liming
-----Original Message-----
Sent: Tuesday, June 23, 2015 5:14 PM
Subject: Re: [edk2] [Patch 2/3] BaseTools: Update GenFw to support 4K alignment.
Post by Yingke Liu
If current ELF file is 4K aligned, the converted PE should also be 4K aligned.
Contributed-under: TianoCore Contribution Agreement 1.0
---
BaseTools/Source/C/GenFw/Elf32Convert.c | 8 ++++++--
BaseTools/Source/C/GenFw/Elf64Convert.c | 6 +++++-
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/BaseTools/Source/C/GenFw/Elf32Convert.c
b/BaseTools/Source/C/GenFw/Elf32Convert.c
index 5c7b689..9245851 100644
--- a/BaseTools/Source/C/GenFw/Elf32Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf32Convert.c
@@ -96,7 +96,7 @@ STATIC Elf_Phdr *mPhdrBase; // // Coff information
// -STATIC const UINT32 mCoffAlignment = 0x20;
+STATIC UINT32 mCoffAlignment = 0x20;
//
// PE section alignment.
@@ -154,7 +154,11 @@ InitializeElf32 (
Error (NULL, 0, 3000, "Unsupported", "ELF e_version (%u) not EV_CURRENT (%d)", (unsigned) mEhdr->e_version, EV_CURRENT);
return FALSE;
}
-
+
+ if ((mEhdr->e_entry & 0xFFF) == 0) {
+ mCoffAlignment = 0x1000;
+ }
+
Can you explain why you are using the alignment of the entry point here? Wouldn't it be much better if mCoffAlignment is simply the max() of the alignments of all the sections?
Post by Yingke Liu
//
// Update section header pointers
//
diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c
b/BaseTools/Source/C/GenFw/Elf64Convert.c
index 25b90e2..8737e30 100644
--- a/BaseTools/Source/C/GenFw/Elf64Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf64Convert.c
@@ -97,7 +97,7 @@ STATIC Elf_Phdr *mPhdrBase; // // Coff information
// -STATIC const UINT32 mCoffAlignment = 0x20;
+STATIC UINT32 mCoffAlignment = 0x20;
//
// PE section alignment.
@@ -158,6 +158,10 @@ InitializeElf64 (
return FALSE;
}
+ if ((mEhdr->e_entry & 0xFFF) == 0) {
+ mCoffAlignment = 0x1000;
+ }
+
//
// Update section header pointers
//
--
1.9.5.msysgit.0
----------------------------------------------------------------------
-------- Monitor 25 network devices or servers for free with
OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download
now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Gao, Liming
2015-06-24 08:26:18 UTC
Permalink
Got your point. I agree with this change. We will include it in the patch and add you in Signed-off-by list.

-----Original Message-----
From: Ard Biesheuvel [mailto:***@linaro.org]
Sent: Wednesday, June 24, 2015 4:19 PM
To: edk2-***@lists.sourceforge.net
Subject: Re: [edk2] [Patch 2/3] BaseTools: Update GenFw to support 4K alignment.
Post by Gao, Liming
Good suggestion. How about go through every Shdr and choose the max Shdr->sh_addralign? The alignment should be power of 2.
Indeed. Something like this seems to work fine:

"""
diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c
b/BaseTools/Source/C/GenFw/Elf64Convert.c
index 2266e487cec7..4025191e868e 100644
--- a/BaseTools/Source/C/GenFw/Elf64Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf64Convert.c
@@ -97,7 +97,7 @@ STATIC Elf_Phdr *mPhdrBase; // // Coff information // -STATIC const UINT32 mCoffAlignment = 0x20;
+STATIC UINT32 mCoffAlignment = 0x20;

//
// PE section alignment.
@@ -286,6 +286,20 @@ ScanSections64 (
mCoffOffset += mCoffNbrSections * sizeof(EFI_IMAGE_SECTION_HEADER);

//
+ // Set mCoffAlignment to the maximum alignment of the input sections
+ // we care about // for (i = 0; i < mEhdr->e_shnum; i++) {
+ Elf_Shdr *shdr = GetShdrByIndex(i);
+ if (shdr->sh_addralign <= mCoffAlignment) {
+ continue;
+ }
+ if (IsTextShdr(shdr) || IsDataShdr(shdr) || IsHiiRsrcShdr(shdr)) {
+ mCoffAlignment = shdr->sh_addralign;
+ }
+ }
+
+ //
// First text sections.
//
mCoffOffset = CoffAlign(mCoffOffset); """

Note that we may want to use 64 KB instead of 4 KB on AArch64, since the OS may use 64 KB pages. So we should avoid hardcoding 4 KB values for section alignment.

--
Ard.
Post by Gao, Liming
Thanks
Liming
-----Original Message-----
Sent: Tuesday, June 23, 2015 5:14 PM
Subject: Re: [edk2] [Patch 2/3] BaseTools: Update GenFw to support 4K alignment.
Post by Yingke Liu
If current ELF file is 4K aligned, the converted PE should also be 4K aligned.
Contributed-under: TianoCore Contribution Agreement 1.0
---
BaseTools/Source/C/GenFw/Elf32Convert.c | 8 ++++++--
BaseTools/Source/C/GenFw/Elf64Convert.c | 6 +++++-
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/BaseTools/Source/C/GenFw/Elf32Convert.c
b/BaseTools/Source/C/GenFw/Elf32Convert.c
index 5c7b689..9245851 100644
--- a/BaseTools/Source/C/GenFw/Elf32Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf32Convert.c
@@ -96,7 +96,7 @@ STATIC Elf_Phdr *mPhdrBase; // // Coff information
// -STATIC const UINT32 mCoffAlignment = 0x20;
+STATIC UINT32 mCoffAlignment = 0x20;
//
// PE section alignment.
@@ -154,7 +154,11 @@ InitializeElf32 (
Error (NULL, 0, 3000, "Unsupported", "ELF e_version (%u) not EV_CURRENT (%d)", (unsigned) mEhdr->e_version, EV_CURRENT);
return FALSE;
}
-
+
+ if ((mEhdr->e_entry & 0xFFF) == 0) {
+ mCoffAlignment = 0x1000;
+ }
+
Can you explain why you are using the alignment of the entry point here? Wouldn't it be much better if mCoffAlignment is simply the max() of the alignments of all the sections?
Post by Yingke Liu
//
// Update section header pointers
//
diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c
b/BaseTools/Source/C/GenFw/Elf64Convert.c
index 25b90e2..8737e30 100644
--- a/BaseTools/Source/C/GenFw/Elf64Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf64Convert.c
@@ -97,7 +97,7 @@ STATIC Elf_Phdr *mPhdrBase; // // Coff information
// -STATIC const UINT32 mCoffAlignment = 0x20;
+STATIC UINT32 mCoffAlignment = 0x20;
//
// PE section alignment.
@@ -158,6 +158,10 @@ InitializeElf64 (
return FALSE;
}
+ if ((mEhdr->e_entry & 0xFFF) == 0) {
+ mCoffAlignment = 0x1000;
+ }
+
//
// Update section header pointers
//
--
1.9.5.msysgit.0
----------------------------------------------------------------------
-------- Monitor 25 network devices or servers for free with
OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download
now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Ard Biesheuvel
2015-06-24 10:12:50 UTC
Permalink
Post by Gao, Liming
Got your point. I agree with this change. We will include it in the patch and add you in Signed-off-by list.
OK, thanks.

There is one additional issue though: when using alignment of > 4 KB,
the GenFw tool may crash, since it tries to pad out the .reloc section
up to section alignment, which may cover unmapped host memory. So
something like below is needed, and MAX_COFF_ALIGNMENT needs to be set
to some sensible but sufficiently high value. Since PE/COFF specifies
64 KB as the maximum file alignment, and GenFw uses mCoffAlignment for
both SectionAlignment and FileAlignment, I suppose 64 KB would be
appropriate here.

"""
diff --git a/BaseTools/Source/C/GenFw/ElfConvert.c
b/BaseTools/Source/C/GenFw/ElfConvert.c
index 1a84d3c28794..e315d913378d 100644
--- a/BaseTools/Source/C/GenFw/ElfConvert.c
+++ b/BaseTools/Source/C/GenFw/ElfConvert.c
@@ -96,11 +101,11 @@ CoffAddFixup(

mCoffFile = realloc (
mCoffFile,
- mCoffOffset + sizeof(EFI_IMAGE_BASE_RELOCATION) + 2*0x1000
+ mCoffOffset + sizeof(EFI_IMAGE_BASE_RELOCATION) + 2 * MAX_COFF_ALIGNMENT
);
memset (
mCoffFile + mCoffOffset, 0,
- sizeof(EFI_IMAGE_BASE_RELOCATION) + 2*0x1000
+ sizeof(EFI_IMAGE_BASE_RELOCATION) + 2 * MAX_COFF_ALIGNMENT
);

mCoffBaseRel = (EFI_IMAGE_BASE_RELOCATION*)(mCoffFile + mCoffOffset);
"""
--
Ard.
Post by Gao, Liming
-----Original Message-----
Sent: Wednesday, June 24, 2015 4:19 PM
Subject: Re: [edk2] [Patch 2/3] BaseTools: Update GenFw to support 4K alignment.
Post by Gao, Liming
Good suggestion. How about go through every Shdr and choose the max Shdr->sh_addralign? The alignment should be power of 2.
"""
diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c
b/BaseTools/Source/C/GenFw/Elf64Convert.c
index 2266e487cec7..4025191e868e 100644
--- a/BaseTools/Source/C/GenFw/Elf64Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf64Convert.c
@@ -97,7 +97,7 @@ STATIC Elf_Phdr *mPhdrBase; // // Coff information // -STATIC const UINT32 mCoffAlignment = 0x20;
+STATIC UINT32 mCoffAlignment = 0x20;
//
// PE section alignment.
@@ -286,6 +286,20 @@ ScanSections64 (
mCoffOffset += mCoffNbrSections * sizeof(EFI_IMAGE_SECTION_HEADER);
//
+ // Set mCoffAlignment to the maximum alignment of the input sections
+ // we care about // for (i = 0; i < mEhdr->e_shnum; i++) {
+ Elf_Shdr *shdr = GetShdrByIndex(i);
+ if (shdr->sh_addralign <= mCoffAlignment) {
+ continue;
+ }
+ if (IsTextShdr(shdr) || IsDataShdr(shdr) || IsHiiRsrcShdr(shdr)) {
+ mCoffAlignment = shdr->sh_addralign;
+ }
+ }
+
+ //
// First text sections.
//
mCoffOffset = CoffAlign(mCoffOffset); """
Note that we may want to use 64 KB instead of 4 KB on AArch64, since the OS may use 64 KB pages. So we should avoid hardcoding 4 KB values for section alignment.
--
Ard.
Post by Gao, Liming
Thanks
Liming
-----Original Message-----
Sent: Tuesday, June 23, 2015 5:14 PM
Subject: Re: [edk2] [Patch 2/3] BaseTools: Update GenFw to support 4K alignment.
Post by Yingke Liu
If current ELF file is 4K aligned, the converted PE should also be 4K aligned.
Contributed-under: TianoCore Contribution Agreement 1.0
---
BaseTools/Source/C/GenFw/Elf32Convert.c | 8 ++++++--
BaseTools/Source/C/GenFw/Elf64Convert.c | 6 +++++-
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/BaseTools/Source/C/GenFw/Elf32Convert.c
b/BaseTools/Source/C/GenFw/Elf32Convert.c
index 5c7b689..9245851 100644
--- a/BaseTools/Source/C/GenFw/Elf32Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf32Convert.c
@@ -96,7 +96,7 @@ STATIC Elf_Phdr *mPhdrBase; // // Coff information
// -STATIC const UINT32 mCoffAlignment = 0x20;
+STATIC UINT32 mCoffAlignment = 0x20;
//
// PE section alignment.
@@ -154,7 +154,11 @@ InitializeElf32 (
Error (NULL, 0, 3000, "Unsupported", "ELF e_version (%u) not EV_CURRENT (%d)", (unsigned) mEhdr->e_version, EV_CURRENT);
return FALSE;
}
-
+
+ if ((mEhdr->e_entry & 0xFFF) == 0) {
+ mCoffAlignment = 0x1000;
+ }
+
Can you explain why you are using the alignment of the entry point here? Wouldn't it be much better if mCoffAlignment is simply the max() of the alignments of all the sections?
Post by Yingke Liu
//
// Update section header pointers
//
diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c
b/BaseTools/Source/C/GenFw/Elf64Convert.c
index 25b90e2..8737e30 100644
--- a/BaseTools/Source/C/GenFw/Elf64Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf64Convert.c
@@ -97,7 +97,7 @@ STATIC Elf_Phdr *mPhdrBase; // // Coff information
// -STATIC const UINT32 mCoffAlignment = 0x20;
+STATIC UINT32 mCoffAlignment = 0x20;
//
// PE section alignment.
@@ -158,6 +158,10 @@ InitializeElf64 (
return FALSE;
}
+ if ((mEhdr->e_entry & 0xFFF) == 0) {
+ mCoffAlignment = 0x1000;
+ }
+
//
// Update section header pointers
//
--
1.9.5.msysgit.0
----------------------------------------------------------------------
-------- Monitor 25 network devices or servers for free with
OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download
now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Liu, Yingke D
2015-06-25 03:33:09 UTC
Permalink
Ard,

Following is the full GenFw patch, please confirm it:

BaseTools: Update GenFw to support 4K alignment.

Get maximum section alignment from ELF sections

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <***@linaro.org>
---
BaseTools/Source/C/GenFw/Elf32Convert.c | 16 +++++++++++++++-
BaseTools/Source/C/GenFw/Elf64Convert.c | 16 +++++++++++++++-
BaseTools/Source/C/GenFw/ElfConvert.c | 4 ++--
BaseTools/Source/C/GenFw/ElfConvert.h | 1 +
4 files changed, 33 insertions(+), 4 deletions(-)

diff --git a/BaseTools/Source/C/GenFw/Elf32Convert.c b/BaseTools/Source/C/GenFw/Elf32Convert.c
index 5c7b689..10d9892 100644
--- a/BaseTools/Source/C/GenFw/Elf32Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf32Convert.c
@@ -96,7 +96,7 @@ STATIC Elf_Phdr *mPhdrBase;
//
// Coff information
//
-STATIC const UINT32 mCoffAlignment = 0x20;
+STATIC UINT32 mCoffAlignment = 0x20;

//
// PE section alignment.
@@ -292,6 +292,20 @@ ScanSections32 (
mCoffOffset += mCoffNbrSections * sizeof(EFI_IMAGE_SECTION_HEADER);

//
+ // Set mCoffAlignment to the maximum alignment of the input sections
+ // we care about
+ //
+ for (i = 0; i < mEhdr->e_shnum; i++) {
+ Elf_Shdr *shdr = GetShdrByIndex(i);
+ if (shdr->sh_addralign <= mCoffAlignment) {
+ continue;
+ }
+ if (IsTextShdr(shdr) || IsDataShdr(shdr) || IsHiiRsrcShdr(shdr)) {
+ mCoffAlignment = (UINT32)shdr->sh_addralign;
+ }
+ }
+
+ //
// First text sections.
//
mCoffOffset = CoffAlign(mCoffOffset);
diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c b/BaseTools/Source/C/GenFw/Elf64Convert.c
index 25b90e2..d2becf1 100644
--- a/BaseTools/Source/C/GenFw/Elf64Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf64Convert.c
@@ -97,7 +97,7 @@ STATIC Elf_Phdr *mPhdrBase;
//
// Coff information
//
-STATIC const UINT32 mCoffAlignment = 0x20;
+STATIC UINT32 mCoffAlignment = 0x20;

//
// PE section alignment.
@@ -286,6 +286,20 @@ ScanSections64 (
mCoffOffset += mCoffNbrSections * sizeof(EFI_IMAGE_SECTION_HEADER);

//
+ // Set mCoffAlignment to the maximum alignment of the input sections
+ // we care about
+ //
+ for (i = 0; i < mEhdr->e_shnum; i++) {
+ Elf_Shdr *shdr = GetShdrByIndex(i);
+ if (shdr->sh_addralign <= mCoffAlignment) {
+ continue;
+ }
+ if (IsTextShdr(shdr) || IsDataShdr(shdr) || IsHiiRsrcShdr(shdr)) {
+ mCoffAlignment = (UINT32)shdr->sh_addralign;
+ }
+ }
+
+ //
// First text sections.
//
mCoffOffset = CoffAlign(mCoffOffset);
diff --git a/BaseTools/Source/C/GenFw/ElfConvert.c b/BaseTools/Source/C/GenFw/ElfConvert.c
index 1a84d3c..6211389 100644
--- a/BaseTools/Source/C/GenFw/ElfConvert.c
+++ b/BaseTools/Source/C/GenFw/ElfConvert.c
@@ -96,11 +96,11 @@ CoffAddFixup(

mCoffFile = realloc (
mCoffFile,
- mCoffOffset + sizeof(EFI_IMAGE_BASE_RELOCATION) + 2*0x1000
+ mCoffOffset + sizeof(EFI_IMAGE_BASE_RELOCATION) + 2 * MAX_COFF_ALIGNMENT
);
memset (
mCoffFile + mCoffOffset, 0,
- sizeof(EFI_IMAGE_BASE_RELOCATION) + 2*0x1000
+ sizeof(EFI_IMAGE_BASE_RELOCATION) + 2 * MAX_COFF_ALIGNMENT
);

mCoffBaseRel = (EFI_IMAGE_BASE_RELOCATION*)(mCoffFile + mCoffOffset);
diff --git a/BaseTools/Source/C/GenFw/ElfConvert.h b/BaseTools/Source/C/GenFw/ElfConvert.h
index b27a2f9..56f165e 100644
--- a/BaseTools/Source/C/GenFw/ElfConvert.h
+++ b/BaseTools/Source/C/GenFw/ElfConvert.h
@@ -34,6 +34,7 @@ extern UINT32 mOutImageType;
// Common EFI specific data.
//
#define ELF_HII_SECTION_NAME ".hii"
+#define MAX_COFF_ALIGNMENT 0x10000

//
// Filter Types
--

Dennis

-----Original Message-----
From: Ard Biesheuvel [mailto:***@linaro.org]
Sent: Wednesday, June 24, 2015 18:13
To: edk2-***@lists.sourceforge.net
Subject: Re: [edk2] [Patch 2/3] BaseTools: Update GenFw to support 4K alignment.
Post by Gao, Liming
Got your point. I agree with this change. We will include it in the patch and add you in Signed-off-by list.
OK, thanks.

There is one additional issue though: when using alignment of > 4 KB, the GenFw tool may crash, since it tries to pad out the .reloc section up to section alignment, which may cover unmapped host memory. So something like below is needed, and MAX_COFF_ALIGNMENT needs to be set to some sensible but sufficiently high value. Since PE/COFF specifies
64 KB as the maximum file alignment, and GenFw uses mCoffAlignment for both SectionAlignment and FileAlignment, I suppose 64 KB would be appropriate here.

"""
diff --git a/BaseTools/Source/C/GenFw/ElfConvert.c
b/BaseTools/Source/C/GenFw/ElfConvert.c
index 1a84d3c28794..e315d913378d 100644
--- a/BaseTools/Source/C/GenFw/ElfConvert.c
+++ b/BaseTools/Source/C/GenFw/ElfConvert.c
@@ -96,11 +101,11 @@ CoffAddFixup(

mCoffFile = realloc (
mCoffFile,
- mCoffOffset + sizeof(EFI_IMAGE_BASE_RELOCATION) + 2*0x1000
+ mCoffOffset + sizeof(EFI_IMAGE_BASE_RELOCATION) + 2 *
+ MAX_COFF_ALIGNMENT
);
memset (
mCoffFile + mCoffOffset, 0,
- sizeof(EFI_IMAGE_BASE_RELOCATION) + 2*0x1000
+ sizeof(EFI_IMAGE_BASE_RELOCATION) + 2 * MAX_COFF_ALIGNMENT
);

mCoffBaseRel = (EFI_IMAGE_BASE_RELOCATION*)(mCoffFile + mCoffOffset); """

--
Ard.
Post by Gao, Liming
-----Original Message-----
Sent: Wednesday, June 24, 2015 4:19 PM
Subject: Re: [edk2] [Patch 2/3] BaseTools: Update GenFw to support 4K alignment.
Post by Gao, Liming
Good suggestion. How about go through every Shdr and choose the max Shdr->sh_addralign? The alignment should be power of 2.
"""
diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c
b/BaseTools/Source/C/GenFw/Elf64Convert.c
index 2266e487cec7..4025191e868e 100644
--- a/BaseTools/Source/C/GenFw/Elf64Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf64Convert.c
@@ -97,7 +97,7 @@ STATIC Elf_Phdr *mPhdrBase; // // Coff information // -STATIC const UINT32 mCoffAlignment = 0x20;
+STATIC UINT32 mCoffAlignment = 0x20;
//
// PE section alignment.
@@ -286,6 +286,20 @@ ScanSections64 (
mCoffOffset += mCoffNbrSections * sizeof(EFI_IMAGE_SECTION_HEADER);
//
+ // Set mCoffAlignment to the maximum alignment of the input sections
+ // we care about // for (i = 0; i < mEhdr->e_shnum; i++) {
+ Elf_Shdr *shdr = GetShdrByIndex(i);
+ if (shdr->sh_addralign <= mCoffAlignment) {
+ continue;
+ }
+ if (IsTextShdr(shdr) || IsDataShdr(shdr) || IsHiiRsrcShdr(shdr)) {
+ mCoffAlignment = shdr->sh_addralign;
+ }
+ }
+
+ //
// First text sections.
//
mCoffOffset = CoffAlign(mCoffOffset); """
Note that we may want to use 64 KB instead of 4 KB on AArch64, since the OS may use 64 KB pages. So we should avoid hardcoding 4 KB values for section alignment.
--
Ard.
Post by Gao, Liming
Thanks
Liming
-----Original Message-----
Sent: Tuesday, June 23, 2015 5:14 PM
Subject: Re: [edk2] [Patch 2/3] BaseTools: Update GenFw to support 4K alignment.
Post by Yingke Liu
If current ELF file is 4K aligned, the converted PE should also be 4K aligned.
Contributed-under: TianoCore Contribution Agreement 1.0
---
BaseTools/Source/C/GenFw/Elf32Convert.c | 8 ++++++--
BaseTools/Source/C/GenFw/Elf64Convert.c | 6 +++++-
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/BaseTools/Source/C/GenFw/Elf32Convert.c
b/BaseTools/Source/C/GenFw/Elf32Convert.c
index 5c7b689..9245851 100644
--- a/BaseTools/Source/C/GenFw/Elf32Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf32Convert.c
@@ -96,7 +96,7 @@ STATIC Elf_Phdr *mPhdrBase; // // Coff information
// -STATIC const UINT32 mCoffAlignment = 0x20;
+STATIC UINT32 mCoffAlignment = 0x20;
//
// PE section alignment.
@@ -154,7 +154,11 @@ InitializeElf32 (
Error (NULL, 0, 3000, "Unsupported", "ELF e_version (%u) not EV_CURRENT (%d)", (unsigned) mEhdr->e_version, EV_CURRENT);
return FALSE;
}
-
+
+ if ((mEhdr->e_entry & 0xFFF) == 0) {
+ mCoffAlignment = 0x1000;
+ }
+
Can you explain why you are using the alignment of the entry point here? Wouldn't it be much better if mCoffAlignment is simply the max() of the alignments of all the sections?
Post by Yingke Liu
//
// Update section header pointers
//
diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c
b/BaseTools/Source/C/GenFw/Elf64Convert.c
index 25b90e2..8737e30 100644
--- a/BaseTools/Source/C/GenFw/Elf64Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf64Convert.c
@@ -97,7 +97,7 @@ STATIC Elf_Phdr *mPhdrBase; // // Coff information
// -STATIC const UINT32 mCoffAlignment = 0x20;
+STATIC UINT32 mCoffAlignment = 0x20;
//
// PE section alignment.
@@ -158,6 +158,10 @@ InitializeElf64 (
return FALSE;
}
+ if ((mEhdr->e_entry & 0xFFF) == 0) {
+ mCoffAlignment = 0x1000;
+ }
+
//
// Update section header pointers
//
--
1.9.5.msysgit.0
----------------------------------------------------------------------
-------- Monitor 25 network devices or servers for free with
OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download
now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Ard Biesheuvel
2015-06-25 06:41:26 UTC
Permalink
Post by Yingke Liu
Ard,
BaseTools: Update GenFw to support 4K alignment.
Get maximum section alignment from ELF sections
Contributed-under: TianoCore Contribution Agreement 1.0
---
BaseTools/Source/C/GenFw/Elf32Convert.c | 16 +++++++++++++++-
BaseTools/Source/C/GenFw/Elf64Convert.c | 16 +++++++++++++++-
BaseTools/Source/C/GenFw/ElfConvert.c | 4 ++--
BaseTools/Source/C/GenFw/ElfConvert.h | 1 +
4 files changed, 33 insertions(+), 4 deletions(-)
Hello Dennis,

The patch looks fine to me.

Thanks,
Ard.
Post by Yingke Liu
diff --git a/BaseTools/Source/C/GenFw/Elf32Convert.c b/BaseTools/Source/C/GenFw/Elf32Convert.c
index 5c7b689..10d9892 100644
--- a/BaseTools/Source/C/GenFw/Elf32Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf32Convert.c
@@ -96,7 +96,7 @@ STATIC Elf_Phdr *mPhdrBase;
//
// Coff information
//
-STATIC const UINT32 mCoffAlignment = 0x20;
+STATIC UINT32 mCoffAlignment = 0x20;
//
// PE section alignment.
@@ -292,6 +292,20 @@ ScanSections32 (
mCoffOffset += mCoffNbrSections * sizeof(EFI_IMAGE_SECTION_HEADER);
//
+ // Set mCoffAlignment to the maximum alignment of the input sections
+ // we care about
+ //
+ for (i = 0; i < mEhdr->e_shnum; i++) {
+ Elf_Shdr *shdr = GetShdrByIndex(i);
+ if (shdr->sh_addralign <= mCoffAlignment) {
+ continue;
+ }
+ if (IsTextShdr(shdr) || IsDataShdr(shdr) || IsHiiRsrcShdr(shdr)) {
+ mCoffAlignment = (UINT32)shdr->sh_addralign;
+ }
+ }
+
+ //
// First text sections.
//
mCoffOffset = CoffAlign(mCoffOffset);
diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c b/BaseTools/Source/C/GenFw/Elf64Convert.c
index 25b90e2..d2becf1 100644
--- a/BaseTools/Source/C/GenFw/Elf64Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf64Convert.c
@@ -97,7 +97,7 @@ STATIC Elf_Phdr *mPhdrBase;
//
// Coff information
//
-STATIC const UINT32 mCoffAlignment = 0x20;
+STATIC UINT32 mCoffAlignment = 0x20;
//
// PE section alignment.
@@ -286,6 +286,20 @@ ScanSections64 (
mCoffOffset += mCoffNbrSections * sizeof(EFI_IMAGE_SECTION_HEADER);
//
+ // Set mCoffAlignment to the maximum alignment of the input sections
+ // we care about
+ //
+ for (i = 0; i < mEhdr->e_shnum; i++) {
+ Elf_Shdr *shdr = GetShdrByIndex(i);
+ if (shdr->sh_addralign <= mCoffAlignment) {
+ continue;
+ }
+ if (IsTextShdr(shdr) || IsDataShdr(shdr) || IsHiiRsrcShdr(shdr)) {
+ mCoffAlignment = (UINT32)shdr->sh_addralign;
+ }
+ }
+
+ //
// First text sections.
//
mCoffOffset = CoffAlign(mCoffOffset);
diff --git a/BaseTools/Source/C/GenFw/ElfConvert.c b/BaseTools/Source/C/GenFw/ElfConvert.c
index 1a84d3c..6211389 100644
--- a/BaseTools/Source/C/GenFw/ElfConvert.c
+++ b/BaseTools/Source/C/GenFw/ElfConvert.c
@@ -96,11 +96,11 @@ CoffAddFixup(
mCoffFile = realloc (
mCoffFile,
- mCoffOffset + sizeof(EFI_IMAGE_BASE_RELOCATION) + 2*0x1000
+ mCoffOffset + sizeof(EFI_IMAGE_BASE_RELOCATION) + 2 * MAX_COFF_ALIGNMENT
);
memset (
mCoffFile + mCoffOffset, 0,
- sizeof(EFI_IMAGE_BASE_RELOCATION) + 2*0x1000
+ sizeof(EFI_IMAGE_BASE_RELOCATION) + 2 * MAX_COFF_ALIGNMENT
);
mCoffBaseRel = (EFI_IMAGE_BASE_RELOCATION*)(mCoffFile + mCoffOffset);
diff --git a/BaseTools/Source/C/GenFw/ElfConvert.h b/BaseTools/Source/C/GenFw/ElfConvert.h
index b27a2f9..56f165e 100644
--- a/BaseTools/Source/C/GenFw/ElfConvert.h
+++ b/BaseTools/Source/C/GenFw/ElfConvert.h
@@ -34,6 +34,7 @@ extern UINT32 mOutImageType;
// Common EFI specific data.
//
#define ELF_HII_SECTION_NAME ".hii"
+#define MAX_COFF_ALIGNMENT 0x10000
//
// Filter Types
--
Dennis
-----Original Message-----
Sent: Wednesday, June 24, 2015 18:13
Subject: Re: [edk2] [Patch 2/3] BaseTools: Update GenFw to support 4K alignment.
Post by Gao, Liming
Got your point. I agree with this change. We will include it in the patch and add you in Signed-off-by list.
OK, thanks.
There is one additional issue though: when using alignment of > 4 KB, the GenFw tool may crash, since it tries to pad out the .reloc section up to section alignment, which may cover unmapped host memory. So something like below is needed, and MAX_COFF_ALIGNMENT needs to be set to some sensible but sufficiently high value. Since PE/COFF specifies
64 KB as the maximum file alignment, and GenFw uses mCoffAlignment for both SectionAlignment and FileAlignment, I suppose 64 KB would be appropriate here.
"""
diff --git a/BaseTools/Source/C/GenFw/ElfConvert.c
b/BaseTools/Source/C/GenFw/ElfConvert.c
index 1a84d3c28794..e315d913378d 100644
--- a/BaseTools/Source/C/GenFw/ElfConvert.c
+++ b/BaseTools/Source/C/GenFw/ElfConvert.c
@@ -96,11 +101,11 @@ CoffAddFixup(
mCoffFile = realloc (
mCoffFile,
- mCoffOffset + sizeof(EFI_IMAGE_BASE_RELOCATION) + 2*0x1000
+ mCoffOffset + sizeof(EFI_IMAGE_BASE_RELOCATION) + 2 *
+ MAX_COFF_ALIGNMENT
);
memset (
mCoffFile + mCoffOffset, 0,
- sizeof(EFI_IMAGE_BASE_RELOCATION) + 2*0x1000
+ sizeof(EFI_IMAGE_BASE_RELOCATION) + 2 * MAX_COFF_ALIGNMENT
);
mCoffBaseRel = (EFI_IMAGE_BASE_RELOCATION*)(mCoffFile + mCoffOffset); """
--
Ard.
Post by Gao, Liming
-----Original Message-----
Sent: Wednesday, June 24, 2015 4:19 PM
Subject: Re: [edk2] [Patch 2/3] BaseTools: Update GenFw to support 4K alignment.
Post by Gao, Liming
Good suggestion. How about go through every Shdr and choose the max Shdr->sh_addralign? The alignment should be power of 2.
"""
diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c
b/BaseTools/Source/C/GenFw/Elf64Convert.c
index 2266e487cec7..4025191e868e 100644
--- a/BaseTools/Source/C/GenFw/Elf64Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf64Convert.c
@@ -97,7 +97,7 @@ STATIC Elf_Phdr *mPhdrBase; // // Coff information // -STATIC const UINT32 mCoffAlignment = 0x20;
+STATIC UINT32 mCoffAlignment = 0x20;
//
// PE section alignment.
@@ -286,6 +286,20 @@ ScanSections64 (
mCoffOffset += mCoffNbrSections * sizeof(EFI_IMAGE_SECTION_HEADER);
//
+ // Set mCoffAlignment to the maximum alignment of the input sections
+ // we care about // for (i = 0; i < mEhdr->e_shnum; i++) {
+ Elf_Shdr *shdr = GetShdrByIndex(i);
+ if (shdr->sh_addralign <= mCoffAlignment) {
+ continue;
+ }
+ if (IsTextShdr(shdr) || IsDataShdr(shdr) || IsHiiRsrcShdr(shdr)) {
+ mCoffAlignment = shdr->sh_addralign;
+ }
+ }
+
+ //
// First text sections.
//
mCoffOffset = CoffAlign(mCoffOffset); """
Note that we may want to use 64 KB instead of 4 KB on AArch64, since the OS may use 64 KB pages. So we should avoid hardcoding 4 KB values for section alignment.
--
Ard.
Post by Gao, Liming
Thanks
Liming
-----Original Message-----
Sent: Tuesday, June 23, 2015 5:14 PM
Subject: Re: [edk2] [Patch 2/3] BaseTools: Update GenFw to support 4K alignment.
Post by Yingke Liu
If current ELF file is 4K aligned, the converted PE should also be 4K aligned.
Contributed-under: TianoCore Contribution Agreement 1.0
---
BaseTools/Source/C/GenFw/Elf32Convert.c | 8 ++++++--
BaseTools/Source/C/GenFw/Elf64Convert.c | 6 +++++-
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/BaseTools/Source/C/GenFw/Elf32Convert.c
b/BaseTools/Source/C/GenFw/Elf32Convert.c
index 5c7b689..9245851 100644
--- a/BaseTools/Source/C/GenFw/Elf32Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf32Convert.c
@@ -96,7 +96,7 @@ STATIC Elf_Phdr *mPhdrBase; // // Coff information
// -STATIC const UINT32 mCoffAlignment = 0x20;
+STATIC UINT32 mCoffAlignment = 0x20;
//
// PE section alignment.
@@ -154,7 +154,11 @@ InitializeElf32 (
Error (NULL, 0, 3000, "Unsupported", "ELF e_version (%u) not EV_CURRENT (%d)", (unsigned) mEhdr->e_version, EV_CURRENT);
return FALSE;
}
-
+
+ if ((mEhdr->e_entry & 0xFFF) == 0) {
+ mCoffAlignment = 0x1000;
+ }
+
Can you explain why you are using the alignment of the entry point here? Wouldn't it be much better if mCoffAlignment is simply the max() of the alignments of all the sections?
Post by Yingke Liu
//
// Update section header pointers
//
diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c
b/BaseTools/Source/C/GenFw/Elf64Convert.c
index 25b90e2..8737e30 100644
--- a/BaseTools/Source/C/GenFw/Elf64Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf64Convert.c
@@ -97,7 +97,7 @@ STATIC Elf_Phdr *mPhdrBase; // // Coff information
// -STATIC const UINT32 mCoffAlignment = 0x20;
+STATIC UINT32 mCoffAlignment = 0x20;
//
// PE section alignment.
@@ -158,6 +158,10 @@ InitializeElf64 (
return FALSE;
}
+ if ((mEhdr->e_entry & 0xFFF) == 0) {
+ mCoffAlignment = 0x1000;
+ }
+
//
// Update section header pointers
//
--
1.9.5.msysgit.0
----------------------------------------------------------------------
-------- Monitor 25 network devices or servers for free with
OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download
now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Gao, Liming
2015-06-29 02:44:31 UTC
Permalink
Reviewed-by: Liming Gao <***@intel.com>

-----Original Message-----
From: Liu, Yingke D [mailto:***@intel.com]
Sent: Thursday, June 25, 2015 11:33 AM
To: edk2-***@lists.sourceforge.net
Subject: Re: [edk2] [Patch 2/3] BaseTools: Update GenFw to support 4K alignment.

Ard,

Following is the full GenFw patch, please confirm it:

BaseTools: Update GenFw to support 4K alignment.

Get maximum section alignment from ELF sections

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <***@linaro.org>
---
BaseTools/Source/C/GenFw/Elf32Convert.c | 16 +++++++++++++++- BaseTools/Source/C/GenFw/Elf64Convert.c | 16 +++++++++++++++-
BaseTools/Source/C/GenFw/ElfConvert.c | 4 ++--
BaseTools/Source/C/GenFw/ElfConvert.h | 1 +
4 files changed, 33 insertions(+), 4 deletions(-)

diff --git a/BaseTools/Source/C/GenFw/Elf32Convert.c b/BaseTools/Source/C/GenFw/Elf32Convert.c
index 5c7b689..10d9892 100644
--- a/BaseTools/Source/C/GenFw/Elf32Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf32Convert.c
@@ -96,7 +96,7 @@ STATIC Elf_Phdr *mPhdrBase; // // Coff information // -STATIC const UINT32 mCoffAlignment = 0x20;
+STATIC UINT32 mCoffAlignment = 0x20;

//
// PE section alignment.
@@ -292,6 +292,20 @@ ScanSections32 (
mCoffOffset += mCoffNbrSections * sizeof(EFI_IMAGE_SECTION_HEADER);

//
+ // Set mCoffAlignment to the maximum alignment of the input sections
+ // we care about // for (i = 0; i < mEhdr->e_shnum; i++) {
+ Elf_Shdr *shdr = GetShdrByIndex(i);
+ if (shdr->sh_addralign <= mCoffAlignment) {
+ continue;
+ }
+ if (IsTextShdr(shdr) || IsDataShdr(shdr) || IsHiiRsrcShdr(shdr)) {
+ mCoffAlignment = (UINT32)shdr->sh_addralign;
+ }
+ }
+
+ //
// First text sections.
//
mCoffOffset = CoffAlign(mCoffOffset); diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c b/BaseTools/Source/C/GenFw/Elf64Convert.c
index 25b90e2..d2becf1 100644
--- a/BaseTools/Source/C/GenFw/Elf64Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf64Convert.c
@@ -97,7 +97,7 @@ STATIC Elf_Phdr *mPhdrBase; // // Coff information // -STATIC const UINT32 mCoffAlignment = 0x20;
+STATIC UINT32 mCoffAlignment = 0x20;

//
// PE section alignment.
@@ -286,6 +286,20 @@ ScanSections64 (
mCoffOffset += mCoffNbrSections * sizeof(EFI_IMAGE_SECTION_HEADER);

//
+ // Set mCoffAlignment to the maximum alignment of the input sections
+ // we care about // for (i = 0; i < mEhdr->e_shnum; i++) {
+ Elf_Shdr *shdr = GetShdrByIndex(i);
+ if (shdr->sh_addralign <= mCoffAlignment) {
+ continue;
+ }
+ if (IsTextShdr(shdr) || IsDataShdr(shdr) || IsHiiRsrcShdr(shdr)) {
+ mCoffAlignment = (UINT32)shdr->sh_addralign;
+ }
+ }
+
+ //
// First text sections.
//
mCoffOffset = CoffAlign(mCoffOffset); diff --git a/BaseTools/Source/C/GenFw/ElfConvert.c b/BaseTools/Source/C/GenFw/ElfConvert.c
index 1a84d3c..6211389 100644
--- a/BaseTools/Source/C/GenFw/ElfConvert.c
+++ b/BaseTools/Source/C/GenFw/ElfConvert.c
@@ -96,11 +96,11 @@ CoffAddFixup(

mCoffFile = realloc (
mCoffFile,
- mCoffOffset + sizeof(EFI_IMAGE_BASE_RELOCATION) + 2*0x1000
+ mCoffOffset + sizeof(EFI_IMAGE_BASE_RELOCATION) + 2 *
+ MAX_COFF_ALIGNMENT
);
memset (
mCoffFile + mCoffOffset, 0,
- sizeof(EFI_IMAGE_BASE_RELOCATION) + 2*0x1000
+ sizeof(EFI_IMAGE_BASE_RELOCATION) + 2 * MAX_COFF_ALIGNMENT
);

mCoffBaseRel = (EFI_IMAGE_BASE_RELOCATION*)(mCoffFile + mCoffOffset); diff --git a/BaseTools/Source/C/GenFw/ElfConvert.h b/BaseTools/Source/C/GenFw/ElfConvert.h
index b27a2f9..56f165e 100644
--- a/BaseTools/Source/C/GenFw/ElfConvert.h
+++ b/BaseTools/Source/C/GenFw/ElfConvert.h
@@ -34,6 +34,7 @@ extern UINT32 mOutImageType; // Common EFI specific data.
//
#define ELF_HII_SECTION_NAME ".hii"
+#define MAX_COFF_ALIGNMENT 0x10000

//
// Filter Types
--

Dennis

-----Original Message-----
From: Ard Biesheuvel [mailto:***@linaro.org]
Sent: Wednesday, June 24, 2015 18:13
To: edk2-***@lists.sourceforge.net
Subject: Re: [edk2] [Patch 2/3] BaseTools: Update GenFw to support 4K alignment.
Post by Gao, Liming
Got your point. I agree with this change. We will include it in the patch and add you in Signed-off-by list.
OK, thanks.

There is one additional issue though: when using alignment of > 4 KB, the GenFw tool may crash, since it tries to pad out the .reloc section up to section alignment, which may cover unmapped host memory. So something like below is needed, and MAX_COFF_ALIGNMENT needs to be set to some sensible but sufficiently high value. Since PE/COFF specifies
64 KB as the maximum file alignment, and GenFw uses mCoffAlignment for both SectionAlignment and FileAlignment, I suppose 64 KB would be appropriate here.

"""
diff --git a/BaseTools/Source/C/GenFw/ElfConvert.c
b/BaseTools/Source/C/GenFw/ElfConvert.c
index 1a84d3c28794..e315d913378d 100644
--- a/BaseTools/Source/C/GenFw/ElfConvert.c
+++ b/BaseTools/Source/C/GenFw/ElfConvert.c
@@ -96,11 +101,11 @@ CoffAddFixup(

mCoffFile = realloc (
mCoffFile,
- mCoffOffset + sizeof(EFI_IMAGE_BASE_RELOCATION) + 2*0x1000
+ mCoffOffset + sizeof(EFI_IMAGE_BASE_RELOCATION) + 2 *
+ MAX_COFF_ALIGNMENT
);
memset (
mCoffFile + mCoffOffset, 0,
- sizeof(EFI_IMAGE_BASE_RELOCATION) + 2*0x1000
+ sizeof(EFI_IMAGE_BASE_RELOCATION) + 2 * MAX_COFF_ALIGNMENT
);

mCoffBaseRel = (EFI_IMAGE_BASE_RELOCATION*)(mCoffFile + mCoffOffset); """

--
Ard.
Post by Gao, Liming
-----Original Message-----
Sent: Wednesday, June 24, 2015 4:19 PM
Subject: Re: [edk2] [Patch 2/3] BaseTools: Update GenFw to support 4K alignment.
Post by Gao, Liming
Good suggestion. How about go through every Shdr and choose the max Shdr->sh_addralign? The alignment should be power of 2.
"""
diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c
b/BaseTools/Source/C/GenFw/Elf64Convert.c
index 2266e487cec7..4025191e868e 100644
--- a/BaseTools/Source/C/GenFw/Elf64Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf64Convert.c
@@ -97,7 +97,7 @@ STATIC Elf_Phdr *mPhdrBase; // // Coff information
// -STATIC const UINT32 mCoffAlignment = 0x20;
+STATIC UINT32 mCoffAlignment = 0x20;
//
// PE section alignment.
@@ -286,6 +286,20 @@ ScanSections64 (
mCoffOffset += mCoffNbrSections * sizeof(EFI_IMAGE_SECTION_HEADER);
//
+ // Set mCoffAlignment to the maximum alignment of the input
+ sections // we care about // for (i = 0; i < mEhdr->e_shnum; i++) {
+ Elf_Shdr *shdr = GetShdrByIndex(i);
+ if (shdr->sh_addralign <= mCoffAlignment) {
+ continue;
+ }
+ if (IsTextShdr(shdr) || IsDataShdr(shdr) || IsHiiRsrcShdr(shdr)) {
+ mCoffAlignment = shdr->sh_addralign;
+ }
+ }
+
+ //
// First text sections.
//
mCoffOffset = CoffAlign(mCoffOffset); """
Note that we may want to use 64 KB instead of 4 KB on AArch64, since the OS may use 64 KB pages. So we should avoid hardcoding 4 KB values for section alignment.
--
Ard.
Post by Gao, Liming
Thanks
Liming
-----Original Message-----
Sent: Tuesday, June 23, 2015 5:14 PM
Subject: Re: [edk2] [Patch 2/3] BaseTools: Update GenFw to support 4K alignment.
Post by Yingke Liu
If current ELF file is 4K aligned, the converted PE should also be 4K aligned.
Contributed-under: TianoCore Contribution Agreement 1.0
---
BaseTools/Source/C/GenFw/Elf32Convert.c | 8 ++++++--
BaseTools/Source/C/GenFw/Elf64Convert.c | 6 +++++-
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/BaseTools/Source/C/GenFw/Elf32Convert.c
b/BaseTools/Source/C/GenFw/Elf32Convert.c
index 5c7b689..9245851 100644
--- a/BaseTools/Source/C/GenFw/Elf32Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf32Convert.c
@@ -96,7 +96,7 @@ STATIC Elf_Phdr *mPhdrBase; // // Coff
information // -STATIC const UINT32 mCoffAlignment = 0x20;
+STATIC UINT32 mCoffAlignment = 0x20;
//
// PE section alignment.
@@ -154,7 +154,11 @@ InitializeElf32 (
Error (NULL, 0, 3000, "Unsupported", "ELF e_version (%u) not EV_CURRENT (%d)", (unsigned) mEhdr->e_version, EV_CURRENT);
return FALSE;
}
-
+
+ if ((mEhdr->e_entry & 0xFFF) == 0) {
+ mCoffAlignment = 0x1000;
+ }
+
Can you explain why you are using the alignment of the entry point here? Wouldn't it be much better if mCoffAlignment is simply the max() of the alignments of all the sections?
Post by Yingke Liu
//
// Update section header pointers
//
diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c
b/BaseTools/Source/C/GenFw/Elf64Convert.c
index 25b90e2..8737e30 100644
--- a/BaseTools/Source/C/GenFw/Elf64Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf64Convert.c
@@ -97,7 +97,7 @@ STATIC Elf_Phdr *mPhdrBase; // // Coff
information // -STATIC const UINT32 mCoffAlignment = 0x20;
+STATIC UINT32 mCoffAlignment = 0x20;
//
// PE section alignment.
@@ -158,6 +158,10 @@ InitializeElf64 (
return FALSE;
}
+ if ((mEhdr->e_entry & 0xFFF) == 0) {
+ mCoffAlignment = 0x1000;
+ }
+
//
// Update section header pointers
//
--
1.9.5.msysgit.0
--------------------------------------------------------------------
--
-------- Monitor 25 network devices or servers for free with
OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email &
sms for fault. Monitor 25 devices for free with no restriction.
Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
---------------------------------------------------------------------
--------- Monitor 25 network devices or servers for free with
OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email &
sms for fault. Monitor 25 devices for free with no restriction.
Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
---------------------------------------------------------------------
--------- Monitor 25 network devices or servers for free with
OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email &
sms for fault. Monitor 25 devices for free with no restriction.
Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
----------------------------------------------------------------------
-------- Monitor 25 network devices or servers for free with
OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download
now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
----------------------------------------------------------------------
-------- Monitor 25 network devices or servers for free with
OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download
now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Yingke Liu
2015-06-30 02:15:11 UTC
Permalink
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
.../Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256Sign.py | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256Sign.py b/BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256Sign.py
index b83c9d4..b3254d8 100644
--- a/BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256Sign.py
+++ b/BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256Sign.py
@@ -65,7 +65,7 @@ if __name__ == '__main__':
group = parser.add_mutually_exclusive_group(required=True)
group.add_argument("-e", action="store_true", dest='Encode', help='encode file')
group.add_argument("-d", action="store_true", dest='Decode', help='decode file')
- parser.add_argument("-o", "--output", dest='OutputFile', type=argparse.FileType('wb'), metavar='filename', help="specify the output filename", required=True)
+ parser.add_argument("-o", "--output", dest='OutputFile', type=str, metavar='filename', help="specify the output filename", required=True)
parser.add_argument("--private-key", dest='PrivateKeyFile', type=argparse.FileType('rb'), help="specify the private key filename. If not specified, a test signing key is used.")
parser.add_argument("-v", "--verbose", dest='Verbose', action="store_true", help="increase output messages")
parser.add_argument("-q", "--quiet", dest='Quiet', action="store_true", help="reduce output messages")
@@ -110,10 +110,13 @@ if __name__ == '__main__':
args.InputFile.close()

#
- # Save output filename and close output file
+ # Save output filename and check if path exists
#
- args.OutputFileName = args.OutputFile.name
- args.OutputFile.close()
+ OutputDir = os.path.dirname(args.OutputFile)
+ if not os.path.exists(OutputDir):
+ print 'ERROR: The output path does not exist: %s' % OutputDir
+ sys.exit(1)
+ args.OutputFileName = args.OutputFile

#
# Save private key filename and close private key file
--
1.9.5.msysgit.0
Gao, Liming
2015-07-01 01:25:01 UTC
Permalink
Reviewed-by: Liming Gao <***@intel.com>

-----Original Message-----
From: Yingke Liu [mailto:***@intel.com]
Sent: Tuesday, June 30, 2015 10:15 AM
To: edk2-***@lists.sourceforge.net
Subject: [edk2] [Patch] BaseTools: Do not create an empty file if Rsa2048Sha256Sign was failed.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
.../Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256Sign.py | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256Sign.py b/BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256Sign.py
index b83c9d4..b3254d8 100644
--- a/BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256Sign.py
+++ b/BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256Sign.py
@@ -65,7 +65,7 @@ if __name__ == '__main__':
group = parser.add_mutually_exclusive_group(required=True)
group.add_argument("-e", action="store_true", dest='Encode', help='encode file')
group.add_argument("-d", action="store_true", dest='Decode', help='decode file')
- parser.add_argument("-o", "--output", dest='OutputFile', type=argparse.FileType('wb'), metavar='filename', help="specify the output filename", required=True)
+ parser.add_argument("-o", "--output", dest='OutputFile', type=str,
+ metavar='filename', help="specify the output filename", required=True)
parser.add_argument("--private-key", dest='PrivateKeyFile', type=argparse.FileType('rb'), help="specify the private key filename. If not specified, a test signing key is used.")
parser.add_argument("-v", "--verbose", dest='Verbose', action="store_true", help="increase output messages")
parser.add_argument("-q", "--quiet", dest='Quiet', action="store_true", help="reduce output messages") @@ -110,10 +110,13 @@ if __name__ == '__main__':
args.InputFile.close()

#
- # Save output filename and close output file
+ # Save output filename and check if path exists
#
- args.OutputFileName = args.OutputFile.name
- args.OutputFile.close()
+ OutputDir = os.path.dirname(args.OutputFile) if not
+ os.path.exists(OutputDir):
+ print 'ERROR: The output path does not exist: %s' % OutputDir
+ sys.exit(1)
+ args.OutputFileName = args.OutputFile

#
# Save private key filename and close private key file
--
1.9.5.msysgit.0


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Yingke Liu
2015-06-30 02:15:25 UTC
Permalink
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Source/C/Common/EfiCompress.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/BaseTools/Source/C/Common/EfiCompress.c b/BaseTools/Source/C/Common/EfiCompress.c
index bd86d12..b225fee 100644
--- a/BaseTools/Source/C/Common/EfiCompress.c
+++ b/BaseTools/Source/C/Common/EfiCompress.c
@@ -408,6 +408,9 @@ Returns:
UINT32 i;

mText = malloc (WNDSIZ * 2 + MAXMATCH);
+ if (mText == NULL) {
+ return EFI_OUT_OF_RESOURCES;
+ }
for (i = 0 ; i < WNDSIZ * 2 + MAXMATCH; i ++) {
mText[i] = 0;
}
@@ -418,6 +421,10 @@ Returns:
mParent = malloc (WNDSIZ * 2 * sizeof(*mParent));
mPrev = malloc (WNDSIZ * 2 * sizeof(*mPrev));
mNext = malloc ((MAX_HASH_VAL + 1) * sizeof(*mNext));
+ if (mLevel == NULL || mChildCount == NULL || mPosition == NULL ||
+ mParent == NULL || mPrev == NULL || mNext == NULL) {
+ return EFI_OUT_OF_RESOURCES;
+ }

mBufSiz = 16 * 1024U;
while ((mBuf = malloc(mBufSiz)) == NULL) {
--
1.9.5.msysgit.0
Gao, Liming
2015-07-01 01:24:11 UTC
Permalink
Reviewed-by: Liming Gao <***@intel.com>

-----Original Message-----
From: Yingke Liu [mailto:***@intel.com]
Sent: Tuesday, June 30, 2015 10:15 AM
To: edk2-***@lists.sourceforge.net
Subject: [edk2] [Patch] BaseTools: Checked return value of malloc for EfiCompress.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Source/C/Common/EfiCompress.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/BaseTools/Source/C/Common/EfiCompress.c b/BaseTools/Source/C/Common/EfiCompress.c
index bd86d12..b225fee 100644
--- a/BaseTools/Source/C/Common/EfiCompress.c
+++ b/BaseTools/Source/C/Common/EfiCompress.c
@@ -408,6 +408,9 @@ Returns:
UINT32 i;

mText = malloc (WNDSIZ * 2 + MAXMATCH);
+ if (mText == NULL) {
+ return EFI_OUT_OF_RESOURCES;
+ }
for (i = 0 ; i < WNDSIZ * 2 + MAXMATCH; i ++) {
mText[i] = 0;
}
@@ -418,6 +421,10 @@ Returns:
mParent = malloc (WNDSIZ * 2 * sizeof(*mParent));
mPrev = malloc (WNDSIZ * 2 * sizeof(*mPrev));
mNext = malloc ((MAX_HASH_VAL + 1) * sizeof(*mNext));
+ if (mLevel == NULL || mChildCount == NULL || mPosition == NULL ||
+ mParent == NULL || mPrev == NULL || mNext == NULL) {
+ return EFI_OUT_OF_RESOURCES;
+ }

mBufSiz = 16 * 1024U;
while ((mBuf = malloc(mBufSiz)) == NULL) {
--
1.9.5.msysgit.0


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Yingke Liu
2015-07-01 07:02:24 UTC
Permalink
The BuildOptions in an INF should also follow override rule: If '==' is used, all other options with '=' are overridden.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Source/Python/AutoGen/AutoGen.py | 14 ++++----------
.../Source/Python/Workspace/WorkspaceDatabase.py | 20 +++++++-------------
2 files changed, 11 insertions(+), 23 deletions(-)

diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index 7fb1a88..449e096 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -2000,7 +2000,6 @@ class PlatformAutoGen(AutoGen):
if Options.get((self.BuildRuleFamily, NowKey)) != None:
Options.pop((self.BuildRuleFamily, NowKey))

- OverrideOpt = set()
for Key in Options:
if ModuleStyle != None and len (Key) > 2:
# Check Module style is EDK or EDKII.
@@ -2026,18 +2025,15 @@ class PlatformAutoGen(AutoGen):
if Arch == "*" or Arch == self.Arch:
if Tool not in BuildOptions:
BuildOptions[Tool] = {}
- if Options[Key].startswith('='):
- OverrideOpt.add((Tool, Attr))
- if Attr != "FLAGS" or Attr not in BuildOptions[Tool] or (Tool, Attr) in OverrideOpt:
+ if Attr != "FLAGS" or Attr not in BuildOptions[Tool] or Options[Key].startswith('='):
BuildOptions[Tool][Attr] = Options[Key]
- else:
+ elif not BuildOptions[Tool][Attr].startswith('='):
# append options for the same tool
BuildOptions[Tool][Attr] += " " + Options[Key]
# Build Option Family has been checked, which need't to be checked again for family.
if FamilyMatch or FamilyIsNull:
return BuildOptions

- OverrideOpt = set()
for Key in Options:
if ModuleStyle != None and len (Key) > 2:
# Check Module style is EDK or EDKII.
@@ -2061,11 +2057,9 @@ class PlatformAutoGen(AutoGen):
if Arch == "*" or Arch == self.Arch:
if Tool not in BuildOptions:
BuildOptions[Tool] = {}
- if Options[Key].startswith('='):
- OverrideOpt.add((Tool, Attr))
- if Attr != "FLAGS" or Attr not in BuildOptions[Tool] or (Tool, Attr) in OverrideOpt:
+ if Attr != "FLAGS" or Attr not in BuildOptions[Tool] or Options[Key].startswith('='):
BuildOptions[Tool][Attr] = Options[Key]
- else:
+ elif not BuildOptions[Tool][Attr].startswith('='):
# append options for the same tool
BuildOptions[Tool][Attr] += " " + Options[Key]
return BuildOptions
diff --git a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
index 9da6ac7..1c8e0f3 100644
--- a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
+++ b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
@@ -753,7 +753,6 @@ class DscBuildData(PlatformBuildClassObject):
## Retrieve [BuildOptions]
def _GetBuildOptions(self):
if self._BuildOptions == None:
- OverrideTool = set()
self._BuildOptions = sdict()
#
# Retrieve build option for EDKII and EDK style module
@@ -762,14 +761,12 @@ class DscBuildData(PlatformBuildClassObject):
RecordList = self._RawData[MODEL_META_DATA_BUILD_OPTION, self._Arch, CodeBase]
for ToolChainFamily, ToolChain, Option, Dummy1, Dummy2, Dummy3, Dummy4 in RecordList:
CurKey = (ToolChainFamily, ToolChain, CodeBase)
- if Option.startswith('='):
- OverrideTool.add(CurKey)
#
# Only flags can be appended
#
- if CurKey not in self._BuildOptions or not ToolChain.endswith('_FLAGS') or CurKey in OverrideTool:
+ if CurKey not in self._BuildOptions or not ToolChain.endswith('_FLAGS') or Option.startswith('='):
self._BuildOptions[CurKey] = Option
- else:
+ elif not self._BuildOptions[CurKey].startswith('='):
self._BuildOptions[CurKey] += ' ' + Option
return self._BuildOptions

@@ -778,18 +775,15 @@ class DscBuildData(PlatformBuildClassObject):
self._ModuleTypeOptions = sdict()
if (Edk, ModuleType) not in self._ModuleTypeOptions:
options = sdict()
- OverrideTool = set()
self._ModuleTypeOptions[Edk, ModuleType] = options
DriverType = '%s.%s' % (Edk, ModuleType)
RecordList = self._RawData[MODEL_META_DATA_BUILD_OPTION, self._Arch, DriverType]
for ToolChainFamily, ToolChain, Option, Arch, Type, Dummy3, Dummy4 in RecordList:
- if Arch == self._Arch and Type == DriverType:
+ if Type == DriverType:
Key = (ToolChainFamily, ToolChain, Edk)
- if Option.startswith('='):
- OverrideTool.add(Key)
- if Key not in options or not ToolChain.endswith('_FLAGS') or Key in OverrideTool:
+ if Key not in options or not ToolChain.endswith('_FLAGS') or Option.startswith('='):
options[Key] = Option
- else:
+ elif not options[Key].startswith('='):
options[Key] += ' ' + Option
return self._ModuleTypeOptions[Edk, ModuleType]

@@ -2399,9 +2393,9 @@ class InfBuildData(ModuleBuildClassObject):
ToolChainFamily = Record[0]
ToolChain = Record[1]
Option = Record[2]
- if (ToolChainFamily, ToolChain) not in self._BuildOptions:
+ if (ToolChainFamily, ToolChain) not in self._BuildOptions or Option.startswith('='):
self._BuildOptions[ToolChainFamily, ToolChain] = Option
- else:
+ elif not self._BuildOptions[ToolChainFamily, ToolChain].startswith('='):
# concatenate the option string if they're for the same tool
OptionString = self._BuildOptions[ToolChainFamily, ToolChain]
self._BuildOptions[ToolChainFamily, ToolChain] = OptionString + " " + Option
--
1.9.5.msysgit.0
Gao, Liming
2015-07-02 01:23:48 UTC
Permalink
Reviewed-by: Liming Gao <***@intel.com>

-----Original Message-----
From: Yingke Liu [mailto:***@intel.com]
Sent: Wednesday, July 1, 2015 3:02 PM
To: edk2-***@lists.sourceforge.net
Subject: [edk2] [Patch] BaseTools: Fixed BuildOptions bug.

The BuildOptions in an INF should also follow override rule: If '==' is used, all other options with '=' are overridden.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Source/Python/AutoGen/AutoGen.py | 14 ++++----------
.../Source/Python/Workspace/WorkspaceDatabase.py | 20 +++++++-------------
2 files changed, 11 insertions(+), 23 deletions(-)

diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index 7fb1a88..449e096 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -2000,7 +2000,6 @@ class PlatformAutoGen(AutoGen):
if Options.get((self.BuildRuleFamily, NowKey)) != None:
Options.pop((self.BuildRuleFamily, NowKey))

- OverrideOpt = set()
for Key in Options:
if ModuleStyle != None and len (Key) > 2:
# Check Module style is EDK or EDKII.
@@ -2026,18 +2025,15 @@ class PlatformAutoGen(AutoGen):
if Arch == "*" or Arch == self.Arch:
if Tool not in BuildOptions:
BuildOptions[Tool] = {}
- if Options[Key].startswith('='):
- OverrideOpt.add((Tool, Attr))
- if Attr != "FLAGS" or Attr not in BuildOptions[Tool] or (Tool, Attr) in OverrideOpt:
+ if Attr != "FLAGS" or Attr not in BuildOptions[Tool] or Options[Key].startswith('='):
BuildOptions[Tool][Attr] = Options[Key]
- else:
+ elif not BuildOptions[Tool][Attr].startswith('='):
# append options for the same tool
BuildOptions[Tool][Attr] += " " + Options[Key]
# Build Option Family has been checked, which need't to be checked again for family.
if FamilyMatch or FamilyIsNull:
return BuildOptions

- OverrideOpt = set()
for Key in Options:
if ModuleStyle != None and len (Key) > 2:
# Check Module style is EDK or EDKII.
@@ -2061,11 +2057,9 @@ class PlatformAutoGen(AutoGen):
if Arch == "*" or Arch == self.Arch:
if Tool not in BuildOptions:
BuildOptions[Tool] = {}
- if Options[Key].startswith('='):
- OverrideOpt.add((Tool, Attr))
- if Attr != "FLAGS" or Attr not in BuildOptions[Tool] or (Tool, Attr) in OverrideOpt:
+ if Attr != "FLAGS" or Attr not in BuildOptions[Tool] or Options[Key].startswith('='):
BuildOptions[Tool][Attr] = Options[Key]
- else:
+ elif not BuildOptions[Tool][Attr].startswith('='):
# append options for the same tool
BuildOptions[Tool][Attr] += " " + Options[Key]
return BuildOptions
diff --git a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
index 9da6ac7..1c8e0f3 100644
--- a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
+++ b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
@@ -753,7 +753,6 @@ class DscBuildData(PlatformBuildClassObject):
## Retrieve [BuildOptions]
def _GetBuildOptions(self):
if self._BuildOptions == None:
- OverrideTool = set()
self._BuildOptions = sdict()
#
# Retrieve build option for EDKII and EDK style module @@ -762,14 +761,12 @@ class DscBuildData(PlatformBuildClassObject):
RecordList = self._RawData[MODEL_META_DATA_BUILD_OPTION, self._Arch, CodeBase]
for ToolChainFamily, ToolChain, Option, Dummy1, Dummy2, Dummy3, Dummy4 in RecordList:
CurKey = (ToolChainFamily, ToolChain, CodeBase)
- if Option.startswith('='):
- OverrideTool.add(CurKey)
#
# Only flags can be appended
#
- if CurKey not in self._BuildOptions or not ToolChain.endswith('_FLAGS') or CurKey in OverrideTool:
+ if CurKey not in self._BuildOptions or not ToolChain.endswith('_FLAGS') or Option.startswith('='):
self._BuildOptions[CurKey] = Option
- else:
+ elif not self._BuildOptions[CurKey].startswith('='):
self._BuildOptions[CurKey] += ' ' + Option
return self._BuildOptions

@@ -778,18 +775,15 @@ class DscBuildData(PlatformBuildClassObject):
self._ModuleTypeOptions = sdict()
if (Edk, ModuleType) not in self._ModuleTypeOptions:
options = sdict()
- OverrideTool = set()
self._ModuleTypeOptions[Edk, ModuleType] = options
DriverType = '%s.%s' % (Edk, ModuleType)
RecordList = self._RawData[MODEL_META_DATA_BUILD_OPTION, self._Arch, DriverType]
for ToolChainFamily, ToolChain, Option, Arch, Type, Dummy3, Dummy4 in RecordList:
- if Arch == self._Arch and Type == DriverType:
+ if Type == DriverType:
Key = (ToolChainFamily, ToolChain, Edk)
- if Option.startswith('='):
- OverrideTool.add(Key)
- if Key not in options or not ToolChain.endswith('_FLAGS') or Key in OverrideTool:
+ if Key not in options or not ToolChain.endswith('_FLAGS') or Option.startswith('='):
options[Key] = Option
- else:
+ elif not options[Key].startswith('='):
options[Key] += ' ' + Option
return self._ModuleTypeOptions[Edk, ModuleType]

@@ -2399,9 +2393,9 @@ class InfBuildData(ModuleBuildClassObject):
ToolChainFamily = Record[0]
ToolChain = Record[1]
Option = Record[2]
- if (ToolChainFamily, ToolChain) not in self._BuildOptions:
+ if (ToolChainFamily, ToolChain) not in self._BuildOptions or Option.startswith('='):
self._BuildOptions[ToolChainFamily, ToolChain] = Option
- else:
+ elif not self._BuildOptions[ToolChainFamily, ToolChain].startswith('='):
# concatenate the option string if they're for the same tool
OptionString = self._BuildOptions[ToolChainFamily, ToolChain]
self._BuildOptions[ToolChainFamily, ToolChain] = OptionString + " " + Option
--
1.9.5.msysgit.0


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Yingke Liu
2015-07-15 02:17:31 UTC
Permalink
The alignment in rule section is shared by modules that use this rule to generate FFS, it should not be modified by certain module.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Source/Python/GenFds/EfiSection.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/BaseTools/Source/Python/GenFds/EfiSection.py b/BaseTools/Source/Python/GenFds/EfiSection.py
index 8f61c4d..09fb28f 100644
--- a/BaseTools/Source/Python/GenFds/EfiSection.py
+++ b/BaseTools/Source/Python/GenFds/EfiSection.py
@@ -97,6 +97,7 @@ class EfiSection (EfiSectionClassObject):
return FileList, self.Alignment

Index = 0
+ Align = self.Alignment

""" If Section type is 'VERSION'"""
OutputFileList = []
@@ -229,9 +230,9 @@ class EfiSection (EfiSectionClassObject):
if self.Alignment == 'Auto' and (SectionType == 'PE32' or SectionType == 'TE'):
ImageObj = PeImageClass (File)
if ImageObj.SectionAlignment < 0x400:
- self.Alignment = str (ImageObj.SectionAlignment)
+ Align = str (ImageObj.SectionAlignment)
else:
- self.Alignment = str (ImageObj.SectionAlignment / 0x400) + 'K'
+ Align = str (ImageObj.SectionAlignment / 0x400) + 'K'

if File[(len(File)-4):] == '.efi':
MapFile = File.replace('.efi', '.map')
@@ -272,4 +273,4 @@ class EfiSection (EfiSectionClassObject):
)
OutputFileList.append(OutputFile)

- return OutputFileList, self.Alignment
+ return OutputFileList, Align
--
1.9.5.msysgit.0
Gao, Liming
2015-07-15 02:50:36 UTC
Permalink
Reviewed-by: Liming Gao <***@intel.com>

-----Original Message-----
From: Yingke Liu [mailto:***@intel.com]
Sent: Wednesday, July 15, 2015 10:18 AM
To: edk2-***@lists.sourceforge.net
Subject: [edk2] [Patch] BaseTools: Fixed incorrect alignment bug.

The alignment in rule section is shared by modules that use this rule to generate FFS, it should not be modified by certain module.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <***@intel.com>
---
BaseTools/Source/Python/GenFds/EfiSection.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/BaseTools/Source/Python/GenFds/EfiSection.py b/BaseTools/Source/Python/GenFds/EfiSection.py
index 8f61c4d..09fb28f 100644
--- a/BaseTools/Source/Python/GenFds/EfiSection.py
+++ b/BaseTools/Source/Python/GenFds/EfiSection.py
@@ -97,6 +97,7 @@ class EfiSection (EfiSectionClassObject):
return FileList, self.Alignment

Index = 0
+ Align = self.Alignment

""" If Section type is 'VERSION'"""
OutputFileList = []
@@ -229,9 +230,9 @@ class EfiSection (EfiSectionClassObject):
if self.Alignment == 'Auto' and (SectionType == 'PE32' or SectionType == 'TE'):
ImageObj = PeImageClass (File)
if ImageObj.SectionAlignment < 0x400:
- self.Alignment = str (ImageObj.SectionAlignment)
+ Align = str (ImageObj.SectionAlignment)
else:
- self.Alignment = str (ImageObj.SectionAlignment / 0x400) + 'K'
+ Align = str (ImageObj.SectionAlignment / 0x400) + 'K'

if File[(len(File)-4):] == '.efi':
MapFile = File.replace('.efi', '.map') @@ -272,4 +273,4 @@ class EfiSection (EfiSectionClassObject):
)
OutputFileList.append(OutputFile)

- return OutputFileList, self.Alignment
+ return OutputFileList, Align
--
1.9.5.msysgit.0


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Leif Lindholm
2015-07-15 14:32:08 UTC
Permalink
Post by Yingke Liu
The alignment in rule section is shared by modules that use this rule to generate FFS, it should not be modified by certain module.
No objection to content of patch, but the above line is too long.
Can you break it up before committing?

Regards,

Leif
Post by Yingke Liu
Contributed-under: TianoCore Contribution Agreement 1.0
---
BaseTools/Source/Python/GenFds/EfiSection.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/BaseTools/Source/Python/GenFds/EfiSection.py b/BaseTools/Source/Python/GenFds/EfiSection.py
index 8f61c4d..09fb28f 100644
--- a/BaseTools/Source/Python/GenFds/EfiSection.py
+++ b/BaseTools/Source/Python/GenFds/EfiSection.py
return FileList, self.Alignment
Index = 0
+ Align = self.Alignment
""" If Section type is 'VERSION'"""
OutputFileList = []
ImageObj = PeImageClass (File)
- self.Alignment = str (ImageObj.SectionAlignment)
+ Align = str (ImageObj.SectionAlignment)
- self.Alignment = str (ImageObj.SectionAlignment / 0x400) + 'K'
+ Align = str (ImageObj.SectionAlignment / 0x400) + 'K'
MapFile = File.replace('.efi', '.map')
)
OutputFileList.append(OutputFile)
- return OutputFileList, self.Alignment
+ return OutputFileList, Align
--
1.9.5.msysgit.0
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Loading...