<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/MdePkg/Library/BaseLib, branch master</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=master</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2026-09-15T10:49:49+00:00</updated>
<entry>
<title>MdePkg/BaseLib: Add AsciiStrToUintn and AsciiStrToUint64</title>
<updated>2026-09-15T10:49:49+00:00</updated>
<author>
<name>Vishal Oliyil Kunnil</name>
<email>vishalo@qti.qualcomm.com</email>
</author>
<published>2026-08-28T23:21:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=f443364513d9f65c793563a324cbc5580ce35a69'/>
<id>urn:sha1:f443364513d9f65c793563a324cbc5580ce35a69</id>
<content type='text'>
Add AsciiStrToUintn() and AsciiStrToUint64() to BaseLib. These are
thin wrappers that dispatch to the existing AsciiStrHexToUintnS()/
AsciiStrDecimalToUintnS() (and UINT64 equivalents) based on Base,
which must be 0 (auto-detect via a "0x"/"0X" prefix), 10, or 16.
No new radix-parsing logic is introduced; the existing conversion
routines already cover the bases actually used in practice.

Signed-off-by: Vishal Oliyil Kunnil &lt;vishalo@qti.qualcomm.com&gt;
</content>
</entry>
<entry>
<title>MdePkg/BaseLib: Add AsciiIsSpace</title>
<updated>2026-09-15T10:49:49+00:00</updated>
<author>
<name>Vishal Oliyil Kunnil</name>
<email>vishalo@qti.qualcomm.com</email>
</author>
<published>2026-08-28T23:20:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=19d198baace6c9b5582d59471ecad6336ca255e0'/>
<id>urn:sha1:19d198baace6c9b5582d59471ecad6336ca255e0</id>
<content type='text'>
Add AsciiIsSpace() to BaseLib, which checks whether an ASCII
character is a space character as defined by the ISO C isspace()
function. This will be used to implement AsciiStrToUintn() and
AsciiStrToUint64().

Signed-off-by: Vishal Oliyil Kunnil &lt;vishalo@qti.qualcomm.com&gt;
</content>
</entry>
<entry>
<title>MdePkg/BaseLib: Add AsciiStrRChr</title>
<updated>2026-09-15T10:49:49+00:00</updated>
<author>
<name>Vishal Oliyil Kunnil</name>
<email>vishalo@qti.qualcomm.com</email>
</author>
<published>2026-08-28T23:20:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=ff77d74ab52590846591427ee35fea75d583c484'/>
<id>urn:sha1:ff77d74ab52590846591427ee35fea75d583c484</id>
<content type='text'>
Add AsciiStrRChr() to BaseLib, which returns the last occurrence of
a character in a Null-terminated ASCII string. This mirrors the
existing AsciiStrStr() API style and provides a reusable
implementation for consumers that currently hand-roll this logic.

Signed-off-by: Vishal Oliyil Kunnil &lt;vishalo@qti.qualcomm.com&gt;
</content>
</entry>
<entry>
<title>MdePkg: UnitTestHostBaseLib: Support reading CNTPCT_EL0, ID_AA64ISAR0_EL1</title>
<updated>2026-09-06T10:12:38+00:00</updated>
<author>
<name>Kun Qin</name>
<email>kuqin@microsoft.com</email>
</author>
<published>2026-07-30T00:43:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=f3118dd3f7fa6fd352143cca025775f5d4a9da95'/>
<id>urn:sha1:f3118dd3f7fa6fd352143cca025775f5d4a9da95</id>
<content type='text'>
This change adds the support of reading CNTPCT_EL0 and ID_AA64ISAR0_EL1
through current BaseLib definition.

This paves way to allow the linkage of these functions needed on other
host based unit tests.

Signed-off-by: Kun Qin &lt;kun.qin@microsoft.com&gt;
</content>
</entry>
<entry>
<title>MdePkg: UnitTestHostBaseLib: Clean up source entries</title>
<updated>2026-07-31T15:16:47+00:00</updated>
<author>
<name>Kun Qin</name>
<email>kuqin@microsoft.com</email>
</author>
<published>2026-05-01T20:58:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=668b5d7bb7f9bf90412110fae420dc15fd580b58'/>
<id>urn:sha1:668b5d7bb7f9bf90412110fae420dc15fd580b58</id>
<content type='text'>
The existing UnitTestHostBaseLib has some source entries that are either
redundant or for unsupported architectures.

This change consolidated the redundant entries and removed the entries
for unsupported architectures.

Signed-off-by: Kun Qin &lt;kun.qin@microsoft.com&gt;
</content>
</entry>
<entry>
<title>MdePkg: UnitTestHostBaseLib: Added preprocessor for AArch64 instances</title>
<updated>2026-07-31T15:16:47+00:00</updated>
<author>
<name>Kun Qin</name>
<email>kuqin@microsoft.com</email>
</author>
<published>2026-01-20T20:50:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=94d9804c32d62d6d51885f5019aaa53ac5e85a8c'/>
<id>urn:sha1:94d9804c32d62d6d51885f5019aaa53ac5e85a8c</id>
<content type='text'>
This change adds a few preprocessors to build AArch64 host based unit
tests properly.

An AArch64 specific instance of `gUnitTestHostBaseLib` is created to
abstract the reference of arch specific special instructions.

Signed-off-by: Kun Qin &lt;kuqin12@gmail.com&gt;
</content>
</entry>
<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>
</feed>
