]> git.proxmox.com Git - mirror_edk2.git/commitdiff
PrmPkg: Changes for edk2 repo transition
authorMichael Kubacki <michael.kubacki@microsoft.com>
Tue, 18 Jan 2022 21:54:51 +0000 (16:54 -0500)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 5 Apr 2022 00:42:38 +0000 (00:42 +0000)
Updates the Readme.md files to remove information that was specific
to the package in edk2-staging and adds key definitions being added
for PRM support in the ACPI Specification.

Adds PrmPkg/PrmPkg.ci.yaml to support CI.

Adds PrmPkg to .pytool/CISettings.py.

Adds PrmPkg maintainers to Maintainers.txt.

Cc: Andrew Fish <afish@apple.com>
Cc: Kang Gao <kang.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Michael Kubacki <michael.kubacki@microsoft.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Benjamin You <benjamin.you@intel.com>
Cc: Liu Yun <yun.y.liu@intel.com>
Cc: Ankit Sinha <ankit.sinha@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Acked-by: Michael D Kinney <michael.d.kinney@intel.com>
Acked-by: Liming Gao <gaoliming@byosoft.com.cn>
Acked-by: Leif Lindholm <quic_llindhol@quicinc.com>
Reviewed-by: Ankit Sinha <ankit.sinha@intel.com>
.azurepipelines/templates/pr-gate-build-job.yml
.pytool/CISettings.py
Maintainers.txt
PrmPkg/PrmPkg.ci.yaml [new file with mode: 0644]
PrmPkg/Readme.md
PrmPkg/Samples/Readme.md

index 244cffdbfabae144ce70ebed234e49a4138576ca..69e4c50afdbbbd965d7116f7da6e82baa0d9d0b9 100644 (file)
@@ -37,7 +37,7 @@ jobs:
         Build.Pkgs: 'NetworkPkg,RedfishPkg'\r
         Build.Targets: 'DEBUG,RELEASE,NO-TARGET'\r
       TARGET_OTHER:\r
-        Build.Pkgs: 'PcAtChipsetPkg,ShellPkg,StandaloneMmPkg'\r
+        Build.Pkgs: 'PcAtChipsetPkg,PrmPkg,ShellPkg,StandaloneMmPkg'\r
         Build.Targets: 'DEBUG,RELEASE,NO-TARGET'\r
       TARGET_FMP_FAT_TEST:\r
         Build.Pkgs: 'FmpDevicePkg,FatPkg,UnitTestFrameworkPkg,DynamicTablesPkg'\r
