MdePkg: Add a set of PcdSetXXS APIs into PcdLib and remove the ASSERT in original PcdSetXX APIs.
And also use DISABLE_NEW_DEPRECATED_INTERFACES macro to include the old PcdSetXX APIs. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17162 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
There are no restrictions on the use of FeaturePcd(), FixedPcdGetXX(),
|
||||
PatchPcdGetXX(), and PatchPcdSetXX().
|
||||
|
||||
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -433,14 +433,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#define PcdGetBool(TokenName) _PCD_GET_MODE_BOOL_##TokenName
|
||||
|
||||
|
||||
#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
|
||||
/**
|
||||
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.
|
||||
|
||||
If the set operation was not correctly performed, then ASSERT().
|
||||
|
||||
@param TokenName The name of the PCD token to retrieve a current value for.
|
||||
@param Value The 8-bit value to set.
|
||||
|
||||
@@ -456,8 +455,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
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 the set operation was not correctly performed, then ASSERT().
|
||||
|
||||
@param TokenName The name of the PCD token to retrieve a current value for.
|
||||
@param Value The 16-bit value to set.
|
||||
|
||||
@@ -473,8 +470,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
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 the set operation was not correctly performed, then ASSERT().
|
||||
|
||||
@param TokenName The name of the PCD token to retrieve a current value for.
|
||||
@param Value The 32-bit value to set.
|
||||
|
||||
@@ -507,7 +502,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
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, or ASSERT() if the set operation was not corretly performed.
|
||||
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().
|
||||
@@ -529,8 +524,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
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 the set operation was not correctly performed, then ASSERT().
|
||||
|
||||
@param TokenName The name of the PCD token to set the current value for.
|
||||
@param Buffer The Boolean value to set.
|
||||
|
||||
@@ -538,7 +531,103 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
#define PcdSetBool(TokenName, Value) _PCD_SET_MODE_BOOL_##TokenName ((Value))
|
||||
#endif
|
||||
|
||||
/**
|
||||
Sets a 8-bit PCD token value based on a token name.
|
||||
|
||||
Sets 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.
|
||||
@param Value The 8-bit value to set.
|
||||
|
||||
@return The status of the set operation.
|
||||
|
||||
**/
|
||||
#define PcdSet8S(TokenName, Value) _PCD_SET_MODE_8_S_##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.
|
||||
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 The status of the set operation.
|
||||
|
||||
**/
|
||||
#define PcdSet16S(TokenName, Value) _PCD_SET_MODE_16_S_##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.
|
||||
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 The status of the set operation.
|
||||
|
||||
**/
|
||||
#define PcdSet32S(TokenName, Value) _PCD_SET_MODE_32_S_##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.
|
||||
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 The status of the set operation.
|
||||
|
||||
**/
|
||||
#define PcdSet64S(TokenName, Value) _PCD_SET_MODE_64_S_##TokenName ((Value))
|
||||
|
||||
/**
|
||||
Sets a pointer to a PCD token buffer based on a token name.
|
||||
|
||||
Sets the buffer for the token specified by TokenName.
|
||||
If SizeOfBuffer is greater than the maximum size supported by TokenName,
|
||||
then set SizeOfBuffer to the maximum size supported by TokenName and return
|
||||
RETURN_INVALID_PARAMETER 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 RETURN_INVALID_PARAMETER 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 The status of the set operation.
|
||||
|
||||
**/
|
||||
#define PcdSetPtrS(TokenName, SizeOfBuffer, Buffer) \
|
||||
_PCD_SET_MODE_PTR_S_##TokenName ((SizeOfBuffer), (Buffer))
|
||||
|
||||
|
||||
|
||||
/**
|
||||
Sets a boolean PCD token value based on a token name.
|
||||
|
||||
Sets 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.
|
||||
@param Value The boolean value to set.
|
||||
|
||||
@return The status of the set operation.
|
||||
|
||||
**/
|
||||
#define PcdSetBoolS(TokenName, Value) _PCD_SET_MODE_BOOL_S_##TokenName ((Value))
|
||||
|
||||
/**
|
||||
Retrieves a token number based on a GUID and a token name.
|
||||
@@ -667,6 +756,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#define PcdGetExBool(Guid, TokenName) LibPcdGetExBool ((Guid), PcdTokenEx(Guid,TokenName))
|
||||
|
||||
|
||||
|
||||
#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
|
||||
/**
|
||||
Sets an 8-bit PCD token value based on a GUID and a token name.
|
||||
|
||||
@@ -675,7 +766,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
then the module will not build.
|
||||
|
||||
If Guid is NULL, then ASSERT().
|
||||
If the set operation was not correctly performed, then ASSERT().
|
||||
|
||||
@param Guid Pointer to a 128-bit unique value that designates
|
||||
which namespace to retrieve a value from.
|
||||
@@ -696,7 +786,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
then the module will not build.
|
||||
|
||||
If Guid is NULL, then ASSERT().
|
||||
If the set operation was not correctly performed, then ASSERT().
|
||||
|
||||
@param Guid Pointer to a 128-bit unique value that designates
|
||||
which namespace to retrieve a value from.
|
||||
@@ -717,7 +806,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
then the module will not build.
|
||||
|
||||
If Guid is NULL, then ASSERT().
|
||||
If the set operation was not correctly performed, then ASSERT().
|
||||
|
||||
@param Guid Pointer to a 128-bit unique value that designates
|
||||
which namespace to retrieve a value from.
|
||||
@@ -738,7 +826,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
then the module will not build.
|
||||
|
||||
If Guid is NULL, then ASSERT().
|
||||
If the set operation was not correctly performed, then ASSERT().
|
||||
|
||||
@param Guid Pointer to a 128-bit unique value that designates
|
||||
which namespace to retrieve a value from.
|
||||
@@ -759,7 +846,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
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, or ASSERT() if the set operation was not corretly performed.
|
||||
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.
|
||||
|
||||
@@ -788,7 +875,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
then the module will not build.
|
||||
|
||||
If Guid is NULL, then ASSERT().
|
||||
If the set operation was not correctly performed, then ASSERT().
|
||||
|
||||
@param Guid Pointer to a 128-bit unique value that designates
|
||||
which namespace to retrieve a value from.
|
||||
@@ -800,7 +886,132 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
**/
|
||||
#define PcdSetExBool(Guid, TokenName, Value) \
|
||||
LibPcdSetExBool((Guid), PcdTokenEx(Guid,TokenName), (Value))
|
||||
#endif
|
||||
|
||||
/**
|
||||
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.
|
||||
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 The status of the set operation.
|
||||
|
||||
**/
|
||||
#define PcdSetEx8S(Guid, TokenName, Value) LibPcdSetEx8S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
|
||||
|
||||
/**
|
||||
Sets an 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.
|
||||
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 The status of the set operation.
|
||||
|
||||
**/
|
||||
#define PcdSetEx16S(Guid, TokenName, Value) LibPcdSetEx16S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
|
||||
|
||||
/**
|
||||
Sets an 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.
|
||||
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 The status of the set operation.
|
||||
|
||||
**/
|
||||
#define PcdSetEx32S(Guid, TokenName, Value) LibPcdSetEx32S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
|
||||
|
||||
/**
|
||||
Sets an 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.
|
||||
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 The status of the set operation.
|
||||
|
||||
**/
|
||||
#define PcdSetEx64S(Guid, TokenName, Value) LibPcdSetEx64S ((Guid), PcdTokenEx(Guid,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.
|
||||
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
|
||||
RETURN_INVALID_PARAMETER 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 RETURN_INVALID_PARAMETER 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 Buffer Pointer to the buffer to set.
|
||||
|
||||
@return The status of the set operation.
|
||||
|
||||
**/
|
||||
#define PcdSetExPtrS(Guid, TokenName, SizeOfBuffer, Buffer) \
|
||||
LibPcdSetExPtrS ((Guid), PcdTokenEx(Guid,TokenName), (SizeOfBuffer), (Buffer))
|
||||
|
||||
|
||||
/**
|
||||
Sets an boolean PCD token value based on a GUID and a token name.
|
||||
|
||||
Sets 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 set the current value for.
|
||||
@param Value The boolean value to set.
|
||||
|
||||
@return The status of the set operation.
|
||||
|
||||
**/
|
||||
#define PcdSetExBoolS(Guid, TokenName, Value) \
|
||||
LibPcdSetExBoolS ((Guid), PcdTokenEx(Guid,TokenName), (Value))
|
||||
|
||||
/**
|
||||
This function provides a means by which SKU support can be established in the PCD infrastructure.
|
||||
@@ -1089,14 +1300,13 @@ LibPcdGetExSize (
|
||||
);
|
||||
|
||||
|
||||
#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
|
||||
/**
|
||||
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.
|
||||
|
||||
If the set operation was not correctly performed, then ASSERT().
|
||||
|
||||
@param[in] TokenNumber The PCD token number to set a current value for.
|
||||
@param[in] Value The 8-bit value to set.
|
||||
|
||||
@@ -1117,8 +1327,6 @@ LibPcdSet8 (
|
||||
Sets the 16-bit value for the token specified by TokenNumber
|
||||
to the value specified by Value. Value is returned.
|
||||
|
||||
If the set operation was not correctly performed, then ASSERT().
|
||||
|
||||
@param[in] TokenNumber The PCD token number to set a current value for.
|
||||
@param[in] Value The 16-bit value to set.
|
||||
|
||||
@@ -1139,8 +1347,6 @@ LibPcdSet16 (
|
||||
Sets the 32-bit value for the token specified by TokenNumber
|
||||
to the value specified by Value. Value is returned.
|
||||
|
||||
If the set operation was not correctly performed, then ASSERT().
|
||||
|
||||
@param[in] TokenNumber The PCD token number to set a current value for.
|
||||
@param[in] Value The 32-bit value to set.
|
||||
|
||||
@@ -1161,8 +1367,6 @@ LibPcdSet32 (
|
||||
Sets the 64-bit value for the token specified by TokenNumber
|
||||
to the value specified by Value. Value is returned.
|
||||
|
||||
If the set operation was not correctly performed, then ASSERT().
|
||||
|
||||
@param[in] TokenNumber The PCD token number to set a current value for.
|
||||
@param[in] Value The 64-bit value to set.
|
||||
|
||||
@@ -1184,8 +1388,7 @@ LibPcdSet64 (
|
||||
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 supported by TokenNumber and
|
||||
return NULL to indicate that the set operation was not actually performed,
|
||||
or ASSERT() if the set operation was not corretly performed.
|
||||
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.
|
||||
@@ -1215,8 +1418,6 @@ LibPcdSetPtr (
|
||||
Sets the Boolean value for the token specified by TokenNumber
|
||||
to the value specified by Value. Value is returned.
|
||||
|
||||
If the set operation was not correctly performed, then ASSERT().
|
||||
|
||||
@param[in] TokenNumber The PCD token number to set a current value for.
|
||||
@param[in] Value The boolean value to set.
|
||||
|
||||
@@ -1238,7 +1439,6 @@ LibPcdSetBool (
|
||||
Guid to the value specified by Value. Value is returned.
|
||||
|
||||
If Guid is NULL, then ASSERT().
|
||||
If the set operation was not correctly performed, then ASSERT().
|
||||
|
||||
@param[in] Guid Pointer to a 128-bit unique value that
|
||||
designates which namespace to set a value from.
|
||||
@@ -1264,7 +1464,6 @@ LibPcdSetEx8 (
|
||||
Guid to the value specified by Value. Value is returned.
|
||||
|
||||
If Guid is NULL, then ASSERT().
|
||||
If the set operation was not correctly performed, then ASSERT().
|
||||
|
||||
@param[in] Guid Pointer to a 128-bit unique value that
|
||||
designates which namespace to set a value from.
|
||||
@@ -1290,7 +1489,6 @@ LibPcdSetEx16 (
|
||||
Guid to the value specified by Value. Value is returned.
|
||||
|
||||
If Guid is NULL, then ASSERT().
|
||||
If the set operation was not correctly performed, then ASSERT().
|
||||
|
||||
@param[in] Guid Pointer to a 128-bit unique value that
|
||||
designates which namespace to set a value from.
|
||||
@@ -1316,7 +1514,6 @@ LibPcdSetEx32 (
|
||||
Guid to the value specified by Value. Value is returned.
|
||||
|
||||
If Guid is NULL, then ASSERT().
|
||||
If the set operation was not correctly performed, then ASSERT().
|
||||
|
||||
@param[in] Guid Pointer to a 128-bit unique value that
|
||||
designates which namespace to set a value from.
|
||||
@@ -1342,7 +1539,7 @@ LibPcdSetEx64 (
|
||||
Buffer and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
|
||||
the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size
|
||||
supported by TokenNumber and return NULL to indicate that the set operation
|
||||
was not actually performed, or ASSERT() if the set operation was not corretly performed.
|
||||
was not actually performed.
|
||||
|
||||
If Guid is NULL, then ASSERT().
|
||||
If SizeOfBuffer is NULL, then ASSERT().
|
||||
@@ -1374,7 +1571,6 @@ LibPcdSetExPtr (
|
||||
Guid to the value specified by Value. Value is returned.
|
||||
|
||||
If Guid is NULL, then ASSERT().
|
||||
If the set operation was not correctly performed, then ASSERT().
|
||||
|
||||
@param[in] Guid Pointer to a 128-bit unique value that
|
||||
designates which namespace to set a value from.
|
||||
@@ -1391,7 +1587,283 @@ LibPcdSetExBool (
|
||||
IN UINTN TokenNumber,
|
||||
IN BOOLEAN Value
|
||||
);
|
||||
#endif
|
||||
|
||||
/**
|
||||
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.
|
||||
|
||||
@param[in] TokenNumber The PCD token number to set a current value for.
|
||||
@param[in] Value The 8-bit value to set.
|
||||
|
||||
@return The status of the set operation.
|
||||
|
||||
**/
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
LibPcdSet8S (
|
||||
IN UINTN TokenNumber,
|
||||
IN UINT8 Value
|
||||
);
|
||||
|
||||
/**
|
||||
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.
|
||||
|
||||
@param[in] TokenNumber The PCD token number to set a current value for.
|
||||
@param[in] Value The 16-bit value to set.
|
||||
|
||||
@return The status of the set operation.
|
||||
|
||||
**/
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
LibPcdSet16S (
|
||||
IN UINTN TokenNumber,
|
||||
IN UINT16 Value
|
||||
);
|
||||
|
||||
/**
|
||||
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.
|
||||
|
||||
@param[in] TokenNumber The PCD token number to set a current value for.
|
||||
@param[in] Value The 32-bit value to set.
|
||||
|
||||
@return The status of the set operation.
|
||||
|
||||
**/
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
LibPcdSet32S (
|
||||
IN UINTN TokenNumber,
|
||||
IN UINT32 Value
|
||||
);
|
||||
|
||||
/**
|
||||
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.
|
||||
|
||||
@param[in] TokenNumber The PCD token number to set a current value for.
|
||||
@param[in] Value The 64-bit value to set.
|
||||
|
||||
@return The status of the set operation.
|
||||
|
||||
**/
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
LibPcdSet64S (
|
||||
IN UINTN TokenNumber,
|
||||
IN UINT64 Value
|
||||
);
|
||||
|
||||
/**
|
||||
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. If SizeOfBuffer is greater than the maximum size
|
||||
support by TokenNumber, then set SizeOfBuffer to the maximum size supported by
|
||||
TokenNumber and return RETURN_INVALID_PARAMETER 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 RETURN_INVALID_PARAMETER must be returned.
|
||||
|
||||
If SizeOfBuffer is NULL, then ASSERT().
|
||||
If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
|
||||
|
||||
@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 A pointer to the buffer to set.
|
||||
|
||||
@return The status of the set operation.
|
||||
|
||||
**/
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
LibPcdSetPtrS (
|
||||
IN UINTN TokenNumber,
|
||||
IN OUT UINTN *SizeOfBuffer,
|
||||
IN CONST 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.
|
||||
|
||||
@param[in] TokenNumber The PCD token number to set a current value for.
|
||||
@param[in] Value The boolean value to set.
|
||||
|
||||
@return The status of the set operation.
|
||||
|
||||
**/
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
LibPcdSetBoolS (
|
||||
IN UINTN TokenNumber,
|
||||
IN BOOLEAN Value
|
||||
);
|
||||
|
||||
/**
|
||||
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.
|
||||
|
||||
If Guid is NULL, then ASSERT().
|
||||
|
||||
@param[in] Guid The pointer to a 128-bit unique value that
|
||||
designates which namespace to set a value from.
|
||||
@param[in] TokenNumber The PCD token number to set a current value for.
|
||||
@param[in] Value The 8-bit value to set.
|
||||
|
||||
@return The status of the set operation.
|
||||
|
||||
**/
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
LibPcdSetEx8S (
|
||||
IN CONST GUID *Guid,
|
||||
IN UINTN TokenNumber,
|
||||
IN UINT8 Value
|
||||
);
|
||||
|
||||
/**
|
||||
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.
|
||||
|
||||
If Guid is NULL, then ASSERT().
|
||||
|
||||
@param[in] Guid The pointer to a 128-bit unique value that
|
||||
designates which namespace to set a value from.
|
||||
@param[in] TokenNumber The PCD token number to set a current value for.
|
||||
@param[in] Value The 16-bit value to set.
|
||||
|
||||
@return The status of the set operation.
|
||||
|
||||
**/
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
LibPcdSetEx16S (
|
||||
IN CONST GUID *Guid,
|
||||
IN UINTN TokenNumber,
|
||||
IN UINT16 Value
|
||||
);
|
||||
|
||||
/**
|
||||
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.
|
||||
|
||||
If Guid is NULL, then ASSERT().
|
||||
|
||||
@param[in] Guid The pointer to a 128-bit unique value that
|
||||
designates which namespace to set a value from.
|
||||
@param[in] TokenNumber The PCD token number to set a current value for.
|
||||
@param[in] Value The 32-bit value to set.
|
||||
|
||||
@return The status of the set operation.
|
||||
|
||||
**/
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
LibPcdSetEx32S (
|
||||
IN CONST GUID *Guid,
|
||||
IN UINTN TokenNumber,
|
||||
IN UINT32 Value
|
||||
);
|
||||
|
||||
/**
|
||||
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.
|
||||
|
||||
If Guid is NULL, then ASSERT().
|
||||
|
||||
@param[in] Guid The pointer to a 128-bit unique value that
|
||||
designates which namespace to set a value from.
|
||||
@param[in] TokenNumber The PCD token number to set a current value for.
|
||||
@param[in] Value The 64-bit value to set.
|
||||
|
||||
@return The status of the set operation.
|
||||
|
||||
**/
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
LibPcdSetEx64S (
|
||||
IN CONST GUID *Guid,
|
||||
IN UINTN TokenNumber,
|
||||
IN UINT64 Value
|
||||
);
|
||||
|
||||
/**
|
||||
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. If SizeOfBuffer is greater than the maximum size
|
||||
support by TokenNumber, then set SizeOfBuffer to the maximum size supported by
|
||||
TokenNumber and return RETURN_INVALID_PARAMETER to indicate that the set operation
|
||||
was not actually performed.
|
||||
|
||||
If Guid is NULL, then ASSERT().
|
||||
If SizeOfBuffer is NULL, then ASSERT().
|
||||
If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
|
||||
|
||||
@param[in] Guid Pointer to a 128-bit unique value that
|
||||
designates which namespace to set a value from.
|
||||
@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 A pointer to the buffer to set.
|
||||
|
||||
@return The status of the set operation.
|
||||
|
||||
**/
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
LibPcdSetExPtrS (
|
||||
IN CONST GUID *Guid,
|
||||
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.
|
||||
|
||||
If Guid is NULL, then ASSERT().
|
||||
|
||||
@param[in] Guid The pointer to a 128-bit unique value that
|
||||
designates which namespace to set a value from.
|
||||
@param[in] TokenNumber The PCD token number to set a current value for.
|
||||
@param[in] Value The boolean value to set.
|
||||
|
||||
@return The status of the set operation.
|
||||
|
||||
**/
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
LibPcdSetExBoolS (
|
||||
IN CONST GUID *Guid,
|
||||
IN UINTN TokenNumber,
|
||||
IN BOOLEAN Value
|
||||
);
|
||||
|
||||
/**
|
||||
This notification function serves two purposes.
|
||||
@@ -1546,6 +2018,38 @@ LibPatchPcdSetPtr (
|
||||
IN CONST VOID *Buffer
|
||||
);
|
||||
|
||||
/**
|
||||
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. If SizeOfBuffer is greater than MaximumDatumSize,
|
||||
then set SizeOfBuffer to MaximumDatumSize and return RETURN_INVALID_PARAMETER
|
||||
to indicate that the set operation was not actually performed.
|
||||
If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
|
||||
MaximumDatumSize and RETURN_INVALID_PARAMETER must be returned.
|
||||
|
||||
If PatchVariable is NULL, then ASSERT().
|
||||
If SizeOfBuffer is NULL, then ASSERT().
|
||||
If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
|
||||
|
||||
@param[in] PatchVariable A pointer to the global variable in a module that is
|
||||
the target of the set operation.
|
||||
@param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.
|
||||
@param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.
|
||||
@param[in] Buffer A pointer to the buffer to used to set the target variable.
|
||||
|
||||
@return The status of the set operation.
|
||||
|
||||
**/
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
LibPatchPcdSetPtrS (
|
||||
IN VOID *PatchVariable,
|
||||
IN UINTN MaximumDatumSize,
|
||||
IN OUT UINTN *SizeOfBuffer,
|
||||
IN CONST VOID *Buffer
|
||||
);
|
||||
|
||||
typedef enum {
|
||||
PCD_TYPE_8,
|
||||
PCD_TYPE_16,
|
||||
|
Reference in New Issue
Block a user