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