summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/C/VolInfo
Commit message (Collapse)AuthorAgeFilesLines
* BaseTools/VolInfo: Update file and section type stringsKonstantin Aladyshev2022-10-021-6/+6
| | | | | | | | | Change SMM to MM in naming according to the recent PI specifications. Remove trailing whitespaces in some strings. Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools/VolInfo: Update copyright informationKonstantin Aladyshev2022-10-021-0/+1
| | | | | | | | Add Konstantin Aladyshev to the copyright header. Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools/VolInfo: Parse apriori filesKonstantin Aladyshev2022-10-021-0/+74
| | | | | | | | Output file GUIDs from the DXE and PEI apriori files. Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools/VolInfo: Increase GUID base name stringKonstantin Aladyshev2022-10-021-3/+1
| | | | | | | | | | | The current string lenght (=60) is not enough for cases where basename is a path to Build folder. Drop custom define and use MAX_LINE_LEN from the BaseTools codebase instead. Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools/VolInfo: Fix EFI_SECTION_GUID_DEFINED parsingKonstantin Aladyshev2022-10-021-4/+4
| | | | | | | | | | | | | Currently 'PutFileImage' function is called with arguments that are not advanced on each section parsing. This would lead to an error if EFI_SECTION_GUID_DEFINED is not the first in a file. The same mistake is present in the parsing of CRC32 guided section case. Use correct arguments to fix the issue. Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* BaseTools/VolInfo: Correct buffer for GenCrc32 toolKonstantin Aladyshev2022-10-021-0/+7
| | | | | | | | | | | | If the guided section was encoded with GenCrc32 tool the resulting 'EFI_GUID_DEFINED_SECTION.DataOffset' field points to the start of the meaningfull data that follows the CRC32 value. But if we want to decode the section with GenCrc32 tool we need to provide a buffer that includes the CRC32 value itself. Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools/VolInfo: Parse EFI_SECTION_FREEFORM_SUBTYPE_GUID headerKonstantin Aladyshev2022-08-061-1/+9
| | | | | | | | | Print 'SubtypeGuid' field from the EFI_FREEFORM_SUBTYPE_GUID_SECTION structure. This value describes the raw data inside the section. Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Reviewed-by: Bob Feng<bob.c.feng@intel.com>
* BaseTools/VolInfo: Show FV section boundariesKonstantin Aladyshev2022-08-061-0/+2
| | | | | | | | | | Currently there is no labels for start and end of the EFI_SECTION_FIRMWARE_VOLUME_IMAGE type section. Therefore it is not possible to see where the FV section ends and another section starts. Add labels for start and end of the FV sections to fix the issue. Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools/VolInfo: Show encapsulation sectionsKonstantin Aladyshev2022-07-271-0/+6
| | | | | | | | | | | Currently there is no labels for start and end of the encapsulation sections. Therefore it is not possible to see where the encapsulation section ends and another section starts. Add labels for start and end of encapsulation sections to fix the issue. Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools/VolInfo: Correct EFI_SECTION_VERSION displayKonstantin Aladyshev2022-07-241-2/+9
| | | | | | | | | | | - Correct typo in print statement, - "BuildNumber" field is UINT16, therefore it needs "0x%04X" format modifier, - "VersionString" field is CHAR16, therefore the input data should be processed to be displayed with "%s" printf modifier. Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools/VolInfo: Increase define for highest section valueKonstantin Aladyshev2022-07-241-2/+2
| | | | | | | | | | | Currently sections with unknown types are displayed as `EFI_SECTION_SMM_DEPEX` which is wrong. Increase the highest value for the section type to 0x1C for correct parsing. Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Reviewed-by: Yuwei Chen<yuwei.chen@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools/VolInfo: Correct alignment attributes displayKonstantin Aladyshev2022-07-241-102/+96
| | | | | | | | | | | Alignment attribute is not a bitmask, therefore we need to compare field value with all alignment defines. Remove duplicate print statements. Unify indent with other attribute print statements. Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Reviewed-by: Yuwei Chen <yuwei.chen@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools/VolInfo: Fix spelling mistakeMichael D Kinney2020-08-051-1/+1
| | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2349 Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Check the fread function and avoid dead loopLiu, Zhiguang2019-05-101-2/+9
| | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1789 If the input file is not a valid file, it may cause dead loop, because the return of fread function is not checked. Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Replace BSD License with BSD+Patent LicenseMichael D Kinney2019-04-094-28/+4
| | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools VolInfo: Fix XCODE5 build issueLiming Gao2019-01-161-1/+1
| | | | | | | | | | | XCODE5 reports warning "equality comparison with extraneous parentheses". Remove extraneous parentheses around the comparison to silence this warning. This issue is caused by commit 8daa4278e80c70e6caabc525cd122744488253f5. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Feng Bob C <bob.c.feng@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Remove unused logic from C toolsFeng, Bob C2019-01-141-1/+1
| | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1350 Remove IA64 support from BaseTools C code. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com>
* BaseTools: Clean up source filesLiming Gao2018-07-091-17/+17
| | | | | | | | | | | 1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools/VolInfo: Update EFI FV FILETYPES for new MM types.Ezra Godfrey2018-06-061-0/+8
| | | | | | | | | | Add support for the following types to VolInfo: EFI_FV_FILETYPE_MM_STANDALONE EFI_FV_FILETYPE_MM_CORE_STANDALONE Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ezra Godfrey <egodfrey.qdt@qualcommdatacenter.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* BaseTools GNUmakefile: Remove HOST_ARCH in every tool MakefileLiming Gao2018-02-061-2/+1
| | | | | | | HOST_ARCH has been moved into the common header.makefile Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Replace ARCH with HOST_ARCH in C Makefile to avoid conflictLiming Gao2017-11-301-1/+1
| | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=793 ARCH is too generic. It may cause confuse of target arch or host arch. To be clarified, replace it with HOST_ARCH in BaseTools C Makefile. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools/VolInfo: Update OPENSSL_PATH to support space charactersYonghong Zhu2017-04-271-4/+9
| | | | | | | | | Update OPENSSL_PATH handling to support space characters in the Path. 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>
* BaseTools/VolInfo: Fix VS2010/VS2012 build failureHao Wu2017-03-071-1/+3
| | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=417 The commit makes the following refinements in VolInfo source codes to avoid VS2010/VS2012 build failure: 1. Refines coding style for function 'CombinePath' to declare local variables at the beginning of the function block. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools/GenVtf & VolInfo: Fix build fail for 'snprintf' not definedHao Wu2017-03-011-21/+3
| | | | | | | | | | | Function snprintf() is not supported in Visual Studio 2013 or older version. The commit replaces the use of snprintf() with sprintf() to avoid build failure for VS compilers. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools/VolInfo: Fix printf issue using '%ls' in format stringHao Wu2016-12-051-1/+68
| | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=257 For GCC compilers, when building with option '-fshort-wchar', wide char string format '%ls' does not work properly for printf() function. The string specified by '%ls' will not be printed. This commit avoids using '%ls' for printf() function and converts the wide char string to char string for printing. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/VolInfo: Add definitions for command format stringsHao Wu2016-11-082-8/+8
| | | | | | | | Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/VolInfo: Provide string width in '%s' specifier in format stringHao Wu2016-11-081-1/+30
| | | | | | | | | | | | | | String width is not specified for '%s' specifier in the format string for scanf functions. This commit now specifies the string length for '%s' in format strings according to the size of receiving buffers. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/VolInfo: Fix file handles not being closedHao Wu2016-11-081-0/+1
| | | | | | | | Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/VolInfo: Fix potential memory leakHao Wu2016-11-081-1/+15
| | | | | | | | Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/VolInfo: Fix parameter format mismatch in printf functionsHao Wu2016-11-081-1/+1
| | | | | | | | | | | Format specification '%ls' for printf expects type 'wchar_t *', cast the type of the parameter to 'wchar_t *' to keep them matched. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/VolInfo: Avoid possible NULL pointer dereferenceHao Wu2016-11-081-4/+42
| | | | | | | | Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/VolInfo: Update to handle PE image with .code section onlyYonghong Zhu2016-04-151-7/+0
| | | | | | | | | | rebase the image which only has .code section, but no other section, the tool return error. this patch fix this bug to support it. 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>
* BaseTools/VolInfo: generate HASH value for each PE imageYonghong Zhu2016-04-121-1/+374
| | | | | | | | | | VolInfo Tool add new option --hash to use openssl to generate hash value for each PE image. If the image base address is not zero, we will rebase its base address to zero before generate hash value. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Change source files to DOS format.Liming Gao2016-03-101-6/+6
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools/VolInfo: add some generic optionsYonghong Zhu2016-02-181-47/+94
| | | | | | | | | | The Help information provided by VolInfo does not follow the EDK II Tools Design doc, so this patch update the help text and add the generic options: -d, -v, -q, -s. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools-Source: Update displayed version informationedk2 dev2016-02-161-10/+16
| | | | | | | | | | | | | Standardize the --version and --help text command-line options Updated tools to correctly display the Build number when using command-line option --version and exit successfully after termination. Ecc was also updated to print informational messages after the options are parsed. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Larry Hauch <larry.hauch@intel.com> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
* BaseTools: Fix two warning reported in the make phase.Yonghong Zhu2015-11-171-2/+17
| | | | | | | | | | | when we make BaseTools, it report warnings about VfrError.cpp and VolInfo, so this patch fix this warning. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18851 6f19259b-4bc3-4df7-8a09-765794883524
* License header updated to match correct format.Yingke Liu2014-08-282-18/+4
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yingke Liu <yingke.d.liu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15971 6f19259b-4bc3-4df7-8a09-765794883524
* Updated GenBootSector, GenCrc32 and GenPage to remove duplicate “Build” ↵lhauch2014-08-271-2/+3
| | | | | | | | | | | | word in the version output, updated the minor number and copyright as needed. Updated the VolInfo version output to remove the tool description from the --version output string. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: lhauch <larry.hauch@intel.com> Reviewed-by: Gao, Liming <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15924 6f19259b-4bc3-4df7-8a09-765794883524
* There is a limitation on WINDOWS OS for the length of entire file path ↵Hess Chen2014-08-151-1/+1
| | | | | | | | | | can’t be larger than 255. There is an OS API provided by Microsoft to add “\\?\” before the path header to support the long file path. Enable this feature on basetools. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yingke Liu <yingke.d.liu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15809 6f19259b-4bc3-4df7-8a09-765794883524
* Sync BaseTool trunk (version r2670) into EDKII BaseTools. Gao, Liming2014-07-011-32/+61
| | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gao, Liming <liming.gao@intel.com> Reviewed-by: Liu, Yingke D (yingke.d.liu@intel.com) git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15605 6f19259b-4bc3-4df7-8a09-765794883524
* Sync BaseTool trunk (version r2649) into EDKII BaseTools.Gao, Liming2014-01-272-1867/+1867
| | | | | | | Signed-off-by: Gao, Liming <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15188 6f19259b-4bc3-4df7-8a09-765794883524
* Sync BaseTool trunk (version r2599) into EDKII BaseTools.Liming Gao2013-08-231-1/+1
| | | | | | | | Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Heshen Chen <chen.heshen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14591 6f19259b-4bc3-4df7-8a09-765794883524
* Sync BaseTool trunk (version r2423) into EDKII BaseTools. The change mainly ↵lgao42011-11-251-3/+3
| | | | | | | | | | | | | | | includes: 1. Fix !include issues 2. Fix Trim to skip the postfix 'U' for hexadecimal and decimal numbers 3. Fix building error C2733 when building C++ code. 4. Add GCC46 tool chain definition 5. Add new RVCT and RVCTLINUX tool chains Signed-off-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12782 6f19259b-4bc3-4df7-8a09-765794883524
* Sync BaseTools Trunk (version r2387) to EDKII main trunk.lgao42011-10-291-1/+0
| | | | | | | Signed-off-by: lgao4 Reviewed-by: gikidy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12602 6f19259b-4bc3-4df7-8a09-765794883524
* Sync BaseTools Branch (version r2321) to EDKII main trunk. lgao42011-09-181-1/+3
| | | | | | | | Signed-off-by: lgao4 Reviewed-by: gikidy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12372 6f19259b-4bc3-4df7-8a09-765794883524
* Sync EDKII BaseTools to BaseTools project r1971lgao42010-05-184-13/+20
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10502 6f19259b-4bc3-4df7-8a09-765794883524
* Sync EDKII BaseTools to BaseTools project r1913.qhuang82010-03-042-22/+46
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10193 6f19259b-4bc3-4df7-8a09-765794883524
* Sync EDKII BaseTools to BaseTools project r1903.lgao42010-02-281-2/+2
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10123 6f19259b-4bc3-4df7-8a09-765794883524
* Sync tool code to BuildTools project r1783.lgao42009-12-291-2/+2
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9623 6f19259b-4bc3-4df7-8a09-765794883524