<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/BaseTools/Source, branch dependabot/github_actions/github/codeql-action-4.39.1</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=dependabot%2Fgithub_actions%2Fgithub%2Fcodeql-action-4.39.1</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=dependabot%2Fgithub_actions%2Fgithub%2Fcodeql-action-4.39.1'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2026-10-22T01:36:43+00:00</updated>
<entry>
<title>BaseTools: FvHandler: Safely update FV free-space nodes</title>
<updated>2026-10-22T01:36:43+00:00</updated>
<author>
<name>Kun Qin</name>
<email>kuqin@microsoft.com</email>
</author>
<published>2026-09-17T04:20:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=68360d273c9788e75b9aca13f839563a5a6cb498'/>
<id>urn:sha1:68360d273c9788e75b9aca13f839563a5a6cb498</id>
<content type='text'>
Current FV resize routine assumes that the final child is always a free-
space node. However, when no such node exists, these routines can remove
or overwrite valid trailing FFS nodes. One replacement path also inserts
the free-space byte count instead of the constructed tree node.

This change centralizes free-space node creation, resizing, and removal,
using the helper for direct replacements and recursive parent resizing.

Signed-off-by: Kun Qin &lt;kun.qin@microsoft.com&gt;
</content>
</entry>
<entry>
<title>BaseTools: FMMTOperation: Use distinct FFS trees for repeated replacement</title>
<updated>2026-10-22T01:36:43+00:00</updated>
<author>
<name>Kun Qin</name>
<email>kuqin@microsoft.com</email>
</author>
<published>2026-09-17T04:20:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=26d6e1f5f26a7456f63011a3107d0ca577eed489'/>
<id>urn:sha1:26d6e1f5f26a7456f63011a3107d0ca577eed489</id>
<content type='text'>
Current `ReplaceFfs` reuses the parsed replacement FFS tree for every
matching target. However, `FvHandler` mutates the tree while attaching it
to a target, causing later replacements inherit state from an earlier
replaced instance and hang the process.

This change uses deep-copy of the replacement tree for each target to
avoid the failure case.

Signed-off-by: Kun Qin &lt;kun.qin@microsoft.com&gt;
</content>
</entry>
<entry>
<title>BaseTools: Reject trailing content after !else and !endif</title>
<updated>2026-10-08T03:58:55+00:00</updated>
<author>
<name>Dongyan Qian</name>
<email>qiandongyan@loongson.cn</email>
</author>
<published>2026-09-16T06:45:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=c51403090f63efa4e463cd17095dd9f012a00c4b'/>
<id>urn:sha1:c51403090f63efa4e463cd17095dd9f012a00c4b</id>
<content type='text'>
The DSC parser accepts "!else if &lt;expression&gt;" as an unconditional
!else branch without evaluating the trailing condition. This can select
an unintended build branch instead of reporting the syntax error.

For example, the following incorrect syntax is currently accepted:

  !if $(MODE) == 1
    # Branch A
  !else if $(MODE) == 2
    # Branch B
  !endif

When MODE is 3, the parser treats the second directive as a plain !else
and selects branch B. Replacing it with "!elseif $(MODE) == 2" would
correctly select neither branch.

Reject trailing content after !else and !endif. When the first word
following !else is "if", suggest "!elseif &lt;expression&gt;" instead.
Trailing comments remain valid because they are removed before
directive parsing.

Cc: Fei Shen &lt;shenfei@loongson.cn&gt;
Signed-off-by: Dongyan Qian &lt;qiandongyan@loongson.cn&gt;
</content>
</entry>
<entry>
<title>BaseTools/FMMT: Return non-zero exit status on failure</title>
<updated>2026-09-29T17:12:07+00:00</updated>
<author>
<name>Zhaoqi Xu</name>
<email>lzy00419@outlook.com</email>
</author>
<published>2026-08-31T08:33:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=53d441a7402aab3ecd02909ae1a0ae6a2e135332'/>
<id>urn:sha1:53d441a7402aab3ecd02909ae1a0ae6a2e135332</id>
<content type='text'>
FMMT catches exceptions from operations such as viewing a missing
input file, prints the error, and then returns status 0. Callers
and scripts treat that as success.

