summaryrefslogtreecommitdiff
path: root/MdePkg/Library/PeiPcdLib
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-12-10 03:04:00 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-12-10 03:04:00 +0000
commit0c3437e0437334687bf08557339072ec9d6977e3 (patch)
tree1c5f3d520f7c31f48f28528b2f78b198d65dc02b /MdePkg/Library/PeiPcdLib
parent9ece9bd35a394cf28c873612b103441104201342 (diff)
downloadedk2-platforms-0c3437e0437334687bf08557339072ec9d6977e3.tar.xz
Synchronize interface function comment from declaration in library class header file to implementation in library instance.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6949 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/PeiPcdLib')
-rw-r--r--MdePkg/Library/PeiPcdLib/PeiPcdLib.c286
1 files changed, 172 insertions, 114 deletions
diff --git a/MdePkg/Library/PeiPcdLib/PeiPcdLib.c b/MdePkg/Library/PeiPcdLib/PeiPcdLib.c
index ac5bbcf058..7bbb0f8039 100644
--- a/MdePkg/Library/PeiPcdLib/PeiPcdLib.c
+++ b/MdePkg/Library/PeiPcdLib/PeiPcdLib.c
@@ -49,11 +49,14 @@ GetPcdPpiPointer (
}
/**
+ 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.
- If SkuId not less than PCD_MAX_SKU_ID, then ASSERT().
-
- @param[in] SkuId System sku id. The SKU value that will be used when the PCD service will retrieve and
- set values.
+
+ @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.
@@ -61,7 +64,7 @@ GetPcdPpiPointer (
UINTN
EFIAPI
LibPcdSetSku (
- IN UINTN SkuId
+ IN UINTN SkuId
)
{
@@ -75,6 +78,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.
@@ -85,7 +90,7 @@ LibPcdSetSku (
UINT8
EFIAPI
LibPcdGet8 (
- IN UINTN TokenNumber
+ IN UINTN TokenNumber
)
{
return (GetPcdPpiPointer ())->Get8 (TokenNumber);
@@ -94,9 +99,11 @@ 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.
+ @param[in] TokenNumber The PCD token number to retrieve a current value for.
@return Returns the 16-bit value for the token specified by TokenNumber.
@@ -104,7 +111,7 @@ LibPcdGet8 (
UINT16
EFIAPI
LibPcdGet16 (
- IN UINTN TokenNumber
+ IN UINTN TokenNumber
)
{
return (GetPcdPpiPointer ())->Get16 (TokenNumber);
@@ -113,6 +120,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.
@@ -123,7 +132,7 @@ LibPcdGet16 (
UINT32
EFIAPI
LibPcdGet32 (
- IN UINTN TokenNumber
+ IN UINTN TokenNumber
)
{
return (GetPcdPpiPointer ())->Get32 (TokenNumber);
@@ -132,6 +141,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.
@@ -142,7 +153,7 @@ LibPcdGet32 (
UINT64
EFIAPI
LibPcdGet64 (
- IN UINTN TokenNumber
+ IN UINTN TokenNumber
)
{
return (GetPcdPpiPointer ())->Get64 (TokenNumber);
@@ -151,6 +162,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.
@@ -161,7 +174,7 @@ LibPcdGet64 (
VOID *
EFIAPI
LibPcdGetPtr (
- IN UINTN TokenNumber
+ IN UINTN TokenNumber
)
{
return (GetPcdPpiPointer ())->GetPtr (TokenNumber);
@@ -170,6 +183,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.
@@ -180,7 +195,7 @@ LibPcdGetPtr (
BOOLEAN
EFIAPI
LibPcdGetBool (
- IN UINTN TokenNumber
+ IN UINTN TokenNumber
)
{
return (GetPcdPpiPointer ())->GetBool (TokenNumber);
@@ -189,7 +204,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.
@@ -199,7 +214,7 @@ LibPcdGetBool (
UINTN
EFIAPI
LibPcdGetSize (
- IN UINTN TokenNumber
+ IN UINTN TokenNumber
)
{
return (GetPcdPpiPointer ())->GetSize (TokenNumber);
@@ -208,7 +223,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
@@ -233,7 +251,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
@@ -285,12 +306,15 @@ 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
- which namespace to retrieve a value from.
- @param[in] TokenNumber The PCD token number to retrieve a current value for.
+ @param[in] Guid Pointer to a 128-bit unique value that designates
+ which namespace to retrieve a value from.
+ @param[in] TokenNumber The PCD token number to retrieve a current value for.
@return Return the UINT64.
@@ -309,12 +333,15 @@ LibPcdGetEx64 (
/**
- Returns the pointer to the token specified by TokenNumber and Guid.
+ 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
- which namespace to retrieve a value from.
- @param[in] TokenNumber The PCD token number to retrieve a current value for.
+ @param[in] Guid Pointer to a 128-bit unique value that designates
+ which namespace to retrieve a value from.
+ @param[in] TokenNumber The PCD token number to retrieve a current value for.
@return Return the VOID* pointer.
@@ -334,12 +361,15 @@ 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
- which namespace to retrieve a value from.
- @param[in] TokenNumber The PCD token number to retrieve a current value for.
+ @param[in] Guid Pointer to a 128-bit unique value that designates
+ which namespace to retrieve a value from.
+ @param[in] TokenNumber The PCD token number to retrieve a current value for.
@return Return the BOOLEAN.
@@ -358,12 +388,15 @@ 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
- which namespace to retrieve a value from.
- @param[in] TokenNumber The PCD token number to retrieve a current value for.
+ @param[in] Guid Pointer to a 128-bit unique value that designates
+ which namespace to retrieve a value from.
+ @param[in] TokenNumber The PCD token number to retrieve a current value for.
@return Return the size.
@@ -382,12 +415,13 @@ 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.
- If fail to set pcd value, then ASSERT_EFI_ERROR().
- @param[in] TokenNumber The PCD token number to set a current value for.
- @param[in] Value The 8-bit value to set.
+ @param[in] TokenNumber The PCD token number to set a current value for.
+ @param[in] Value The 8-bit value to set.
@return Return the value been set.
@@ -411,12 +445,13 @@ 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.
- If fail to set pcd value, then ASSERT_EFI_ERROR().
- @param[in] TokenNumber The PCD token number to set a current value for.
- @param[in] Value The 16-bit value to set.
+ @param[in] TokenNumber The PCD token number to set a current value for.
+ @param[in] Value The 16-bit value to set.
@return Return the value been set.
@@ -440,12 +475,13 @@ 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.
- If fail to set pcd value, then ASSERT_EFI_ERROR().
- @param[in] TokenNumber The PCD token number to set a current value for.
- @param[in] Value The 32-bit value to set.
+ @param[in] TokenNumber The PCD token number to set a current value for.
+ @param[in] Value The 32-bit value to set.
@return Return the value been set.
@@ -454,7 +490,7 @@ UINT32
EFIAPI
LibPcdSet32 (
IN UINTN TokenNumber,
- IN UINT32 Value
+ IN UINT32 Value
)
{
EFI_STATUS Status;
@@ -469,12 +505,13 @@ 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.
- If fail to set pcd value, then ASSERT_EFI_ERROR().
- @param[in] TokenNumber The PCD token number to set a current value for.
- @param[in] Value The 64-bit value to set.
+ @param[in] TokenNumber The PCD token number to set a current value for.
+ @param[in] Value The 64-bit value to set.
@return Return the value been set.
@@ -483,7 +520,7 @@ UINT64
EFIAPI
LibPcdSet64 (
IN UINTN TokenNumber,
- IN UINT64 Value
+ IN UINT64 Value
)
{
EFI_STATUS Status;
@@ -498,23 +535,23 @@ LibPcdSet64 (
/**
- Sets a buffer for the token specified by TokenNumber to
- the value specified by Buffer and SizeOfBuffer. Buffer to
- be set is returned. The content of the buffer could be
- overwritten if a Callback on SET is registered with this
- TokenNumber.
+ This function provides a means by which to set a value for a given PCD token.
- 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.
+ 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 supported by TokenNumber 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 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.
- In out, returns actual size of buffer is set.
- @param[in] Buffer A pointer to the buffer to set.
+ @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 Return the pointer for the buffer been set.
@@ -522,9 +559,9 @@ LibPcdSet64 (
VOID *
EFIAPI
LibPcdSetPtr (
- IN UINTN TokenNumber,
- IN OUT UINTN *SizeOfBuffer,
- IN CONST VOID *Buffer
+ IN UINTN TokenNumber,
+ IN OUT UINTN *SizeOfBuffer,
+ IN CONST VOID *Buffer
)
{
EFI_STATUS Status;
@@ -547,12 +584,13 @@ LibPcdSetPtr (
/**
+ 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.
- If fail to set pcd value, then ASSERT_EFI_ERROR().
- @param[in] TokenNumber The PCD token number to set a current value for.
- @param[in] Value The boolean value to set.
+ @param[in] TokenNumber The PCD token number to set a current value for.
+ @param[in] Value The boolean value to set.
@return Return the value been set.
@@ -576,15 +614,17 @@ 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().
- If fail to set pcd value, then ASSERT_EFI_ERROR().
- @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] Value The 8-bit value to set.
+ @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] Value The 8-bit value to set.
@return Return the value been set.
@@ -611,15 +651,17 @@ 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().
- If fail to set pcd value, then ASSERT_EFI_ERROR().
- @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] Value The 16-bit value to set.
+ @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] Value The 16-bit value to set.
@return Return the value been set.
@@ -644,15 +686,17 @@ 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().
- If fail to set pcd value, then ASSERT_EFI_ERROR().
- @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] Value The 32-bit value to set.
+ @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] Value The 32-bit value to set.
@return Return the value been set.
@@ -662,7 +706,7 @@ EFIAPI
LibPcdSetEx32 (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
- IN UINT32 Value
+ IN UINT32 Value
)
{
EFI_STATUS Status;
@@ -679,15 +723,16 @@ 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().
- If fail to set pcd value, then ASSERT_EFI_ERROR().
- @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] Value The 64-bit value to set.
+ @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] Value The 64-bit value to set.
@return Return the value been set.
@@ -713,20 +758,23 @@ 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
supported by TokenNumber and return NULL 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.
- In out, returns actual size of buffer is set.
- @param[in] Buffer A pointer to the buffer to set.
+ @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 Return the pinter to the buffer been set.
@@ -759,15 +807,17 @@ 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().
- If fail to set pcd value, then ASSERT_EFI_ERROR().
- @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] Value The Boolean value to set.
+ @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] Value The Boolean value to set.
@return Return the value been set.
@@ -793,17 +843,20 @@ LibPcdSetExBool (
/**
+ 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().
- If fail to set callback, then ASSERT_EFI_ERROR().
- @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.
- @param[in] TokenNumber The PCD token number to monitor.
- @param[in] NotificationFunction The function to call when the token
- specified by Guid and TokenNumber is set.
+
+ @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.
+ @param[in] TokenNumber The PCD token number to monitor.
+ @param[in] NotificationFunction The function to call when the token
+ specified by Guid and TokenNumber is set.
**/
VOID
@@ -827,11 +880,15 @@ 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 fail to cancel callback, then ASSERT_EFI_ERROR().
+ 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] Guid Specify the GUID token space.
+ @param[in] TokenNumber Specify the token number.
@param[in] NotificationFunction The callback function to be unregistered.
**/
@@ -855,27 +912,29 @@ 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().
- If fail to get token in given token space, then ASSERT_EFI_ERROR().
+ token number in the token space, then 0 is returned.
- @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.
- @param[in] TokenNumber The previous PCD token number. If 0, then retrieves the first PCD
- token number.
+ 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.
+ @param[in] TokenNumber The previous PCD token number. If 0, then retrieves the first PCD
+ token number.
@return The next valid token number.
**/
-UINTN
+UINTN
EFIAPI
LibPcdGetNextToken (
- IN CONST GUID *Guid, OPTIONAL
- IN UINTN TokenNumber
+ IN CONST GUID *Guid, OPTIONAL
+ IN UINTN TokenNumber
)
{
EFI_STATUS Status;
@@ -896,8 +955,7 @@ LibPcdGetNextToken (
platform. If Guid is NULL, then the GUID of the first non-local token space of the
current platform is returned. If Guid is the last non-local token space,
then NULL is returned.
- If fail to get next token space, then ASSERT_EFI_ERROR().
-
+
If Guid is not NULL and is not a valid token space in the current platform, then ASSERT().