<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/PrmPkg/Library, 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-02-23T21:01:28+00:00</updated>
<entry>
<title>PrmPkg: 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-03T19:16:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=963162cab093fe5aad5aed59edfb0f9a33bc602f'/>
<id>urn:sha1:963162cab093fe5aad5aed59edfb0f9a33bc602f</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>PrmPkg/Library/DxePrmContextBufferLib/UnitTest: Fix CLANG error</title>
<updated>2025-12-20T20:20:05+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2025-12-08T19:45:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=542d2f2ed4e066fc5280e3cc1322e16e2f438ea8'/>
<id>urn:sha1:542d2f2ed4e066fc5280e3cc1322e16e2f438ea8</id>
<content type='text'>
Fix uninitialized variable errors in unit tests discovered
by CLANG by zeroing local variable structures before use
in unit test cases.

Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>PrmPkg/DxePrmContextBufferLib: Free handle buffers after LocateHandleBuffer</title>
<updated>2025-06-12T14:09:13+00:00</updated>
<author>
<name>Dongyan Qian</name>
<email>qiandongyan@loongson.cn</email>
</author>
<published>2025-06-11T03:57:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=ddacfa238aa99399256897df2e193a5a730dee29'/>
<id>urn:sha1:ddacfa238aa99399256897df2e193a5a730dee29</id>
<content type='text'>
Fix memory leaks by adding missing FreePool calls:
cleanup HandleBuffer in GetModuleContextBuffers.

REF: https://uefi.org/sites/default/files/resources/UEFI_Spec_Final_2.11.pdf
Chapter 7.3.15: "Services - Boot Services.LocateHandleBuffer":
It is the caller's responsibility to call the Boot Service.FreePool when
the caller no longer requires the contents of Buffer.

Signed-off-by: Dongyan Qian &lt;qiandongyan@loongson.cn&gt;
</content>
</entry>
<entry>
<title>PrmPkg: Update code to be more C11 compliant by using __func__</title>
<updated>2023-04-10T14:19:57+00:00</updated>
<author>
<name>Rebecca Cran</name>
<email>rebecca@bsdio.com</email>
</author>
<published>2023-04-06T19:52:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=9e7b042ecba5f78f9fb72d6bb50f8dbc5a32ecac'/>
<id>urn:sha1:9e7b042ecba5f78f9fb72d6bb50f8dbc5a32ecac</id>
<content type='text'>
__FUNCTION__ is a pre-standard extension that gcc and Visual C++ among
others support, while __func__ was standardized in C99.

Since it's more standard, replace __FUNCTION__ with __func__ throughout
PrmPkg.

Signed-off-by: Rebecca Cran &lt;rebecca@bsdio.com&gt;
Reviewed-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
</content>
</entry>
<entry>
<title>PrmPkg/Library: HOST_APPLICATION IA32/X64 only</title>
<updated>2023-04-10T05:59:02+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2023-03-24T22:28:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=cf4af503fb61e7a942e05e61627364cad48c5781'/>
<id>urn:sha1:cf4af503fb61e7a942e05e61627364cad48c5781</id>
<content type='text'>
Update PrmPkg host-based unit test INF files to only list
VALID_ARCHITECTURES of IA32 and X64 to align with all other
host-based unit test INF files. The UnitTestFrameworkPkg only
provides build support of host-based unit tests to OS applications
for IA32 and X64.

Cc: Michael Kubacki &lt;mikuback@linux.microsoft.com&gt;
Cc: Nate DeSimone &lt;nathaniel.l.desimone@intel.com&gt;
Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Oliver Smith-Denny &lt;osde@linux.microsoft.com&gt;
Reviewed-by: Michael Kubacki &lt;mikuback@linux.microsoft.com&gt;
</content>
</entry>
<entry>
<title>PrmPkg/DxePrmContextBufferLib: Fix unit test GCC compilation errors</title>
<updated>2022-04-20T18:24:32+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2022-04-12T19:05:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=6d2baf9dfbffe43019932c2771cd7d39697d4b11'/>
<id>urn:sha1:6d2baf9dfbffe43019932c2771cd7d39697d4b11</id>
<content type='text'>
https://bugzilla.tianocore.org/show_bug.cgi?id=3905

Fixes GCC compilation errors in DxePrmContextBufferLibUnitTest.c.

Cc: Michael Kubacki &lt;mikuback@linux.microsoft.com&gt;
Cc: Nate DeSimone &lt;nathaniel.l.desimone@intel.com&gt;
Cc: Ankit Sinha &lt;ankit.sinha@intel.com&gt;
Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Reviewed-by: Ankit Sinha &lt;ankit.sinha@intel.com&gt;
</content>
</entry>
<entry>
<title>PrmPkg: Apply uncrustify changes</title>
<updated>2022-04-05T00:42:38+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2022-03-15T18:46:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=a298a84478053872ed9da660a75f182ce81b8ddc'/>
<id>urn:sha1:a298a84478053872ed9da660a75f182ce81b8ddc</id>
<content type='text'>
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3737

Apply uncrustify changes to .c/.h files in PrmPkg.