Set status to 1 in the exception handler so the process exit code
matches the failure.

A regression test covers FMMT -v not-a-file.

Signed-off-by: Zhaoqi Xu &lt;lzy00419@outlook.com&gt;
</content>
</entry>
<entry>
<title>BaseTools/FirmwareStorageFormat: Fix FV ext entry struct factory functions</title>
<updated>2026-09-13T19:05:51+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2026-07-15T21:13:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=203bf1ffa12e890e238d710c6c6cf9d15615951b'/>
<id>urn:sha1:203bf1ffa12e890e238d710c6c6cf9d15615951b</id>
<content type='text'>
The Refine_FV_EXT_ENTRY_OEM_TYPE_Header() and
Refine_FV_EXT_ENTRY_GUID_TYPE_Header() functions incorrectly return
an instantiation attempt of the local class with `Structure` as an
argument (e.g., `return ClassName(Structure)`) instead of returning the
class itself (e.g., `return ClassName`).

This causes FMMT to fail with:
  "expected EFI_FIRMWARE_VOLUME_EXT_ENTRY instance, got
   _ctypes.PyCStructType"

When processing FVs that contain ext header entries of type 0x01
(OEM Type) or type 0x02 (GUID Type, used for FV UI Name when
FvNameString = TRUE).

Fix by returning the class directly, matching the pattern used by
Refine_FV_Header() which correctly returns the class for subsequent
.from_buffer_copy() calls.

Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>BaseTools: Optimize parsing of byte-array PCD values</title>
<updated>2026-09-06T23:50:31+00:00</updated>
<author>
<name>kuqin12</name>
<email>42554914+kuqin12@users.noreply.github.com</email>
</author>
<published>2026-08-21T22:12:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=4d55998e8b0a251b5124bdf240ddaad9921e6257'/>
<id>urn:sha1:4d55998e8b0a251b5124bdf240ddaad9921e6257</id>
<content type='text'>
This change adds a fast path for simple VOID* hexadecimal byte arrays,
avoiding the generic expression tokenizer's repeated processing of large
PCD values. Regression tests for both paths. It does not change the
existing parser for structured and symbolic expressions.

This reduces parsing time for a 28 KiB generated PCD from roughly 2
seconds to 50 milliseconds.

Signed-off-by: Kun Qin &lt;kun.qin@microsoft.com&gt;
</content>
</entry>
<entry>
<title>BaseTools/GenSec: Use SECTION_SIZE to read section size</title>
<updated>2026-09-03T10:36:41+00:00</updated>
<author>
<name>Mingjie Shen</name>
<email>shen497@purdue.edu</email>
</author>
<published>2026-08-31T22:14:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=52f19aacd569aa0f1f264108ed518a96657f9088'/>
<id>urn:sha1:52f19aacd569aa0f1f264108ed518a96657f9088</id>
<content type='text'>
Replace the open-coded read of the 3-byte section Size[] field with
the SECTION_SIZE() macro from Pi/PiFirmwareFile.h. The macro reads
exactly the three Size[] bytes (endianness-safe) instead of a 4-byte
load that over-reads the adjacent byte. No functional change.

Verified by building BaseTools and running GenSec:

  python3 BaseTools/Edk2ToolsBuild.py -t GCC
  GenSec -s EFI_SECTION_RAW -o out.sec in.bin   # in.bin: 100 bytes

out.sec is 104 bytes: the 100-byte payload plus the 4-byte
EFI_COMMON_SECTION_HEADER. The Size field of the header reads
0x000068, matching out.sec's size that is calculated by SECTION_SIZE.

Generated with the following Coccinelle semantic patch:

