<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/EmbeddedPkg/Library/PrePiHobLib, 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>EmbeddedPkg: 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:19:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=1c2d76e233c93ef37643c59aa6f6bd88efcfd370'/>
<id>urn:sha1:1c2d76e233c93ef37643c59aa6f6bd88efcfd370</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>EmbeddedPkg: PrePiHobLib: Add Library/Protocol Dependencies</title>
<updated>2026-01-15T17:10:46+00:00</updated>
<author>
<name>Oliver Smith-Denny</name>
<email>osde@microsoft.com</email>
</author>
<published>2025-12-17T23:07:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=2c4f469a96d97dbdcb7e6e260c857e4d10ecf378'/>
<id>urn:sha1:2c4f469a96d97dbdcb7e6e260c857e4d10ecf378</id>
<content type='text'>
CLANGPDB AARCH64 catches that PrePiHobLib doesn't correctly
list the library classes and protocols it uses. This resolves
that.

Signed-off-by: Oliver Smith-Denny &lt;osde@microsoft.com&gt;
</content>
</entry>
<entry>
<title>EmbeddedPkg: Add two new APIs in PrePiHobLib</title>
<updated>2025-04-18T03:48:07+00:00</updated>
<author>
<name>Dun Tan</name>
<email>dun.tan@intel.com</email>
</author>
<published>2025-04-11T05:11:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=be720b8d6cc01383b4eba6174c390798e4194491'/>
<id>urn:sha1:be720b8d6cc01383b4eba6174c390798e4194491</id>
<content type='text'>
This commit is to add two new APIs in EmbeddedPkg
PrePiHobLib:

1.The GetNextMemoryAllocationGuidHob () returns the next
instance of the Memory Allocation HOB with the matched
GUID from a starting HOB pointer.

2.The TagMemoryAllocationHobWithGuid () searchs the HOB
list for the Memory Allocation HOB with a matching base
address and set the Name GUID. Then the instance of the
tagged Memory Allocation HOB with matched base address is
returned.

Signed-off-by: Dun Tan &lt;dun.tan@intel.com&gt;
</content>
</entry>
<entry>
<title>EmbeddedPkg: CodeQL Fixes.</title>
<updated>2025-01-15T11:18:04+00:00</updated>
<author>
<name>Vineel Kovvuri[MSFT]</name>
<email>vineelko@microsoft.com</email>
</author>
<published>2024-10-25T23:37:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=aae044a130599427e3562fe5736d7b2d42777272'/>
<id>urn:sha1:aae044a130599427e3562fe5736d7b2d42777272</id>
<content type='text'>
Makes changes to comply with alerts raised by CodeQL.

Most of the issues here fall into the following two categories:

1. Potential use of uninitialized pointer.
2. Inconsistent integer width in comparison.

Co-authored-by: Taylor Beebe &lt;taylor.d.beebe@gmail.com&gt;
Co-authored-by: Ken Lautner &lt;kenlautner3@gmail.com&gt;
Co-authored-by: Bret Barkelew &lt;bret@corthon.com&gt;
Signed-off-by: Vineel Kovvuri[MSFT] &lt;vineelko@microsoft.com&gt;
</content>
</entry>
<entry>
<title>EmbeddedPkg/PrePiHobLib: Remove Non-RT Types from Mem Type Info HOB</title>
<updated>2024-11-11T16:45:29+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2024-10-24T23:08:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=b904377d0d54a784f9a9348d05088afc80de5c54'/>
<id>urn:sha1:b904377d0d54a784f9a9348d05088afc80de5c54</id>
<content type='text'>
Removes the following types from the memory type information HOB
produced:

- `EfiBootServicesCode`
- `EfiBootServicesData`
- `EfiLoaderCode`
- `EfiLoaderData`

This follows the guidance in the whitepaper "A Tour Beyond BIOS
Memory Map and Practices in UEFI BIOS".

https://github.com/tianocore-docs/Docs/raw/master/White_Papers/A_Tour_Beyond_BIOS_Memory_Map_And_Practices_in_UEFI_BIOS_V2.pdf

"NOTE: We recommend a platform only define the ReservedMemory,
ACPINvs, ACPIReclaim,  RuntimeCode, RuntimeData in Memory Type
Information table, because OSes only request  these regions to be
consistent. There is no need to add BootServicesCode,
BootServicesData, LoaderCode, LoaderData in memory type information
table, because these regions will not be reserved during S4 resume."

