<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/PrmPkg/Samples/PrmSampleHardwareAccessModule, 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: 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: Remove the concept of OS services</title>
<updated>2022-04-05T00:42:38+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2020-11-17T17:37:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=88f3d734f5a066491d6da3cddcacc6cd7f07d184'/>
<id>urn:sha1:88f3d734f5a066491d6da3cddcacc6cd7f07d184</id>
<content type='text'>
OS services are no longer supported as of the current PRM design.

1. Removes OS services from PrmSampleHardwareAccessModule
2. Removes the PrmOsServices.h file

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/HardwareAccessModuleConfigLib: Add initial library</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-11T00:28:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=fec018624c7e3059cd3e23d5f1bc6006d99fb673'/>
<id>urn:sha1:fec018624c7e3059cd3e23d5f1bc6006d99fb673</id>
<content type='text'>
Adds a PRM module configuration library for PrmSampleHardwareAccessModule
that demonstrates marking a runtime MMIO range. In the case of this
sample module, the range used is for HPET.

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/PrmSampleHardwareAccessModule: Add non-print PRM handlers</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-10T23:28:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=4c8486fd72156b1327206121572f3959ba7afa59'/>
<id>urn:sha1:4c8486fd72156b1327206121572f3959ba7afa59</id>
<content type='text'>
For each PRM handler that is currently present, a corresponding PRM
handler is added that does not print. This allows a caller to execute
a sample hardware access PRM handler without requiring that caller to
provide a debug print service.

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 initial PrmSampleHardwareAccessModule</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:31:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=27b1a840e4b286927c59495a8b7cf414dadfa90d'/>
<id>urn:sha1:27b1a840e4b286927c59495a8b7cf414dadfa90d</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 multiple PRM handlers in a module
  3. How to use a basic PRM OS service
  4. MSR access at OS runtime

Note: This module contains a PRM handler to read from the HPET MMIO
      range but the memory map changes needed for this to succeed
      are currently not implemented. These will be implemented in a
      future change.

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>
