summaryrefslogtreecommitdiff
path: root/BaseTools
AgeCommit message (Collapse)AuthorFilesLines
2025-11-03BaseTools/GenFW: RISC-V: Detect Zicfilp extensionTuan Phan2-0/+8
Parse the ELF file for RISC-V Zicfilp extension support to identify forward control flow integrity (FCFI) features. Signed-off-by: Tuan Phan <tphan@ventanamicro.com>
2025-10-30BaseTools: Remove DXE_SAL_DRIVERSathya Ravichandran17-45/+20
The DXE_SAL_DRIVER module type was introduced to support Itanium (IPF) platforms. Since support for Itanium processors has been dropped, the instances of DXE_SAL_DRIVER have been removed. Ref: [3cb0a311cb7e747d7be5c5076d0fff76ad256d2b] Cc: Sachin Ganesh <sachinganesh@ami.com> Signed-off-by: Sathya Ravichandran <sathyar@ami.com>
2025-10-21BaseTools:Remove deprecated ast.Str import for Python 3.14 compatibilityAshraf Ali S1-1/+0
- Str is not being used in FvHeader.py - Removed import of ast.Str as it was removed in Python 3.14. - Ensures compatibility with Python 3.14 and later. - https://docs.python.org/3/whatsnew/3.14.html#id9 This addresses ImportError caused by removal of deprecated AST classes including ast.Str. Signed-off-by: Ashraf Ali S <ashraf.ali.s@intel.com>
2025-10-21BaseTools: Add Quoting to Python Path on WindowsNate DeSimone1-6/+7
Building the C BaseTools using Clang on a Windows system that has the Python interpreter installed to a path that contains spaces (for example C:\Program Files\Python314\python.exe) currently fails. This change adds quoting to fix that issue. Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
2025-10-17BaseTools/Scripts: KEEP .prmexportdescriptor data sectionsMichael D Kinney1-0/+1
Update GCC linker script to always keep .prmexportdescriptor sections and merge them into the .data section. The .prmexportdescriptor section is only used by PRM modules for the PRM Export Descriptor Structure that must be kept in the final image to support adding the PRM Export Descriptor Structure and its associated PRM Handlers APIs to a PE/COFF DLL Export section. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
2025-10-17BaseTools/Source/C/GenFw: Add --image-version optionMichael D Kinney1-0/+68
Add --image-version option that takes a version value of the form MMMM.mmmm where MMMM and mmmm are decimal values < 65536. The MMMM and mmmm values are used to set the PE/COFF optional header fields MajorImageVersion and MinorImageVersion. If MMMM or mmmm are larger than 65535, then generate Error() condition. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
2025-10-17BaseTools/Source/C/GenFw: Add no symbols check to --prmMichael D Kinney1-12/+18
When --prm is specified, a search for the symbol with the name PRM_MODULE_EXPORT_DESCRIPTOR_NAME is performed. If the symbol is not found, then GENFW generates an exception due to a loop with a terminal count of -1. Update logic to not search for PRM Handler symbols if the PRM_MODULE_EXPORT_DESCRIPTOR_NAME was not found and add an Error() message when --prm is specified and PRM_MODULE_EXPORT_DESCRIPTOR_NAME was not found. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
2025-10-16BaseTools/FMMT: Fix errors when operating the FV with CRC32 sectionPhil Noh1-6/+1
Currently the FMMT tool supports CRC32 GUID section (Ref. GuidTools.py). But it is found that there are errors for the FV with CRC32 section. For example, the errors are checked on the following commands. --v : Show FV information except for the FV --a : Show "Target Fv not found!!!" when adding an FFS file to the FV --d : Show "Target Ffs not found!!!" when deleting an FFS file in the FV They are caused by the mismatch for CRC32 section data between the FMMT and GenCrc32 tools. The FMMT tool returns CRC32 section data without CRC checksum field (4 bytes). The GenCrc32 tool (with -d option, verify CRC32 value for the input file) requires CRC32 section data including CRC checksum field (4 bytes). Fix the issue through adjusting the section data to include CRC checksum field. Currently DataOffset field for CRC32 GUID section is reported as 0x1C differently (GUID Section header length: 0x18 + Checksum field: 0x4). Instead of DataOffset field that includes CRC checksum field, configure the section data based on the offset from section header length (0x18) that was previously calculated. This update enables GUID sections to use the same offset consistently. Signed-off-by: Phil Noh <Phil.Noh@amd.com>
2025-10-16BaseTools/build.py: set BUILD_TIME_EPOCH if not already in environmentLeif Lindholm1-1/+22
Set BUILD_TIME_EPOCH to the current UTC timestamp if not already present in the environment. Use the resulting value to print the "Build start time:" message. Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
2025-10-16BaseTools/build.py: language cleanup around CheckEnvVariableLeif Lindholm1-3/+3
The function CheckEnvVariable in fact checks several environment variables. And the comment at its invocation enumerates a specific set of variables, which defeats half the point of abstracting it out into a helper function. Rename the function to the plural form and turn the comment into a list of examples. Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
2025-10-10BaseTools: Disable GCC relax on LoongArchChao Li1-3/+3
It might appear some odd problems if enable GCC relax. Disabling it can avoid these problems. Signed-off-by: Chao Li <lichao@loongson.cn> Cc: Rebecca Cran <rebecca@bsdio.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Guillermo Antonio Palomino Sosa <guillermo.a.palomino.sosa@intel.com> Cc: Yuwei Chen <yuwei.chen@intel.com> Cc: Poncho Figueroa <poncho.figueroa.esqueda@intel.com>
2025-09-29BaseTools/Plugin/HostBasedUnitTestRunner: Add CLANG supportMichael D Kinney1-2/+141
Update HostBasedUnitTestRunner to generate merged Cobertura coverage.xml output file using CLANG code coverage data from -fprofile-instr-generate -fcoverage-mapping options. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
2025-09-26BaseTools: Remove ARM32 SupportOliver Smith-Denny33-1143/+57
edk2 is dropping support for the ARM32 architecture. This commit removes ARM32 code from BaseTools. Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2025-09-25BaseTools: Align Pre-Processor Macros for CLANGPDB and CLANGDWARFNate DeSimone1-1/+1
Update the CLANGPDB toolchain to define the __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__, and __MINGW32__ macros with values that match the pre-defined values seen when using the x86_64-unknown-windows-gnu target triple. This minimizes the differences in pre-processor macros between the CLANGPDB and CLANGDWARF targets. Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
2025-09-22BaseTools/Conf: Add support for C++ compiler flagsMichael D Kinney1-3/+21
Update build rules to split C file rules from C++ file rules and introduce CXX_FLAGS to provide compiler options that are only used to compile C++ files. This is required because the compiler options to specify the C++ standard generate errors when used to compile C files. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
2025-09-22BaseTools/Conf: Remove -nostdlib -nostdlibinc for CLANGMichael D Kinney1-1/+1
Remove -nostdlib and -nostdlibinc from CC_FLAGS for CLANG builds to support using CLANGPDB and CLANGDWARF for modules of type HOST_APPLICATION that require use of standard C libs. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
2025-09-22BaseTools/Conf: Remove -imacros from GCC_ASM_FLAGSMichael D Kinney1-1/+1
All ASM files are processed using PP_FLAGS that includes AutoGen.h. Remove redundant -imacros AutoGen.h option from GCC_ASM_FLAGS. This also removes warnings generated in CLANG builds when an ASM file is processed and an AutoGen.h file is not present. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
2025-09-22BaseTools/Conf: Make ASLCC_FLAGS independent of CC_FLAGSMichael D Kinney2-4/+9
Update ASLCC_FLAGS in tools_def.template too provide all the options required to compile ACPI Table source files without any dependencies on CC_FLAGS. This allows CC_FLAGS to only be used to compile C source files and for ASLCC_FLAGS to only be used to compile ACPI Tables source files. No changes are required for the MSFT or XCODE tool chain families. Only the GCC tool chain family requires updates to the ASLCC_FLAGS in tools_def.template along with updates to build_rule.template to not use CC_FLAGS for ACPI Table rules. This change is required to avoid use of ASAN and code coverage flags when building ACPI Table source files that break CLANGDWARF builds of ACPI Table source files. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
2025-09-22BaseTools/Conf: USER_DEFINED/HOST_APPLICATION CLANG supportMichael D Kinney1-1/+1
* Add CLANGDWARF support to USER_DEFINED module type rules. * Add CLANGDWARF support to HOST_APPLICATION module type rules. * Add missing -c option to CLANGPDB HOST_APPLICATION module type rules Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
2025-09-22BaseTools/Conf: Fix build_rule.template for CLANGDWARFMichael D Kinney1-2/+2
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
2025-09-17BaseTools/VfrCompile: Fix compiler warning C++17 does not allow registerVishal Oliyil Kunnil3-13/+13
The register keyword was deprecated in C++11 and removed in C++17, which causes multiple compiler warnings when building VfrCompile: "ISO C++17 does not allow ‘register’ storage class specifier". Resolve the warnings by removing instances of register keyword. Signed-off-by: Vishal Oliyil Kunnil <vishalo@qti.qualcomm.com>
2025-09-05BaseTools: PatchCheck.py: Allow MultiPkg Commits For Subject CheckOliver Smith-Denny1-3/+9
Subject Check was added to PatchCheck.py to enforce that if a package was touched in a commit that it be referenced in the subject line. However, this is impractical for multipackage commits with many packages, e.g. when stack cookies were added, every package was touched, but in a rote way, and it is not reasonable to put every package in a subject line. This updates PatchCheck.py to check if ignore_multi_package is set and if so only require that package names be included in the subject if there are fewer than 3 packages touched. Otherwise, PatchCheck will require the message to start with `Global:` to indicate it touches more than 3 packages. Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2025-09-05BaseTools/PatchCheck.py: Check CI Options Before ParsingOliver Smith-Denny1-1/+1
PatchCheck.py currently parses the CI options as the last step it does before reporting results. This means that the other checking logic cannot use any of the CI options that are passed in. This updates the order of operations to process CI options before running other checks so that they can be used in performing checks. Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2025-09-04BaseTools: Update architectures in target.templateGao Qihang1-2/+2
- Remove IPF since it's no longer supported in edk2. - Rename AArch64 to AARCH64 for greater accuracy. - Add newly supported RISCV64 and LOONGARCH64. Cc: Chao Li <lichao@loongson.cn> Signed-off-by: Gao Qihang <gaoqihang@loongson.cn>
2025-08-25BaseTools: DSC: fix processing !include in multiarch subsectionsSergii Dmytruk1-1/+5
Commit f0a2015373 ("UefiPayloadPkg: Add AARCH64 support") changed `[Components.X64]` to `[Components.X64, Components.AARCH64]` which resulted in the following code within that section to not work as expected (the code wasn't there, just providing a real world example that uncovered the issue): [Components.X64, Components.AARCH64] FmpDevicePkg/FmpDxe/FmpDxe.inf { ... <PcdsFixedAtBuild> !include .../...PcdFmpDevicePkcs7CertBufferXdr.inc ... } At the same time `[Components.X64]` or even `[Components.AARCH64, Components.X64]` (notice the swapped order) worked fine for X64 target. The cause of the issue turned out to be skipping includes inside `_PostProcess()` method of `DscParser` class. This method processes list of items stored in a database filled on the first pass through a DSC file in `Start()` method. One of the fields stored in each row of a table is link to a parent object (owner). A section like `[Components.X64, Components.AARCH64]` creates two objects and all of its subelements are duplicated for both X64 and AARCH64. This was not happening for !include statement in the example above. Because `_PostProcess()` contracted a sequence of !include objects disregarding their owner, it did not create instance for each of the requested targets. Codewise, `self._ContentIndex` was incremented more than once, while `__ProcessDirective()` method (invoked indirectly as `Processer[self._ItemType]()`) queried owner of the current directive as: if self._InSubsection: Owner = self._Content[self._ContentIndex - 1][8] else: # not taken in this case This is why order of targets made a difference, only the last was fully initialized in this case. An alternative fix is completely dropping merging of !include directives, but hard to say whether it still has some utility (the code is complex, hard to follow and barely documented). Safer to keep it, in the worst case it doesn't do anything now. Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2025-08-22BaseTools/VfrCompile: Add check for setting string default to numberGao Qihang1-2/+3
It's illegal that string default is numeric type in vfr string definition. This patch add a check to the illegal behavior. If numeric string default is encountered, throw a invalid parameter error to break VfrCompile. Cc: Chao Li <lichao@loongson.cn> Signed-off-by: Gao Qihang <gaoqihang@loongson.cn>
2025-07-30BaseTools: Fix FMMT FvHandler Padding operation issuesecurity-advisory/cve-2025-xxxxx/advisoryYuwei Chen1-4/+22
When using the FMMT FvHandler function, new padding size should be calculated correctly comparing with origin ffs and new ffs, else it will cause the binary size changes. This patch is used to fix the bug. Signed-off-by: Yuwei Chen <yuwei.chen@intel.com>
2025-07-23BaseTools/tools_def: Enable frame pointer for RISC-VTuan Phan1-1/+1
Add -fno-omit-frame-pointer to RISC-V targets to ensure frame pointers are preserved, supporting stack backtraces for debugging. Signed-off-by: Tuan Phan <tphan@ventanamicro.com>
2025-07-22BaseTools/tools_def: Always link with -Wl,-z,notext for BFD/LLDJames Le Cuirot1-10/+11
Commit a257988f590ba90dd8394dd6bc7014ae9d814a08 added -Wl,-z,notext, but only when linking for IA32/X64 with LLD. BFD can also be configured to either warn or error when text relocations are detected. It does not check at all by default, but Gentoo Linux tells it to warn in its regular configuration and tells it to error in its hardened configuration. Commit 14cb48b0a053b44c5a6bcc89cbbbf86ac78c7820 made linker warnings fatal in all BFD cases. At least the AARCH64 and IA32/X64 code does include text relocations, so this now fails to build on Gentoo Linux. We should therefore always use -Wl,-z,notext. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
2025-07-22BaseTools/tools_def: Make linker warnings fatal for RISCV + LOONGARCH64James Le Cuirot1-3/+3
For consistency, and as before, for GCC5 only. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
2025-07-22BaseTools/tools_def: Drop unused GCC IA32/X64 flag variablesJames Le Cuirot1-12/+9
These haven't been used since before 2d07607d8b1a0710ba7379f8ee6c11dae1, when UNIXGCC support was dropped. The recent change in 14cb48b0a053b44c5a6bcc89cbbbf86ac78c7820 to make linker warnings fatal was therefore ineffective for these architectures. As requested, also make linker warnings fatal for GCC5 only. The last release made them fatal for AARCH64 on GCC48/GCC49, but it seems likely no one has actually tested that yet. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
2025-07-10BaseTools/toolsetup.bat: Set IASL_PREFIX when using Mingw-w64 on WindowsNate DeSimone2-1/+17
If IASL_PREFIX is not already defined, then edksetup.bat should set it. This unifies the behavior between Visual Studio and Mingw-w64. Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
2025-07-10BaseTools/tools_def: Use MSVC ABI for CLANGPDB TargetsNate DeSimone1-3/+3
Update the CLANGPDB toolchain configuration to use MSVC ABI targets and retain frame pointers in generated code. This improves compatibility with the Microsoft Debug Interface Access (DIA) SDK and improves debuggability with any debugger that uses the Microsoft PDB parser, for example the Visual Studio debugger or windbg. Without these changes, code generated by the Clang compiler will have a mix of calling conventions. With the current configuration, any function declared with EFIAPI will use the Microsoft x64 calling convention. However, the default calling convention will be the SysV x64 calling convention. This mixing of calling conventions prevents debuggers from decoding the call stack. With these changes, only the Microsoft x64 calling convention will be used. These modifications enable debuggers to properly parse and display call stacks on binaries built with the CLANGPDB toolchain. The changes include: - Switch from GNU ABI target (*-unknown-windowsl-gnu) to MSVC ABI targets (*-pc-windows-msvc) for both IA32 and X64 architectures. - Remove -fseh-exceptions as not supported. - Add -fno-omit-frame-pointer as required for call stack. - Undefine the _MSC_VER macro, and define the __GNUC__ macro, so that pre-processor conditionals will continue to function as expected. Co-authored-by: Muhammad Mustafa <muhammad.mustafa@intel.com> Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
2025-07-08BaseTools: Remove UGA supportGuoMinJ2-211/+0
The Universal Graphics Adapter (UGA) is a graphic abstraction. The UGA I/O and Draw protocols are deprecated since UEFI 2.0 was introduced. Cf. the UEFI spec v2.9: "Appendix L - EFI 1.10 Protocol Changes and Deprecation List" section L.2 "Deprecated Protocols" Remove the UGA support. Signed-off-by: GuoMinJ <newexplorerj@gmail.com> Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2025-07-08BaseTools: Improve report generation for Nested Fvs.Aaron Pop1-7/+15
Build report would not detect a nested FV if the nested FV was not in a subsection of an FFS statement. Modify the build report to better handle some of the variations of nested FVs. Failing Example: [Fv.FvName1] INF <path to some driver>.inf [Fv.FvName0] FILE FV_IMAGE = B25ACDEF-39CE-4FA5-B50A-33E24DB1BDDF { SECTION FV_IMAGE = FvName1 } Working Example: [Fv.FvName1] INF <path to some driver>.inf [Fv.FvName0] FILE FV_IMAGE = DA04F6BF-A0FD-47EC-928B-5101A6C95026 { SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE { SECTION FV_IMAGE = FvName1 } } Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
2025-07-04BaseTools: Fix the spelling or typoAbdul Lateef Attar1-1/+2
Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
2025-07-02BaseTools/PatchCheck.py: permit at least 20 characters after ':'Leif Lindholm1-2/+7
Commit b55530ad4460 ("BaseTools/PatchCheck.py: verify commit message lists package(s)") introduced a check for the requirement to enumerate all modified packages in the commit subject line. But it did leave the maximum line length at 75 characters (for non-CVE commits), which can get a bit cramped for changes to several packages. Introduce a new arbitrary "at least 20 characters after the :" limit. Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
2025-07-02BaseTools/PatchCheck.py: clean up subject line length handlingLeif Lindholm1-10/+8
Use a temporary variable for max subject line length and log result of test in one location. Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
2025-07-02BaseTools/PatchCheck.py: drop redundant line count checkLeif Lindholm1-1/+1
Before doing the subject line length check, the script checks that the number of lines in the commit message (including subject) is not less than or equal to zero - and returns if it is. However, then the test for whether the subject line starts with a CVE tag inexplicably also checks for whether the number of lines are greater than or equal to one. This is just clutter, so drop it. Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
2025-07-01BaseTools: WorkSpace: Remove unnecessary codePierre Gondois7-144/+0
Running the vulture tool on the WorkSpace folder gave the following report. Remove the unnecessary code. - Workspace/BuildClassObject.py:148: unused method 'IsSimpleTypeArray' (60% confidence) - Workspace/BuildClassObject.py:337: unused method 'SetPcdMode' (60% confidence) - Workspace/BuildClassObject.py:612: unused attribute 'DscSpecification' (60% confidence) - Workspace/DscBuildData.py:451: unused property 'DscSpecification' (60% confidence) - Workspace/DscBuildData.py:1253: unused method 'GetBuildOptionsByPkg' (60% confidence) - Workspace/DscBuildData.py:2064: unused method 'GetStarNum' (60% confidence) - Workspace/DscBuildData.py:3613: unused method 'AddModule' (60% confidence) - Workspace/DscBuildData.py:3650: unused method 'AddPcd' (60% confidence) - Workspace/InfBuildData.py:117: unused attribute '_TailComments' (60% confidence) - Workspace/InfBuildData.py:126: unused attribute '_BinaryModule' (60% confidence) - Workspace/MetaDataTable.py:114: unused method 'IsIntegral' (60% confidence) - Workspace/MetaDataTable.py:218: unused method 'GetFileTimeStamp' (60% confidence) - Workspace/MetaDataTable.py:230: unused method 'SetFileTimeStamp' (60% confidence) - Workspace/MetaDataTable.py:298: unused method 'GetCrossIndex' (60% confidence) - Workspace/MetaFileParser.py:161: unused attribute '_FileDir' (60% confidence) - Workspace/MetaFileParser.py:1187: unused method '_DecodeCODEData' (60% confidence) - Workspace/MetaFileParser.py:1796: unused attribute '_RestofValue' (60% confidence) - Workspace/MetaFileTable.py:31: unused attribute '_NumpyTab' (60% confidence) - Workspace/WorkspaceDatabase.py:136: unused class 'TransformObjectFactory' (60% confidence) - Workspace/WorkspaceDatabase.py:159: unused attribute 'TransformObject' (60% confidence) Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2025-07-01BaseTools: UPT/Library: Remove unnecessary codePierre Gondois7-1155/+0
Running the vulture tool on the UPT/Library folder gave the following report. Remove the unnecessary code. - UPT/Library/CommentGenerating.py:50: unused function 'GenGenericComment' (60% confidence) - UPT/Library/CommentGenerating.py:172: unused function 'GenInfPcdTailComment' (60% confidence) - UPT/Library/CommentGenerating.py:185: unused function 'GenInfProtocolPPITailComment' (60% confidence) - UPT/Library/CommentGenerating.py:203: unused function 'GenInfGuidTailComment' (60% confidence) - UPT/Library/Misc.py:504: unused class 'MergeCommentDict' (60% confidence) - UPT/Library/Misc.py:527: unused function 'GenDummyHelpTextObj' (60% confidence) - UPT/Library/ParserValidate.py:110: unused function 'IsValidInfComponentType' (60% confidence) - UPT/Library/ParserValidate.py:122: unused function 'IsValidToolFamily' (60% confidence) - UPT/Library/ParserValidate.py:134: unused function 'IsValidToolTagName' (60% confidence) - UPT/Library/ParserValidate.py:465: unused function 'IsValidBuildNumber' (60% confidence) - UPT/Library/ParserValidate.py:478: unused function 'IsValidDepex' (60% confidence) - UPT/Library/ParserValidate.py:546: unused function 'IsValidVersionString' (60% confidence) - UPT/Library/ParserValidate.py:721: unused function 'CheckUTF16FileHeader' (60% confidence) - UPT/Library/Parsing.py:52: unused function 'GetBuildOption' (60% confidence) - UPT/Library/Parsing.py:100: unused function 'GetLibraryClassOfInf' (60% confidence) - UPT/Library/Parsing.py:150: unused function 'GetPcd' (60% confidence) - UPT/Library/Parsing.py:177: unused function 'GetFeatureFlagPcd' (60% confidence) - UPT/Library/Parsing.py:201: unused function 'GetDynamicDefaultPcd' (60% confidence) - UPT/Library/Parsing.py:227: unused function 'GetDynamicHiiPcd' (60% confidence) - UPT/Library/Parsing.py:254: unused function 'GetDynamicVpdPcd' (60% confidence) - UPT/Library/Parsing.py:277: unused function 'GetComponent' (60% confidence) - UPT/Library/Parsing.py:392: unused function 'GetExec' (60% confidence) - UPT/Library/Parsing.py:416: unused function 'GetComponents' (60% confidence) - UPT/Library/Parsing.py:532: unused function 'GetSource' (60% confidence) - UPT/Library/Parsing.py:581: unused function 'GetGuidsProtocolsPpisOfInf' (60% confidence) - UPT/Library/Parsing.py:595: unused function 'GetGuidsProtocolsPpisOfDec' (60% confidence) - UPT/Library/Parsing.py:645: unused function 'GetPcdOfInf' (60% confidence) - UPT/Library/Parsing.py:682: unused function 'GetPcdOfDec' (60% confidence) - UPT/Library/Parsing.py:739: unused function 'InsertSectionItems' (60% confidence) - UPT/Library/Parsing.py:776: unused function 'GenMetaDatSectionItem' (60% confidence) - UPT/Library/StringUtils.py:87: unused function 'GetLibraryClassesWithModuleType' (60% confidence) - UPT/Library/StringUtils.py:107: unused function 'GetDynamics' (60% confidence) - UPT/Library/StringUtils.py:350: unused function 'GetMultipleValuesOfKeyFromLines' (60% confidence) - UPT/Library/StringUtils.py:396: unused function 'GetSingleValueOfKeyFromLines' (60% confidence) - UPT/Library/StringUtils.py:463: unused function 'PreCheck' (60% confidence) - UPT/Library/StringUtils.py:675: unused function 'StringArrayLength' (60% confidence) - UPT/Library/StringUtils.py:718: unused function 'IsHexDigit' (60% confidence) - UPT/Library/UniClassObject.py:86: unused function 'UniToStr' (60% confidence) - UPT/Library/UniClassObject.py:227: unused attribute 'StringNameByteList' (60% confidence) - UPT/Library/UniClassObject.py:237: unused attribute 'StringNameByteList' (60% confidence) - UPT/Library/UniClassObject.py:377: unused method 'GetIncludeFile' (60% confidence) - UPT/Library/UniClassObject.py:947: unused method 'FindStringValue' (60% confidence) - UPT/Library/UniClassObject.py:957: unused method 'FindByToken' (60% confidence) - UPT/Library/UniClassObject.py:1022: unused method 'ReadIncludeUNIfile' (60% confidence) - UPT/Library/StringUtils.py:718: unused function 'IsHexDigit' (60% confidence) - UPT/Library/Xml/XmlRoutines.py:176: unused function 'XmlElementList' (60% confidence) - UPT/Library/Xml/XmlRoutines.py:202: unused function 'XmlNodeName' (60% confidence) Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2025-07-01BaseTools: UPT/Xml: Remove unnecessary codePierre Gondois1-1/+0
Running the vulture tool on the UPT/Xml folder gave the following report. Remove the unnecessary code. - UPT/Xml/CommonXml.py:585: unused attribute 'LangDefsList' (60% confidence) Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2025-07-01BaseTools: UPT/PomAdapter: Remove unnecessary codePierre Gondois1-47/+0
Running the vulture tool on the UPT/PomAdapter folder gave the following report. Remove the unnecessary code. - UPT/PomAdapter/DecPomAlignment.py:898: unused method 'ShowPackage' (60% confidence) Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2025-07-01BaseTools: UPT/Parser: Remove unnecessary codePierre Gondois3-72/+0
Running the vulture tool on the UPT/Parser folder gave the following report. Remove the unnecessary code. - UPT/Parser/InfAsBuiltProcess.py:223: unused function 'GetInfsFromWorkSpace' (60% confidence) - UPT/Parser/InfAsBuiltProcess.py:237: unused function 'GetGuidVerFormLibInstance' (60% confidence) - UPT/Parser/InfParserMisc.py:211: unused attribute 'InfPeiDepexSection' (60% confidence) - UPT/Parser/InfParserMisc.py:212: unused attribute 'InfDxeDepexSection' (60% confidence) - UPT/Parser/InfParserMisc.py:213: unused attribute 'InfSmmDepexSection' (60% confidence) - UPT/Parser/InfSectionParser.py:231: unused attribute 'InfPeiDepexSection' (60% confidence) - UPT/Parser/InfSectionParser.py:232: unused attribute 'InfDxeDepexSection' (60% confidence) - UPT/Parser/InfSectionParser.py:233: unused attribute 'InfSmmDepexSection' (60% confidence) Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2025-07-01BaseTools: Table: Remove unnecessary codePierre Gondois3-36/+0
Running the vulture tool on the Table folder gave the following report. Remove the unnecessary code. - Table/Table.py:88: unused method 'GenerateID' (60% confidence) - Table/TableDataModel.py:83: unused method 'GetCrossIndex' (60% confidence) - Table/TableEotReport.py:66: unused method 'GetMaxID' (60% confidence) Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2025-07-01BaseTools: GenFds: Remove unnecessary codePierre Gondois6-63/+0
Running the vulture tool on the GenFds folder gave the following report. Remove the unnecessary code. - GenFds/Fd.py:146: unused method 'GenFlashMap' (60% confidence) - GenFds/FdfParser.py:1539: unused attribute 'BaseAddressPcd' (60% confidence) - GenFds/FdfParser.py:1556: unused attribute 'SizePcd' (60% confidence) - GenFds/FdfParser.py:2394: unused attribute 'CurrentLineNum' (60% confidence) - GenFds/FdfParser.py:2395: unused attribute 'CurrentLineContent' (60% confidence) - GenFds/FdfParser.py:2653: unused attribute 'CurrentLineNum' (60% confidence) - GenFds/FdfParser.py:2654: unused attribute 'CurrentLineContent' (60% confidence) - GenFds/FdfParser.py:3229: unused attribute 'CreateFile' (60% confidence) - GenFds/FfsFileStatement.py:36: unused attribute 'CurrentLineNum' (60% confidence) - GenFds/FfsFileStatement.py:37: unused attribute 'CurrentLineContent' (60% confidence) - GenFds/FfsInfStatement.py:68: unused attribute 'CurrentLineNum' (60% confidence) - GenFds/FfsInfStatement.py:69: unused attribute 'CurrentLineContent' (60% confidence) - GenFds/GenFds.py:68: unused attribute 'LibDir' (60% confidence) - GenFds/GenFds.py:557: unused method 'GetFvBlockSize' (60% confidence) Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2025-07-01BaseTools: FMTT: Remove unnecessary codePierre Gondois4-51/+1
Running the vulture tool on the FMTT folder gave the following report. Remove the unnecessary code. - FMMT/core/BinaryFactoryProduct.py:132: unused attribute 'ROffset' (60% confidence) - FMMT/core/BinaryFactoryProduct.py:176: unused attribute 'ROffset' (60% confidence) - FMMT/core/BinaryFactoryProduct.py:229: unused attribute 'ROffset' (60% confidence) - FMMT/core/BinaryFactoryProduct.py:365: unused class 'ElfSectionProduct' (60% confidence) - FMMT/core/BinaryFactoryProduct.py:369: unused method 'ParserSectionData' (60% confidence) - FMMT/core/BinaryFactoryProduct.py:371: unused method 'ParserProgramData' (60% confidence) - FMMT/core/BiosTree.py:76: unused method 'insertRel' (60% confidence) - FMMT/core/BiosTree.py:84: unused method 'deleteNode' (60% confidence) - FMMT/core/BiosTreeNode.py:63: unused attribute 'ROffset' (60% confidence) - FMMT/core/BiosTreeNode.py:125: unused attribute 'ROffset' (60% confidence) - FMMT/core/BiosTreeNode.py:182: unused attribute 'ROffset' (60% confidence) - FMMT/core/BiosTreeNode.py:185: unused attribute 'SectionMaxAlignment' (60% confidence) - FMMT/core/BiosTreeNode.py:220: unused attribute 'ROffset' (60% confidence) - FMMT/core/BiosTreeNode.py:223: unused attribute 'OriHeader' (60% confidence) - FMMT/core/BiosTreeNode.py:226: unused attribute 'SectionMaxAlignment' (60% confidence) - FMMT/core/BiosTreeNode.py:247: unused attribute 'ROffset' (60% confidence) - FMMT/FMMT.py:52: unused attribute 'firmware_packet' (60% confidence) Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2025-07-01BaseTools: Eot: Remove unnecessary codePierre Gondois7-308/+0
Running the vulture tool on the Eot folder gave the following report. Remove the unnecessary code. - Eot/CodeFragment.py:47: unused class 'AssignmentExpression' (60% confidence) - Eot/CodeFragmentCollector.py:75: unused attribute '__Token' (60% confidence) - Eot/CodeFragmentCollector.py:76: unused attribute '__SkippedChars' (60% confidence) - Eot/CodeFragmentCollector.py:104: unused method '__EndOfLine' (60% confidence) - Eot/CodeFragmentCollector.py:129: unused method '__UndoOneChar' (60% confidence) - Eot/CodeFragmentCollector.py:215: unused method '__InsertComma' (60% confidence) - Eot/Database.py:81: unused attribute 'text_factory' (60% confidence) - Eot/EotMain.py:1012: unused method 'SetFreeSpace' (60% confidence) - Eot/Identification.py:36: unused method 'GetFileFullPath' (60% confidence) - Eot/Identification.py:43: unused method 'GetFileRelativePath' (60% confidence) - Eot/Parser.py:119: unused function 'AddToGlobalMacro' (60% confidence) - Eot/Parser.py:238: unused function 'GetAllSourceFiles' (60% confidence) - Eot/Parser.py:257: unused function 'ParseConditionalStatementMacros' (60% confidence) - Eot/Parser.py:267: unused function 'GetAllFiles' (60% confidence) - Eot/Parser.py:291: unused function 'ParseConditionalStatement' (60% confidence) - Eot/Parser.py:367: unused function 'GetConditionalStatementStatus' (60% confidence) - Eot/Parser.py:722: unused function 'ConvertGuid' (60% confidence) - Eot/Parser.py:857: unused function 'ConvertGuid2' (60% confidence) - Eot/Report.py:161: unused method 'GeneratePpi' (60% confidence) - Eot/Report.py:173: unused method 'GenerateProtocol' (60% confidence) Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2025-07-01BaseTools: Ecc: Remove unnecessary codePierre Gondois5-200/+0
Running the vulture tool on the Ecc folder gave the following report. Remove the unnecessary code. - Ecc/c.py:52: unused function 'GetConfig' (60% confidence) - Ecc/c.py:484: unused function 'GetFileModificationTimeFromDB' (60% confidence) - Ecc/CodeFragmentCollector.py:77: unused attribute '__Token' (60% confidence) - Ecc/CodeFragmentCollector.py:78: unused attribute '__SkippedChars' (60% confidence) - Ecc/CodeFragmentCollector.py:109: unused method '__EndOfLine' (60% confidence) - Ecc/CodeFragmentCollector.py:134: unused method '__UndoOneChar' (60% confidence) - Ecc/CodeFragmentCollector.py:221: unused method '__InsertComma' (60% confidence) - Ecc/CodeFragmentCollector.py:539: unused method 'PrintFragments' (60% confidence) - Ecc/Database.py:81: unused attribute 'text_factory' (60% confidence) - Ecc/Database.py:214: unused method 'UpdateIdentifierBelongsToFunction_disabled' (60% confidence) - Ecc/MetaFileWorkspace/MetaDataTable.py:142: unused method 'IsIntegral' (60% confidence) - Ecc/MetaFileWorkspace/MetaDataTable.py:205: unused method 'GetCrossIndex' (60% confidence) - Ecc/Xml/XmlRoutines.py:145: unused function 'XmlElementData' (60% confidence) - Ecc/Xml/XmlRoutines.py:162: unused function 'XmlElementList' (60% confidence) - Ecc/Xml/XmlRoutines.py:192: unused function 'XmlNodeName' (60% confidence) Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2025-07-01BaseTools: Capsule: Remove unnecessary codePierre Gondois1-5/+0
Running the vulture tool on the Capsule folder gave the following report. Remove the unnecessary code. - Capsule/WindowsCapsuleSupportHelper.py:26: unused method 'RegisterHelpers' (60% confidence) Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>