<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/MdePkg/Library/BaseLib, branch dependabot/github_actions/actions/setup-python-7</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=dependabot%2Fgithub_actions%2Factions%2Fsetup-python-7</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=dependabot%2Fgithub_actions%2Factions%2Fsetup-python-7'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2026-06-09T07:20:10+00:00</updated>
<entry>
<title>MdePkg: Replace manual alignment checks with helper macros</title>
<updated>2026-06-09T07:20:10+00:00</updated>
<author>
<name>Mingjie Shen</name>
<email>shen497@purdue.edu</email>
</author>
<published>2026-05-14T02:17:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=f57a4f1216c707b56d91a5ec2d2f7a8d5daa902f'/>
<id>urn:sha1:f57a4f1216c707b56d91a5ec2d2f7a8d5daa902f</id>
<content type='text'>
Replace manual alignment checks with IS_ALIGNED() and
ADDRESS_IS_ALIGNED().

Convert the following bitmask and modulo forms:

- ((E &amp; ((PowOf2Expr) - ONE)) == ZERO)
- ((E &amp; ((PowOf2Expr) - ONE)) != ZERO)
- ((E % (PowOf2Expr)) == ZERO)
- ((E % (PowOf2Expr)) != ZERO)

to the corresponding helper macro forms:

+ IS_ALIGNED (E, PowOf2Expr)
+ !IS_ALIGNED (E, PowOf2Expr)

PowOf2Expr is limited to known power-of-two expressions, including
SIZE_* and BASE_* macros, EFI_PAGE_SIZE, CPU_STACK_ALIGNMENT,
RUNTIME_PAGE_ALLOCATION_GRANULARITY, sizeof() of UEFI integer types
(e.g. BOOLEAN, CHAR16, UINT32, UINTN) and pointer types, and 1 &lt;&lt; E1
expressions.

Address checks that cast the checked value to UINTN are written with
ADDRESS_IS_ALIGNED().

The change was generated with the Coccinelle semantic patch below.

```smpl
@power_of_2_expr@
expression PowOf2Expr;
expression E1;
typedef BOOLEAN, CHAR8, CHAR16, INT8, UINT8, INT16, UINT16, INT32, UINT32, INT64, UINT64, INTN, UINTN;
type ScalarType = { BOOLEAN, CHAR8, CHAR16, INT8, UINT8, INT16, UINT16, INT32, UINT32, INT64, UINT64, INTN, UINTN };
type AnyType;
type PointerType = AnyType *;
idexpression ScalarType ScalarValue;
idexpression PointerType PointerValue;
constant SizeBase =~ "^(SIZE|BASE)_(1|2|4|8|16|32|64|128|256|512)[KMGTPE]B$";
constant NamedPowerOf2 =~ "^(EFI_PAGE_SIZE|CPU_STACK_ALIGNMENT|RUNTIME_PAGE_ALLOCATION_GRANULARITY)$";
constant ONE = {1, 1U, 1u};
@@
(
(
  SizeBase
|
  NamedPowerOf2
|
  ONE &lt;&lt; E1
|
  sizeof (ScalarType)
|
  sizeof (PointerType)
|
  sizeof (ScalarValue)
|
  sizeof (PointerValue)
)
&amp;
PowOf2Expr
)

@aligned depends on power_of_2_expr disable is_zero,isnt_zero@
expression E;
expression power_of_2_expr.PowOf2Expr;
constant ONE = {1, 1U, 1u};
constant ZERO = {0, 0U, 0u};
@@
(
  ((E &amp; (E - ONE)) == ZERO)
|
- ((E &amp; ((PowOf2Expr) - ONE)) == ZERO)
+ IS_ALIGNED (E, PowOf2Expr)
|
  ((E &amp; (E - ONE)) != ZERO)
|
- ((E &amp; ((PowOf2Expr) - ONE)) != ZERO)
+ !IS_ALIGNED (E, PowOf2Expr)
|
- ((E % (PowOf2Expr)) == ZERO)
+ IS_ALIGNED (E, PowOf2Expr)
|
- ((E % (PowOf2Expr)) != ZERO)
+ !IS_ALIGNED (E, PowOf2Expr)
)

@address_is_aligned@
typedef UINTN;
expression *Address;
expression Alignment;
@@
- IS_ALIGNED ((UINTN) Address, Alignment)
+ ADDRESS_IS_ALIGNED (Address, Alignment)

@normalize_aligned disable paren expression@
expression E, SZ;
@@
(
- (IS_ALIGNED (E, SZ))
+ IS_ALIGNED (E, SZ)
|
- (!IS_ALIGNED (E, SZ))
+ !IS_ALIGNED (E, SZ)
)

@normalize_macro_args disable paren expression@
expression E, SZ;
@@
(
- IS_ALIGNED ((E), SZ)
+ IS_ALIGNED (E, SZ)
|
- IS_ALIGNED (E, (SZ))
+ IS_ALIGNED (E, SZ)
)
```

