<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/PrmPkg/Samples/PrmSampleContextBufferModule, 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/Samples: Update INF files for GCC/CLANG</title>
<updated>2025-10-17T06:23:17+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2025-10-02T23:18:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=12a908e09c2e2999a8c988a53bb44f70a7862bc4'/>
<id>urn:sha1:12a908e09c2e2999a8c988a53bb44f70a7862bc4</id>
<content type='text'>
* Remove redundant /DLL option from MSFT
* Use VERSION_STRING from [Defines] section to set
  the PE/COFF optional header image version fields.
  The use of the MSFT linker /VERSION option is
  removed and replaced with the GenFw --image-version
  option to use same method for all tool chains and
  provide better error checking.
* Add CLANGPDB tool chain family support that matches
  MSFT settings.
* Add GCC family tool chain support that overrides
  OBJCOPY_STRIPFLAGS to nothing to prevent symbols
  from being stripped from PRM Modules so the
  PRM Export Descriptor Structure can be found by
  GENFW when the --prm option is used.
* Remove all -Wl, options that are not compatible
  across all support tool chains. This also removes
  the need to list the PRM Export Descriptor Structure
  and PRM Handler APIs in the INF file and instead
  depend in GENFW with --prm option to find these
  symbols and generate the PE/COFF DLL export section.

Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>PrmPkg: Correct the flags for X64 GCC compiler</title>
<updated>2025-03-27T04:54:29+00:00</updated>
<author>
<name>Abdul Lateef Attar</name>
<email>abdattar@amd.com</email>
</author>
<published>2025-03-18T08:51:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=9006a9b5e4671ffc3d29c035260b19a8075c3f64'/>
<id>urn:sha1:9006a9b5e4671ffc3d29c035260b19a8075c3f64</id>
<content type='text'>
Correct the GCC GenFw and ld flag to build PRM run time modules.
These changes are made for X64 GCC compiler, current present for AARCH64 only.
Adds addition _X64_OBJCOPY_STRIPFLAG for X64 to retain required symbol
during objcopy.

Signed-off-by: Abdul Lateef Attar &lt;AbdulLateef.Attar@amd.com&gt;
</content>
</entry>
<entry>
<title>PrmPkg: Build Prm Samples with GCC for AARCH64</title>
<updated>2022-08-08T22:43:51+00:00</updated>
<author>
<name>Jose Marinho</name>
<email>jose.marinho@arm.com</email>
</author>
<published>2022-04-05T17:57:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=21200d9fe6d5b8078b93dbddfbcdf536308b67e4'/>
<id>urn:sha1:21200d9fe6d5b8078b93dbddfbcdf536308b67e4</id>
<content type='text'>
- Add the --prm flag to the GENFW_FLAGS
- Add the --no-gc-section to the linker flags so that apparently
unreferenced symbols are not prematurely removed from the .dll which
is used to generate the Prm module .efi.
- Force the linker to maintain the PrmModuleExportDescriptor symbol.
- Force the linker to maintain the PRM handler funtion's symbol.

Signed-off-by: Jose Marinho &lt;jose.marinho@arm.com&gt;
Signed-off-by: Sami Mujawar &lt;sami.mujawar@arm.com&gt;
Reviewed-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&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/PrmSampleContextBufferModule: Remove OS debug print requirement</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-09T16:44:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=c1a7a50f67a3d3ac3b9c21275181a695b879403c'/>
<id>urn:sha1:c1a7a50f67a3d3ac3b9c21275181a695b879403c</id>
<content type='text'>
Removes the expectation that the parameter buffer contain an OS
debug print service at the beginning of the buffer. All supporting
code related to printing is also removed.

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: Remove ALLOCATE_CONTEXT_BUFFER_IN_FW build flag</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-08T18:06:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=0797989c5dba1157ed09586f6026af6c05df78d5'/>
<id>urn:sha1:0797989c5dba1157ed09586f6026af6c05df78d5</id>
<content type='text'>
The POR is firmly to use an OS allocated context buffer now so the
build flag that allows firmware to allocate the context buffer
is removed along with supporting code.

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: Export major/minor version in PRM module PE COFF header</title>
<updated>2022-04-05T00:42:38+00:00</updated>
<author>
<name>Liu</name>
<email>yun.y.liu@intel.com</email>
</author>
<published>2020-05-07T06:48:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=f96517f4d04e9edf7705966b4e7c759998cc1144'/>
<id>urn:sha1:f96517f4d04e9edf7705966b4e7c759998cc1144</id>
<content type='text'>
PRMT ACPI defined major version and minor version for each PRM module.

PRM module will build its major/minor version in its PE COFF header.
In boot time, PRM loader will collect the major/minor version from PE COFF
header and fill them into PRMT ACPI table.

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: Liu Yun &lt;yun.y.liu@intel.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: Add ALLOCATE_CONTEXT_BUFFER_IN_FW build option</title>
<updated>2022-04-05T00:42:38+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2020-04-13T23:38:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=e846797662bd968cf9bf67ff04957ad80e5a9c6c'/>
<id>urn:sha1:e846797662bd968cf9bf67ff04957ad80e5a9c6c</id>
<content type='text'>
There's currently two approaches being considered for how to allocate the
context buffer passed to PRM handlers:

1. The context buffer is allocated and populated in firmware. As such, the
   FW converts all pointers internal to the buffer to virtual memory
   addresses at the virtual address change event. A single context buffer
   pointer is given to the OS via the PRM ACPI table and the OS converts
   this single physical address to a virtual address when it passes the
   context buffer as a pointer to PRM handlers.

2. The context buffer is allocated and populated in the OS. The OS gets
   all the information needed to populate the context buffer from other
   pre-existing resources (mainly physical addresses in the PRM ACPI
   table). The OS converts all the physical addresses to virtual addresses,
   allocates the context buffer instances, and fills in the information.
   The OS passes the context buffer virtual address to PRM handlers.

The prior behavior was (1). The current POR behavior has moved to (2).
Until (2) is used more widely, it can be kept around with fairly minimal
overhead via a build flag in a few places.

So the default behavior is now (2) (the expected permanent behavior) with
(1) easily enabled by defining "ALLOCATE_CONTEXT_BUFFER_IN_FW" in the
compiler defined macros. A DSC define was added in PrmPkg.dsc to set this
compiler macro in the package  build.

At some point in the future, all code (and some peripheral code)
surrounded with this build flag can be removed if (2) is fully
decided upon.

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: Add initial PrmSampleContextBufferModule</title>
<updated>2022-04-05T00:42:38+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2020-04-07T18:33:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=7c41ec47ca55ab4556eeede585d66144add5cb23'/>
<id>urn:sha1:7c41ec47ca55ab4556eeede585d66144add5cb23</id>
<content type='text'>
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3812

Adds a sample PRM module that demonstrates:
  1. How to write a PRM module
  2. How to use a basic PRM OS services
  3. How to use a basic PRM module configuration library
  4. How to use a context buffer during PRM handler execution

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>