```smpl
@@
EFI_COMMON_SECTION_HEADER *E;
typedef UINT32;
@@
(
- *(UINT32 *)(E-&gt;Size) &amp; 0x00FFFFFF
+ SECTION_SIZE (E)
|
- *(UINT32 *)E-&gt;Size &amp; 0x00FFFFFF
+ SECTION_SIZE (E)
)
```

Signed-off-by: Mingjie Shen &lt;shen497@purdue.edu&gt;
</content>
</entry>
<entry>
<title>BaseTools: Make DSC arch macro expansion owner-aware</title>
<updated>2026-09-01T14:42:26+00:00</updated>
<author>
<name>Bob Chen (UST Global Singapore Pte Limited)</name>
<email>v-kuanlchen@microsoft.com</email>
</author>
<published>2026-08-25T14:08:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=7b01c71a83e0bf6a89f5e803a4f60adc29c1f70f'/>
<id>urn:sha1:7b01c71a83e0bf6a89f5e803a4f60adc29c1f70f</id>
<content type='text'>
PR #12628 expanded architecture macros for every DSC record so
component-private records match their component. A positive raw owner can
also represent include provenance, so broad expansion changes records
outside component scope.

Expand architecture macros only for Component records and records whose
owner maps to a final Component. Reset the owner mapping whenever the
post-processed table is rebuilt to prevent stale ownership across
DoPostProcess calls.

Add regression coverage for component-private LibraryClasses and PCDs,
nested and private includes, multiple architectures, unresolved macros,
repeated sections, and repeated post-processing.

Signed-off-by: Bob Chen (UST Global Singapore Pte Limited) &lt;v-kuanlchen@microsoft.com&gt;
</content>
</entry>
<entry>
<title>BaseTools/Python: Remove error message with email address</title>
<updated>2026-08-28T10:04:05+00:00</updated>
<author>
<name>Vishal Oliyil Kunnil</name>
<email>vishalo@qti.qualcomm.com</email>
</author>
<published>2026-05-22T21:14:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=edcf8ffa69319cd5cb038124bd3878f254f97056'/>
<id>urn:sha1:edcf8ffa69319cd5cb038124bd3878f254f97056</id>
<content type='text'>
Remove the "Please send email to devel@edk2.groups.io" message
from the unhandled exception handlers in build.py, GenFds.py,
Trim.py, and the UPT tools. Also remove the now-unused
MSG_EDKII_MAIL_ADDR and MSG_SEARCH_FOR_HELP constants from
Common/DataType.py and UPT/Logger/StringTable.py.

Signed-off-by: Vishal Oliyil Kunnil &lt;vishalo@qti.qualcomm.com&gt;
</content>
</entry>
<entry>
<title>BaseTools/Build: Output warning message for library class mismatch</title>
<updated>2026-08-06T04:55:34+00:00</updated>
<author>
<name>Joey Vagedes</name>
<email>joey.vagedes@gmail.com</email>
</author>
<published>2024-07-02T17:27:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=c5aa7e7d94c0e6b3c0202e15dbf7a5c92dd6a01d'/>
<id>urn:sha1:c5aa7e7d94c0e6b3c0202e15dbf7a5c92dd6a01d</id>
<content type='text'>
Performs a check that will verify that the library instance implements
the library specified in the dsc by ensuring a LIBRARY_CLASS definition
exists in the INF [Defines] section and the value matches the library it
says it is implementing.

As an example, from a platform dsc file:
BaseBmpSupportLib|MdeModulePkg/Library/BaseBmpSupportLib/BaseBmpSupportLib.inf

BaseBmpSupportLib is supposed to be of library class BmpSupportLib, but the
dsc defines it incorrectly, the warning message will be displayed during
build.

Signed-off-by: Aaron Pop &lt;aaronpop@microsoft.com&gt;
Co-authored-by: Poncho Figueroa &lt;poncho.figueroa.esqueda@intel.com&gt;
</content>
</entry>
</feed>
