]> git.proxmox.com Git - mirror_edk2.git/commitdiff
synchronize the MdePkg/Include/Library/PcdLib.h and the MDE_Library_Spec.Add the...
authorgikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 21 Nov 2008 07:07:12 +0000 (07:07 +0000)
committergikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 21 Nov 2008 07:07:12 +0000 (07:07 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6664 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Include/Library/PcdLib.h
MdePkg/Library/BasePcdLibNull/PcdLib.c
MdePkg/Library/DxePcdLib/DxePcdLib.c
MdePkg/Library/PeiPcdLib/PeiPcdLib.c

index 8a7007dfb21f7632c17b32dd6978ce9ef6fb4d5b..63a6e36c531ea86b866046aa1b94f29acd2c51da 100644 (file)
@@ -8,6 +8,11 @@
   LibPatchPcdSetPtr() interface. For FeatureFlag/Fixed PCD, macro interface is\r
   translated to an variable or macro which is auto-generated by build tool in\r
   module's autogen.h/autogen.c.\r
+  The PcdGetXX(), PcdSetXX(), PcdToken(), and PcdGetNextTokenSpace() operations are \r
+  only available prior to ExitBootServices().  If access to PCD values are required \r
+  at runtime, then their values must be collected prior to ExitBootServices().\r
+  There are no restrictions on the use of FeaturePcd(), FixedPcdGetXX(),\r
+  PatchPcdGetXX(), and PatchPcdSetXX().\r
 \r
 Copyright (c) 2006 - 2008, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
@@ -25,43 +30,317 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #define PCD_MAX_SKU_ID           0x100\r
 \r
+\r
+/**\r
+  Retrieves a token number based on a token name.\r
+\r
+ Returns the token number associated with the PCD token specified by TokenName.\r
+  If TokenName is not a valid token in the token space, then the module will not build.\r
+  If TokenName is not a feature flag, then the module will not build.\r
+\r
+  @param   TokenName  The name of the PCD token to retrieve the token number for.\r
+\r
+  @return  The token number associated with the PCD.\r
+\r
+**/\r
 #define PcdToken(TokenName)                 _PCD_TOKEN_##TokenName\r
 \r
 \r
-///\r
-/// Feature Flag is in the form of a global constant\r
-///\r
+/**\r
+  Retrieves a Boolean PCD feature flag based on a token name.\r
+\r
+  Returns the Boolean value for the PCD feature flag specified by TokenName.\r
+  If TokenName is not a valid token in the token space, then the module will not build.\r
+  If TokenName is not a feature flag, then the module will not build.\r
+\r
+  @param   TokenName  The name of the PCD token to retrieve a current value for.\r
+\r
+  @return  Boolean value for the PCD feature flag.\r
+\r
+**/\r
 #define FeaturePcdGet(TokenName)            _PCD_GET_MODE_BOOL_##TokenName\r
 \r
 \r
-//\r
-// Fixed is fixed at build time\r
-//\r
+/**\r
+  Retrieves an 8-bit fixed PCD token value based on a token name.\r
+\r
+  Returns the 8-bit value for the token specified by TokenName.\r
+  If TokenName is not a valid token in the token space, then the module will not build.\r
+  If TokenName is not a feature flag, then the module will not build.\r
+\r
+  @param   TokenName  The name of the PCD token to retrieve a current value for.\r
+\r
+  @return  8-bit value for the token specified by TokenName.\r
+\r
+**/\r
 #define FixedPcdGet8(TokenName)             _PCD_VALUE_##TokenName\r
+\r
+\r
+/**\r
+  Retrieves a 16-bit fixed PCD token value based on a token name.\r
+\r
+  Returns the 16-bit value for the token specified by TokenName.\r
+  If TokenName is not a valid token in the token space, then the module will not build.\r
+  If TokenName is not a feature flag, then the module will not build.\r
+\r
+  @param   TokenName  The name of the PCD token to retrieve a current value for.\r
+\r
+  @return  16-bit value for the token specified by TokenName.\r
+\r
+**/\r
 #define FixedPcdGet16(TokenName)            _PCD_VALUE_##TokenName\r
+\r
+\r
+/**\r
+  Retrieves a 32-bit fixed PCD token value based on a token name.\r
+\r
+  Returns the 32-bit value for the token specified by TokenName.\r
+  If TokenName is not a valid token in the token space, then the module will not build.\r
+  If TokenName is not a feature flag, then the module will not build.\r
+\r
+  @param   TokenName  The name of the PCD token to retrieve a current value for.\r
+\r
+  @return  32-bit value for the token specified by TokenName.\r
+\r
+**/\r
 #define FixedPcdGet32(TokenName)            _PCD_VALUE_##TokenName\r
+\r
+\r
+/**\r
+  Retrieves a 64-bit fixed PCD token value based on a token name.\r
+\r
+  Returns the 64-bit value for the token specified by TokenName.\r
+  If TokenName is not a valid token in the token space, then the module will not build.\r
+  If TokenName is not a feature flag, then the module will not build.\r
+\r
+  @param   TokenName  The name of the PCD token to retrieve a current value for.\r
+\r
+  @return  64-bit value for the token specified by TokenName.\r
+\r
+**/\r
 #define FixedPcdGet64(TokenName)            _PCD_VALUE_##TokenName\r
+\r
+\r
+/**\r
+  Retrieves a Boolean fixed PCD token value based on a token name.\r
+\r
+  Returns the Boolean value for the token specified by TokenName.\r
+  If TokenName is not a valid token in the token space, then the module will not build.\r
+  If TokenName is not a feature flag, then the module will not build.\r
+\r
+  @param   TokenName  The name of the PCD token to retrieve a current value for.\r
+\r
+  @return  The Boolean value for the token. \r
+\r
+**/\r
 #define FixedPcdGetBool(TokenName)          _PCD_VALUE_##TokenName\r
 \r
 \r
+/**\r
+  Retrieves a pointer to a fixed PCD token buffer based on a token name.\r
+\r
+  Returns a pointer to the buffer for the token specified by TokenName.\r
+  If TokenName is not a valid token in the token space, then the module will not build.\r
+  If TokenName is not a feature flag, then the module will not build.\r
+\r
+  @param   TokenName  The name of the PCD token to retrieve a current value for.\r
+\r
+  @return  A pointer to the buffer. \r
+\r
+**/\r
 #define FixedPcdGetPtr(TokenName)           ((VOID *)_PCD_VALUE_##TokenName)\r
 \r
 \r
-//\r
-// (Binary) Patch is in the form of a global variable\r
-//\r
+/**\r
+  Retrieves an 8-bit binary patchable PCD token value based on a token name.\r
+\r
+  Returns the 8-bit value for the token specified by TokenName.\r
+  If TokenName is not a valid token in the token space, then the module will not build.\r
+  If TokenName is not a feature flag, then the module will not build.\r
+\r
+  @param   TokenName  The name of the PCD token to retrieve a current value for.\r
+\r
+  @return  An 8-bit binary patchable PCD token value.\r
+\r
+**/\r
 #define PatchPcdGet8(TokenName)             _gPcd_BinaryPatch_##TokenName\r
+\r
+/**\r
+  Retrieves a 16-bit binary patchable PCD token value based on a token name.\r
+\r
+  Returns the 16-bit value for the token specified by TokenName.\r
+  If TokenName is not a valid token in the token space, then the module will not build.\r
+  If TokenName is not a feature flag, then the module will not build.\r
+\r
+  @param   TokenName  The name of the PCD token to retrieve a current value for.\r
+\r
+  @return  A 16-bit binary patchable PCD token value.\r
+\r
+**/\r
 #define PatchPcdGet16(TokenName)            _gPcd_BinaryPatch_##TokenName\r
+\r
+\r
+/**\r
+  Retrieves a 32-bit binary patchable PCD token value based on a token name.\r
+\r
+  Returns the 32-bit value for the token specified by TokenName.\r
+  If TokenName is not a valid token in the token space, then the module will not build.\r
+  If TokenName is not a feature flag, then the module will not build.\r
+\r
+  @param   TokenName  The name of the PCD token to retrieve a current value for.\r
+\r
+  @return  A 32-bit binary patchable PCD token value.\r
+\r
+**/\r
 #define PatchPcdGet32(TokenName)            _gPcd_BinaryPatch_##TokenName\r
+\r
+\r
+/**\r
+  Retrieves a 64-bit binary patchable PCD token value based on a token name.\r
+\r
+  Returns the 64-bit value for the token specified by TokenName.\r
+  If TokenName is not a valid token in the token space, then the module will not build.\r
+  If TokenName is not a feature flag, then the module will not build.\r
+\r
+  @param   TokenName  The name of the PCD token to retrieve a current value for.\r
+\r
+  @return  A 64-bit binary patchable PCD token value.\r
+\r
+**/\r
 #define PatchPcdGet64(TokenName)            _gPcd_BinaryPatch_##TokenName\r
+\r
+\r
+/**\r
+  Retrieves a Boolean binary patchable PCD token value based on a token name.\r
+\r
+  Returns the Boolean value for the token specified by TokenName.\r
+  If TokenName is not a valid token in the token space, then the module will not build.\r
+  If TokenName is not a feature flag, then the module will not build.\r
+\r
+  @param   TokenName  The name of the PCD token to retrieve a current value for.\r
+\r
+  @return  The Boolean value for the token.\r
+\r
+**/\r
 #define PatchPcdGetBool(TokenName)          _gPcd_BinaryPatch_##TokenName\r
+\r
+\r
+/**\r
+  Retrieves a pointer to a binary patchable PCD token buffer based on a token name.\r
+\r
+  Returns a pointer to the buffer for the token specified by TokenName.\r
+  If TokenName is not a valid token in the token space, then the module will not build.\r
+  If TokenName is not a feature flag, then the module will not build.\r
+\r
+  @param   TokenName  The name of the PCD token to retrieve a current value for.\r
+\r
+  @return  A pointer to the buffer for the token.\r
+\r
+**/\r
 #define PatchPcdGetPtr(TokenName)           ((VOID *)_gPcd_BinaryPatch_##TokenName)\r
 \r
+\r
+/**\r
+  Sets an 8-bit binary patchable PCD token value based on a token name.\r
+\r
+  Sets the 8-bit value for the token specified by TokenName. Value is returned.\r
+  If TokenName is not a valid token in the token space, then the module will not build.\r
+  If TokenName is not a feature flag, then the module will not build.\r
+\r
+  @param   TokenName  The name of the binary patchable PCD token to set the current value for.\r
+  @param   Value      The 8-bit value to set.\r
+  \r
+  @return  Value.\r
+\r
+**/\r
 #define PatchPcdSet8(TokenName, Value)      (_gPcd_BinaryPatch_##TokenName = (Value))\r
+\r
+\r
+/**\r
+  Sets a 16-bit binary patchable PCD token value based on a token name.\r
+\r
+  Sets the 16-bit value for the token specified by TokenName. Value is returned.\r
+  If TokenName is not a valid token in the token space, then the module will not build.\r
+  If TokenName is not a feature flag, then the module will not build.\r
+\r
+  @param   TokenName  The name of the binary patchable PCD token to set the current value for.\r
+  @param   Value      The 16-bit value to set.\r
+\r
+  @return  Value.\r
+\r
+**/\r
 #define PatchPcdSet16(TokenName, Value)     (_gPcd_BinaryPatch_##TokenName = (Value))\r
+\r
+\r
+/**\r
+  Sets a 32-bit binary patchable PCD token value based on a token name.\r
+\r
+  Sets the 32-bit value for the token specified by TokenName. Value is returned.\r
+  If TokenName is not a valid token in the token space, then the module will not build.\r
+  If TokenName is not a feature flag, then the module will not build.\r
+\r
+  @param   TokenName  The name of the binary patchable PCD token to set the current value for.\r
+  @param   Value      The 32-bit value to set.\r
+\r
+  @return  Value.\r
+\r
+**/\r
 #define PatchPcdSet32(TokenName, Value)     (_gPcd_BinaryPatch_##TokenName = (Value))\r
+\r
+\r
+/**\r
+  Sets a 64-bit binary patchable PCD token value based on a token name.\r
+\r
+  Sets the 64-bit value for the token specified by TokenName. Value is returned.\r
+  If TokenName is not a valid token in the token space, then the module will not build.\r
+  If TokenName is not a feature flag, then the module will not build.\r
+\r
+  @param   TokenName  The name of the binary patchable PCD token to set the current value for.\r
+  @param   Value      The 64-bit value to set.\r
+\r
+  @return  Value.\r
+\r
+**/\r
 #define PatchPcdSet64(TokenName, Value)     (_gPcd_BinaryPatch_##TokenName = (Value))\r
+\r
+\r
+/**\r
+  Sets a Boolean binary patchable PCD token value based on a token name.\r
+\r
+  Sets the Boolean value for the token specified by TokenName. Value is returned.\r
+  If TokenName is not a valid token in the token space, then the module will not build.\r
+  If TokenName is not a feature flag, then the module will not build.\r
+\r
+  @param   TokenName  The name of the binary patchable PCD token to set the current value for.\r
+  @param   Value      The boolean value to set.\r
+\r
+  @return  Value.\r
+\r
+**/\r
 #define PatchPcdSetBool(TokenName, Value)   (_gPcd_BinaryPatch_##TokenName = (Value))\r
+\r
+\r
+/**\r
+  Sets a pointer to a binary patchable PCD token buffer based on a token name.\r
+\r
+  Sets the buffer for the token specified by TokenName.  Buffer is returned.  \r
+  If SizeOfBuffer is greater than the maximum size supported by TokenName, then set SizeOfBuffer\r
+  to the maximum size supported by TokenName and return NULL to indicate that the set operation \r
+  was not actually performed.  If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be \r
+  set to the maximum size supported by TokenName and NULL must be returned.\r
+  If TokenName is not a valid token in the token space, then the module will not build.\r
+  If TokenName is not a feature flag, then the module will not build.\r
+  \r
+  If SizeOfBuffer is NULL, then ASSERT().\r
+  If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
+  \r
+  @param   TokenName      The name of the binary patchable PCD token to set the current value for.\r
+  @param   SizeOfBuffer   A pointer to the size, in bytes, of Buffer.\r
+  @param   Buffer         Pointer to the value to set.\r
+\r
+  @return  Value.\r
+\r
+**/\r
 #define PatchPcdSetPtr(TokenName, Size, Buffer) \\r
                                             LibPatchPcdSetPtr (                        \\r
                                               _gPcd_BinaryPatch_##TokenName,           \\r
@@ -70,56 +349,442 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
                                               (Buffer)                                 \\r
                                               )\r
 \r
-//\r
-// Dynamic is via the protocol with only the TokenNumber as argument\r
-//  It can also be Patch or Fixed type based on a build option\r
-//\r
+/**\r
+  Retrieves an 8-bit PCD token value based on a token name.\r
+  \r
+  Returns the 8-bit value for the token specified by TokenName.\r
+  If TokenName is not a valid token in the token space, then the module will not build.\r
+  \r
+  @param   TokenName  The name of the PCD token to retrieve a current value for.\r
+\r
+  @return  8-bit value for the token specified by TokenName.\r
+\r
+**/\r
 #define PcdGet8(TokenName)                  _PCD_GET_MODE_8_##TokenName\r
+\r
+\r
+/**\r
+  Retrieves a 16-bit PCD token value based on a token name.\r
+\r
+  Returns the 16-bit value for the token specified by TokenName.\r
+  If TokenName is not a valid token in the token space, then the module will not build.\r
+\r
+  @param   TokenName  The name of the PCD token to retrieve a current value for.\r
+\r
+  @return  16-bit value for the token specified by TokenName.\r
+\r
+**/\r
 #define PcdGet16(TokenName)                 _PCD_GET_MODE_16_##TokenName\r
+\r
+\r
+/**\r
+  Retrieves a 32-bit PCD token value based on a token name.\r
+\r
+  Returns the 32-bit value for the token specified by TokenName.\r
+  If TokenName is not a valid token in the token space, then the module will not build.\r
+\r
+  @param   TokenName  The name of the PCD token to retrieve a current value for.\r
+\r
+  @return  32-bit value for the token specified by TokenName.\r
+\r
+**/\r
 #define PcdGet32(TokenName)                 _PCD_GET_MODE_32_##TokenName\r
+\r
+\r
+/**\r
+  Retrieves a 64-bit PCD token value based on a token name.\r
+\r
+  Returns the 64-bit value for the token specified by TokenName.\r
+  If TokenName is not a valid token in the token space, then the module will not build.\r
+\r
+  @param   TokenName  The name of the PCD token to retrieve a current value for.\r
+\r
+  @return  64-bit value for the token specified by TokenName.\r
+\r
+**/\r
 #define PcdGet64(TokenName)                 _PCD_GET_MODE_64_##TokenName\r
+\r
+\r
+/**\r
+  Retrieves a pointer to a PCD token buffer based on a token name.\r
+\r
+  Returns a pointer to the buffer for the token specified by TokenName.\r
+  If TokenName is not a valid token in the token space, then the module will not build.\r
+\r
+  @param   TokenName  The name of the PCD token to retrieve a current value for.\r
+\r
+  @return  A pointer to the buffer.\r
+\r
+**/\r
 #define PcdGetPtr(TokenName)                _PCD_GET_MODE_PTR_##TokenName\r
+\r
+\r
+/**\r
+  Retrieves a Boolean PCD token value based on a token name.\r
+\r
+  Returns the Boolean value for the token specified by TokenName.\r
+  If TokenName is not a valid token in the token space, then the module will not build.\r
+\r
+  @param   TokenName  The name of the PCD token to retrieve a current value for.\r
+\r
+  @return  A Boolean PCD token value.\r
+\r
+**/\r
 #define PcdGetBool(TokenName)               _PCD_GET_MODE_BOOL_##TokenName\r
 \r
-//\r
-// Dynamic Set\r
-//\r
+\r
+/**\r
+  Sets an 8-bit PCD token value based on a token name.\r
+\r
+  Sets the 8-bit value for the token specified by TokenName. Value is returned.\r
+  If TokenName is not a valid token in the token space, then the module will not build.\r
+\r
+  @param   TokenName  The name of the PCD token to retrieve a current value for.\r
+  @param   Value      The 8-bit value to set.\r
+  \r
+  @return  Value.\r
+\r
+**/\r
 #define PcdSet8(TokenName, Value)           _PCD_SET_MODE_8_##TokenName     ((Value))\r
+\r
+\r
+/**\r
+  Sets a 16-bit PCD token value based on a token name.\r
+\r
+  Sets the 16-bit value for the token specified by TokenName. Value is returned.\r
+  If TokenName is not a valid token in the token space, then the module will not build.\r
+\r
+  @param   TokenName  The name of the PCD token to retrieve a current value for.\r
+  @param   Value      The 16-bit value to set.\r
+\r
+  @return  Value.\r
+\r
+**/\r
 #define PcdSet16(TokenName, Value)          _PCD_SET_MODE_16_##TokenName    ((Value))\r
+\r
+\r
+/**\r
+  Sets a 32-bit PCD token value based on a token name.\r
+\r
+  Sets the 32-bit value for the token specified by TokenName. Value is returned.\r
+  If TokenName is not a valid token in the token space, then the module will not build.\r
+\r
+  @param   TokenName  The name of the PCD token to retrieve a current value for.\r
+  @param   Value      The 32-bit value to set.\r
+\r
+  @return  Value.\r
+\r
+**/\r
 #define PcdSet32(TokenName, Value)          _PCD_SET_MODE_32_##TokenName    ((Value))\r
+\r
+\r
+/**\r
+  Sets a 64-bit PCD token value based on a token name.\r
+\r
+  Sets the 64-bit value for the token specified by TokenName. Value is returned.\r
+  If TokenName is not a valid token in the token space, then the module will not build.\r
+\r
+  @param   TokenName  The name of the PCD token to retrieve a current value for.\r
+  @param   Value      The 64-bit value to set.\r
+\r
+  @return  Value.\r
+\r
+**/\r
 #define PcdSet64(TokenName, Value)          _PCD_SET_MODE_64_##TokenName    ((Value))\r
+\r
+\r
+/**\r
+  Sets a pointer to a PCD token buffer based on a token name.\r
+\r
+  Sets the buffer for the token specified by TokenName. Buffer is returned.  \r
+  If SizeOfBuffer is greater than the maximum size supported by TokenName, \r
+  then set SizeOfBuffer to the maximum size supported by TokenName and return NULL \r
+  to indicate that the set operation was not actually performed.  If SizeOfBuffer \r
+  is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size supported \r
+  by TokenName and NULL must be returned.\r
+  If TokenName is not a valid token in the token space, then the module will not build.\r
+  \r
+  If SizeOfBuffer is NULL, then ASSERT().\r
+  If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
+  \r
+  @param   TokenName      The name of the PCD token to set the current value for.\r
+  @param   SizeOfBuffer   A pointer to the size, in bytes, of Buffer.\r
+  @param   Buffer         A pointer to the buffer to set.\r
+\r
+  @return  Buffer.\r
+\r
+**/\r
 #define PcdSetPtr(TokenName, SizeOfBuffer, Buffer) \\r
                                             _PCD_SET_MODE_PTR_##TokenName   ((SizeOfBuffer), (Buffer))\r
+                                            \r
+/**\r
+  Sets a Boolean PCD token value based on a token name.\r
+\r
+  Sets the Boolean value for the token specified by TokenName. Value is returned. \r
+  If TokenName is not a valid token in the token space, then the module will not build.\r
+\r
+  @param   TokenName      The name of the PCD token to set the current value for.\r
+  @param   Buffer         The Boolean value to set.\r
+\r
+  @return  Value. \r
+\r
+**/\r
 #define PcdSetBool(TokenName, Value)        _PCD_SET_MODE_BOOL_##TokenName  ((Value))\r
 \r
-//\r
-// Dynamic Ex is to support binary distribution\r
-//\r
+\r
+/**\r
+  Retrieves an 8-bit PCD token value based on a GUID and a token name.\r
+\r
+  Returns the 8-bit value for the token specified by Guid and TokenName.\r
+  If TokenName is not a valid token in the token space specified by Guid, \r
+  then the module will not build.\r
+  \r
+  If Guid is NULL, then ASSERT().\r
+\r
+  @param   Guid        Pointer to a 128-bit unique value that designates \r
+                       which namespace to retrieve a value from.\r
+  @param   TokenName   The name of the PCD token to retrieve a current value for.                 \r
+\r
+  @return  An 8-bit PCD token value.\r
+\r
+**/\r
 #define PcdGetEx8(Guid, TokenName)          LibPcdGetEx8    ((Guid), _PCD_TOKEN_##TokenName)\r
+\r
+\r
+/**\r
+  Retrieves a 16-bit PCD token value based on a GUID and a token name.\r
+\r
+  Returns the 16-bit value for the token specified by Guid and TokenName.\r
+  If TokenName is not a valid token in the token space specified by Guid, \r
+  then the module will not build.\r
+\r
+  If Guid is NULL, then ASSERT().\r
+\r
+  @param   Guid        Pointer to a 128-bit unique value that designates \r
+                       which namespace to retrieve a value from.\r
+  @param   TokenName   The name of the PCD token to retrieve a current value for.                 \r
+\r
+  @return  A 16-bit PCD token value.\r
+\r
+**/\r
 #define PcdGetEx16(Guid, TokenName)         LibPcdGetEx16   ((Guid), _PCD_TOKEN_##TokenName)\r
+\r
+\r
+/**\r
+  Retrieves a 32-bit PCD token value based on a GUID and a token name.\r
+\r
+  Returns the 32-bit value for the token specified by Guid and TokenName.\r
+  If TokenName is not a valid token in the token space specified by Guid, \r
+  then the module will not build.\r
+\r
+  If Guid is NULL, then ASSERT().\r
+\r
+  @param   Guid        Pointer to a 128-bit unique value that designates \r
+                       which namespace to retrieve a value from.\r
+  @param   TokenName   The name of the PCD token to retrieve a current value for.                 \r
+\r
+  @return  A 32-bit PCD token value.\r
+\r
+**/\r
 #define PcdGetEx32(Guid, TokenName)         LibPcdGetEx32   ((Guid), _PCD_TOKEN_##TokenName)\r
+\r
+\r
+/**\r
+  Retrieves a 64-bit PCD token value based on a GUID and a token name.\r
+\r
+  Returns the 64-bit value for the token specified by Guid and TokenName.\r
+  If TokenName is not a valid token in the token space specified by Guid, \r
+  then the module will not build.\r
+\r
+  If Guid is NULL, then ASSERT().\r
+\r
+  @param   Guid        Pointer to a 128-bit unique value that designates \r
+                       which namespace to retrieve a value from.\r
+  @param   TokenName   The name of the PCD token to retrieve a current value for.                 \r
+\r
+  @return  A 64-bit PCD token value.\r
+\r
+**/\r
 #define PcdGetEx64(Guid, TokenName)         LibPcdGetEx64   ((Guid), _PCD_TOKEN_##TokenName)\r
+\r
+\r
+/**\r
+  Retrieves a pointer to a PCD token buffer based on a GUID and a token name.\r
+\r
+  Returns a pointer to the buffer for the token specified by Guid and TokenName.\r
+  If TokenName is not a valid token in the token space specified by Guid, \r
+  then the module will not build.\r
+\r
+  If Guid is NULL, then ASSERT().\r
+\r
+  @param   Guid        Pointer to a 128-bit unique value that designates \r
+                       which namespace to retrieve a value from.\r
+  @param   TokenName   The name of the PCD token to retrieve a current value for.                 \r
+\r
+  @return  A pointer to a PCD token buffer.\r
+\r
+**/\r
 #define PcdGetExPtr(Guid, TokenName)        LibPcdGetExPtr  ((Guid), _PCD_TOKEN_##TokenName)\r
+\r
+\r
+/**\r
+  Retrieves a Boolean PCD token value based on a GUID and a token name.\r
+\r
+  Returns the Boolean value for the token specified by Guid and TokenName.\r
+  If TokenName is not a valid token in the token space specified by Guid, \r
+  then the module will not build.\r
+\r
+  If Guid is NULL, then ASSERT().\r
+\r
+  @param   Guid        Pointer to a 128-bit unique value that designates \r
+                       which namespace to retrieve a value from.\r
+  @param   TokenName   The name of the PCD token to retrieve a current value for.                 \r
+\r
+  @return  A Boolean PCD token value.\r
+\r
+**/\r
 #define PcdGetExBool(Guid, TokenName)       LibPcdGetExBool ((Guid), _PCD_TOKEN_##TokenName)\r
 \r
-//\r
-// Dynamic Set Ex\r
-//\r
+\r
+/**\r
+  Sets an 8-bit PCD token value based on a GUID and a token name.\r
+\r
+  Sets the 8-bit value for the token specified by Guid and TokenName. Value is returned.\r
+  If TokenName is not a valid token in the token space specified by Guid, \r
+  then the module will not build.\r
+\r
+  If Guid is NULL, then ASSERT().\r
+\r
+  @param   Guid        Pointer to a 128-bit unique value that designates \r
+                       which namespace to retrieve a value from.\r
+  @param   TokenName   The name of the PCD token to set the current value for.\r
+  @param   Value       The 8-bit value to set.                   \r
+\r
+  @return  Value. \r
+\r
+**/\r
 #define PcdSetEx8(Guid, TokenName, Value)   LibPcdSetEx8   ((Guid), _PCD_TOKEN_##TokenName, (Value))\r
+\r
+\r
+/**\r
+  Sets a 16-bit PCD token value based on a GUID and a token name.\r
+\r
+  Sets the 16-bit value for the token specified by Guid and TokenName. Value is returned.\r
+  If TokenName is not a valid token in the token space specified by Guid, \r
+  then the module will not build.\r
+\r
+  If Guid is NULL, then ASSERT().\r
+\r
+  @param   Guid        Pointer to a 128-bit unique value that designates \r
+                       which namespace to retrieve a value from.\r
+  @param   TokenName   The name of the PCD token to set the current value for.\r
+  @param   Value       The 16-bit value to set.                   \r
+\r
+  @return  Value. \r
+\r
+**/\r
 #define PcdSetEx16(Guid, TokenName, Value)  LibPcdSetEx16  ((Guid), _PCD_TOKEN_##TokenName, (Value))\r
+\r
+\r
+/**\r
+  Sets a 32-bit PCD token value based on a GUID and a token name.\r
+\r
+  Sets the 32-bit value for the token specified by Guid and TokenName. Value is returned.\r
+  If TokenName is not a valid token in the token space specified by Guid, \r
+  then the module will not build.\r
+\r
+  If Guid is NULL, then ASSERT().\r
+\r
+  @param   Guid        Pointer to a 128-bit unique value that designates \r
+                       which namespace to retrieve a value from.\r
+  @param   TokenName   The name of the PCD token to set the current value for.\r
+  @param   Value       The 32-bit value to set.                   \r
+\r
+  @return  Value. \r
+\r
+**/\r
 #define PcdSetEx32(Guid, TokenName, Value)  LibPcdSetEx32  ((Guid), _PCD_TOKEN_##TokenName, (Value))\r
+\r
+\r
+/**\r
+  Sets a 64-bit PCD token value based on a GUID and a token name.\r
+\r
+  Sets the 64-bit value for the token specified by Guid and TokenName. Value is returned.\r
+  If TokenName is not a valid token in the token space specified by Guid, \r
+  then the module will not build.\r
+\r
+  If Guid is NULL, then ASSERT().\r
+\r
+  @param   Guid        Pointer to a 128-bit unique value that designates \r
+  which namespace to retrieve a value from.\r
+  @param   TokenName   The name of the PCD token to set the current value for.\r
+  @param   Value       The 64-bit value to set.                   \r
+\r
+  @return  Value. \r
+\r
+**/\r
 #define PcdSetEx64(Guid, TokenName, Value)  LibPcdSetEx64  ((Guid), _PCD_TOKEN_##TokenName, (Value))\r
+\r
+\r
+/**\r
+  Sets a pointer to a PCD token buffer based on a GUID and a token name.\r
+\r
+  Sets the buffer for the token specified by Guid and TokenName. Buffer is returned.  \r
+  If SizeOfBuffer is greater than the maximum size supported by Guid and TokenName, \r
+  then set SizeOfBuffer to the maximum size supported by Guid and TokenName and return \r
+  NULL to indicate that the set operation was not actually performed. If SizeOfBuffer \r
+  is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size supported by\r
+  Guid and TokenName and NULL must be returned.\r
+  If TokenName is not a valid token in the token space specified by Guid, \r
+  then the module will not build.\r
+  \r
+  If Guid is NULL, then ASSERT().\r
+  If SizeOfBuffer is NULL, then ASSERT().\r
+  If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
+\r
+  @param   Guid           Pointer to a 128-bit unique value that designates \r
+                          which namespace to retrieve a value from.\r
+  @param   TokenName      The name of the PCD token to set the current value for.\r
+  @param   SizeOfBuffer   A pointer to the size, in bytes, of Buffer.                  \r
+  @param   Value          Pointer to the buffer to set.\r
+    \r
+  @return  Buffer. \r
+\r
+**/\r
 #define PcdSetExPtr(Guid, TokenName, SizeOfBuffer, Buffer) \\r
                                             LibPcdSetExPtr ((Guid), _PCD_TOKEN_##TokenName, (SizeOfBuffer), (Buffer))\r
+\r
+\r
+/**\r
+  Sets a Boolean PCD token value based on a GUID and a token name.\r
+\r
+  Sets the Boolean value for the token specified by Guid and TokenName. Value is returned. \r
+  If TokenName is not a valid token in the token space specified by Guid, \r
+  then the module will not build.\r
+\r
+  If Guid is NULL, then ASSERT().\r
+\r
+  @param   Guid           Pointer to a 128-bit unique value that designates \r
+                          which namespace to retrieve a value from.\r
+  @param   TokenName      The name of the PCD token to set the current value for.              \r
+  @param   Value          The Boolean value to set.\r
+\r
+  @return  Value. \r
+\r
+**/                                         \r
 #define PcdSetExBool(Guid, TokenName, Value) \\r
                                             LibPcdSetExBool((Guid), _PCD_TOKEN_##TokenName, (Value))\r
 \r
 \r
 /**\r
+  This function provides a means by which SKU support can be established in the PCD infrastructure.\r
+\r
   Sets the current SKU in the PCD database to the value specified by SkuId.  SkuId is returned.\r
 \r
   @param[in]  SkuId The SKU value that will be used when the PCD service will retrieve and \r
                     set values associated with a PCD token.\r
+                    \r
+  If SkuId >= 0x100, then ASSERT().                  \r
 \r
   @return Return the SKU ID that just be set.\r
 \r
@@ -132,6 +797,8 @@ LibPcdSetSku (
 \r
 \r
 /**\r
+  This function provides a means by which to retrieve a value for a given PCD token.\r
+  \r
   Returns the 8-bit value for the token specified by TokenNumber. \r
 \r
   @param[in]  TokenNumber The PCD token number to retrieve a current value for.\r
@@ -147,6 +814,8 @@ LibPcdGet8 (
 \r
 \r
 /**\r
+  This function provides a means by which to retrieve a value for a given PCD token.\r
+  \r
   Returns the 16-bit value for the token specified by TokenNumber. \r
 \r
   @param[in]  TokenNumber The PCD token number to retrieve a current value for.\r
@@ -162,6 +831,8 @@ LibPcdGet16 (
 \r
 \r
 /**\r
+  This function provides a means by which to retrieve a value for a given PCD token.\r
+  \r
   Returns the 32-bit value for the token specified by TokenNumber. \r
 \r
   @param[in]  TokenNumber The PCD token number to retrieve a current value for.\r
@@ -177,6 +848,8 @@ LibPcdGet32 (
 \r
 \r
 /**\r
+  This function provides a means by which to retrieve a value for a given PCD token.\r
+  \r
   Returns the 64-bit value for the token specified by TokenNumber.\r
 \r
   @param[in]  TokenNumber The PCD token number to retrieve a current value for.\r
@@ -192,6 +865,8 @@ LibPcdGet64 (
 \r
 \r
 /**\r
+  This function provides a means by which to retrieve a value for a given PCD token.\r
+  \r
   Returns the pointer to the buffer of the token specified by TokenNumber.\r
 \r
   @param[in]  TokenNumber The PCD token number to retrieve a current value for.\r
@@ -207,6 +882,8 @@ LibPcdGetPtr (
 \r
 \r
 /**\r
+  This function provides a means by which to retrieve a value for a given PCD token.\r
+  \r
   Returns the Boolean value of the token specified by TokenNumber. \r
 \r
   @param[in]  TokenNumber The PCD token number to retrieve a current value for.\r
@@ -222,7 +899,7 @@ LibPcdGetBool (
 \r
 \r
 /**\r
-  Returns the size of the token specified by TokenNumber. \r
+  This function provides a means by which to retrieve the size of a given PCD token.\r
 \r
   @param[in]  TokenNumber The PCD token number to retrieve a current value for.\r
 \r
@@ -237,7 +914,10 @@ LibPcdGetSize (
 \r
 \r
 /**\r
+  This function provides a means by which to retrieve a value for a given PCD token.\r
+  \r
   Returns the 8-bit value for the token specified by TokenNumber and Guid.\r
+  \r
   If Guid is NULL, then ASSERT(). \r
 \r
   @param[in]  Guid Pointer to a 128-bit unique value that designates \r
@@ -256,7 +936,10 @@ LibPcdGetEx8 (
 \r
 \r
 /**\r
+  This function provides a means by which to retrieve a value for a given PCD token.\r
+\r
   Returns the 16-bit value for the token specified by TokenNumber and Guid.\r
+  \r
   If Guid is NULL, then ASSERT(). \r
 \r
   @param[in]  Guid Pointer to a 128-bit unique value that designates \r
@@ -294,7 +977,10 @@ LibPcdGetEx32 (
 \r
 \r
 /**\r
+  This function provides a means by which to retrieve a value for a given PCD token.\r
+  \r
   Returns the 64-bit value for the token specified by TokenNumber and Guid.\r
+  \r
   If Guid is NULL, then ASSERT(). \r
 \r
   @param[in]  Guid          Pointer to a 128-bit unique value that designates \r
@@ -313,7 +999,10 @@ LibPcdGetEx64 (
 \r
 \r
 /**\r
+  This function provides a means by which to retrieve a value for a given PCD token.\r
+  \r
   Returns the pointer to the buffer of token specified by TokenNumber and Guid.\r
+  \r
   If Guid is NULL, then ASSERT(). \r
 \r
   @param[in]  Guid          Pointer to a 128-bit unique value that designates \r
@@ -332,7 +1021,10 @@ LibPcdGetExPtr (
 \r
 \r
 /**\r
+  This function provides a means by which to retrieve a value for a given PCD token.\r
+  \r
   Returns the Boolean value of the token specified by TokenNumber and Guid. \r
+  \r
   If Guid is NULL, then ASSERT(). \r
 \r
   @param[in]  Guid          Pointer to a 128-bit unique value that designates \r
@@ -351,7 +1043,10 @@ LibPcdGetExBool (
 \r
 \r
 /**\r
+  This function provides a means by which to retrieve the size of a given PCD token.\r
+  \r
   Returns the size of the token specified by TokenNumber and Guid. \r
+  \r
   If Guid is NULL, then ASSERT(). \r
 \r
   @param[in]  Guid          Pointer to a 128-bit unique value that designates \r
@@ -370,6 +1065,8 @@ LibPcdGetExSize (
 \r
 \r
 /**\r
+  This function provides a means by which to set a value for a given PCD token.\r
+  \r
   Sets the 8-bit value for the token specified by TokenNumber \r
   to the value specified by Value.  Value is returned.\r
   \r
@@ -388,6 +1085,8 @@ LibPcdSet8 (
 \r
 \r
 /**\r
+  This function provides a means by which to set a value for a given PCD token.\r
+  \r
   Sets the 16-bit value for the token specified by TokenNumber \r
   to the value specified by Value.  Value is returned.\r
   \r
@@ -406,6 +1105,8 @@ LibPcdSet16 (
 \r
 \r
 /**\r
+  This function provides a means by which to set a value for a given PCD token.\r
+  \r
   Sets the 32-bit value for the token specified by TokenNumber \r
   to the value specified by Value.  Value is returned.\r
   \r
@@ -424,6 +1125,8 @@ LibPcdSet32 (
 \r
 \r
 /**\r
+  This function provides a means by which to set a value for a given PCD token.\r
+  \r
   Sets the 64-bit value for the token specified by TokenNumber \r
   to the value specified by Value.  Value is returned.\r
   \r
@@ -442,6 +1145,8 @@ LibPcdSet64 (
 \r
 \r
 /**\r
+  This function provides a means by which to set a value for a given PCD token.\r
+  \r
   Sets a buffer for the token specified by TokenNumber to the value \r
   specified by Buffer and SizeOfBuffer.  Buffer is returned.  \r
   If SizeOfBuffer is greater than the maximum size support by TokenNumber, \r
@@ -456,21 +1161,23 @@ LibPcdSet64 (
   \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        Value A pointer to the buffer to set.\r
+  @param[in]      Buffer        A pointer to the buffer to set.\r
 \r
   @return Return the pointer for the buffer been set.\r
 \r
 **/\r
-VOID*\r
+VOID *\r
 EFIAPI\r
 LibPcdSetPtr (\r
-  IN      UINTN             TokenNumber,\r
-  IN OUT  UINTN             *SizeOfBuffer,\r
-  IN      VOID              *Buffer\r
+  IN        UINTN             TokenNumber,\r
+  IN OUT    UINTN             *SizeOfBuffer,\r
+  IN        VOID              *Buffer\r
   );\r
 \r
 \r
 /**\r
+  This function provides a means by which to set a value for a given PCD token.\r
+  \r
   Sets the Boolean value for the token specified by TokenNumber \r
   to the value specified by Value.  Value is returned.\r
   \r
@@ -489,8 +1196,11 @@ LibPcdSetBool (
 \r
 \r
 /**\r
+  This function provides a means by which to set a value for a given PCD token.\r
+  \r
   Sets the 8-bit value for the token specified by TokenNumber and \r
   Guid to the value specified by Value. Value is returned.\r
+  \r
   If Guid is NULL, then ASSERT().\r
   \r
   @param[in]  Guid          Pointer to a 128-bit unique value that \r
@@ -511,8 +1221,11 @@ LibPcdSetEx8 (
 \r
 \r
 /**\r
+  This function provides a means by which to set a value for a given PCD token.\r
+  \r
   Sets the 16-bit value for the token specified by TokenNumber and \r
   Guid to the value specified by Value. Value is returned.\r
+  \r
   If Guid is NULL, then ASSERT().\r
   \r
   @param[in]  Guid          Pointer to a 128-bit unique value that \r
@@ -533,8 +1246,11 @@ LibPcdSetEx16 (
 \r
 \r
 /**\r
+  This function provides a means by which to set a value for a given PCD token.\r
+  \r
   Sets the 32-bit value for the token specified by TokenNumber and \r
   Guid to the value specified by Value. Value is returned.\r
+  \r
   If Guid is NULL, then ASSERT().\r
   \r
   @param[in]  Guid          Pointer to a 128-bit unique value that \r
@@ -555,6 +1271,8 @@ LibPcdSetEx32 (
 \r
 \r
 /**\r
+  This function provides a means by which to set a value for a given PCD token.\r
+  \r
   Sets the 64-bit value for the token specified by TokenNumber and \r
   Guid to the value specified by Value. Value is returned.\r
   If Guid is NULL, then ASSERT().\r
@@ -577,6 +1295,8 @@ LibPcdSetEx64 (
 \r
 \r
 /**\r
+  This function provides a means by which to set a value for a given PCD token.\r
+  \r
   Sets a buffer for the token specified by TokenNumber to the value specified by \r
   Buffer and SizeOfBuffer.  Buffer is returned.  If SizeOfBuffer is greater than \r
   the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size \r
@@ -607,8 +1327,11 @@ LibPcdSetExPtr (
 \r
 \r
 /**\r
+  This function provides a means by which to set a value for a given PCD token.\r
+  \r
   Sets the Boolean value for the token specified by TokenNumber and \r
   Guid to the value specified by Value. Value is returned.\r
+  \r
   If Guid is NULL, then ASSERT().\r
   \r
   @param[in]  Guid          Pointer to a 128-bit unique value that \r
@@ -659,9 +1382,12 @@ VOID
 \r
 \r
 /**\r
+  Set up a notification function that is called when a specified token is set.\r
+  \r
   When the token specified by TokenNumber and Guid is set, \r
   then notification function specified by NotificationFunction is called.  \r
   If Guid is NULL, then the default token space is used. \r
+  \r
   If NotificationFunction is NULL, then ASSERT().\r
 \r
   @param[in]  Guid      Pointer to a 128-bit unique value that designates which \r
@@ -683,7 +1409,13 @@ LibPcdCallbackOnSet (
 \r
 /**\r
   Disable a notification function that was established with LibPcdCallbackonSet().\r
-\r
+  \r
+  Disable a notification function that was previously established with LibPcdCallbackOnSet(). \r
+  \r
+  If NotificationFunction is NULL, then ASSERT().\r
+  If LibPcdCallbackOnSet() was not previously called with Guid, TokenNumber, \r
+  and NotificationFunction, then ASSERT().\r
+  \r
   @param[in]  Guid          Specify the GUID token space.\r
   @param[in]  TokenNumber   Specify the token number.\r
   @param[in]  NotificationFunction The callback function to be unregistered.\r
@@ -699,12 +1431,15 @@ LibPcdCancelCallback (
 \r
 \r
 /**\r
+  Retrieves the next token in a token space.\r
+  \r
   Retrieves the next PCD token number from the token space specified by Guid.  \r
   If Guid is NULL, then the default token space is used.  If TokenNumber is 0, \r
   then the first token number is returned.  Otherwise, the token number that \r
   follows TokenNumber in the token space is returned.  If TokenNumber is the last \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
+  token number in the token space, then 0 is returned.  \r
+  \r
+  If TokenNumber is not 0 and is not in the token space specified by Guid, then ASSERT().\r
 \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
@@ -724,6 +1459,8 @@ LibPcdGetNextToken (
 \r
 \r
 /**\r
+  Used to retrieve the list of available PCD token space GUIDs.\r
+  \r
   Retrieves the next PCD token space from a token space specified by Guid.\r
   Guid of NULL is reserved to mark the default local token namespace on the current\r
   platform. If Guid is NULL, then the GUID of the first non-local token space of the \r
@@ -743,11 +1480,13 @@ LibPcdGetNextToken (
 GUID *           \r
 EFIAPI\r
 LibPcdGetNextTokenSpace (\r
-  IN CONST GUID  *Guid\r
+  IN CONST GUID  *TokenSpaceGuid\r
   );\r
 \r
 \r
 /**\r
+  Sets a value of a patchable PCD entry that is type pointer.\r
+  \r
   Sets the PCD entry specified by PatchVariable to the value specified by Buffer \r
   and SizeOfBuffer.  Buffer is returned.  If SizeOfBuffer is greater than \r
   MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return \r
index 669af6484a198ce2116dd39218f7a1cb838408c7..37a151d25cff7edcc1aec048f97eaad5749ac390 100644 (file)
@@ -481,9 +481,9 @@ LibPcdSet64 (
 VOID *\r
 EFIAPI\r
 LibPcdSetPtr (\r
-  IN      UINTN             TokenNumber,\r
-  IN OUT  UINTN             *SizeOfBuffer,\r
-  IN      VOID              *Buffer\r
+  IN       UINTN             TokenNumber,\r
+  IN OUT   UINTN             *SizeOfBuffer,\r
+  IN       VOID              *Buffer\r
   )\r
 {\r
   ASSERT (FALSE);\r
index 987a2e91654643fe3f30507561246d65bd968843..4f552ebb0b219f32b418e7cca92b867f75303aef 100644 (file)
@@ -527,9 +527,9 @@ LibPcdSet64 (
 VOID *\r
 EFIAPI\r
 LibPcdSetPtr (\r
-  IN      UINTN             TokenNumber,\r
-  IN OUT  UINTN             *SizeOfBuffer,\r
-  IN      VOID              *Buffer\r
+  IN        UINTN             TokenNumber,\r
+  IN OUT    UINTN             *SizeOfBuffer,\r
+  IN        VOID              *Buffer\r
   )\r
 {\r
   EFI_STATUS Status;\r
@@ -905,6 +905,8 @@ LibPcdGetNextToken (
 \r
 \r
 /**\r
+  Used to retrieve the list of available PCD token space GUIDs.\r
+  \r
   Retrieves the next PCD token space from a token space specified by Guid.\r
   Guid of NULL is reserved to mark the default local token namespace on the current\r
   platform. If Guid is NULL, then the GUID of the first non-local token space of the \r
@@ -923,16 +925,16 @@ LibPcdGetNextToken (
 GUID *           \r
 EFIAPI\r
 LibPcdGetNextTokenSpace (\r
-  IN CONST GUID  *Guid\r
+  IN CONST GUID  *TokenSpaceGuid\r
   )\r
 {\r
   EFI_STATUS Status;\r
 \r
-  Status = mPcd->GetNextTokenSpace (&Guid);\r
+  Status = mPcd->GetNextTokenSpace (&TokenSpaceGuid);\r
 \r
   ASSERT_EFI_ERROR (Status);\r
 \r
-  return (GUID *) Guid;\r
+  return (GUID *) TokenSpaceGuid;\r
 }\r
 \r
 \r
index f1630bf60663bab2582590d6524b347a260fa174..2766817b4307cdd0a611fca19d146d864b336387 100644 (file)
@@ -522,9 +522,9 @@ LibPcdSet64 (
 VOID *\r
 EFIAPI\r
 LibPcdSetPtr (\r
-  IN      UINTN             TokenNumber,\r
-  IN OUT  UINTN             *SizeOfBuffer,\r
-  IN      VOID              *Buffer\r
+  IN       UINTN             TokenNumber,\r
+  IN OUT   UINTN             *SizeOfBuffer,\r
+  IN       VOID              *Buffer\r
   )\r
 {\r
   EFI_STATUS Status;\r
@@ -889,6 +889,8 @@ LibPcdGetNextToken (
 \r
 \r
 /**\r
+  Used to retrieve the list of available PCD token space GUIDs.\r
+  \r
   Retrieves the next PCD token space from a token space specified by Guid.\r
   Guid of NULL is reserved to mark the default local token namespace on the current\r
   platform. If Guid is NULL, then the GUID of the first non-local token space of the \r
@@ -909,16 +911,16 @@ LibPcdGetNextToken (
 GUID *           \r
 EFIAPI\r
 LibPcdGetNextTokenSpace (\r
-  IN CONST GUID  *Guid\r
+  IN CONST GUID  *TokenSpaceGuid\r
   )\r
 {\r
   EFI_STATUS Status;\r
 \r
-  Status = (GetPcdPpiPointer ())->GetNextTokenSpace (&Guid);\r
+  Status = (GetPcdPpiPointer ())->GetNextTokenSpace (&TokenSpaceGuid);\r
 \r
   ASSERT_EFI_ERROR (Status);\r
 \r
-  return (GUID *)Guid;\r
+  return (GUID *) TokenSpaceGuid;\r
 }\r
 \r
 \r