Signed-off-by: Mingjie Shen &lt;shen497@purdue.edu&gt;
</content>
</entry>
<entry>
<title>MdePkg: Fix Spelling Errors in Comments</title>
<updated>2026-05-08T02:15:34+00:00</updated>
<author>
<name>Oliver Smith-Denny</name>
<email>osde@microsoft.com</email>
</author>
<published>2026-04-16T16:52:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=6f73fbea977818342dd3992aa443f867957ad1c4'/>
<id>urn:sha1:6f73fbea977818342dd3992aa443f867957ad1c4</id>
<content type='text'>
This fixes all non-breaking spelling errors in
MdePkg.

Signed-off-by: Oliver Smith-Denny &lt;osde@microsoft.com&gt;
</content>
</entry>
<entry>
<title>MdePkg/BaseLib: Add AsmReadFsBase and AsmWriteFsBase for X86-64</title>
<updated>2026-03-12T06:51:54+00:00</updated>
<author>
<name>Ray Ni</name>
<email>ray.ni@intel.com</email>
</author>
<published>2026-03-11T02:57:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=e2b0e207f7b1009a6729f7973ed17242cb6672a4'/>
<id>urn:sha1:e2b0e207f7b1009a6729f7973ed17242cb6672a4</id>
<content type='text'>
Signed-off-by: Ray Ni &lt;ray.ni@intel.com&gt;
</content>
</entry>
<entry>
<title>MdePkg: 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:54:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=7835e5802a2a70984333c054002e449bfd1f0a0d'/>
<id>urn:sha1:7835e5802a2a70984333c054002e449bfd1f0a0d</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>MdePkg/Library/BaseLib: Use PcdControlFlowEnforcementPropertyMask as fixed</title>
<updated>2025-12-24T05:43:01+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2025-12-21T18:54:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=1e1edf4d6cd41f6539808c85cc5220f211a4206f'/>
<id>urn:sha1:1e1edf4d6cd41f6539808c85cc5220f211a4206f</id>
<content type='text'>
Always access PcdControlFlowEnforcementPropertyMask using
FixedPcdGet() in NASM source files and update INFs to correctly
declare that PcdControlFlowEnforcementPropertyMask is always
accessed as a Fixed PCD.

PcdControlFlowEnforcementPropertyMask is declared in MdePkg.dec
in the [PcdsFixedAtBuild] section, so this PCD does not support
any other PCD access types.

This change resolves ld warnings from GCC and CLANGDWARF builds
for relocations in read-only text sections because use of PcdGet()
in NASM source files reads the value into eax from the memory
location of a const global variable that requires a relocation
fixup.

