]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/PeiPcdLib/PeiPcdLib.c
Add SEC as a supported Module Type for all libraries that are also compatible with...
[mirror_edk2.git] / MdePkg / Library / PeiPcdLib / PeiPcdLib.c
index b67d5f4ef21e458806d0a9a1355677a6f3730ebd..ea65581ebc87d311604550ed88d3332bf62a0879 100644 (file)
@@ -11,12 +11,21 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 \r
 \r
-Module Name: PeiPcdLib.c\r
-\r
 **/\r
 \r
 \r
 \r
+\r
+#include <PiPei.h>\r
+\r
+#include <Ppi/Pcd.h>\r
+\r
+#include <Library/PeiServicesLib.h>\r
+#include <Library/PcdLib.h>\r
+#include <Library/DebugLib.h>\r
+#include <Library/PeiServicesTablePointerLib.h>\r
+#include <Library/BaseMemoryLib.h>\r
+\r
 /**\r
   The constructor function retrieve the PCD_PPI pointer.\r
 \r
@@ -25,6 +34,7 @@ Module Name: PeiPcdLib.c
   @retval PCD_PPI * The pointer to the PCD_PPI.\r
 \r
 **/\r
+STATIC\r
 PCD_PPI  *\r
 GetPcdPpiPtr (\r
   VOID\r
@@ -32,19 +42,8 @@ GetPcdPpiPtr (
 {\r
   EFI_STATUS        Status;\r
   PCD_PPI           *PcdPpi;\r
-  EFI_PEI_SERVICES  **PeiServices;\r
-\r
-\r
-  PeiServices = GetPeiServicesTablePointer ();\r
-\r
-  Status = (**PeiServices).LocatePpi (\r
-                             PeiServices,\r
-                             &gPcdPpiGuid,\r
-                             0,\r
-                             NULL,\r
-                             (VOID **)&PcdPpi\r
-                             );\r
-\r
+  \r
+  Status = PeiServicesLocatePpi (&gPcdPpiGuid, 0, NULL, (VOID **)&PcdPpi);\r
   ASSERT_EFI_ERROR (Status);\r
 \r
   return PcdPpi;\r
@@ -906,7 +905,7 @@ LibPcdCallbackOnSet (
   PcdPpi = GetPcdPpiPtr ();\r
 \r
 \r
-  Status = PcdPpi->CallbackOnSet (TokenNumber, Guid, NotificationFunction);\r
+  Status = PcdPpi->CallbackOnSet (Guid, TokenNumber, NotificationFunction);\r
 \r
   ASSERT_EFI_ERROR (Status);\r
 \r
@@ -940,7 +939,7 @@ LibPcdCancelCallback (
   PcdPpi = GetPcdPpiPtr ();\r
 \r
 \r
-  Status = PcdPpi->CancelCallback (TokenNumber, Guid, NotificationFunction);\r
+  Status = PcdPpi->CancelCallback (Guid, TokenNumber, NotificationFunction);\r
 \r
   ASSERT_EFI_ERROR (Status);\r
 \r