Cc: Andrew Fish &lt;afish@apple.com&gt;
Cc: Kang Gao &lt;kang.gao@intel.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Cc: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Cc: Leif Lindholm &lt;leif@nuviainc.com&gt;
Cc: Benjamin You &lt;benjamin.you@intel.com&gt;
Cc: Liu Yun &lt;yun.y.liu@intel.com&gt;
Cc: Ankit Sinha &lt;ankit.sinha@intel.com&gt;
Cc: Nate DeSimone &lt;nathaniel.l.desimone@intel.com&gt;
Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Acked-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Acked-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Acked-by: Leif Lindholm &lt;quic_llindhol@quicinc.com&gt;
Reviewed-by: Ankit Sinha &lt;ankit.sinha@intel.com&gt;
</content>
</entry>
<entry>
<title>PrmPkg/DxePrmModuleDiscoveryLib: Add initial host-based unit tests</title>
<updated>2022-04-05T00:42:38+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2020-06-17T19:09:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=68ee42c99126dca11a116fa9c22c428374a0ac80'/>
<id>urn:sha1:68ee42c99126dca11a116fa9c22c428374a0ac80</id>
<content type='text'>
Adds host-based unit tests for DxePrmModuleDiscoveryLib. This is
an initial set of support, more tests should be added in the
future.

Cc: Andrew Fish &lt;afish@apple.com&gt;
Cc: Kang Gao &lt;kang.gao@intel.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Cc: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Cc: Leif Lindholm &lt;leif@nuviainc.com&gt;
Cc: Benjamin You &lt;benjamin.you@intel.com&gt;
Cc: Liu Yun &lt;yun.y.liu@intel.com&gt;
Cc: Ankit Sinha &lt;ankit.sinha@intel.com&gt;
Cc: Nate DeSimone &lt;nathaniel.l.desimone@intel.com&gt;
Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Acked-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Acked-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Acked-by: Leif Lindholm &lt;quic_llindhol@quicinc.com&gt;
Reviewed-by: Ankit Sinha &lt;ankit.sinha@intel.com&gt;
</content>
</entry>
<entry>
<title>PrmPkg/Library/DxePrmContextBufferLib: Add host-based unit tests</title>
<updated>2022-04-05T00:42:38+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2020-06-16T04:56:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=82d15dc6c11c4b38b9b2fbfad4768b2f56363844'/>
<id>urn:sha1:82d15dc6c11c4b38b9b2fbfad4768b2f56363844</id>
<content type='text'>
Adds host-based unit tests for DxePrmContextBufferLib. This tests
each function in DxePrmContextBufferLib.

Any changes to DxePrmContextBufferLib moving forward must pass the unit
tests. The unit tests should be updated as needed if the library API
changes.

Cc: Andrew Fish &lt;afish@apple.com&gt;
Cc: Kang Gao &lt;kang.gao@intel.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Cc: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Cc: Leif Lindholm &lt;leif@nuviainc.com&gt;
Cc: Benjamin You &lt;benjamin.you@intel.com&gt;
Cc: Liu Yun &lt;yun.y.liu@intel.com&gt;
Cc: Ankit Sinha &lt;ankit.sinha@intel.com&gt;
Cc: Nate DeSimone &lt;nathaniel.l.desimone@intel.com&gt;
Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Acked-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Acked-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Acked-by: Leif Lindholm &lt;quic_llindhol@quicinc.com&gt;
Reviewed-by: Ankit Sinha &lt;ankit.sinha@intel.com&gt;
</content>
</entry>
<entry>
<title>PrmPkg: Refactor some PrmLoaderDxe functionality into libraries</title>
<updated>2022-04-05T00:42:38+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2020-06-12T21:24:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=6b7dde7cdd1649e59e228535a29aa8d80761a1ba'/>
<id>urn:sha1:6b7dde7cdd1649e59e228535a29aa8d80761a1ba</id>
<content type='text'>
This change breaks out two sets of responsibilities in
PrmLoaderDxe into libraries:
  * PE/COFF functions -&gt; PrmPeCoffLib
  * PRM module discovery functions -&gt; PrmModuleDiscoveryLib

This is core infrastructure code for PRM functionality that needs
to be directly reused and tested in other places. At this time,
the primary motivating factor is to use this code in two other
locations:
  1.) Link the functionality into unit testing modules
  2.) Link the functionality into a PRM UEFI application

Cc: Andrew Fish &lt;afish@apple.com&gt;
Cc: Kang Gao &lt;kang.gao@intel.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Cc: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Cc: Leif Lindholm &lt;leif@nuviainc.com&gt;
Cc: Benjamin You &lt;benjamin.you@intel.com&gt;
Cc: Liu Yun &lt;yun.y.liu@intel.com&gt;
Cc: Ankit Sinha &lt;ankit.sinha@intel.com&gt;
Cc: Nate DeSimone &lt;nathaniel.l.desimone@intel.com&gt;
Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Acked-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Acked-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Acked-by: Leif Lindholm &lt;quic_llindhol@quicinc.com&gt;
Reviewed-by: Ankit Sinha &lt;ankit.sinha@intel.com&gt;
</content>
</entry>
</feed>