By changing PcdGet() to FixedPcdGet(), eax is loaded with an
immediate value known at build time and no relocation fixups for
PcdControlFlowEnforcementPropertyMask are required.

Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>MdePkg/BaseLib AARCH64: Drop special Unaligned.c version</title>
<updated>2025-12-09T08:41:08+00:00</updated>
<author>
<name>Ard Biesheuvel</name>
<email>ardb@kernel.org</email>
</author>
<published>2025-12-05T15:32:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=3e7107c7da655b0b65425ba99f066366b5b7a230'/>
<id>urn:sha1:3e7107c7da655b0b65425ba99f066366b5b7a230</id>
<content type='text'>
Now that the generic code takes alignment constraints into account,
there is no longer a need for a special AArch64 version that performs
byte by byte access in C.

Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
</content>
</entry>
<entry>
<title>MdePkg/BaseLib: Avoid undefined behavior in Unaligned() accessors</title>
<updated>2025-12-09T08:41:08+00:00</updated>
<author>
<name>Ard Biesheuvel</name>
<email>ardb@kernel.org</email>
</author>
<published>2025-12-05T15:22:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=2ba7e5be6cc6b83d5d4ce67d3225e87466c4ecf7'/>
<id>urn:sha1:2ba7e5be6cc6b83d5d4ce67d3225e87466c4ecf7</id>
<content type='text'>
The C standard qualifies misaligned pointers as undefined behavior. This
means it is fundamentally impossible to define a conformant C API for
unaligned access that is expressed in terms of types with a minimum
alignment greater than 1 byte.

Undefined behavior means that the compiler is free to generate code that
assumes that only the defined behavior occurs. This means that a C
implementation of ReadUnaligned64() might be emitted using a 64-bit load
operation that does not tolerate misalignment, depending on the CPU
architecture.

So the only correct way to define such an API is in terms of types such
as VOID* that have no implied alignment.

Then, given that compilers today are perfectly capable of generating the
right code, given accurate annotations, let's rely on those in the
generic implementation. This will ensure that the correct access
sequences are used, depending on the CPU architecture, and on the
compiler flags (e.g., AArch64 uses -mstrict-align in XIP code as it may
execute with the MMU disabled).

Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
</content>
</entry>
<entry>
<title>MdePkg: fix various typos</title>
<updated>2025-11-21T21:49:59+00:00</updated>
<author>
<name>Philipp Schuster</name>
<email>philipp.schuster@cyberus-technology.de</email>
</author>
<published>2025-11-04T07:25:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=1a21b50d6b70e25c349657cbefa1f3fa0b2ef86b'/>
<id>urn:sha1:1a21b50d6b70e25c349657cbefa1f3fa0b2ef86b</id>
<content type='text'>
Signed-off-by: Philipp Schuster &lt;philipp.schuster@cyberus-technology.de&gt;
</content>
</entry>
<entry>
<title>MdePkg: Add code to detect running as an SEV guest</title>
<updated>2025-11-04T06:51:50+00:00</updated>
<author>
<name>RARelph</name>
<email>44270374+RARelph@users.noreply.github.com</email>
</author>
<published>2025-10-30T22:02:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=b98ccecdecec0bb768e6e5bd4df1694de87ad42f'/>
<id>urn:sha1:b98ccecdecec0bb768e6e5bd4df1694de87ad42f</id>
<content type='text'>
Similar to Intel's Tdx, we need a mechanism to detect running as
an AMD SEV guest that will work in all phases everywhere. This
will be immediately used to prevent usage of MTRRs with SEV guests.

Signed-off-by: Richard Relph &lt;richard.relph@amd.com&gt;
</content>
</entry>
<entry>
<title>MdePkg: Remove ARM32 Support from BaseLib</title>
<updated>2025-09-25T22:04:10+00:00</updated>
<author>
<name>Oliver Smith-Denny</name>
<email>osde@microsoft.com</email>
</author>
<published>2025-09-15T21:08:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=49b3eb5907f1a1c17b202cb2195da6fff59ca7dc'/>
<id>urn:sha1:49b3eb5907f1a1c17b202cb2195da6fff59ca7dc</id>
<content type='text'>
edk2 is dropping support for the ARM32 architecture. This
commit removes ARM32 code from BaseLib.

Signed-off-by: Oliver Smith-Denny &lt;osde@microsoft.com&gt;
</content>
</entry>
</feed>