Since these memory types are not tracked in memory type information
any longer it also reduces the number of resets that may need to
occur to update memory type buckets that are not needed.

Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
</content>
</entry>
<entry>
<title>EmbeddedPkg/PrePiHobLib: Fix SetBootMode return value</title>
<updated>2024-09-05T17:08:51+00:00</updated>
<author>
<name>Vishal Oliyil Kunnil</name>
<email>vishalo@qti.qualcomm.com</email>
</author>
<published>2024-08-19T21:05:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=013d51771a67ff87e6cb17a57e156ef4b6f4ec54'/>
<id>urn:sha1:013d51771a67ff87e6cb17a57e156ef4b6f4ec54</id>
<content type='text'>
After updating Doxygen, we can see that SetBootMode returns the BootMode
instead of status code as it should, fix it to return status.

Signed-off-by: Vishal Oliyil Kunnil &lt;quic_vishalo@quicinc.com&gt;
</content>
</entry>
<entry>
<title>EmbeddedPkg/PrePiHobLib: Align Doxygen comment between code and header</title>
<updated>2024-09-05T17:08:51+00:00</updated>
<author>
<name>Vishal Oliyil Kunnil</name>
<email>vishalo@qti.qualcomm.com</email>
</author>
<published>2024-08-19T21:05:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=1204de7b50926b01394fefb28a04072305a39ca1'/>
<id>urn:sha1:1204de7b50926b01394fefb28a04072305a39ca1</id>
<content type='text'>
The Doxygen comment for SetBootMode and GetBootMode in PrePiHobLib/Hob.c
does not match declaration in PrePiLib.h. The C file has it wrong. Align
the text to match the header.

Signed-off-by: Vishal Oliyil Kunnil &lt;quic_vishalo@quicinc.com&gt;
</content>
</entry>
<entry>
<title>EmbeddedPkg/Hob: Integer Overflow in CreateHob()</title>
<updated>2024-01-26T03:40:09+00:00</updated>
<author>
<name>Gua Guo</name>
<email>gua.guo@intel.com</email>
</author>
<published>2024-01-11T05:07:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=aeaee8944f0eaacbf4cdf39279785b9ba4836bb6'/>
<id>urn:sha1:aeaee8944f0eaacbf4cdf39279785b9ba4836bb6</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4166

Fix integer overflow in various CreateHob instances.
Fixes: CVE-2022-36765

The CreateHob() function aligns the requested size to 8
performing the following operation:
```
HobLength = (UINT16)((HobLength + 0x7) &amp; (~0x7));
```

No checks are performed to ensure this value doesn't
overflow, and could lead to CreateHob() returning a smaller
HOB than requested, which could lead to OOB HOB accesses.

Reported-by: Marc Beatove &lt;mbeatove@google.com&gt;
Cc: Leif Lindholm &lt;quic_llindhol@quicinc.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb+tianocore@kernel.org&gt;
Cc: Abner Chang &lt;abner.chang@amd.com&gt;
Cc: John Mathew &lt;john.mathews@intel.com&gt;
Authored-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Signed-off-by: Gua Guo &lt;gua.guo@intel.com&gt;
</content>
</entry>
<entry>
<title>EmbeddedPkg: Apply uncrustify changes</title>
<updated>2021-12-07T17:24:28+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2021-12-05T22:53:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=e7108d0e9655b1795c94ac372b0449f28dd907df'/>
<id>urn:sha1:e7108d0e9655b1795c94ac372b0449f28dd907df</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737

Apply uncrustify changes to .c/.h files in the EmbeddedPkg package

Cc: Andrew Fish &lt;afish@apple.com&gt;
Cc: Leif Lindholm &lt;leif@nuviainc.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Reviewed-by: Andrew Fish &lt;afish@apple.com&gt;
</content>
</entry>
<entry>
<title>EmbeddedPkg: Change OPTIONAL keyword usage style</title>
<updated>2021-12-07T17:24:28+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2021-12-03T02:00:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=792433088c8bd67725bf1cc4a89408ec7a112719'/>
<id>urn:sha1:792433088c8bd67725bf1cc4a89408ec7a112719</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3760

Update all use of ', OPTIONAL' to ' OPTIONAL,' for function params.

Cc: Andrew Fish &lt;afish@apple.com&gt;
Cc: Leif Lindholm &lt;leif@nuviainc.com&gt;
Cc: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Andrew Fish &lt;afish@apple.com&gt;
</content>
</entry>
</feed>
