]> git.proxmox.com Git - mirror_edk2.git/commitdiff
PrmPkg: Add initial PrmSampleContextBufferModule
authorMichael Kubacki <michael.kubacki@microsoft.com>
Tue, 7 Apr 2020 18:33:23 +0000 (11:33 -0700)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 5 Apr 2022 00:42:38 +0000 (00:42 +0000)
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 <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>
PrmPkg/Samples/PrmSampleContextBufferModule/Include/StaticData.h [new file with mode: 0644]
PrmPkg/Samples/PrmSampleContextBufferModule/Library/DxeContextBufferModuleConfigLib/DxeContextBufferModuleConfigLib.c [new file with mode: 0644]
PrmPkg/Samples/PrmSampleContextBufferModule/Library/DxeContextBufferModuleConfigLib/DxeContextBufferModuleConfigLib.inf [new file with mode: 0644]
PrmPkg/Samples/PrmSampleContextBufferModule/PrmSampleContextBufferModule.c [new file with mode: 0644]
PrmPkg/Samples/PrmSampleContextBufferModule/PrmSampleContextBufferModule.inf [new file with mode: 0644]

diff --git a/PrmPkg/Samples/PrmSampleContextBufferModule/Include/StaticData.h b/PrmPkg/Samples/PrmSampleContextBufferModule/Include/StaticData.h
new file mode 100644 (file)
index 0000000..8fe3cf9
--- /dev/null
@@ -0,0 +1,24 @@
+/** @file\r
+  PRM Module Static Data\r
+\r
+  Defines the structure of the static data buffer for the PRM Sample Context Buffer module.\r
+\r
+  Copyright (c) Microsoft Corporation\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+**/\r
+\r
+#ifndef PRM_STATIC_DATA_SAMPLE_CONTEXT_BUFFER_MODULE_H_\r
+#define PRM_STATIC_DATA_SAMPLE_CONTEXT_BUFFER_MODULE_H_\r
+\r
+#include <Base.h>\r
+\r
+#define   SOME_VALUE_ARRAY_MAX_VALUES   16\r
+\r
+typedef struct {\r
+  BOOLEAN       Policy1Enabled;\r
+  BOOLEAN       Policy2Enabled;\r
+  UINT8         SomeValueArray[SOME_VALUE_ARRAY_MAX_VALUES];\r
+} STATIC_DATA_SAMPLE_CONTEXT_BUFFER_MODULE;\r
+\r
+#endif\r
diff --git a/PrmPkg/Samples/PrmSampleContextBufferModule/Library/DxeContextBufferModuleConfigLib/DxeContextBufferModuleConfigLib.c b/PrmPkg/Samples/PrmSampleContextBufferModule/Library/DxeContextBufferModuleConfigLib/DxeContextBufferModuleConfigLib.c
new file mode 100644 (file)
index 0000000..3bf5beb
--- /dev/null
@@ -0,0 +1,203 @@
+/** @file\r
+\r
+  The boot services environment configuration library for the Context Buffer Sample PRM module.\r
+\r
+  Copyright (c) Microsoft Corporation\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+**/\r
+\r
+#include <Library/BaseLib.h>\r
+#include <Library/BaseMemoryLib.h>\r
+#include <Library/DebugLib.h>\r
+#include <Library/MemoryAllocationLib.h>\r
+#include <Library/UefiBootServicesTableLib.h>\r
+#include <Protocol/PrmConfig.h>\r
+#include <Samples/PrmSampleContextBufferModule/Include/StaticData.h>\r
+\r
+#include <PrmContextBuffer.h>\r
+#include <PrmDataBuffer.h>\r
+\r
+STATIC EFI_HANDLE  mPrmConfigProtocolHandle;\r
+\r
+// {5a6cf42b-8bb4-472c-a233-5c4dc4033dc7}\r
+STATIC CONST EFI_GUID mPrmModuleGuid = {0x5a6cf42b, 0x8bb4, 0x472c, {0xa2, 0x33, 0x5c, 0x4d, 0xc4, 0x03, 0x3d, 0xc7}};\r
+\r
+// {e1466081-7562-430f-896b-b0e523dc335a}\r
+STATIC CONST EFI_GUID mDumpStaticDataBufferPrmHandlerGuid = {0xe1466081, 0x7562, 0x430f, {0x89, 0x6b, 0xb0, 0xe5, 0x23, 0xdc, 0x33, 0x5a}};\r
+\r
+/**\r
+  Populates the static data buffer for this PRM module.\r
+\r
+  @param[out] StaticDataBuffer  A pointer to the static data buffer.\r
+\r
+  @retval EFI_SUCCESS           The static data buffer was populated successfully.\r
+  @retval EFI_INVALID_PARAMETER The StaticDataBuffer pointer argument is NULL.\r
+\r
+**/\r
+EFI_STATUS\r
+PopulateStaticDataBuffer (\r
+  OUT STATIC_DATA_SAMPLE_CONTEXT_BUFFER_MODULE  *StaticDataBuffer\r
+  )\r
+{\r
+  if (StaticDataBuffer == NULL) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+\r
+  //\r
+  // Note: In a real-world module these values would likely come from somewhere\r
+  // like a Setup menu option, PCD, binary data, runtime device info, etc. Ideally,\r
+  // this configuration library would be provided an API to get what it needs (the data)\r
+  // and not be concerned with how the data is provided. This makes the PRM module more\r
+  // portable across systems.\r
+  //\r
+  StaticDataBuffer->Policy1Enabled = TRUE;\r
+  StaticDataBuffer->Policy2Enabled = FALSE;\r
+  SetMem (StaticDataBuffer->SomeValueArray, ARRAY_SIZE (StaticDataBuffer->SomeValueArray), 'D');\r
+\r
+  return EFI_SUCCESS;\r
+}\r
+\r
+/**\r
+  Allocates and populates the static data buffer for this PRM module.\r
+\r
+  @param[out] StaticDataBuffer  A pointer to a pointer to the static data buffer.\r
+\r
+  @retval EFI_SUCCESS           The static data buffer was allocated and filled successfully.\r
+  @retval EFI_INVALID_PARAMETER The StaticDataBuffer pointer argument is NULL.\r
+  @retval EFI_OUT_OF_RESOURCES  Insufficient memory resources to allocate the static data buffer.\r
+\r
+**/\r
+EFI_STATUS\r
+GetStaticDataBuffer (\r
+  OUT PRM_DATA_BUFFER         **StaticDataBuffer\r
+  )\r
+{\r
+  EFI_STATUS                  Status;\r
+  PRM_DATA_BUFFER             *DataBuffer;\r
+  UINTN                       DataBufferLength;\r
+\r
+  if (StaticDataBuffer == NULL) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+  *StaticDataBuffer = NULL;\r
+\r
+  //\r
+  // Length of the data buffer = Buffer Header Size + Buffer Data Size\r
+  //\r
+  DataBufferLength = sizeof (PRM_DATA_BUFFER_HEADER) + sizeof (STATIC_DATA_SAMPLE_CONTEXT_BUFFER_MODULE);\r
+\r
+  DataBuffer = AllocateRuntimeZeroPool (DataBufferLength);\r
+  if (DataBuffer == NULL) {\r
+    return EFI_OUT_OF_RESOURCES;\r
+  }\r
+\r
+  //\r
+  // Initialize the data buffer header\r
+  //\r
+  DataBuffer->Header.Signature = PRM_DATA_BUFFER_HEADER_SIGNATURE;\r
+  DataBuffer->Header.Length = (UINT32) DataBufferLength;\r
+\r
+  Status = PopulateStaticDataBuffer ((STATIC_DATA_SAMPLE_CONTEXT_BUFFER_MODULE *) &DataBuffer->Data[0]);\r
+  ASSERT_EFI_ERROR (Status);\r
+\r
+  *StaticDataBuffer = DataBuffer;\r
+  return EFI_SUCCESS;\r
+}\r
+\r
+/**\r
+  Constructor of the PRM configuration library.\r
+\r
+  @param[in] ImageHandle        The image handle of the driver.\r
+  @param[in] SystemTable        The EFI System Table pointer.\r
+\r
+  @retval EFI_SUCCESS           The shell command handlers were installed successfully.\r
+  @retval EFI_UNSUPPORTED       The shell level required was not found.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+ContextBufferModuleConfigLibConstructor (\r
+  IN  EFI_HANDLE              ImageHandle,\r
+  IN  EFI_SYSTEM_TABLE        *SystemTable\r
+  )\r
+{\r
+  EFI_STATUS                  Status;\r
+  PRM_CONTEXT_BUFFER          *PrmContextBuffer;\r
+  PRM_DATA_BUFFER             *StaticDataBuffer;\r
+  PRM_CONFIG_PROTOCOL         *PrmConfigProtocol;\r
+\r
+  PrmContextBuffer = NULL;\r
+  StaticDataBuffer = NULL;\r
+  PrmConfigProtocol = NULL;\r
+\r
+  /*\r
+    In this sample PRM module, the protocol describing this sample module's resources is simply\r
+    installed in the constructor.\r
+\r
+    However, if some data is not available until later, this constructor could register a callback\r
+    on the dependency for the data to be available (e.g. ability to communicate with some device)\r
+    and then install the protocol. The requirement is that the protocol is installed before end of DXE.\r
+  */\r
+\r
+  //\r
+  // Allocate and populate the static data buffer\r
+  //\r
+  Status = GetStaticDataBuffer (&StaticDataBuffer);\r
+  ASSERT_EFI_ERROR (Status);\r
+  if (EFI_ERROR (Status) || StaticDataBuffer == NULL) {\r
+    goto Done;\r
+  }\r
+\r
+  //\r
+  // Allocate and populate the context buffer\r
+  //\r
+  // This sample module uses a single context buffer for all the handlers\r
+  // Todo: This can be done more elegantly in the future. Likely though a library service.\r
+  //\r
+  PrmContextBuffer = AllocateRuntimeZeroPool (sizeof (*PrmContextBuffer));\r
+  ASSERT (PrmContextBuffer != NULL);\r
+  if (PrmContextBuffer == NULL) {\r
+    Status = EFI_OUT_OF_RESOURCES;\r
+    goto Done;\r
+  }\r
+  CopyGuid (&PrmContextBuffer->HandlerGuid, &mDumpStaticDataBufferPrmHandlerGuid);\r
+  PrmContextBuffer->Signature = PRM_CONTEXT_BUFFER_SIGNATURE;\r
+  PrmContextBuffer->Version = PRM_CONTEXT_BUFFER_INTERFACE_VERSION;\r
+  PrmContextBuffer->StaticDataBuffer = StaticDataBuffer;\r
+\r
+  PrmConfigProtocol = AllocateZeroPool (sizeof (*PrmConfigProtocol));\r
+  ASSERT (PrmConfigProtocol != NULL);\r
+  if (PrmConfigProtocol == NULL) {\r
+    Status = EFI_OUT_OF_RESOURCES;\r
+    goto Done;\r
+  }\r
+  CopyGuid (&PrmConfigProtocol->ModuleContextBuffers.ModuleGuid, &mPrmModuleGuid);\r
+  PrmConfigProtocol->ModuleContextBuffers.BufferCount = 1;\r
+  PrmConfigProtocol->ModuleContextBuffers.Buffer = PrmContextBuffer;\r
+\r
+  //\r
+  // Install the PRM Configuration Protocol for this module. This indicates the configuration\r
+  // library has completed resource initialization for the PRM module.\r
+  //\r
+  Status = gBS->InstallProtocolInterface (\r
+                  &mPrmConfigProtocolHandle,\r
+                  &gPrmConfigProtocolGuid,\r
+                  EFI_NATIVE_INTERFACE,\r
+                  (VOID *) PrmConfigProtocol\r
+                  );\r
+\r
+Done:\r
+  if (EFI_ERROR (Status)) {\r
+    if (StaticDataBuffer != NULL) {\r
+      FreePool (StaticDataBuffer);\r
+    }\r
+    if (PrmContextBuffer != NULL) {\r
+      FreePool (PrmContextBuffer);\r
+    }\r
+    if (PrmConfigProtocol != NULL) {\r
+      FreePool (PrmConfigProtocol);\r
+    }\r
+  }\r
+\r
+  return Status;\r
+}\r
diff --git a/PrmPkg/Samples/PrmSampleContextBufferModule/Library/DxeContextBufferModuleConfigLib/DxeContextBufferModuleConfigLib.inf b/PrmPkg/Samples/PrmSampleContextBufferModule/Library/DxeContextBufferModuleConfigLib/DxeContextBufferModuleConfigLib.inf
new file mode 100644 (file)
index 0000000..db60468
--- /dev/null
@@ -0,0 +1,39 @@
+## @file\r
+#  Sample PRM Configuration Library Instance\r
+#\r
+#  The PRM configuration library instance is responsible for initializing and setting the corresponding\r
+#  PRM module's configuration in the boot environment.\r
+#\r
+#  Copyright (c) Microsoft Corporation\r
+#\r
+#  SPDX-License-Identifier: BSD-2-Clause-Patent\r
+#\r
+##\r
+\r
+[Defines]\r
+  INF_VERSION         = 0x00010005\r
+  BASE_NAME           = DxeContextBufferModuleConfigLib\r
+  FILE_GUID           = FFB56F09-65E3-4462-A799-2F0D1930D38C\r
+  MODULE_TYPE         = DXE_DRIVER\r
+  VERSION_STRING      = 1.0\r
+  LIBRARY_CLASS       = NULL |DXE_DRIVER\r
+  CONSTRUCTOR         = ContextBufferModuleConfigLibConstructor\r
+\r
+[Sources]\r
+  DxeContextBufferModuleConfigLib.c\r
+\r
+[Packages]\r
+  MdePkg/MdePkg.dec\r
+  MdeModulePkg/MdeModulePkg.dec\r
+  PrmPkg/PrmPkg.dec\r
+\r
+[Protocols]\r
+  gPrmConfigProtocolGuid\r
+\r
+[LibraryClasses]\r
+  BaseLib\r
+  BaseMemoryLib\r
+  DebugLib\r
+  MemoryAllocationLib\r
+  UefiBootServicesTableLib\r
+  UefiDriverEntryPoint\r
diff --git a/PrmPkg/Samples/PrmSampleContextBufferModule/PrmSampleContextBufferModule.c b/PrmPkg/Samples/PrmSampleContextBufferModule/PrmSampleContextBufferModule.c
new file mode 100644 (file)
index 0000000..074552d
--- /dev/null
@@ -0,0 +1,182 @@
+/** @file\r
+\r
+  This PRM Module demonstrates how to configure the module data resources in the firmware boot environment\r
+  and access those resources in a PRM handler at OS runtime.\r
+\r
+  Copyright (c) Microsoft Corporation\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+**/\r
+\r
+#include <PrmModule.h>\r
+\r
+#include <Library/BaseLib.h>\r
+#include <Library/PrintLib.h>\r
+#include <Library/UefiLib.h>\r
+\r
+#include <Samples/PrmSampleContextBufferModule/Include/StaticData.h>\r
+\r
+//\r
+// PRM Handler GUIDs\r
+//\r
+\r
+// {e1466081-7562-430f-896b-b0e523dc335a}\r
+#define DUMP_STATIC_DATA_BUFFER_PRM_HANDLER_GUID {0xe1466081, 0x7562, 0x430f, {0x89, 0x6b, 0xb0, 0xe5, 0x23, 0xdc, 0x33, 0x5a}}\r
+\r
+/**\r
+  Dumps the contents of a given buffer.\r
+\r
+  @param[in]  OsServiceDebugPrint   A pointer to the debug print OS service.\r
+  @param[in]  Buffer                A pointer to the buffer that should be dumped.\r
+  @param[in]  BufferSize            The size of Buffer in bytes.\r
+\r
+**/\r
+STATIC\r
+VOID\r
+DumpBuffer (\r
+  IN PRM_OS_SERVICE_DEBUG_PRINT OsServiceDebugPrint,\r
+  IN CONST VOID                 *Buffer,\r
+  IN UINTN                      BufferSize\r
+  )\r
+{\r
+  UINTN Count;\r
+  CONST UINT8 *Char = Buffer;\r
+  CHAR8 DebugMessage[16];\r
+\r
+  if (OsServiceDebugPrint == NULL || Buffer == NULL) {\r
+    return;\r
+  }\r
+\r
+  OsServiceDebugPrint ("    ");\r
+  for (Count = 0; Count < BufferSize; Count++)\r
+  {\r
+    if (Count && !(Count % 16)) {\r
+      OsServiceDebugPrint ("\n    ");\r
+    }\r
+    AsciiSPrint (\r
+      &DebugMessage[0],\r
+      ARRAY_SIZE (DebugMessage),\r
+      "%02X ",\r
+      Char[Count]\r
+      );\r
+    OsServiceDebugPrint (&DebugMessage[0]);\r
+  }\r
+  OsServiceDebugPrint ("\n\n");\r
+}\r
+\r
+/**\r
+  Prints the contents of this PRM module's static data buffer.\r
+\r
+  @param[in]  OsServiceDebugPrint   A pointer to the debug print OS service.\r
+  @param[in]  StaticDataBuffer      A pointer to the static buffer.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+PrintStaticDataBuffer (\r
+  IN PRM_OS_SERVICE_DEBUG_PRINT                       OsServiceDebugPrint,\r
+  IN CONST STATIC_DATA_SAMPLE_CONTEXT_BUFFER_MODULE   *StaticDataBuffer\r
+  )\r
+{\r
+  CHAR8 DebugMessage[256];\r
+\r
+  if (OsServiceDebugPrint == NULL || StaticDataBuffer == NULL) {\r
+    return;\r
+  }\r
+\r
+  AsciiSPrint (\r
+    &DebugMessage[0],\r
+    ARRAY_SIZE (DebugMessage),\r
+    "  Policy1Enabled = 0x%x.\n",\r
+    StaticDataBuffer->Policy1Enabled\r
+    );\r
+  OsServiceDebugPrint (&DebugMessage[0]);\r
+\r
+  AsciiSPrint (\r
+    &DebugMessage[0],\r
+    ARRAY_SIZE (DebugMessage),\r
+    "  Policy2Enabled = 0x%x.\n",\r
+    StaticDataBuffer->Policy2Enabled\r
+    );\r
+  OsServiceDebugPrint (&DebugMessage[0]);\r
+\r
+  OsServiceDebugPrint ("  Dumping SomeValueArray:\n");\r
+  DumpBuffer (\r
+    OsServiceDebugPrint,\r
+    (CONST VOID *) &StaticDataBuffer->SomeValueArray[0],\r
+    ARRAY_SIZE (StaticDataBuffer->SomeValueArray)\r
+    );\r
+}\r
+\r
+/**\r
+  A sample Platform Runtime Mechanism (PRM) handler.\r
+\r
+  This sample handler attempts to read the contents of the static data buffer that were configured\r
+  during the firmware boot environment and print those contents at OS runtime.\r
+\r
+  @param[in]  OsServices          An array of pointers to OS provided services for PRM handlers\r
+  @param[in]  Context             Handler context info\r
+\r
+  @retval EFI_STATUS              The PRM handler executed successfully.\r
+  @retval Others                  An error occurred in the PRM handler.\r
+\r
+**/\r
+PRM_HANDLER_EXPORT (DumpStaticDataBufferPrmHandler)\r
+{\r
+  PRM_OS_SERVICE_DEBUG_PRINT      OsServiceDebugPrint;\r
+\r
+  if (ContextBuffer == NULL) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+\r
+  // In the POC, the OS debug print service is assumed to be at the beginning of ParameterBuffer\r
+  OsServiceDebugPrint = *((PRM_OS_SERVICE_DEBUG_PRINT *) ParameterBuffer);\r
+  if (OsServiceDebugPrint == NULL) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+\r
+  OsServiceDebugPrint ("Context Buffer DumpStaticDataBufferPrmHandler entry.\n");\r
+\r
+  if (ContextBuffer->StaticDataBuffer == NULL) {\r
+    OsServiceDebugPrint ("The static buffer is not allocated!\n");\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+\r
+  OsServiceDebugPrint ("  Printing the contents of the static data buffer:\n");\r
+\r
+  //\r
+  // Verify PRM data buffer signature is valid\r
+  //\r
+  if (\r
+    ContextBuffer->Signature != PRM_CONTEXT_BUFFER_SIGNATURE ||\r
+    ContextBuffer->StaticDataBuffer->Header.Signature != PRM_DATA_BUFFER_HEADER_SIGNATURE) {\r
+    OsServiceDebugPrint ("  A buffer signature is invalid!\n");\r
+    return EFI_NOT_FOUND;\r
+  }\r
+\r
+  PrintStaticDataBuffer (\r
+    OsServiceDebugPrint,\r
+    (CONST STATIC_DATA_SAMPLE_CONTEXT_BUFFER_MODULE *) &(ContextBuffer->StaticDataBuffer->Data[0])\r
+    );\r
+\r
+  OsServiceDebugPrint ("Context Buffer DumpStaticDataBufferPrmHandler exit.\n");\r
+\r
+  return EFI_SUCCESS;\r
+}\r
+\r
+//\r
+// Register the PRM export information for this PRM Module\r
+//\r
+PRM_MODULE_EXPORT (\r
+  PRM_HANDLER_EXPORT_ENTRY (DUMP_STATIC_DATA_BUFFER_PRM_HANDLER_GUID, DumpStaticDataBufferPrmHandler)\r
+  );\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+PrmSampleContextBufferModuleInit (\r
+  IN  EFI_HANDLE                  ImageHandle,\r
+  IN  EFI_SYSTEM_TABLE            *SystemTable\r
+  )\r
+{\r
+  return EFI_SUCCESS;\r
+}\r
diff --git a/PrmPkg/Samples/PrmSampleContextBufferModule/PrmSampleContextBufferModule.inf b/PrmPkg/Samples/PrmSampleContextBufferModule/PrmSampleContextBufferModule.inf
new file mode 100644 (file)
index 0000000..4dd77f5
--- /dev/null
@@ -0,0 +1,42 @@
+## @file\r
+#  Sample PRM Driver\r
+#\r
+#  A sample PRM Module implementation. This PRM Module includes a PRM Module configuration library instance\r
+#  that applies the configuration for the PRM context data in the boot environment. A PRM handler\r
+#  is provided that accesses the context buffer resources and prints their value at OS runtime.\r
+#\r
+#  Copyright (c) Microsoft Corporation\r
+#\r
+#  SPDX-License-Identifier: BSD-2-Clause-Patent\r
+#\r
+##\r
+\r
+[Defines]\r
+  INF_VERSION         = 0x00010005\r
+  BASE_NAME           = PrmSampleContextBufferModule\r
+  FILE_GUID           = 5A6CF42B-8BB4-472C-A233-5C4DC4033DC7\r
+  MODULE_TYPE         = DXE_RUNTIME_DRIVER\r
+  VERSION_STRING      = 1.0\r
+  ENTRY_POINT         = PrmSampleContextBufferModuleInit\r
+\r
+[Sources]\r
+  Include/StaticData.h\r
+  PrmSampleContextBufferModule.c\r
+\r
+[Packages]\r
+  MdePkg/MdePkg.dec\r
+  MdeModulePkg/MdeModulePkg.dec\r
+  UefiCpuPkg/UefiCpuPkg.dec\r
+  PrmPkg/PrmPkg.dec\r
+\r
+[LibraryClasses]\r
+  BaseLib\r
+  PrintLib\r
+  UefiDriverEntryPoint\r
+  UefiLib\r
+\r
+[Depex]\r
+  TRUE\r
+\r
+[BuildOptions.common]\r
+  MSFT:*_*_*_DLINK_FLAGS  = /DLL /SUBSYSTEM:CONSOLE /VERSION:1.0\r