<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/EmulatorPkg/Win, branch dependabot/github_actions/actions/github-script-9</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=dependabot%2Fgithub_actions%2Factions%2Fgithub-script-9</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=dependabot%2Fgithub_actions%2Factions%2Fgithub-script-9'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2026-02-23T21:01:28+00:00</updated>
<entry>
<title>EmulatorPkg: Replace include guards with #pragma once</title>
<updated>2026-02-23T21:01:28+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2026-02-03T18:22:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=e6797413058281e76caed111fa4a90090f876bb6'/>
<id>urn:sha1:e6797413058281e76caed111fa4a90090f876bb6</id>
<content type='text'>
Replace traditional `#ifndef`/`#define`/`#endif` include guards with
`#pragma` once.

`#pragma once` is a widely supported preprocessor directive that
prevents header files from being included multiple times. It is
supported by all toolchains used to build edk2: GCC, Clang/LLVM, and
MSVC.

Compared to macro-based include guards, `#pragma once`:

- Eliminates the risk of macro name collisions or copy/paste errors
  where two headers inadvertently use the same guard macro.
- Eliminate inconsistency in the way include guard macros are named
  (e.g., some files use `__FILE_H__`, others use `FILE_H_`, etc.).
- Reduces boilerplate (three lines replaced by one).
- Avoids polluting the macro namespace with guard symbols.
- Can improve build times as the preprocessor can skip re-opening the
  file entirely, rather than re-reading it to find the matching
  `#endif` ("multiple-include optimization").
  - Note that some compilers may already optimize traditional include
    guards, by recognzining the idiomatic pattern.

This change is made acknowledging that overall portability of the
code will technically be reduced, as `#pragma once` is not part of the
C/C++ standards.

However, this is considered acceptable given:

1. edk2 already defines a subset of supported compilers in
   BaseTools/Conf/tools_def.template, all of which have supported
   `#pragma once` for over two decades.
2. There have been concerns raised to the project about inconsistent
   include guard naming and potential macro collisions.

Approximate compiler support dates:

