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
- @param[in] VOID\r
- \r
@retval PCD_PPI * The pointer to the PCD_PPI.\r
\r
**/\r
{\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
}\r
\r
-\r
-\r
/**\r
Sets the current SKU in the PCD database to the value specified by SkuId. SkuId is returned.\r
\r
/**\r
Returns the 8-bit value for the token specified by TokenNumber. \r
\r
- @param[in] The PCD token number to retrieve a current value for.\r
+ @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
\r
@retval UINT8 Returns the 8-bit value for the token specified by TokenNumber. \r
\r
/**\r
Returns the 16-bit value for the token specified by TokenNumber. \r
\r
- @param[in] The PCD token number to retrieve a current value for.\r
+ @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
\r
@retval UINT16 Returns the 16-bit value for the token specified by TokenNumber. \r
\r
\r
If SizeOfValue > 0 and Buffer is NULL, then ASSERT().\r
\r
- @param[in] TokenNumber The PCD token number to set a current value for.\r
- @param[in,out] SizeOfBuffer The size, in bytes, of Buffer.\r
- @param[in] Value A pointer to the buffer to set.\r
+ @param[in] TokenNumber The PCD token number to set a current value for.\r
+ @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.\r
+ @param[in] Buffer A pointer to the buffer to set.\r
\r
@retval VOID* Return the pointer for the buffer been set.\r
\r
token number in the token space, then 0 is returned. If TokenNumber is not 0 and \r
is not in the token space specified by Guid, then ASSERT().\r
\r
- @param[in] Pointer to a 128-bit unique value that designates which namespace \r
- to set a value from. If NULL, then the default token space is used.\r
- @param[in] The previous PCD token number. If 0, then retrieves the first PCD \r
- token number.\r
+ @param[in] Guid Pointer to a 128-bit unique value that designates which namespace \r
+ to set a value from. If NULL, then the default token space is used.\r
+ @param[in] TokenNumber The previous PCD token number. If 0, then retrieves the first PCD \r
+ token number.\r
\r
@retval UINTN The next valid token number.\r
\r
\r
\r
\r
- @param[in] Pointer to a 128-bit unique value that designates from which namespace \r
- to start the search.\r
+ @param[in] Guid Pointer to a 128-bit unique value that designates from which namespace \r
+ to start the search.\r
\r
@retval CONST GUID * The next valid token namespace.\r
\r