index ce330e2c73a38c248220b8f4c6b28df60bdcd424..cf9e0d77b19bba2c67f9a25ae9c9c15a7549036c 100644 (file)
@@ -65,6 +65,7 @@ class Settings(CiBuildSettingsManager, UpdateSettingsManager, SetupSettingsManag
                 "StandaloneMmPkg",\r
                 "FatPkg",\r
                 "CryptoPkg",\r
+                "PrmPkg",\r
                 "UnitTestFrameworkPkg",\r
                 "OvmfPkg",\r
                 "RedfishPkg",\r
index e32507dd6eb7545ab9dfeab84b649cd3848f415b..26662c9221ee0ab41199ede7d952fa38d9f9c7e8 100644 (file)
@@ -540,6 +540,14 @@ F: PcAtChipsetPkg/
 W: https://github.com/tianocore/tianocore.github.io/wiki/PcAtChipsetPkg\r
 M: Ray Ni <ray.ni@intel.com> [niruiyu]\r
 \r
+PrmPkg\r
+F: PrmPkg/\r
+M: Michael Kubacki <mikuback@linux.microsoft.com> [makubacki]\r
+M: Nate DeSimone <nathaniel.l.desimone@intel.com> [nate-desimone]\r
+\r
+PrmPkg: ACPI related modules\r
+R: Ankit Sinha <ankit.sinha@intel.com> [ankit13s]\r
+\r
 RedfishPkg: Redfish related modules\r
 F: RedfishPkg/\r
 M: Abner Chang <abner.chang@hpe.com> [changab]\r
diff --git a/PrmPkg/PrmPkg.ci.yaml b/PrmPkg/PrmPkg.ci.yaml
new file mode 100644 (file)
index 0000000..babaf22
--- /dev/null
@@ -0,0 +1,110 @@
+## @file\r
+# CI configuration for PrmPkg\r
+#\r
+# Copyright (c) Microsoft Corporation<BR>\r
+# SPDX-License-Identifier: BSD-2-Clause-Patent\r
+##\r
+{\r
+    ## options defined .pytool/Plugin/LicenseCheck\r
+    "LicenseCheck": {\r
+        "IgnoreFiles": []\r
+    },\r
+\r
+    "EccCheck": {\r
+        ## Exception sample looks like below:\r
+        ## "ExceptionList": [\r
+        ##     "<ErrorID>", "<KeyWord>"\r
+        ## ]\r
+        "ExceptionList": [\r
+          "5001", "PRM_HANDLER_EXPORT",\r
+          "8006", "PRM_HANDLER_EXPORT"\r
+        ],\r
+        ## Both file path and directory path are accepted.\r
+        "IgnoreFiles": [\r
+          "Library/DxePrmContextBufferLib/UnitTest",\r
+          "Library/DxePrmModuleDiscoveryLib/UnitTest",\r
+          "Samples",\r
+          "Test"\r
+        ]\r
+    },\r
+\r
+    ## options defined .pytool/Plugin/CompilerPlugin\r
+    "CompilerPlugin": {\r
+        "DscPath": "PrmPkg.dsc"\r
+    },\r
+\r
+    ## options defined .pytool/Plugin/HostUnitTestCompilerPlugin\r
+    "HostUnitTestCompilerPlugin": {\r
+        "DscPath": "Test/PrmPkgHostTest.dsc"\r
+    },\r
+\r
+    ## options defined .pytool/Plugin/CharEncodingCheck\r
+    "CharEncodingCheck": {\r
+        "IgnoreFiles": []\r
+    },\r
+\r
+    ## options defined .pytool/Plugin/DependencyCheck\r
+    "DependencyCheck": {\r
+        "AcceptableDependencies": [\r
+            "MdeModulePkg/MdeModulePkg.dec",\r
+            "MdePkg/MdePkg.dec",\r
+            "PrmPkg/PrmPkg.dec",\r
+            "ShellPkg/ShellPkg.dec",\r
+            "UefiCpuPkg/UefiCpuPkg.dec"\r
+        ],\r
+        # For host based unit tests\r
+        "AcceptableDependencies-HOST_APPLICATION":[\r
+            "UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec"\r
+        ],\r
+        # For UEFI shell based apps\r
+        "AcceptableDependencies-UEFI_APPLICATION":[],\r
+        "IgnoreInf": []\r
+    },\r
+\r
+    ## options defined .pytool/Plugin/DscCompleteCheck\r
+    "DscCompleteCheck": {\r
+        "IgnoreInf": [],\r
+        "DscPath": "PrmPkg.dsc"\r
+    },\r
+\r
+    ## options defined .pytool/Plugin/HostUnitTestDscCompleteCheck\r
+    "HostUnitTestDscCompleteCheck": {\r
+        "IgnoreInf": [""],\r
+        "DscPath": "Test/PrmPkgHostTest.dsc"\r
+    },\r
+\r
+    ## options defined .pytool/Plugin/GuidCheck\r
+    "GuidCheck": {\r
+        "IgnoreGuidName": [],\r
+        "IgnoreGuidValue": [],\r
+        "IgnoreFoldersAndFiles": [],\r
+        "IgnoreDuplicates": [],\r
+    },\r
+\r
+    ## options defined .pytool/Plugin/LibraryClassCheck\r
+    "LibraryClassCheck": {\r
+        "IgnoreHeaderFile": []\r
+    },\r
+\r
+    ## options defined .pytool/Plugin/SpellCheck\r
+    "SpellCheck": {\r
+        "AuditOnly": False,\r
+        "IgnoreFiles": [],          # use gitignore syntax to ignore errors\r
+                                    # in matching files\r
+        "ExtendWords": [            # words to extend to the dictionary for this package\r
+          "buffe",                  # note: appears in buffer ascii dump in documentation\r
+          "iptor",                  # note: appears in buffer ascii dump in documentation\r
+          "keepoptionalheader",\r
+          "odule",                  # note: appears in buffer ascii dump in documentation\r
+          "oemid",\r
+          "prmopreg",\r
+          "prmpecofflib",\r
+          "prmpkg",\r
+          "prmssdtinstall"\r
+        ],\r
+        "IgnoreStandardPaths": [],   # Standard Plugin defined paths that\r
+                                     # should be ignore\r
+        "AdditionalIncludePaths": [] # Additional paths to spell check\r
+                                     # (wildcards supported)\r
+    }\r
+}\r
index 848f898ab6d366ffd350c835d86af9e930339b8e..4ff8a36123d5f987fdd8b54ebaa87e605fa0b4ea 100644 (file)
@@ -10,15 +10,6 @@ For more details on PRM, refer to the [Platform Runtime Mechanism Specification
 The `PrmPkg` maintained in this branch provides a single cohesive set of generic PRM functionality that is intended\r
 to be leveraged by platform firmware with minimal overhead to integrate PRM functionality in the firmware.\r
 \r
-## **IMPORTANT NOTE**\r
-> The code provided in this package and branch are for proof-of-concept purposes only. The code does not represent a\r
-formal design and is not validated at product quality. The development of this feature is shared in the edk2-staging\r
-branch to simplify collaboration by allowing direct code contributions and early feedback throughout its development.\r
-\r
-> **Use recent edk2/master** - This code makes use of a very recent change in edk2 BaseTools. Specifically, commit\r
-[b65afdd](https://github.com/tianocore/edk2/commit/b65afdde74d6c1fac1cdbd2efdad23ba26295808). Ensure you have that\r
-change to build the code in this repo as-is.\r
-\r
 > By default, the build makes use of a new ACPI OperationRegion type specifically introduced for PRM called\r
 `PlatformRtMechanism`. Support for this OperationRegion is planned for the next release of the ACPI specification.\r
 However, support for `PlatformRtMechanism` is already included in the iASL Compiler/Disassembler for early prototyping\r
@@ -27,7 +18,13 @@ through ACPI, iASL compiler [20200528](https://acpica.org/node/181) or greater m
 interested in compiling the code and/or using direct call style PRM handlers, you can simply remove\r
 `PrmSsdtInstallDxe` from `PrmPkg.dsc`.\r
 \r
+The changes in the ACPI Specification include two elements:\r
+\r
+1. `BIT20` in Platform-Wide _OSC Capabilities DWORD2 will be used by an OS to indicate support for PRM\r
+2. A new Operation Region Address Space Identifier Value is defined as `0xB` for `PlatformRtMechanism`\r
+\r
 ## How to Build PrmPkg\r
+\r
 As noted earlier, resources in `PrmPkg` are intended to be referenced by a platform firmware so it can adopt support\r
 for PRM. In that case, the platform firmware should add the `PrmConfigDxe` and `PrmLoaderDxe` drivers to its DSC and\r
 FDF files so they are built in the platform firmware build and dispatched during its runtime. All that is left is to\r
@@ -35,26 +32,18 @@ add individual PRM modules to the DSC and FDF. These can be built from source or
 firmware flash map.\r
 \r
 ### PrmPkg Standalone Build\r
-**All changes to `PrmPkg` must not regress the standalone package build**. Any time a change is made to `PrmPkg`, the\r
-package build must be tested. Since this is a forward looking package, to ease potential integration into the edk2\r
-project in the future, the build is tested against the tip of the master branch in the [edk2](https://github.com/tianocore/edk2)\r
-repository.\r
 \r
 To build `PrmPkg` as a standalone package:\r
+\r
 1. If new to EDK II, follow the directions in [Getting Started with EDK II](https://github.com/tianocore/tianocore.github.io/wiki/Getting-Started-with-EDK-II)\r
 \r
 2. Clone the *master* branch on the edk2 repository locally \\r
    ``git clone https://github.com/tianocore/edk2.git``\r
 \r
-3. Clone the *PlatformRuntimeMechanism* branch on the edk2-staging repository locally \\r
-   ``git clone -b PlatformRuntimeMechanism --single-branch https://github.com/tianocore/edk2-staging.git``\r
-   > __*Note*__: The *--single-branch* argument is recommended since edk2-staging hosts many branches for completely\r
-   unrelated features. If you are just interested in PRM, this will avoid fetching all of the other branches.\r
-\r
-4. Change to the edk2 workspace directory \\r
+3. Change to the edk2 workspace directory \\r
    ``cd edk2``\r
 \r
-5. Run *edksetup* to set local environment variables needed for build\r
+4. Run *edksetup* to set local environment variables needed for build\r
    * Windows:\r
      * ``edksetup.bat``\r
    * Linux:\r
@@ -62,52 +51,22 @@ To build `PrmPkg` as a standalone package:
        * ``make -C BaseTools``\r
      * ``. edksetup.sh``\r
 \r
-6. Set the PACKAGES_PATH environment variable to include the directory path that contains `PrmPkg`\r
-   * Windows example:\r
-     *  ``set PACKAGES_PATH=c:\src\edk2-staging``\r
-\r
-7. Change to the edk2-staging workspace directory\r
-   * Example: ``cd ../edk2-staging``\r
-\r
-8. Build PrmPkg \\r
+5. Build PrmPkg \\r
    ``build -p PrmPkg/PrmPkg.dsc -a IA32 -a X64``\r
-   > __*Note*__: Due to the way PRM modules are compiled with exports, **only building on Visual Studio compiler tool\r
-   chains is currently supported**.\r
+   > ***Note***: Due to the way PRM modules are compiled with exports, **only building on Visual Studio compiler tool\r
+   chains has been tested**.\r
 \r
-In the future, each new terminal session can start at step #4. Within a terminal session, start at step #8.\r
-\r
-> __*Note*__: \\r
+> ***Note***: \\r
 > This package has been used without modification in several environments including client, server,\r
 > and virtual systems.\r
 >\r
-> A functional example of how to integrate this code into a platform is available here:\r
-> https://github.com/makubacki/edk2/tree/sample_ovmfpkg_prmpkg_integration\r
->\r
-> That build will load the drivers and PRM sample modules provided in this package in the open source emulator\r
-> [QEMU](https://www.qemu.org/) by including it in the [`OvmfPkg`](https://github.com/tianocore/edk2/tree/master/OvmfPkg) build.\r
->\r
 > You can add your own PRM modules into the build and check them with the `PrmInfo` UEFI application described\r
 > later in this document and dump the PRMT table in the OS to check if your PRM module is represented as expected.\r
 \r
-### Build Flags\r
-As PRM is a new feature at a proof-of-concept (POC) level of maturity, there's some changes to the normal build\r
-available as build flags. By default, if no flags are specified, the build is done with the currently expected plan of\r
-record (POR) configuration.\r
-\r
-The following list are the currently defined build flags (if any) that may be passed to the `build` command\r
-(e.g. -D FLAG=VALUE).\r
-\r
-* NONE - No build flags are currently used.\r
-\r
-   Additional detail: The context buffer structure is defined in [PrmContextBuffer.h](PrmPkg/Include/PrmContextBuffer.h).\r
-   This structure is passed as the context buffer to PRM handlers. The structure actually passed to PRM handlers is\r
-   allocated and populated by the OS where it gets all the information to populate the context buffer from other structures.\r
-\r
 ### PRM Platform GUID\r
-**IMPORTANT**\r
 \r
-PRM has a concept of a "Platform GUID" which associates a specific platform with a set of PRM modules built for\r
-that platform. This GUID is used to ensure system compatibility for a given collection of PRM modules.\r
+**IMPORTANT** PRM has a concept of a "Platform GUID" which associates a specific platform with a set of PRM modules\r
+built for that platform. This GUID is used to ensure system compatibility for a given collection of PRM modules.\r
 \r
 Therefore, each PRM module must only target a single platform and each platform must have a unique GUID. Even if a\r
 PRM module is unchanged between two different platforms now, there is no guarantee that will remain the case so always\r
@@ -122,20 +81,30 @@ supported in the future if needed.
 In the `PrmPkg` implementation, the Platform GUID is automatically derived from the PLATFORM_GUID in the DSC file of\r
 the package being built.\r
 \r
+### Build Output\r
+\r
+Like a typical EDK II package, the PrmPkg binary build output can be found in the Build directory in the edk2\r
+workspace. The organization in that directory follows the same layout as other EDK II packages.\r
+\r
+For example, that path to PRM module sample binaries for a DEBUG VS2017 X64 build is: \\r
+``edk2/Build/Prm/DEBUG_VS2017/X64/PrmPkg/Samples``\r
+\r
 ## Overview\r
+\r
 At a high-level, PRM can be viewed from three levels of granularity:\r
 \r
-1. PRM interface - Encompassing the entirety of firmware functionalities and data provided to OS runtime. Most\r
+1. `PRM interface` - Encompassing the entirety of firmware functionalities and data provided to OS runtime. Most\r
    information is provided through ACPI tables to be agnostic to a UEFI implementation.\r
-2. PRM module - An independently updatable package of PRM handlers. The PRM interface will be composed of multiple\r
+2. `PRM module` - An independently updatable package of PRM handlers. The PRM interface will be composed of multiple\r
    PRM modules. This requirement allows for the separation of OEM and IHV PRM code, each of which can be serviced\r
    independently.\r
-3. PRM handler - The implementation/callback of a single PRM functionality as identified by a GUID.\r
+3. `PRM handler` - The implementation/callback of a single PRM functionality as identified by a GUID.\r
 \r
 ## Firmware Design\r
+\r
 The firmware has three key generic drivers to support PRM:\r
 \r
-1. A PRM Loader driver - Functionality is split across three phases:\r
+1. A `PRM Loader driver` - Functionality is split across three phases:\r
    1. Discover - Find all PRM modules in the firmware image made available by the platform firmware author.\r
       * This phase includes verifying authenticity/integrity of the image, the image executable type, the export\r
         table is present and the PRM Export Module Descriptor is present and valid.\r
@@ -143,15 +112,16 @@ The firmware has three key generic drivers to support PRM:
       to physical address mappings required to construct the PRM ACPI table.\r
    3. Publish - Publish the PRM ACPI table using the information from the Process phase.\r
 \r
-2. A PRM Configuration driver - A generic driver responsible for processing PRM module configuration information\r
+2. A `PRM Configuration driver` - A generic driver responsible for processing PRM module configuration information\r
    consumed through a `PRM_CONFIG_PROTOCOL` per PRM module instance. Therefore, the `PRM_CONFIG_PROTOCOL` serves\r
    as the dynamic interface for this driver to process PRM module resources and prepare the module's data to be\r
    configured properly for OS runtime.\r
 \r
-3. A PRM Module - Not a single driver but a user written PE/COFF image that follows the PRM module authoring process.\r
+3. A `PRM Module` - Not a single driver but a user written PE/COFF image that follows the PRM module authoring process.\r
    A PRM module groups together cohesive sets of PRM functionality into functions referred to as "PRM handlers".\r
 \r
 ## PrmPkg Code Organization\r
+\r
 The package follows a standard EDK II style package format. The list below contains some notable areas to\r
 explore in the package:\r
 \r
@@ -167,12 +137,14 @@ that infrastructure. The PrmPkg is meant to be used as-is by firmware that suppo
 prevent the package from being used as-is should be addressed directly in PrmPkg.\r
 \r
 ## PRM Information UEFI Application\r
-A UEFI application is provided in this package called "PrmInfo" that allows a user to display and test PRM\r
+\r
+A UEFI application is provided in this package called `PrmInfo` that allows a user to display and test PRM\r
 modules on their system.\r
 \r
 [Link to application source code](PrmPkg/Application/PrmInfo).\r
 \r
 This application is intended to be helpful during PRM enabling by allowing the user to:\r
+\r
   1. Confirm that their firmware port of the PRM infrastructure implemented in this package is functioning correctly.\r
   2. Quickly get information about what PRM modules and handlers that are present on a given system.\r
   3. Quickly test PRM handlers without booting into a full operating system.\r
@@ -183,32 +155,32 @@ Execute the application help command for detailed usage instructions and example
 \r
 *Example Usage:*\r
 \r
-![](PrmPkg/Application/PrmInfo/PrmInfo_Usage_Example.gif)\r
+![PrmInfo Usage Example](https://raw.githubusercontent.com/tianocore/edk2-staging/PlatformRuntimeMechanism/PrmPkg/Application/PrmInfo/PrmInfo_Usage_Example.gif)\r
 \r
 ## PRM Module\r
 \r
-> __*Note*__: You can find simple examples of PRM modules in the Samples directory of this package.\r
+> ***Note***: You can find simple examples of PRM modules in the Samples directory of this package.\r
 > [Samples/Readme.md](PrmPkg/Samples/Readme.md) has more information.\r
 \r
 By default, the EDK II implementation of UEFI does not allow images with the subsystem type\r
-IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER to be built with exports. \r
+`IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER` to be built with exports.\r
 \r
-```\r
+```txt\r
 ERROR - Linker #1294 from LINK : fatal exports and import libraries are not supported with /SUBSYSTEM:EFI_RUNTIME_DRIVER\r
 ```\r
+\r
 This can adjusted in the MSVC linker options.\r
 \r
-__For the purposes of this POC__, the subsystem type is changed in the firmware build to allow the export table to be\r
-added but the subsystem type in the final image is still 0xC (EFI Runtime Driver). This is important to allow the DXE\r
-dispatcher to use its standard image verification and loading algorithms to load the image into permanent memory during\r
-the DXE execution phase.\r
+The subsystem type is changed in the firmware build to allow the export table to be added but the subsystem type in the\r
+final image is still `0xC` (`EFI Runtime Driver`). This is important to allow the DXE dispatcher to use its standard\r
+image verification and loading algorithms to load the image into permanent memory during the DXE execution phase.\r
 \r
-All firmware-loaded PRM modules are loaded into a memory buffer of type EfiRuntimeServicesCode. This means the\r
+All firmware-loaded PRM modules are loaded into a memory buffer of type `EfiRuntimeServicesCode`. This means the\r
 operating system must preserve all PRM handler code and the buffer will be reflected in the UEFI memory map. The\r
 execution for invoking PRM handlers is the same as that required for UEFI Runtime Services, notably 4KiB or more of\r
-available stack space must be provided and the stack must be 16-byte aligned. \r
+available stack space must be provided and the stack must be 16-byte aligned.\r
 \r
-__*Note:*__ Long term it is possible to similarly load the modules into a EfiRuntimeServicesCode buffer and perform\r
+***Note:*** Long term it is possible to similarly load the modules into a `EfiRuntimeServicesCode` buffer and perform\r
 relocation fixups with a new EFI module type for PRM if desired. It was simply not done since it is not essential\r
 for this POC.\r
 \r
@@ -217,10 +189,11 @@ motivation behind using PE/COFF export tables to expose PRM module information a
 definition consistent between firmware and OS load.\r
 \r
 ### PRM Module Exports\r
+\r
 A PRM module must contain at least two exports: A PRM Module Export Descriptor and at least one PRM handler. Here's\r
 an example of an export table from a PRM module that has a single PRM handler:\r
 \r
-```\r
+```txt\r
   0000000000005000: 00 00 00 00 FF FF FF FF 00 00 00 00 3C 50 00 00  ............<P..\r
   0000000000005010: 01 00 00 00 02 00 00 00 02 00 00 00 28 50 00 00  ............(P..\r
   0000000000005020: 30 50 00 00 38 50 00 00 78 13 00 00 20 40 00 00  0P..8P..x... @..\r
@@ -245,7 +218,9 @@ an example of an export table from a PRM module that has a single PRM handler:
           2    1 00004020 PrmModuleExportDescriptor\r
 \r
 ```\r
+\r
 ### PRM Image Format\r
+\r
 PRM modules are ultimately PE/COFF images. However, when packaged in firmware the PE/COFF image is placed into a\r
 Firmware File System (FFS) file. This is transparent to the operating system but done to better align with the typical\r
 packaging of PE32(+) images managed in the firmware binary image. In the dump of the PRM FV binary image shown earlier,\r
@@ -255,11 +230,12 @@ during the firmware build process. In either case, the PE/COFF section is contai
 image.\r
 \r
 ### PRM Module Implementation\r
+\r
 To simplify building the PRM Module Export Descriptor, a PRM module implementation can use the following macros to mark\r
 functions as PRM handlers. In this example, a PRM module registers three functions by name as PRM handlers with the\r
 associated GUIDs.\r
 \r
-```\r
+```c\r
 //\r
 // Register the PRM export information for this PRM Module\r
 //\r
@@ -280,6 +256,7 @@ all the includes needed to author a PRM module. This export is `PRM_MODULE_UPDAT
 `PrmModule.h`, a PRM module has the `PRM_MODULE_UPDATE_LOCK_DESCRIPTOR` automatically exported.\r
 \r
 ## PRM Handler Constraints\r
+\r
 At this time, PRM handlers are restricted to a maximum identifier length of 128 characters. This is checked when using\r
 the `PRM_HANDLER_EXPORT` macro by using a static assert that reports a violation at build-time.\r
 \r
index 590b81c349b4b7eb765c1e3d2108ed33bed3c62e..73963da168f2e1858fe33b59671903253a8a2467 100644 (file)
@@ -5,10 +5,12 @@ samples can also be used to verify the basic infrastructure needed in your firmw
 expected by checking that the sample modules are found properly and the handlers perform their tasks as noted.\r
 \r
 ## **IMPORTANT NOTE**\r
+\r
 > The sample modules have currently only been tested on the Visual Studio compiler tool chain. Sample module\r
 build may fail on other tool chains. A future work item is to enable broader build support.\r
 \r
 ## How to Build PRM Sample Modules\r
+\r
 The sample modules are built as part of the normal `PrmPkg` build so you can follow the\r
 [package build instructions](../../Readme.md#how-to-build-prmpkg) and then find the PRM sample binaries in your\r
 workspace build output directory. For example, if your build workspace is called "edk2" and you build\r
@@ -17,6 +19,7 @@ location: \
 ``edk2/Build/Prm/DEBUG_VS2017/X64/PrmPkg/Samples``\r
 \r
 ### Build an Individual PRM Sample Module\r
+\r
 Note that the build command does provide the option to build a specific module in a package which can result in\r
 faster build time. If you would like to just build a single PRM module that can be done by specifying the path to\r
 the module INF file with the "-m" argument to `build`. For example, this command builds 32-bit and 64-bit binaries\r
@@ -33,14 +36,18 @@ It is recommended that all PRM authors write a similar set of documentation for
 and interact with their PRM modules.\r
 \r
 ---\r
+\r
 ### Module: PRM Sample ACPI Parameter Buffer\r
+\r
 >* Name: `PrmSampleAcpiParameterBufferModule`\r
 >* GUID: `dc2a58a6-5927-4776-b995-d118a27335a2`\r
 > * Purpose:\r
 >   * Provides an example of how to configure an ACPI parameter buffer\r
 \r
 **Handlers:**\r
+\r
 #### Handler: Check Parameter Buffer PRM Handler\r
+\r
 * Name: `CheckParamBufferPrmHandler`\r
 * GUID: `2e4f2d13-6240-4ed0-a401-c723fbdc34e8`\r
 * Actions:\r
@@ -55,6 +62,7 @@ and interact with their PRM modules.
 * Runtime MMIO Range(s) Required: No\r
 \r
 ### Module: PRM Sample Context Buffer\r
+\r
 >* Name: `PrmSampleContextBufferModule`\r
 >* GUID: `5a6cf42b-8bb4-472c-a233-5c4dc4033dc7`\r
 > * Purpose:\r
@@ -62,7 +70,9 @@ and interact with their PRM modules.
       firmware and consume the buffer contents at runtime\r
 \r
 **Handlers:**\r
+\r
 #### Handler: Check Static Data Buffer PRM Handler\r
+\r
 * Name: `CheckStaticDataBufferPrmHandler`\r
 * GUID: `e1466081-7562-430f-896b-b0e523dc335a`\r
 * Actions:\r
@@ -72,6 +82,7 @@ and interact with their PRM modules.
 \r
 * Context Buffer Required: Yes\r
   * Static Data Buffer Contents:\r
+\r
   ```c\r
   #define   SOME_VALUE_ARRAY_MAX_VALUES   16\r
 \r
@@ -85,13 +96,16 @@ and interact with their PRM modules.
 * Runtime MMIO Range(s) Required: No\r
 \r
 ### Module: PRM Sample Hardware Access Buffer\r
+\r
 >* Name: `PrmSampleHardwareAccessModule`\r
 >* GUID: `0ef93ed7-14ae-425b-928f-b85a6213b57e`\r
 > * Purpose:\r
 >   * Demonstrate access of several types of hardware resources from a PRM module\r
 \r
 **Handlers:**\r
+\r
 #### Handler: MSR Access Microcode Signature PRM Handler\r
+\r
 * Name: `MsrAccessMicrocodeSignaturePrmHandler`\r
 * GUID: `2120cd3c-848b-4d8f-abbb-4b74ce64ac89`\r
 * Actions:\r
@@ -104,6 +118,7 @@ and interact with their PRM modules.
 * Runtime MMIO Range(s) Required: No\r
 \r
 #### Handler: MSR Access MTRR Dump PRM Handler\r
+\r
 * Name: `MsrAccessMtrrDumpPrmHandler`\r
 * GUID: `ea0935a7-506b-4159-bbbb-48deeecb6f58`\r
 * Actions:\r
@@ -116,6 +131,7 @@ and interact with their PRM modules.
 * Runtime MMIO Range(s) Required: No\r
 \r
 #### Handler: HPET MMIO Access PRM Handler\r
+\r
 * Name: `MmioAccessHpetPrmHandler`\r
 * GUID: `1bd1bda9-909a-4614-9699-25ec0c2783f7`\r
 * Actions:\r