summaryrefslogtreecommitdiff
path: root/BaseTools
AgeCommit message (Collapse)AuthorFilesLines
2017-08-29BaseTools/Conf: Support LLVM39 and LLVM40 in CLANG38 toolchainShi, Steven1-2/+3
https://bugzilla.tianocore.org/show_bug.cgi?id=676 Add LLVM39 and LLVM40 support in CLANG38 toolchain Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Steven Shi <steven.shi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-08-29BaseTools: Update toolsetup.bat to support the case without EDK_TOOLS_BINLiming Gao1-10/+5
When EDK_TOOLS_BIN is not set, %EDK_TOOLS_PATH%\Bin\Win32 will be used as the binary tool directory. But, %EDK_TOOLS_PATH%\Bin\Win32 may not exist. On this case, toolsetup.bat should continue to do the other setting, such VS tool chain and tool conf file copy. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2017-08-29BaseTools: Support /WHOLEARCHIVE option in VS2015 tool chainLiming Gao2-1/+6
https://bugzilla.tianocore.org/show_bug.cgi?id=582 Don't enable this option in the default setting, because it may cause VS2015 linker crash. Platform can enable this option in PlatformPkg.dsc like below: [BuildOptions] *_*_*_DLINK2_FLAGS = /WHOLEARCHIVE Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2017-08-26BaseTools/EfiRom: Add multiple device id supportDaniel Verkamp2-23/+129
This is a patch to implement writing and dumping of PCI 3.0 Device ID lists in EFI option ROMs in the EfiRom tool. Using this modification, multiple space-delimited device IDs can be specified after -i. The first device in the list is used for the main PCI ROM header Device ID field and is also written in the list. The list is only written when more than one device ID has been specified; when only one device ID is given on the command line, the EfiRom output should be identical to the current code. Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=666 Cc: Liming Gao <liming.gao@intel.com> Cc: Tomas Pilar <tpilar@solarflare.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-08-25BaseTools: Update tools_def to remove /Gw option in VS NOOPT targetLiming Gao1-16/+16
To remove /Gw option is to disable size optimization. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2017-08-25BaseTools: Add the missing -pie link option in GCC tool chainLiming Gao1-2/+2
https://bugzilla.tianocore.org/show_bug.cgi?id=671 GCC tool chain uses -fpie in CC_FLAGS. So, add -pie in DLINK_FLAGS. More discussion in https://lists.01.org/pipermail/edk2-devel/2017-August/013508.html 3.13 Options for Linking ======================== '-pie' Produce a position independent executable on targets that support it. For predictable results, you must also specify the same set of options used for compilation ('-fpie', '-fPIE', or model suboptions) when you specify this linker option. 3.18 Options for Code Generation Conventions ============================================ '-fpie' '-fPIE' These options are similar to '-fpic' and '-fPIC', but generated position independent code can be only linked into executables. Usually these options are used when '-pie' GCC option is used during linking. '-fpie' and '-fPIE' both define the macros '__pie__' and '__PIE__'. The macros have the value 1 for '-fpie' and 2 for '-fPIE'. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2017-08-24BaseTools/UPT: Fix UNI file name issueHess Chen4-4/+16
Fix the issue of creating duplicate UNI file names Fix the issue of removing packages Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2017-08-24BaseTools: Roll back GenFw Change to keep unknown field in RSDS debug entryLiming Gao1-7/+1
https://lists.01.org/pipermail/edk2-devel/2017-August/013488.html These fields are actually a GUID and DWORD respectively: the GUID identifies the PDB to make it possible to verify that a given PDB matches the PE file, and the DWORD is the "age" of the PDB which is simply a helper value that is incremented by 1 by the linker every time the file is remade. Wiping the GUID will cause PDB parsers (such as the MS DIA SDK that IDA and most other tools use) to treat the PDB as a mismatch and refuse to load it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com>
2017-08-14BaseTools: Fix Segmentation fault: 11 when build AppPkg with XCODE5Andrew Fish1-1/+11
it is a bug in mtoc setting the size of the debug directory entry to the size of the .debug section, not the size of the EFI_IMAGE_DEBUG_DIRECTORY_ENTRY. It was causing a loop to iterate and get bogus EFI_IMAGE_DEBUG_DIRECTORY_ENTRY data and pass that to memset() and boom. Cc: Liming Gao <liming.gao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Andrew Fish <afish@apple.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-08-13BaseTools: Support TabSpace between section tag in DEC fileYanyan Zhang1-1/+1
Per DEC spec, multiple section tag use <TS> to separate, and it can support Tab, so this patch fix the bug to use Tab. <TabSpace> ::= {<Tab>} {<Space>} <TS> ::= <TabSpace>* Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yanyan Zhang <yanyanx.zhang@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2017-08-12BaseTools: Don't need to add extra quotes when UI string from fileBin Wang1-2/+1
when the UI string is read from files, we don't need to add the extra quotes. Otherwise, it will cause UI name has this extra quotes. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Bin Wang <binx.a.wang@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2017-08-12BaseTools/UPT: Support Multiple InstallationHess Chen8-102/+145
Add a new feature to UPT to support installing multiple DIST packages in one time. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2017-08-11BaseTools/Scripts: Add sample makefile for use with RunMakefile.pyMichael D Kinney1-0/+43
https://bugzilla.tianocore.org/show_bug.cgi?id=670 Add sample makefile that can be used to test RunMakefile.py script and can also be used as a template to start a new PREBUILD/POSTBUILD makefile. This makefile contains TAB characters instead of spaces on purpose to maximize compatibility with make utilities. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2017-08-11BaseTools/Scripts: Add python script to run a makefileMichael D Kinney1-0/+178
https://bugzilla.tianocore.org/show_bug.cgi?id=670 Add the python script RunMakefile.py that can be used in a PREBUILD/POSTBUIILD action to invoke a makefile passing in context as makefile defines. The command line arguments passed into RunMakefile.py are converted to the following set of defines. * ACTIVE_PLATFORM * TARGET_ARCH * TOOL_CHAIN_TAG * CONF_DIRECTORY * TARGET * EXTRA_FLAGS In addition, a makefile can access the system environment variables including WORKSPACE and PACKAGES_PATH. The makefile target from the following set is also passed into the makefile. If no target is passed into build, then the 'all' target is used. [all|fds|genc|genmake|clean|cleanall|cleanlib|modules|libraries|run] A platform DSC file can use a statements in the [Defines] section of the following form to use this script. MAKEFILE is a WORKSPACE or PACKAGES_PATH relative path to the makefile to run. [Defines] PREBUILD = python BaseTools/Script/RunMakefile.py --makefile MAKEFILE POSTBUILD = python BaseTools/Script/RunMakefile.py --makefile MAKEFILE Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2017-08-11BaseTools/build: Expand PREBUILD/POSTBUILD DSC actionsMichael D Kinney2-30/+82
https://bugzilla.tianocore.org/show_bug.cgi?id=670 * Extend PREBUILD/POSTBUILD define values to support more than one argument. * Delay normalization of PREBUILD/POSTBUILD define values until all arguments in the define values can be processed. * Convert PREBUILD/POSTBUILD build define value arguments that are WORKSPACE or PACKAGES_PATH relative paths to absolute paths. * Append -p PlatformFile, --conf=ConfDirectory, and build target flags to command line used to execute PREBUILD/POSTBUILD actions. * Remove PrebuildScript and PostbuildScript fields from the Build class and use Prebuild and Postbuild fields instead. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2017-08-11BaseTools: Fix Xcode 9 Beta treating 32-bit left shift as undefinedYonghong Zhu2-4/+4
Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=635 Cc: Liming Gao <liming.gao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Andrew Fish <afish@apple.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-08-07BaseTools/Conf: apply nasmb, asm16 build rule orderChris Ruffin1-1/+1
Prioritize nasmb rule over asm16 where both source types are specified. Change-Id: I33ec348dab66b313ddb05cb15f2d8407a648c320 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chris Ruffin <chris.ruffin@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-08-04BaseTools/VfrCompile: Remove the MAX_PATH limitationDandan Bi2-26/+1
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=579 Since we have already used LongFilePath() to convert file path, so we can remove the MAX_PATH limitation. Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Daniel Díaz <daniel.diaz@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
2017-08-04BaseTools/VfrCompile: Fix segmentation fault issuesDandan Bi1-7/+7
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=532 (1) Add NULL check before using a pointer. (2) Use "%s" format string in DebugError function to avoid crash caused by incorrect input. Cc: Bo Chen <chenbo@pdx.edu> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
2017-08-03edk2: Move License.txt file to rootMichael D Kinney1-25/+0
https://bugzilla.tianocore.org/show_bug.cgi?id=642 Add top level License.txt file with the BSD 2-Clause License that is used by the majority of the EKD II open source project content. Merge copyright statements from the BSD 2-Clause License files in each package directory and remove the duplication License.txt file from package directories. Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Andrew Fish <afish@apple.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-08-03edk2: Move TianoCore Contribution Agreement to rootMichael D Kinney1-218/+0
https://bugzilla.tianocore.org/show_bug.cgi?id=629 Move Contributions.txt that contains the TianoCore Contribution Agreement 1.0 to the root of the edk2 repository and remove the duplicate Contributions.txt files from all packages. Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Andrew Fish <afish@apple.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-08-03BaseTools/PatchCheck: Support Contribution Agreement 1.1Michael D Kinney1-3/+6
https://bugzilla.tianocore.org/show_bug.cgi?id=628 Update PatchCheck.py to support either "Contributed-under: TianoCore Contribution Agreement 1.0" or "Contributed-under: TianoCore Contribution Agreement 1.1" in the commit message. Temporarily continue to allow the TianoCore Contribution Agreement 1.0 agreement. Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Andrew Fish <afish@apple.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-08-01BaseTools/GenCrc32: Fix a bug to hand empty file for decodeYonghong Zhu1-2/+6
Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=535 Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-08-01BaseTools/EfiLdrImage: Fix a segmentation fault from vfprintf()Yonghong Zhu1-3/+3
Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=533 Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-08-01BaseTools/EfiRom: Fix a segmentation fault from vsprintf()/vfprintf()Yonghong Zhu1-3/+3
Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=534 Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-08-01BaseTools/GenFfs: Fix a segmentation fault from vsprintf()/vfprintf()Yonghong Zhu1-3/+3
Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=536 Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-08-01BaseTools/GenSec: Fix a segmentation fault in main()Yonghong Zhu1-2/+6
Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=537 Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-08-01BaseTools/Split: Fix the segmentation fault in GetSplitValue()Yonghong Zhu1-3/+7
Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=538 Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-08-01BaseTools: Fix the bug to correctly check Pcd type that in FDF fileYonghong Zhu1-0/+7
We set Pcd value in FDF and used this Pcd as PatchableInModule type in module, it cause build report generate failure. because we incorrectly set the Pcd type during check whether the Pcd is used. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-07-26BaseTools: Fix the bug that warn() function with only 1 argumentYonghong Zhu1-1/+1
In the definition, the warn() function takes at least 2 arguments. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-07-26BaseTools: add some comment for .PrebuildEnv file's usageYonghong Zhu1-0/+5
This patch add some comments to explain why we use .PrebuildEnv file to save environment variable settings set by the prebuild script. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-07-14BaseTools/tools_def AARCH64: avoid SIMD registers in XIP codeArd Biesheuvel1-1/+1
XIP code may execute with the MMU off, in which case all memory accesses should be strictly aligned to their size. Some versions of GCC violate this restriction even when -mstrict-align is passed, when performing loads and stores that involve SIMD registers. This is clearly a bug in the compiler, but we can easily work around it by avoiding SIMD registers altogether when building code that may execute in such a context. So add -mgeneral-regs-only to the AARCH64 XIP CC flags. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-07-14BaseTools/tools_def AARCH64: mark register x18 as reservedArd Biesheuvel1-1/+1
The AArch64 ABI classifies register x18 as a platform register, which means it should not be used unless the code is guaranteed to run on a platform that doesn't use it in such a capacity. GCC does not honour this requirement by default, and so we need to tell it not to touch it explicitly, by passing the -ffixed-x18 command line option. Link: https://bugzilla.tianocore.org/show_bug.cgi?id=625 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-07-13BaseTools/Build: Support python scripts in PREBUILD/POSTBUILDMichael Kinney1-2/+2
https://bugzilla.tianocore.org/show_bug.cgi?id=627 Add shell=True in Popen() calls to support direct execution of python scripts Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2017-07-10BaseTools: Report Fd File Path in build logYunhua Feng1-6/+3
At the end of build, Report Fd image path in build log Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2017-07-10BaseTools: Fix FDF file parse !include file issueYunhua Feng1-0/+4
when FDF file use "!include" format to include the other file, and the end line of the file not end with '\n', the include file parse error. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2017-07-10BaseTools: Add PCDs conditional operator functionYunhua Feng1-5/+17
Parse PCDS value like A >B ? C :D if A > B is True, the result is C, else the result is D Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2017-07-07BaseTools/Eot: register MM Module types with FFS class.Supreeth Venkatesh1-0/+2
This patch registers MM_STANDALONE and MM_CORE_STANDALONE with Ffs class. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Supreeth Venkatesh <supreeth.venkatesh@arm.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-07-07BaseTools/Workspace: check MM module type compatibility with PI version.Supreeth Venkatesh1-0/+5
This patch checks SUP_MODULE_MM_CORE_STANDALONE and SUP_MODULE_MM_STANDALONE module compatibility with PI specification version. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Supreeth Venkatesh <supreeth.venkatesh@arm.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-07-07BaseTools/build: register MM module types with build tools.Supreeth Venkatesh2-2/+4
This patch registers MM_STANDALONE and MM_CORE_STANDALONE module type with python build tools. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Supreeth Venkatesh <supreeth.venkatesh@arm.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-07-07BaseTools/GenFds: register MM Modules and MM FV file types.Supreeth Venkatesh3-4/+11
This patch verifies MM_CORE_STANDALONE module compatibility with PI specification version. Also, it registers MM_STANDALONE/MM_CORE_STANDALONE modules with FdfParser class and provides mapping between MM_STANDALONE and MM_CORE_STANDALONE module type in FDF with EFI_FV_FILETYPE_MM_STANDALONE and EFI_FV_FILETYPE_MM_CORE_STANDALONE file types in GenFfs. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Supreeth Venkatesh <supreeth.venkatesh@arm.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-07-07BaseTools/CommonDataClass: register MM Modules.Supreeth Venkatesh2-4/+4
This patch registers MM_STANDALONE and MM_CORE_STANDALONE module types with CommonClass and PackageIncludePkgHeaderClass in CommonDataClass. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Supreeth Venkatesh <supreeth.venkatesh@arm.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-07-07BaseTools/Common: add support in FDF Parser to parse MM Modules.Supreeth Venkatesh1-2/+2
This patch adds support for FdfParser tool to parse MM_STANDALONE and MM_CORE_STANDALONE modules. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Supreeth Venkatesh <supreeth.venkatesh@arm.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-07-07BaseTools/Common: add MM Module data types.Supreeth Venkatesh1-1/+3
This patch adds SUP_MODULE_MM_STANDALONE and SUP_MODULE_MM_CORE_STANDALONE data types and includes it in SUP_MODULE_LIST. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Supreeth Venkatesh <supreeth.venkatesh@arm.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-07-07BaseTools/AutoGen: auto generate MM template APIs and dependencies.Supreeth Venkatesh2-3/+162
This patch adds changes to auto generate MM_CORE_STANDALONE and MM_STANDALONE Entry Point templates. Also, it adds changes to help auto generate dependency expressions for MM_STANDALONE modules. PI Specification v1.5 specifies Management Mode System Table (MMST) which is a collection of common services for managing MMRAM allocation and providing basic I/O services. MMST is similar to the UEFI System Table. (Currently, EFI_SMM_SYSTEM_TABLE2 defines Management Mode System Table) Some of auto generated MM_CORE_STANDALONE and MM_STANDALONE template APIs use MMST as parameter. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Supreeth Venkatesh <supreeth.venkatesh@arm.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-07-07BaseTools/GenFw: recognize MM file types as EFI Boot Service Drivers.Supreeth Venkatesh1-1/+4
PI v1.5 Specification Volume 4 defines Management Mode Core Interface. In order to support Management Mode Core Interface, Module Types MM_STANDALONE, MM_CORE_STANDALONE are needed. This patch ensures that MM_STANDALONE, MM_CORE_STANDALONE Modules are treated as EFI Boot Service Driver in GenFw tool. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Supreeth Venkatesh <supreeth.venkatesh@arm.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-07-07BaseTools/GenFfs: add FFS file types for MM modules.Supreeth Venkatesh2-2/+8
PI specification v1.5 defines new firmware volume file types for Management Mode (MM). This patch adds the new file type EFI_FV_FILETYPE_MM_STANDALONE and EFI_FV_FILETYPE_MM_CORE_STANDALONE in GenFfs tool. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Supreeth Venkatesh <supreeth.venkatesh@arm.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-07-06BaseTools/GenFw: disregard payload in PE debug directory entry sizeArd Biesheuvel2-2/+2
Currently, the PE/COFF conversion routines in GenFw add a so-called NB10 CodeView debug record to the image, and update the associated directory entry in the PE/COFF optional header to contain its relative virtual address (RVA) and size. However, there are two levels of indirection at work here: the actual NB10 CodeView record (which is simply a magic number and some unused data fields followed by the NUL terminated filename) is emitted separately, and a separate descriptor is emitted that identifies the NB10 CodeView record as type EFI_IMAGE_DEBUG_TYPE_CODEVIEW, and records its size. The directory entry in the PE/COFF optional header should refer to this intermediate descriptor's address and size only, but the WriteDebug## () routines in GenFw erroneously record the size of both the descriptor and the NB10 CodeView record. This problem was exposed by commit e4129b0e5897 ("BaseTools: Update GenFw to clear unused debug entry generated by VS tool chain", 2017-06-19), and GenFw now crashes when it attempts to iterate over what it thinks are multiple intermediate descriptors for different kinds of debug data embedded in the image. The error is understandable, given that both are carved out of the same file space allocation, but this is really an implementation detail of GenFw, and is not required. (Note that the intermediate descriptor does not require a RVA and so it does not even need to be inside a section) So omit the size of the NB10 CodeView record from the size recorded in the optional header. Link: https://lists.01.org/pipermail/edk2-devel/2017-July/012162.html Link: https://lists.01.org/pipermail/edk2-devel/2017-July/012181.html Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Co-debugged-or-whatever-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-07-05BaseTools: Update GenFw to clear unused debug entry generated by VS tool chainLiming Gao1-5/+22
https://bugzilla.tianocore.org/show_bug.cgi?id=600 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2017-07-05BaseTools: Update tools_def.template to remove old XCLANG and XCODE32Liming Gao1-176/+0
https://bugzilla.tianocore.org/show_bug.cgi?id=562 https://bugzilla.tianocore.org/show_bug.cgi?id=563 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Andrew Fish <afish@apple.com>