]> git.proxmox.com Git - mirror_edk2.git/commitdiff
updated definitions of PCD PPI/Protocol per latest UEFI Spec.
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 1 Mar 2010 06:14:46 +0000 (06:14 +0000)
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 1 Mar 2010 06:14:46 +0000 (06:14 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10134 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Include/Ppi/PiPcd.h
MdePkg/Include/Protocol/PiPcd.h
MdePkg/Library/PeiPcdLib/PeiPcdLib.c

index d0b43ca8c908a97e6b31ec0505b52bd6ca486e7e..372bb117e9ffa9b31f00957f5a9c5dbbbfc456d7 100644 (file)
@@ -1,10 +1,10 @@
 /** @file\r
   Platform Configuration Database (PCD) Protocol defined in PI 1.2 Vol3\r
 \r
-  A platform database that contains a variety of current platform settings or \r
+  A platform database that contains a variety of current platform settings or\r
   directives that can be accessed by a driver or application.\r
   PI PCD protocol only provide the accessing interfaces for Dynamic-Ex type PCD.\r
-  \r
+\r
   Callers to this protocol must be at a TPL_APPLICATION task priority level.\r
   This is the base PCD service API that provides an abstraction for accessing configuration content in\r
   the platform. It a seamless mechanism for extracting information regardless of where the\r
   This protocol allows access to data through size-granular APIs and provides a mechanism for a\r
   firmware component to monitor specific settings and be alerted when a setting is changed.\r
 \r
-  Copyright (c) 2009, Intel Corporation                                                         \r
-  All rights reserved. This program and the accompanying materials                          \r
-  are licensed and made available under the terms and conditions of the BSD License         \r
-  which accompanies this distribution.  The full text of the license may be found at        \r
-  http://opensource.org/licenses/bsd-license.php                                            \r
+  Copyright (c) 2009 - 2010, Intel Corporation\r
+  All rights reserved. This program and the accompanying materials\r
+  are licensed and made available under the terms and conditions of the BSD License\r
+  which accompanies this distribution.  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.php\r
 \r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-  @par Revision Reference: \r
+  @par Revision Reference:\r
   PI Version 1.2 Vol 3.\r
 **/\r
 \r
@@ -47,7 +47,7 @@ extern EFI_GUID gEfiPeiPcdPpiGuid;
   SKU Id is set or the currently set SKU Id isn't valid for the specified token, the system uses the\r
   default SKU Id. If the system attempts to use the default SKU Id and no value has been set for that\r
   Id, the results are unpredictable.\r
-  \r
+\r
   @param[in]    SkuId   The SKU value to set.\r
 **/\r
 typedef\r
@@ -59,15 +59,15 @@ VOID
 /**\r
   Retrieves the current byte-sized value for a PCD token number. If the TokenNumber is invalid,\r
   the results are unpredictable.\r
-  \r
+\r
   @param[in]    Guid          The 128-bit unique value that designates which namespace to extract the value from.\r
   @param[in]    TokenNumber   The PCD token number.\r
-  \r
+\r
   @return 8-bit value for a given PCD token.\r
 **/\r
 typedef\r
 UINT8\r
-(EFIAPI *EFI_PEI_PCD_PPI_GET_EX_8)(\r
+(EFIAPI *EFI_PEI_PCD_PPI_GET_8)(\r
   IN CONST  EFI_GUID  *Guid,\r
   IN        UINTN     TokenNumber\r
 );\r
@@ -75,15 +75,15 @@ UINT8
 /**\r
   Retrieves the current byte-sized value for a PCD token number. If the TokenNumber is invalid,\r
   the results are unpredictable.\r
-  \r
+\r
   @param[in]    Guid          The 128-bit unique value that designates which namespace to extract the value from.\r
   @param[in]    TokenNumber   The PCD token number.\r
-  \r
+\r
   @return 16-bit value for a given PCD token.\r
 **/\r
 typedef\r
 UINT16\r
-(EFIAPI *EFI_PEI_PCD_PPI_GET_EX_16)(\r
+(EFIAPI *EFI_PEI_PCD_PPI_GET_16)(\r
   IN CONST  EFI_GUID  *Guid,\r
   IN        UINTN     TokenNumber\r
 );\r
@@ -91,15 +91,15 @@ UINT16
 /**\r
   Retrieves the current 32-bit value for a PCD token number. If the TokenNumber is invalid, the\r
   results are unpredictable.\r
-  \r
+\r
   @param[in]    Guid          The 128-bit unique value that designates which namespace to extract the value from.\r
   @param[in]    TokenNumber   The PCD token number.\r
-  \r
-  @return 32-bit value for a given PCD token.  \r
+\r
+  @return 32-bit value for a given PCD token.\r
 **/\r
 typedef\r
 UINT32\r
-(EFIAPI *EFI_PEI_PCD_PPI_GET_EX_32)(\r
+(EFIAPI *EFI_PEI_PCD_PPI_GET_32)(\r
   IN CONST  EFI_GUID  *Guid,\r
   IN        UINTN     TokenNumber\r
 );\r
@@ -107,15 +107,15 @@ UINT32
 /**\r
   Retrieves the current 64-bit value for a PCD token number. If the TokenNumber is invalid, the\r
   results are unpredictable.\r
-  \r
+\r
   @param[in]    Guid          The 128-bit unique value that designates which namespace to extract the value from.\r
   @param[in]    TokenNumber   The PCD token number.\r
-  \r
-  @return 64-bit value for a given PCD token.  \r
+\r
+  @return 64-bit value for a given PCD token.\r
 **/\r
 typedef\r
 UINT64\r
-(EFIAPI *EFI_PEI_PCD_PPI_GET_EX_64)(\r
+(EFIAPI *EFI_PEI_PCD_PPI_GET_64)(\r
   IN CONST  EFI_GUID  *Guid,\r
   IN        UINTN     TokenNumber\r
 );\r
@@ -124,13 +124,13 @@ UINT64
   Retrieves the current pointer to the value for a PCD token number. There should not be any\r
   alignment assumptions about the pointer that is returned by this function call. If the TokenNumber\r
   is invalid, the results are unpredictable.\r
-  \r
+\r
   @param[in]    Guid          The 128-bit unique value that designates which namespace to extract the value from.\r
   @param[in]    TokenNumber   The PCD token number.\r
 **/\r
 typedef\r
 VOID *\r
-(EFIAPI *EFI_PEI_PCD_PPI_GET_EX_POINTER)(\r
+(EFIAPI *EFI_PEI_PCD_PPI_GET_POINTER)(\r
   IN CONST  EFI_GUID  *Guid,\r
   IN        UINTN     TokenNumber\r
 );\r
@@ -141,12 +141,12 @@ VOID *
 \r
   @param[in]    Guid          The 128-bit unique value that designates which namespace to extract the value from.\r
   @param[in]    TokenNumber   The PCD token number.\r
-  \r
+\r
   @return Boolean value for a given PCD token.\r
 **/\r
 typedef\r
 BOOLEAN\r
-(EFIAPI *EFI_PEI_PCD_PPI_GET_EX_BOOLEAN)(\r
+(EFIAPI *EFI_PEI_PCD_PPI_GET_BOOLEAN)(\r
   IN CONST  EFI_GUID  *Guid,\r
   IN        UINTN     TokenNumber\r
 );\r
@@ -154,38 +154,38 @@ BOOLEAN
 /**\r
   Retrieves the current size of a particular PCD token. If the TokenNumber is invalid, the results are\r
   unpredictable.\r
-  \r
+\r
   @param[in]    Guid          The 128-bit unique value that designates which namespace to extract the value from.\r
-  @param[in]    TokenNumber   The PCD token number.  \r
-  \r
+  @param[in]    TokenNumber   The PCD token number.\r
+\r
   @return the size of the value for a given PCD token.\r
 **/\r
 typedef\r
 UINTN\r
-(EFIAPI *EFI_PEI_PCD_PPI_GET_EX_SIZE)(\r
+(EFIAPI *EFI_PEI_PCD_PPI_GET_SIZE)(\r
   IN CONST  EFI_GUID  *Guid,\r
   IN        UINTN     TokenNumber\r
 );\r
 \r
 /**\r
   Sets an 8-bit value for a given PCD token.\r
-  \r
+\r
   When the PCD service sets a value, it will check to ensure that the size of the value being set is\r
   compatible with the Token's existing definition. If it is not, an error will be returned.\r
-  \r
+\r
   @param[in]    Guid          The 128-bit unique value that designates which namespace to extract the value from.\r
-  @param[in]    TokenNumber   The PCD token number. \r
+  @param[in]    TokenNumber   The PCD token number.\r
   @param[in]    Value         The value to set for the PCD token.\r
-  \r
+\r
   @retval   EFI_SUCCESS             The PCD service has set the value requested\r
   @retval   EFI_INVALID_PARAMETER   The PCD service determined that the size of the data being set was\r
                                     incompatible with a call to this function. Use GetSizeEx() to\r
                                     retrieve the size of the target data.\r
-  @retval   EFI_NOT_FOUND           The PCD service could not find the requested token number.                                    \r
+  @retval   EFI_NOT_FOUND           The PCD service could not find the requested token number.\r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_PEI_PCD_PPI_SET_EX_8)(\r
+(EFIAPI *EFI_PEI_PCD_PPI_SET_8)(\r
   IN CONST  EFI_GUID  *Guid,\r
   IN        UINTN     TokenNumber,\r
   IN        UINT8     Value\r
@@ -193,23 +193,23 @@ EFI_STATUS
 \r
 /**\r
   Sets an 16-bit value for a given PCD token.\r
-  \r
+\r
   When the PCD service sets a value, it will check to ensure that the size of the value being set is\r
   compatible with the Token's existing definition. If it is not, an error will be returned.\r
-  \r
+\r
   @param[in]    Guid          The 128-bit unique value that designates which namespace to extract the value from.\r
-  @param[in]    TokenNumber   The PCD token number. \r
+  @param[in]    TokenNumber   The PCD token number.\r
   @param[in]    Value         The value to set for the PCD token.\r
-  \r
+\r
   @retval   EFI_SUCCESS             The PCD service has set the value requested\r
   @retval   EFI_INVALID_PARAMETER   The PCD service determined that the size of the data being set was\r
                                     incompatible with a call to this function. Use GetSizeEx() to\r
                                     retrieve the size of the target data.\r
-  @retval   EFI_NOT_FOUND           The PCD service could not find the requested token number.                                    \r
+  @retval   EFI_NOT_FOUND           The PCD service could not find the requested token number.\r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_PEI_PCD_PPI_SET_EX_16)(\r
+(EFIAPI *EFI_PEI_PCD_PPI_SET_16)(\r
   IN CONST  EFI_GUID  *Guid,\r
   IN        UINTN     TokenNumber,\r
   IN        UINT16    Value\r
@@ -217,23 +217,23 @@ EFI_STATUS
 \r
 /**\r
   Sets an 32-bit value for a given PCD token.\r
-  \r
+\r
   When the PCD service sets a value, it will check to ensure that the size of the value being set is\r
   compatible with the Token's existing definition. If it is not, an error will be returned.\r
-  \r
+\r
   @param[in]    Guid          The 128-bit unique value that designates which namespace to extract the value from.\r
-  @param[in]    TokenNumber   The PCD token number. \r
+  @param[in]    TokenNumber   The PCD token number.\r
   @param[in]    Value         The value to set for the PCD token.\r
-  \r
+\r
   @retval   EFI_SUCCESS             The PCD service has set the value requested\r
   @retval   EFI_INVALID_PARAMETER   The PCD service determined that the size of the data being set was\r
                                     incompatible with a call to this function. Use GetSizeEx() to\r
                                     retrieve the size of the target data.\r
-  @retval   EFI_NOT_FOUND           The PCD service could not find the requested token number.                                    \r
+  @retval   EFI_NOT_FOUND           The PCD service could not find the requested token number.\r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_PEI_PCD_PPI_SET_EX_32)(\r
+(EFIAPI *EFI_PEI_PCD_PPI_SET_32)(\r
   IN CONST  EFI_GUID  *Guid,\r
   IN        UINTN     TokenNumber,\r
   IN        UINT32    Value\r
@@ -241,23 +241,23 @@ EFI_STATUS
 \r
 /**\r
   Sets an 64-bit value for a given PCD token.\r
-  \r
+\r
   When the PCD service sets a value, it will check to ensure that the size of the value being set is\r
   compatible with the Token's existing definition. If it is not, an error will be returned.\r
-  \r
+\r
   @param[in]    Guid          The 128-bit unique value that designates which namespace to extract the value from.\r
-  @param[in]    TokenNumber   The PCD token number. \r
+  @param[in]    TokenNumber   The PCD token number.\r
   @param[in]    Value         The value to set for the PCD token.\r
-  \r
+\r
   @retval   EFI_SUCCESS             The PCD service has set the value requested\r
   @retval   EFI_INVALID_PARAMETER   The PCD service determined that the size of the data being set was\r
                                     incompatible with a call to this function. Use GetSizeEx() to\r
                                     retrieve the size of the target data.\r
-  @retval   EFI_NOT_FOUND           The PCD service could not find the requested token number.                                    \r
+  @retval   EFI_NOT_FOUND           The PCD service could not find the requested token number.\r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_PEI_PCD_PPI_SET_EX_64)(\r
+(EFIAPI *EFI_PEI_PCD_PPI_SET_64)(\r
   IN CONST  EFI_GUID  *Guid,\r
   IN        UINTN     TokenNumber,\r
   IN        UINT64    Value\r
@@ -265,24 +265,26 @@ EFI_STATUS
 \r
 /**\r
   Sets a value of the specified size for a given PCD token.\r
-  \r
+\r
   When the PCD service sets a value, it will check to ensure that the size of the value being set is\r
   compatible with the Token's existing definition. If it is not, an error will be returned.\r
-  \r
+\r
   @param[in]    Guid          The 128-bit unique value that designates which namespace to extract the value from.\r
-  @param[in]    TokenNumber   The PCD token number. \r
-  @param[in]    SizeOfValue   The length of the Value being set for the PCD token.\r
+  @param[in]    TokenNumber   The PCD token number.\r
+  @param[in]    SizeOfValue   The length of the value being set for the PCD token. If too large of a length is\r
+                              specified, upon return from this function the value of SizeOfValue will reflect the\r
+                              maximum size for the PCD token.\r
   @param[in]    Buffer        A pointer to the buffer containing the value to set for the PCD token.\r
-  \r
+\r
   @retval   EFI_SUCCESS             The PCD service has set the value requested\r
   @retval   EFI_INVALID_PARAMETER   The PCD service determined that the size of the data being set was\r
                                     incompatible with a call to this function. Use GetSizeEx() to\r
                                     retrieve the size of the target data.\r
-  @retval   EFI_NOT_FOUND           The PCD service could not find the requested token number.                                    \r
+  @retval   EFI_NOT_FOUND           The PCD service could not find the requested token number.\r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_PEI_PCD_PPI_SET_EX_POINTER)(\r
+(EFIAPI *EFI_PEI_PCD_PPI_SET_POINTER)(\r
   IN CONST  EFI_GUID  *Guid,\r
   IN        UINTN     TokenNumber,\r
   IN OUT    UINTN     *SizeOfValue,\r
@@ -291,23 +293,23 @@ EFI_STATUS
 \r
 /**\r
   Sets a Boolean value for a given PCD token.\r
-  \r
+\r
   When the PCD service sets a value, it will check to ensure that the size of the value being set is\r
   compatible with the Token's existing definition. If it is not, an error will be returned.\r
-  \r
+\r
   @param[in]    Guid          The 128-bit unique value that designates which namespace to extract the value from.\r
-  @param[in]    TokenNumber   The PCD token number. \r
+  @param[in]    TokenNumber   The PCD token number.\r
   @param[in]    Value         The value to set for the PCD token.\r
-  \r
+\r
   @retval   EFI_SUCCESS             The PCD service has set the value requested\r
   @retval   EFI_INVALID_PARAMETER   The PCD service determined that the size of the data being set was\r
                                     incompatible with a call to this function. Use GetSizeEx() to\r
                                     retrieve the size of the target data.\r
-  @retval   EFI_NOT_FOUND           The PCD service could not find the requested token number.                                    \r
+  @retval   EFI_NOT_FOUND           The PCD service could not find the requested token number.\r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_PEI_PCD_PPI_SET_EX_BOOLEAN)(\r
+(EFIAPI *EFI_PEI_PCD_PPI_SET_BOOLEAN)(\r
   IN CONST  EFI_GUID  *Guid,\r
   IN        UINTN     TokenNumber,\r
   IN        BOOLEAN   Value\r
@@ -315,16 +317,16 @@ EFI_STATUS
 \r
 typedef\r
 VOID\r
-(EFIAPI *EFI_PCD_PPI_CALLBACK)(\r
-  IN EFI_GUID *Guid     OPTIONAL,\r
-  IN UINTN    CallBackToken,\r
-  IN VOID     *TokenData,\r
-  IN UINTN    TokenDatSize\r
+(EFIAPI *EFI_PEI_PCD_PPI_CALLBACK)(\r
+  IN     EFI_GUID *Guid     OPTIONAL,\r
+  IN     UINTN    CallBackToken,\r
+  IN OUT VOID     *TokenData,\r
+  IN     UINTN    TokenDatSize\r
 );\r
 \r
 /**\r
   Specifies a function to be called anytime the value of a designated token is changed.\r
-  \r
+\r
   @param[in]    Guid              The 128-bit unique value that designates which namespace to monitor. If NULL, use\r
                                   the standard platform namespace.\r
   @param[in]    CallBackToken     The PCD token number to monitor.\r
@@ -333,48 +335,48 @@ VOID
 \r
   @retval EFI_SUCCESS     The PCD service has successfully established a call event for the\r
                           CallBackToken requested.\r
-  @retval EFI_NOT_FOUND   The PCD service could not find the referenced token number.                       \r
+  @retval EFI_NOT_FOUND   The PCD service could not find the referenced token number.\r
 **/\r
 typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_PEI_PCD_PPI_CALLBACK_ON_SET)(\r
-  IN CONST  EFI_GUID          *Guid   OPTIONAL,\r
-  IN        UINTN             CallBackToken,\r
-  IN        EFI_PCD_PPI_CALLBACK  CallBackFunction\r
+  IN CONST  EFI_GUID                  *Guid   OPTIONAL,\r
+  IN        UINTN                     CallBackToken,\r
+  IN        EFI_PEI_PCD_PPI_CALLBACK  CallBackFunction\r
 );\r
 \r
 /**\r
   Cancels a previously set callback function for a particular PCD token number.\r
-  \r
+\r
   @param[in]  Guid              The 128-bit unique value that designates which namespace to monitor. If NULL, use\r
                                 the standard platform namespace.\r
   @param[in]  CallBackToken     The PCD token number to cancel monitoring.\r
   @param[in]  CallBackFunction  The function prototype that was originally passed to the CallBackOnSet function.\r
-  \r
+\r
   @retval     EFI_SUCCESS       The PCD service has cancelled the call event associated with the\r
                                 CallBackToken.\r
   @retval     EFI_INVALID_PARAMETER   The PCD service did not match the CallBackFunction to one\r
                                       that is currently being monitored.\r
-  @retval     EFI_NOT_FOUND     The PCD service could not find data the requested token number.                                 \r
+  @retval     EFI_NOT_FOUND     The PCD service could not find data the requested token number.\r
 **/\r
 typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_PEI_PCD_PPI_CANCEL_CALLBACK)(\r
-  IN CONST  EFI_GUID          *Guid   OPTIONAL,\r
-  IN        UINTN             CallBackToken,\r
-  IN        EFI_PCD_PPI_CALLBACK  CallBackFunction\r
+  IN CONST  EFI_GUID                  *Guid   OPTIONAL,\r
+  IN        UINTN                     CallBackToken,\r
+  IN        EFI_PEI_PCD_PPI_CALLBACK  CallBackFunction\r
 );\r
 \r
 /**\r
   Retrieves the next valid PCD token for a given namespace.\r
-  \r
+\r
   This provides a means by which to get the next valid token number in a given namespace. This is\r
   useful since the PCD infrastructure has a sparse list of token numbers in it, and one cannot a priori\r
   know what token numbers are valid in the database.\r
-  \r
+\r
   @param[in]    Guid          The 128-bit unique value that designates which namespace to extract the value from.\r
-  @param[in]    TokenNumber   The PCD token number. \r
-  \r
+  @param[in]    TokenNumber   The PCD token number.\r
+\r
   @retval   EFI_SUCCESS       The PCD service has retrieved the value requested.\r
   @retval   EFI_NOT_FOUND     The PCD service could not find data from the requested token number.\r
 **/\r
@@ -387,18 +389,18 @@ EFI_STATUS
 \r
 /**\r
   Retrieves the next valid PCD token namespace for a given namespace.\r
-  \r
+\r
   Gets the next valid token namespace for a given namespace. This is useful to traverse the valid\r
   token namespaces on a platform.\r
-  \r
+\r
   @param[in, out]   Guid    An indirect pointer to EFI_GUID. On input it designates a known token\r
                             namespace from which the search will start. On output, it designates the next valid\r
                             token namespace on the platform. If *Guid is NULL, then the GUID of the first token\r
                             space of the current platform is returned. If the search cannot locate the next valid\r
                             token namespace, an error is returned and the value of *Guid is undefined.\r
-                            \r
+\r
   @retval  EFI_SUCCESS      The PCD service retrieved the value requested.\r
-  @retval  EFI_NOT_FOUND    The PCD service could not find the next valid token namespace.                     \r
+  @retval  EFI_NOT_FOUND    The PCD service could not find the next valid token namespace.\r
 **/\r
 typedef\r
 EFI_STATUS\r
@@ -408,19 +410,19 @@ EFI_STATUS
 \r
 typedef struct {\r
   EFI_PEI_PCD_PPI_SET_SKU               SetSku;\r
-  EFI_PEI_PCD_PPI_GET_EX_8              GetEx8;\r
-  EFI_PEI_PCD_PPI_GET_EX_16             GetEx16;\r
-  EFI_PEI_PCD_PPI_GET_EX_32             GetEx32;\r
-  EFI_PEI_PCD_PPI_GET_EX_64             GetEx64;\r
-  EFI_PEI_PCD_PPI_GET_EX_POINTER        GetExPtr;\r
-  EFI_PEI_PCD_PPI_GET_EX_BOOLEAN        GetExBool;\r
-  EFI_PEI_PCD_PPI_GET_EX_SIZE           GetExSize;\r
-  EFI_PEI_PCD_PPI_SET_EX_8              SetEx8;\r
-  EFI_PEI_PCD_PPI_SET_EX_16             SetEx16;\r
-  EFI_PEI_PCD_PPI_SET_EX_32             SetEx32;\r
-  EFI_PEI_PCD_PPI_SET_EX_64             SetEx64;\r
-  EFI_PEI_PCD_PPI_SET_EX_POINTER        SetExPtr;\r
-  EFI_PEI_PCD_PPI_SET_EX_BOOLEAN        SetExBool;\r
+  EFI_PEI_PCD_PPI_GET_8                 GetEx8;\r
+  EFI_PEI_PCD_PPI_GET_16                GetEx16;\r
+  EFI_PEI_PCD_PPI_GET_32                GetEx32;\r
+  EFI_PEI_PCD_PPI_GET_64                GetEx64;\r
+  EFI_PEI_PCD_PPI_GET_POINTER           GetExPtr;\r
+  EFI_PEI_PCD_PPI_GET_BOOLEAN           GetExBool;\r
+  EFI_PEI_PCD_PPI_GET_SIZE              GetExSize;\r
+  EFI_PEI_PCD_PPI_SET_8                 SetEx8;\r
+  EFI_PEI_PCD_PPI_SET_16                SetEx16;\r
+  EFI_PEI_PCD_PPI_SET_32                SetEx32;\r
+  EFI_PEI_PCD_PPI_SET_64                SetEx64;\r
+  EFI_PEI_PCD_PPI_SET_POINTER           SetExPtr;\r
+  EFI_PEI_PCD_PPI_SET_BOOLEAN           SetExBool;\r
   EFI_PEI_PCD_PPI_CALLBACK_ON_SET       CallbackOnSet;\r
   EFI_PEI_PCD_PPI_CANCEL_CALLBACK       CancelCallback;\r
   EFI_PEI_PCD_PPI_GET_NEXT_TOKEN        GetNextToken;\r
index 19376f411dd14ff167c1164e06ef31470e52c1ef..bfb5588083fb8bcc98c774d842286de8acdf7e2b 100644 (file)
@@ -1,10 +1,10 @@
 /** @file\r
   Platform Configuration Database (PCD) Protocol defined in PI 1.2 Vol3\r
 \r
-  A platform database that contains a variety of current platform settings or \r
+  A platform database that contains a variety of current platform settings or\r
   directives that can be accessed by a driver or application.\r
   PI PCD protocol only provide the accessing interfaces for Dynamic-Ex type PCD.\r
-  \r
+\r
   Callers to this protocol must be at a TPL_APPLICATION task priority level.\r
   This is the base PCD service API that provides an abstraction for accessing configuration content in\r
   the platform. It a seamless mechanism for extracting information regardless of where the\r
   This protocol allows access to data through size-granular APIs and provides a mechanism for a\r
   firmware component to monitor specific settings and be alerted when a setting is changed.\r
 \r
-  Copyright (c) 2009, Intel Corporation                                                         \r
-  All rights reserved. This program and the accompanying materials                          \r
-  are licensed and made available under the terms and conditions of the BSD License         \r
-  which accompanies this distribution.  The full text of the license may be found at        \r
-  http://opensource.org/licenses/bsd-license.php                                            \r
+  Copyright (c) 2009 - 2010, Intel Corporation\r
+  All rights reserved. This program and the accompanying materials\r
+  are licensed and made available under the terms and conditions of the BSD License\r
+  which accompanies this distribution.  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.php\r
 \r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-  @par Revision Reference: \r
+  @par Revision Reference:\r
   PI Version 1.2 Vol 3.\r
 **/\r
 \r
@@ -47,7 +47,7 @@ extern EFI_GUID gEfiPcdProtocolGuid;
   Id is set or the currently set SKU Id isn't valid for the specified token, the system uses the default\r
   SKU Id. If the system attempts to use the default SKU Id and no value has been set for that Id, the\r
   results are unpredictable.\r
-  \r
+\r
   @param[in]  SkuId   The SKU value to set.\r
 **/\r
 typedef\r
@@ -59,37 +59,37 @@ VOID
 /**\r
   Retrieves an 8-bit value for a given PCD token.\r
   If the TokenNumber is invalid, the results are unpredictable.\r
-  \r
+\r
   @param[in]    Guid        The 128-bit unique value that designates the namespace from which to extract the value.\r
   @param[in]    TokenNumber The PCD token number.\r
-  \r
+\r
   @return 8-bit value for a given PCD token.\r
 **/\r
 typedef\r
 UINT8\r
-(EFIAPI *EFI_PCD_PROTOCOL_GET_EX_8)(\r
+(EFIAPI *EFI_PCD_PROTOCOL_GET_8)(\r
   IN CONST EFI_GUID   *Guid,\r
   IN       UINTN      TokenNumber\r
 );\r
 \r
 /**\r
-  Retrieves the current word-sized value for a PCD token number. \r
+  Retrieves the current word-sized value for a PCD token number.\r
   If the TokenNumber is invalid, the results are unpredictable.\r
-  \r
+\r
   @param[in]    Guid        The 128-bit unique value that designates the namespace from which to extract the value.\r
   @param[in]    TokenNumber The PCD token number.\r
-  \r
-  @return word-sized value for a given PCD token.  \r
+\r
+  @return word-sized value for a given PCD token.\r
 **/\r
 typedef\r
 UINT16\r
-(EFIAPI *EFI_PCD_PROTOCOL_GET_EX_16)(\r
+(EFIAPI *EFI_PCD_PROTOCOL_GET_16)(\r
   IN CONST  EFI_GUID  *Guid,\r
   IN        UINTN     TokenNumber\r
 );\r
 \r
 /**\r
-  Retrieves the current 32-bit sized value for a PCD token number. \r
+  Retrieves the current 32-bit sized value for a PCD token number.\r
   If the TokenNumber is invalid, the results are unpredictable.\r
 \r
   @param[in]    Guid        The 128-bit unique value that designates the namespace from which to extract the value.\r
@@ -99,24 +99,24 @@ UINT16
 **/\r
 typedef\r
 UINT32\r
-(EFIAPI *EFI_PCD_PROTOCOL_GET_EX_32)(\r
+(EFIAPI *EFI_PCD_PROTOCOL_GET_32)(\r
   IN CONST  EFI_GUID  *Guid,\r
   IN        UINTN     TokenNumber\r
 );\r
 \r
 /**\r
-  Retrieves the 64-bit sized value for a PCD token number. \r
+  Retrieves the 64-bit sized value for a PCD token number.\r
   If the TokenNumber is invalid, the results are unpredictable.\r
-  \r
+\r
   @param[in]    Guid        The 128-bit unique value that designates the namespace from which to extract the value.\r
   @param[in]    TokenNumber The PCD token number.\r
 \r
   @return 64-bit value for a given PCD token.\r
-  \r
+\r
 **/\r
 typedef\r
 UINT64\r
-(EFIAPI *EFI_PCD_PROTOCOL_GET_EX_64)(\r
+(EFIAPI *EFI_PCD_PROTOCOL_GET_64)(\r
   IN CONST  EFI_GUID  *Guid,\r
   IN        UINTN     TokenNumber\r
 );\r
@@ -125,7 +125,7 @@ UINT64
   Retrieves the current pointer to the value for a PCD token number. Do not make any assumptions\r
   about the alignment of the pointer that is returned by this function call. If the TokenNumber is\r
   invalid, the results are unpredictable.\r
-  \r
+\r
   @param[in]    Guid        The 128-bit unique value that designates the namespace from which to extract the value.\r
   @param[in]    TokenNumber The PCD token number.\r
 \r
@@ -133,7 +133,7 @@ UINT64
 **/\r
 typedef\r
 VOID *\r
-(EFIAPI *EFI_PCD_PROTOCOL_GET_EX_POINTER)(\r
+(EFIAPI *EFI_PCD_PROTOCOL_GET_POINTER)(\r
   IN CONST  EFI_GUID  *Guid,\r
   IN        UINTN     TokenNumber\r
 );\r
@@ -141,15 +141,15 @@ VOID *
 /**\r
   Retrieves the current BOOLEAN-sized value for a PCD token number. If the TokenNumber is\r
   invalid, the results are unpredictable.\r
-  \r
+\r
   @param[in]    Guid        The 128-bit unique value that designates the namespace from which to extract the value.\r
   @param[in]    TokenNumber The PCD token number.\r
-  \r
+\r
   @return Boolean value for a given PCD token.\r
 **/\r
 typedef\r
 BOOLEAN\r
-(EFIAPI *EFI_PCD_PROTOCOL_GET_EX_BOOLEAN)(\r
+(EFIAPI *EFI_PCD_PROTOCOL_GET_BOOLEAN)(\r
   IN CONST  EFI_GUID  *Guid,\r
   IN        UINTN     TokenNumber\r
 );\r
@@ -157,29 +157,29 @@ BOOLEAN
 /**\r
   Retrieves the current size of a particular PCD token. If the TokenNumber is invalid, the results are\r
   unpredictable.\r
-  \r
+\r
   @param[in]    Guid        The 128-bit unique value that designates the namespace from which to extract the value.\r
   @param[in]    TokenNumber The PCD token number.\r
-  \r
+\r
   @return the size of the value for a given PCD token.\r
 **/\r
 typedef\r
 UINTN\r
-(EFIAPI *EFI_PCD_PROTOCOL_GET_EX_SIZE)(\r
+(EFIAPI *EFI_PCD_PROTOCOL_GET_SIZE)(\r
   IN CONST  EFI_GUID  *Guid,\r
   IN        UINTN     TokenNumber\r
 );\r
 \r
 /**\r
   Sets an 8-bit value for a given PCD token.\r
-  \r
+\r
   When the PCD service sets a value, it will check to ensure that the size of the value being set is\r
   compatible with the Token's existing definition. If it is not, an error will be returned.\r
-  \r
+\r
   @param[in]    Guid        The 128-bit unique value that designates the namespace from which to extract the value.\r
   @param[in]    TokenNumber The PCD token number.\r
   @param[in]    Value       The value to set for the PCD token.\r
-  \r
+\r
   @retval   EFI_SUCCESS             The PCD service has set the value requested\r
   @retval   EFI_INVALID_PARAMETER   The PCD service determined that the size of the data being set was\r
                                     incompatible with a call to this function. Use GetSizeEx() to\r
@@ -188,7 +188,7 @@ UINTN
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_PCD_PROTOCOL_SET_EX_8)(\r
+(EFIAPI *EFI_PCD_PROTOCOL_SET_8)(\r
   IN CONST  EFI_GUID  *Guid,\r
   IN        UINTN     TokenNumber,\r
   IN        UINT8     Value\r
@@ -196,14 +196,14 @@ EFI_STATUS
 \r
 /**\r
   Sets an 16-bit value for a given PCD token.\r
-  \r
+\r
   When the PCD service sets a value, it will check to ensure that the size of the value being set is\r
   compatible with the Token's existing definition. If it is not, an error will be returned.\r
-  \r
+\r
   @param[in]    Guid        The 128-bit unique value that designates the namespace from which to extract the value.\r
   @param[in]    TokenNumber The PCD token number.\r
   @param[in]    Value       The value to set for the PCD token.\r
-  \r
+\r
   @retval   EFI_SUCCESS             The PCD service has set the value requested\r
   @retval   EFI_INVALID_PARAMETER   The PCD service determined that the size of the data being set was\r
                                     incompatible with a call to this function. Use GetSizeEx() to\r
@@ -212,7 +212,7 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_PCD_PROTOCOL_SET_EX_16)(\r
+(EFIAPI *EFI_PCD_PROTOCOL_SET_16)(\r
   IN CONST  EFI_GUID  *Guid,\r
   IN        UINTN     TokenNumber,\r
   IN        UINT16    Value\r
@@ -220,14 +220,14 @@ EFI_STATUS
 \r
 /**\r
   Sets an 32-bit value for a given PCD token.\r
-  \r
+\r
   When the PCD service sets a value, it will check to ensure that the size of the value being set is\r
   compatible with the Token's existing definition. If it is not, an error will be returned.\r
-  \r
+\r
   @param[in]    Guid        The 128-bit unique value that designates the namespace from which to extract the value.\r
   @param[in]    TokenNumber The PCD token number.\r
   @param[in]    Value       The value to set for the PCD token.\r
-  \r
+\r
   @retval   EFI_SUCCESS             The PCD service has set the value requested\r
   @retval   EFI_INVALID_PARAMETER   The PCD service determined that the size of the data being set was\r
                                     incompatible with a call to this function. Use GetSizeEx() to\r
@@ -236,7 +236,7 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_PCD_PROTOCOL_SET_EX_32)(\r
+(EFIAPI *EFI_PCD_PROTOCOL_SET_32)(\r
   IN CONST  EFI_GUID  *Guid,\r
   IN        UINTN     TokenNumber,\r
   IN        UINT32    Value\r
@@ -244,14 +244,14 @@ EFI_STATUS
 \r
 /**\r
   Sets an 64-bit value for a given PCD token.\r
-  \r
+\r
   When the PCD service sets a value, it will check to ensure that the size of the value being set is\r
   compatible with the Token's existing definition. If it is not, an error will be returned.\r
-  \r
+\r
   @param[in]    Guid        The 128-bit unique value that designates the namespace from which to extract the value.\r
   @param[in]    TokenNumber The PCD token number.\r
   @param[in]    Value       The value to set for the PCD token.\r
-  \r
+\r
   @retval   EFI_SUCCESS             The PCD service has set the value requested\r
   @retval   EFI_INVALID_PARAMETER   The PCD service determined that the size of the data being set was\r
                                     incompatible with a call to this function. Use GetSizeEx() to\r
@@ -260,7 +260,7 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_PCD_PROTOCOL_SET_EX_64)(\r
+(EFIAPI *EFI_PCD_PROTOCOL_SET_64)(\r
   IN CONST  EFI_GUID  *Guid,\r
   IN        UINTN     TokenNumber,\r
   IN        UINT64    Value\r
@@ -268,15 +268,17 @@ EFI_STATUS
 \r
 /**\r
   Sets a value of a specified size for a given PCD token.\r
-  \r
+\r
   When the PCD service sets a value, it will check to ensure that the size of the value being set is\r
   compatible with the Token's existing definition. If it is not, an error will be returned.\r
-  \r
+\r
   @param[in]    Guid        The 128-bit unique value that designates the namespace from which to extract the value.\r
   @param[in]    TokenNumber The PCD token number.\r
-  @param[in]    SizeOfValue The length of the value being set for the PCD token.\r
+  @param[in]    SizeOfValue The length of the value being set for the PCD token. If too large of a length is\r
+                            specified, upon return from this function the value of SizeOfValue will\r
+                            reflect the maximum size for the PCD token.\r
   @param[in]    Buffer      A pointer to the buffer containing the value to set for the PCD token.\r
-  \r
+\r
   @retval   EFI_SUCCESS             The PCD service has set the value requested\r
   @retval   EFI_INVALID_PARAMETER   The PCD service determined that the size of the data being set was\r
                                     incompatible with a call to this function. Use GetSizeEx() to\r
@@ -285,23 +287,23 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_PCD_PROTOCOL_SET_EX_POINTER)(\r
+(EFIAPI *EFI_PCD_PROTOCOL_SET_POINTER)(\r
   IN CONST  EFI_GUID  *Guid,\r
   IN        UINTN     TokenNumber,\r
-  IN        UINTN     *SizeOfValue,\r
+  IN OUT    UINTN     *SizeOfValue,\r
   IN        VOID      *Buffer\r
 );\r
 \r
 /**\r
   Sets a Boolean value for a given PCD token.\r
-  \r
+\r
   When the PCD service sets a value, it will check to ensure that the size of the value being set is\r
   compatible with the Token's existing definition. If it is not, an error will be returned.\r
-  \r
+\r
   @param[in]    Guid        The 128-bit unique value that designates the namespace from which to extract the value.\r
   @param[in]    TokenNumber The PCD token number.\r
   @param[in]    Value       The value to set for the PCD token.\r
-  \r
+\r
   @retval   EFI_SUCCESS             The PCD service has set the value requested\r
   @retval   EFI_INVALID_PARAMETER   The PCD service determined that the size of the data being set was\r
                                     incompatible with a call to this function. Use GetSizeEx() to\r
@@ -310,7 +312,7 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_PCD_PROTOCOL_SET_EX_BOOLEAN)(\r
+(EFIAPI *EFI_PCD_PROTOCOL_SET_BOOLEAN)(\r
   IN CONST  EFI_GUID  *Guid,\r
   IN        UINTN     TokenNumber,\r
   IN        BOOLEAN   Value\r
@@ -319,19 +321,19 @@ EFI_STATUS
 typedef\r
 VOID\r
 (EFIAPI *EFI_PCD_PROTOCOL_CALLBACK)(\r
-  IN EFI_GUID *Guid           OPTIONAL,\r
-  IN UINTN    CallBackToken,\r
-  IN VOID     *TokenData,\r
-  IN UINTN    TokenDataSize\r
+  IN     EFI_GUID *Guid           OPTIONAL,\r
+  IN     UINTN    CallBackToken,\r
+  IN OUT VOID     *TokenData,\r
+  IN     UINTN    TokenDataSize\r
 );\r
 \r
 /**\r
   Specifies a function to be called anytime the value of a designated token is changed.\r
-  \r
+\r
   @param[in]    Guid              The 128-bit unique value that designates the namespace from which to extract the value.\r
   @param[in]    CallBackToken     The PCD token number to monitor.\r
   @param[in]    CallBackFunction  The function prototype called when the value associated with the CallBackToken is set.\r
-  \r
+\r
   @retval EFI_SUCCESS     The PCD service has successfully established a call event for the CallBackToken requested.\r
   @retval EFI_NOT_FOUND   The PCD service could not find the referenced token number.\r
 **/\r
@@ -345,11 +347,11 @@ EFI_STATUS
 \r
 /**\r
   Cancels a callback function that was set through a previous call to the CallBackOnSet function.\r
-  \r
+\r
   @param[in]    Guid              The 128-bit unique value that designates the namespace from which to extract the value.\r
   @param[in]    CallBackToken     The PCD token number to monitor.\r
   @param[in]    CallBackFunction  The function prototype called when the value associated with the CallBackToken is set.\r
-  \r
+\r
   @retval EFI_SUCCESS     The PCD service has successfully established a call event for the CallBackToken requested.\r
   @retval EFI_NOT_FOUND   The PCD service could not find the referenced token number.\r
 **/\r
@@ -365,12 +367,12 @@ EFI_STATUS
   Gets the next valid token number in a given namespace. This is useful since the PCD infrastructure\r
   contains a sparse list of token numbers, and one cannot a priori know what token numbers are valid\r
   in the database.\r
-  \r
+\r
   @param[in]    Guid              The 128-bit unique value that designates the namespace from which to retrieve the next token.\r
   @param[in]    TokenNumber       A pointer to the PCD token number to use to find the subsequent token number. To\r
                                   retrieve the "first" token, have the pointer reference a TokenNumber value of 0.\r
   @retval EFI_SUCCESS           The PCD service has retrieved the value requested\r
-  @retval EFI_NOT_FOUND         The PCD service could not find data from the requested token number.                    \r
+  @retval EFI_NOT_FOUND         The PCD service could not find data from the requested token number.\r
 **/\r
 typedef\r
 EFI_STATUS\r
@@ -382,13 +384,13 @@ EFI_STATUS
 /**\r
   Gets the next valid token namespace for a given namespace. This is useful to traverse the valid\r
   token namespaces on a platform.\r
-  \r
+\r
   @param[in, out]   Guid    An indirect pointer to EFI_GUID. On input it designates a known token namespace\r
                             from which the search will start. On output, it designates the next valid token\r
                             namespace on the platform. If *Guid is NULL, then the GUID of the first token\r
                             space of the current platform is returned. If the search cannot locate the next valid\r
                             token namespace, an error is returned and the value of *Guid is undefined.\r
-                    \r
+\r
   @retval   EFI_SUCCESS   The PCD service retrieved the value requested.\r
   @retval   EFI_NOT_FOUND The PCD service could not find the next valid token namespace.\r
 **/\r
@@ -400,19 +402,19 @@ EFI_STATUS
 \r
 typedef struct _EFI_PCD_PROTOCOL {\r
   EFI_PCD_PROTOCOL_SET_SKU              SetSku;\r
-  EFI_PCD_PROTOCOL_GET_EX_8             Get8Ex;\r
-  EFI_PCD_PROTOCOL_GET_EX_16            Get16Ex;\r
-  EFI_PCD_PROTOCOL_GET_EX_32            Get32Ex;\r
-  EFI_PCD_PROTOCOL_GET_EX_64            Get64Ex;\r
-  EFI_PCD_PROTOCOL_GET_EX_POINTER       GetPtrEx;\r
-  EFI_PCD_PROTOCOL_GET_EX_BOOLEAN       GetBoolEx;\r
-  EFI_PCD_PROTOCOL_GET_EX_SIZE          GetSizeEx;\r
-  EFI_PCD_PROTOCOL_SET_EX_8             Set8Ex;\r
-  EFI_PCD_PROTOCOL_SET_EX_16            Set16Ex;\r
-  EFI_PCD_PROTOCOL_SET_EX_32            Set32Ex;\r
-  EFI_PCD_PROTOCOL_SET_EX_64            Set64Ex;\r
-  EFI_PCD_PROTOCOL_SET_EX_POINTER       SetPtrEx;\r
-  EFI_PCD_PROTOCOL_SET_EX_BOOLEAN       SetBoolEx;\r
+  EFI_PCD_PROTOCOL_GET_8                Get8Ex;\r
+  EFI_PCD_PROTOCOL_GET_16               Get16Ex;\r
+  EFI_PCD_PROTOCOL_GET_32               Get32Ex;\r
+  EFI_PCD_PROTOCOL_GET_64               Get64Ex;\r
+  EFI_PCD_PROTOCOL_GET_POINTER          GetPtrEx;\r
+  EFI_PCD_PROTOCOL_GET_BOOLEAN          GetBoolEx;\r
+  EFI_PCD_PROTOCOL_GET_SIZE             GetSizeEx;\r
+  EFI_PCD_PROTOCOL_SET_8                Set8Ex;\r
+  EFI_PCD_PROTOCOL_SET_16               Set16Ex;\r
+  EFI_PCD_PROTOCOL_SET_32               Set32Ex;\r
+  EFI_PCD_PROTOCOL_SET_64               Set64Ex;\r
+  EFI_PCD_PROTOCOL_SET_POINTER          SetPtrEx;\r
+  EFI_PCD_PROTOCOL_SET_BOOLEAN          SetBoolEx;\r
   EFI_PCD_PROTOCOL_CALLBACK_ON_SET      CallbackOnSet;\r
   EFI_PCD_PROTOCOL_CANCEL_CALLBACK      CancelCallback;\r
   EFI_PCD_PROTOCOL_GET_NEXT_TOKEN       GetNextToken;\r
index 2b883268c820b3dac73a50043cbb07572a066ec7..057a95716559ed5797bf7492e768b1b76b01c2b8 100644 (file)
@@ -893,7 +893,7 @@ LibPcdCallbackOnSet (
 \r
   ASSERT (NotificationFunction != NULL);\r
 \r
-  Status = (GetPiPcdPpiPointer ())->CallbackOnSet (Guid, TokenNumber, (EFI_PCD_PPI_CALLBACK) NotificationFunction);\r
+  Status = (GetPiPcdPpiPointer ())->CallbackOnSet (Guid, TokenNumber, (EFI_PEI_PCD_PPI_CALLBACK) NotificationFunction);\r
 \r
   ASSERT_EFI_ERROR (Status);\r
 \r
@@ -927,7 +927,7 @@ LibPcdCancelCallback (
 \r
   ASSERT (NotificationFunction != NULL);\r
 \r
-  Status = (GetPiPcdPpiPointer ())->CancelCallback (Guid, TokenNumber, (EFI_PCD_PPI_CALLBACK) NotificationFunction);\r
+  Status = (GetPiPcdPpiPointer ())->CancelCallback (Guid, TokenNumber, (EFI_PEI_PCD_PPI_CALLBACK) NotificationFunction);\r
 \r
   ASSERT_EFI_ERROR (Status);\r
 \r