- MSVC: Supported since Visual C++ 4.2 (1996)
- GCC: Supported since 3.4 (2004)
  (http://gnu.ist.utl.pt/software/gcc/gcc-3.4/changes.html)
- Clang (LLVM based): Since initial release in 2007

Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
</content>
</entry>
<entry>
<title>EmulatorPkg: Use HOST_APPLICATION and add MINGW CLANG</title>
<updated>2026-01-07T16:58:11+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2025-12-28T22:19:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=deeeaa76c0773c31bfe9994ef551d78d0f5e9e85'/>
<id>urn:sha1:deeeaa76c0773c31bfe9994ef551d78d0f5e9e85</id>
<content type='text'>
* Update EmulatorPkg to use HOST_APPLICATION module type
  instead of USER_DEFINED to align with UnitTestFrameworkPkg
  that uses HOST_APPLICATION for all Host-based unit tests.
* Move [BuildOptions] from host module INFs files to EmulatorPkg
  DSC file. This is required to have finer control over build
  options for MINGW CLANG builds.
* Add support for MINGW CLANG builds.
* Use WIN_HOST_BUILD to simplify the selection of the Windows
  host module or the Linux host module.
* Add missing StackCheckLib mapping
* Override PcdOpensslLibAssemblySourceStyleNasm to TRUE for
  MINGW CLANG builds that use Windows calling convention.
* Add checks for support tool chains with error messages
* Set linker BASE to correct values for DLLs and Applications
  for 32-bit and 64-bit Windows builds.
* Update DEBUG, RELEASE, and NOOPT profiles with correct
  optimization settings and source level debug settings.
* Reduce Visual Studio support to VS2019 and VS2022
* Simplify linker settings for Visual Studio builds.

Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>EmulatorPkg/Win/Host: Remove workarounds for older VS20xx/SDKs</title>
<updated>2026-01-05T20:32:28+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2025-12-23T21:54:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=135e06911fc666a7d0f6970a2b353b15efef1e8c'/>
<id>urn:sha1:135e06911fc666a7d0f6970a2b353b15efef1e8c</id>
<content type='text'>
Remove workarounds for older VS20xx/SDK versions that are no
longer supported. This simplifies the number of workarounds
required to mix windows and edk2 includes.

Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>EmulatorPkg/Win/Host: Fix CLANG windows include issues</title>
<updated>2026-01-05T20:32:28+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2025-12-23T19:00:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=892a99aa02f659dcfe4ef8f47187c41739793cfc'/>
<id>urn:sha1:892a99aa02f659dcfe4ef8f47187c41739793cfc</id>
<content type='text'>
CLANG compiler does not support VS20xx specific #pragma
warning statements. Remove #pragma warning statements that
are no longer required for VS20xx/SDKs.

Add logic to correct case mismatch in the define value
for IMAGE_FILE_MACHINE_ARM64 between edk2, SDKs, and
Mingw ucrt includes.

Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>EmulatorPkg/Win/Host: Fix GetProcessAffinityMask() param types</title>
<updated>2026-01-05T20:32:28+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2025-12-23T18:56:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=cd68b0087399cb90ae7cf136509a5ffa16540ee9'/>
<id>urn:sha1:cd68b0087399cb90ae7cf136509a5ffa16540ee9</id>
<content type='text'>
Update call to GetProcessAffinityMask() to typecast parameters
to the types required by the Windows API. This type mismatch
was caught by the clang compiler.

Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>EmulatorPkg/Win/Host: Fix Receive() parameter type</title>
<updated>2026-01-05T20:32:28+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2025-12-23T18:49:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=a5a9df01f56d80e26ca65d076ff35251aef618b7'/>
<id>urn:sha1:a5a9df01f56d80e26ca65d076ff35251aef618b7</id>
<content type='text'>
Update call to Receive() in WinNtSnpReceive() to pass in
the correct 32-bit sized parameter for both IA32 and X64
builds. In X64 builds, the upper 32-bits of BufferSize
would not be cleared by Receive() and could result in
unexpected values return values. This type mismatch was
found by the clang compiler.

Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>EmulatorPkg/Win/Host: Fix main() return type and error paths</title>
<updated>2026-01-05T20:32:28+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2025-12-23T18:45:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=771137625b198b53a8d7c25e71f217e3b6c00129'/>
<id>urn:sha1:771137625b198b53a8d7c25e71f217e3b6c00129</id>
<content type='text'>
Update main() to have a return type of int to match Windows
console application requirements. Also update error paths
to consistently call exit(1) instead of returning an EFI_ERROR
status that does not match Windows console applications error
values. These issues were caught with clang compiler.

Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>EmulatorPkg/Win/Host: Fix WinNtOpenVolume() uninitialized variable</title>
<updated>2026-01-05T20:32:28+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2025-12-23T18:42:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=8dca04c5ffdf6ad4662d716eaceb97d43f91ac66'/>
<id>urn:sha1:8dca04c5ffdf6ad4662d716eaceb97d43f91ac66</id>
<content type='text'>
Fix uninitialized variable error for the local variable Status
in a WinNtOpenVolume() error path. This issue was caught by the
clang compiler.

Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>EmulatorPkg/Win/Host: Fix WinNtBlockIoError() parameter type</title>
<updated>2026-01-05T20:32:28+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2025-12-23T18:41:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=0890baeaa329d2987e07e43393c63ac319a5081d'/>
<id>urn:sha1:0890baeaa329d2987e07e43393c63ac319a5081d</id>
<content type='text'>
Fix incorrect parameter type passed to WinNtBlockIoError()
caught by clang compiler.

Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>EmulatorPkg/Win/Host: Fix loaded DLL page protections</title>
<updated>2025-10-30T19:23:44+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2025-10-30T17:49:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=aba2b4e221c49aa60f76c2552967329b1097219e'/>
<id>urn:sha1:aba2b4e221c49aa60f76c2552967329b1097219e</id>
<content type='text'>
The current algorithm evaluates page protection in
sections of a PE/COFF image at DWORD granularity and
it skips the evaluation of the first DWORD of the
PE/COFF image.

If a PE/COFF section has a VirtualSize that is ends
in first 4 bytes of a 4KB page, then the PE/COFF
section protection attributes for that section are
not applied to that page due to the DWORD stride.

For example, a .text section with a VirtualSize of
0x1001, 0x1002, 0x1003, or 0x1004 followed by non
.text section will not apply the PAGE_EXECUTE_READ
attribute to the second page of the .text section
and execution of code at the end of that .text
section generates an access violation exception.

The fix is to change the stride for evaluating page
protection attributes from DWORD to BYTE.

The loop is also updated to include evaluation of
the first DWORD of the PE/COFF image.

Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
</feed>
