]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BasePcdLibNull/PcdLib.c
Synchronize function comment in h file
[mirror_edk2.git] / MdePkg / Library / BasePcdLibNull / PcdLib.c
index ef285ea80f8867ef83e747e71a6d9cdedbdf1a9d..168803426358d34bdcf97e8df41c0f5ee3c60d5c 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   A emptry template implementation of PCD Library.\r
 \r
-  Copyright (c) 2006, Intel Corporation\r
+  Copyright (c) 2006 - 2008, Intel Corporation\r
   All rights reserved. This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -12,7 +12,8 @@
 \r
 **/\r
 \r
-#include <PiPei.h>\r
+#include <Base.h>\r
+\r
 #include <Library/DebugLib.h>\r
 #include <Library/PcdLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
@@ -24,7 +25,7 @@
   @param[in]  SkuId The SKU value that will be used when the PCD service will retrieve and \r
               set values associated with a PCD token.\r
 \r
-  @retval SKU_ID Return the SKU ID that just be set.\r
+  @return Return the SKU ID that just be set.\r
 \r
 **/\r
 UINTN           \r
@@ -33,7 +34,7 @@ LibPcdSetSku (
   IN UINTN  SkuId\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -43,7 +44,7 @@ LibPcdSetSku (
 \r
   @param[in]  TokenNumber The PCD token number to retrieve a current value for.\r
 \r
-  @retval UINT8 Returns the 8-bit value for the token specified by TokenNumber. \r
+  @return Returns the 8-bit value for the token specified by TokenNumber. \r
 \r
 **/\r
 UINT8\r
@@ -52,7 +53,7 @@ LibPcdGet8 (
   IN UINTN             TokenNumber\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -64,7 +65,7 @@ LibPcdGet8 (
 \r
   @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
 \r
-  @retval UINT16 Returns the 16-bit value for the token specified by TokenNumber. \r
+  @return Returns the 16-bit value for the token specified by TokenNumber. \r
 \r
 **/\r
 UINT16\r
@@ -73,7 +74,7 @@ LibPcdGet16 (
   IN UINTN             TokenNumber\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -85,7 +86,7 @@ LibPcdGet16 (
 \r
   @param[in]  TokenNumber The PCD token number to retrieve a current value for.\r
 \r
-  @retval UINT32 Returns the 32-bit value for the token specified by TokenNumber.\r
+  @return Returns the 32-bit value for the token specified by TokenNumber.\r
 \r
 **/\r
 UINT32\r
@@ -94,7 +95,7 @@ LibPcdGet32 (
   IN UINTN             TokenNumber\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -106,7 +107,7 @@ LibPcdGet32 (
 \r
   @param[in]  TokenNumber The PCD token number to retrieve a current value for.\r
 \r
-  @retval UINT64 Returns the 64-bit value for the token specified by TokenNumber.\r
+  @return Returns the 64-bit value for the token specified by TokenNumber.\r
 \r
 **/\r
 UINT64\r
@@ -115,7 +116,7 @@ LibPcdGet64 (
   IN UINTN             TokenNumber\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -127,7 +128,7 @@ LibPcdGet64 (
 \r
   @param[in]  TokenNumber The PCD token number to retrieve a current value for.\r
 \r
-  @retval VOID* Returns the pointer to the token specified by TokenNumber.\r
+  @return Returns the pointer to the token specified by TokenNumber.\r
 \r
 **/\r
 VOID *\r
@@ -136,7 +137,7 @@ LibPcdGetPtr (
   IN UINTN             TokenNumber\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -148,7 +149,7 @@ LibPcdGetPtr (
 \r
   @param[in]  TokenNumber The PCD token number to retrieve a current value for.\r
 \r
-  @retval BOOLEAN Returns the Boolean value of the token specified by TokenNumber. \r
+  @return Returns the Boolean value of the token specified by TokenNumber. \r
 \r
 **/\r
 BOOLEAN \r
@@ -157,7 +158,7 @@ LibPcdGetBool (
   IN UINTN             TokenNumber\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -169,7 +170,7 @@ LibPcdGetBool (
 \r
   @param[in]  TokenNumber The PCD token number to retrieve a current value for.\r
 \r
-  @retval UINTN Returns the size of the token specified by TokenNumber. \r
+  @return Returns the size of the token specified by TokenNumber. \r
 \r
 **/\r
 UINTN\r
@@ -178,7 +179,7 @@ LibPcdGetSize (
   IN UINTN             TokenNumber\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -193,7 +194,7 @@ LibPcdGetSize (
               which namespace to retrieve a value from.\r
   @param[in]  TokenNumber The PCD token number to retrieve a current value for.\r
 \r
-  @retval UINT8 Return the UINT8.\r
+  @return Return the UINT8.\r
 \r
 **/\r
 UINT8\r
@@ -203,7 +204,7 @@ LibPcdGetEx8 (
   IN UINTN             TokenNumber\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -218,7 +219,7 @@ LibPcdGetEx8 (
               which namespace to retrieve a value from.\r
   @param[in]  TokenNumber The PCD token number to retrieve a current value for.\r
 \r
-  @retval UINT16 Return the UINT16.\r
+  @return Return the UINT16.\r
 \r
 **/\r
 UINT16\r
@@ -228,7 +229,7 @@ LibPcdGetEx16 (
   IN UINTN             TokenNumber\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -243,7 +244,7 @@ LibPcdGetEx16 (
               which namespace to retrieve a value from.\r
   @param[in]  TokenNumber The PCD token number to retrieve a current value for.\r
 \r
-  @retval UINT32 Return the UINT32.\r
+  @return Return the UINT32.\r
 \r
 **/\r
 UINT32\r
@@ -253,7 +254,7 @@ LibPcdGetEx32 (
   IN UINTN             TokenNumber\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -268,7 +269,7 @@ LibPcdGetEx32 (
               which namespace to retrieve a value from.\r
   @param[in]  TokenNumber The PCD token number to retrieve a current value for.\r
 \r
-  @retval UINT64 Return the UINT64.\r
+  @return Return the UINT64.\r
 \r
 **/\r
 UINT64\r
@@ -278,7 +279,7 @@ LibPcdGetEx64 (
   IN UINTN             TokenNumber\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -293,7 +294,7 @@ LibPcdGetEx64 (
               which namespace to retrieve a value from.\r
   @param[in]  TokenNumber The PCD token number to retrieve a current value for.\r
 \r
-  @retval VOID* Return the VOID* pointer.\r
+  @return Return the VOID* pointer.\r
 \r
 **/\r
 VOID *\r
@@ -303,7 +304,7 @@ LibPcdGetExPtr (
   IN UINTN             TokenNumber\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -318,7 +319,7 @@ LibPcdGetExPtr (
               which namespace to retrieve a value from.\r
   @param[in]  TokenNumber The PCD token number to retrieve a current value for.\r
 \r
-  @retval BOOLEAN Return the BOOLEAN.\r
+  @return Return the BOOLEAN.\r
 \r
 **/\r
 BOOLEAN\r
@@ -328,7 +329,7 @@ LibPcdGetExBool (
   IN UINTN             TokenNumber\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -343,7 +344,7 @@ LibPcdGetExBool (
               which namespace to retrieve a value from.\r
   @param[in]  TokenNumber The PCD token number to retrieve a current value for.\r
 \r
-  @retval UINTN Return the size.\r
+  @return Return the size.\r
 \r
 **/\r
 UINTN\r
@@ -353,7 +354,7 @@ LibPcdGetExSize (
   IN UINTN             TokenNumber\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -367,7 +368,7 @@ LibPcdGetExSize (
   @param[in]  TokenNumber The PCD token number to set a current value for.\r
   @param[in]  Value The 8-bit value to set.\r
 \r
-  @retval UINT8 Return the value been set.\r
+  @return Return the value been set.\r
 \r
 **/\r
 UINT8\r
@@ -377,7 +378,7 @@ LibPcdSet8 (
   IN UINT8             Value\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -391,7 +392,7 @@ LibPcdSet8 (
   @param[in]  TokenNumber The PCD token number to set a current value for.\r
   @param[in]  Value The 16-bit value to set.\r
 \r
-  @retval UINT16 Return the value been set.\r
+  @return Return the value been set.\r
 \r
 **/\r
 UINT16\r
@@ -401,7 +402,7 @@ LibPcdSet16 (
   IN UINT16            Value\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -415,7 +416,7 @@ LibPcdSet16 (
   @param[in]  TokenNumber The PCD token number to set a current value for.\r
   @param[in]  Value The 32-bit value to set.\r
 \r
-  @retval UINT32 Return the value been set.\r
+  @return Return the value been set.\r
 \r
 **/\r
 UINT32\r
@@ -425,7 +426,7 @@ LibPcdSet32 (
   IN UINT32             Value\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -439,7 +440,7 @@ LibPcdSet32 (
   @param[in]  TokenNumber The PCD token number to set a current value for.\r
   @param[in]  Value The 64-bit value to set.\r
 \r
-  @retval UINT64 Return the value been set.\r
+  @return Return the value been set.\r
 \r
 **/\r
 UINT64\r
@@ -449,7 +450,7 @@ LibPcdSet64 (
   IN UINT64             Value\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -474,18 +475,18 @@ LibPcdSet64 (
   @param[in, out]   SizeOfBuffer    The size, in bytes, of Buffer.\r
   @param[in]        Buffer          A pointer to the buffer to set.\r
 \r
-  @retval VOID* Return the pointer for the buffer been set.\r
+  @return Return the pointer for the buffer been set.\r
 \r
 **/\r
 VOID *\r
 EFIAPI\r
 LibPcdSetPtr (\r
-  IN      UINTN             TokenNumber,\r
-  IN OUT  UINTN             *SizeOfBuffer,\r
-  IN      VOID              *Buffer\r
+  IN       UINTN             TokenNumber,\r
+  IN OUT   UINTN             *SizeOfBuffer,\r
+  IN       VOID              *Buffer\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return NULL;\r
 }\r
@@ -499,7 +500,7 @@ LibPcdSetPtr (
   @param[in]  TokenNumber The PCD token number to set a current value for.\r
   @param[in]  Value The boolean value to set.\r
 \r
-  @retval BOOLEAN Return the value been set.\r
+  @return Return the value been set.\r
 \r
 **/\r
 BOOLEAN\r
@@ -509,7 +510,7 @@ LibPcdSetBool (
   IN BOOLEAN           Value\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return FALSE;\r
 }\r
@@ -526,7 +527,7 @@ LibPcdSetBool (
   @param[in]  TokenNumber The PCD token number to set a current value for.\r
   @param[in]  Value The 8-bit value to set.\r
 \r
-  @retval UINT8 Return the value been set.\r
+  @return Return the value been set.\r
 \r
 **/\r
 UINT8\r
@@ -537,7 +538,7 @@ LibPcdSetEx8 (
   IN UINT8             Value\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -554,7 +555,7 @@ LibPcdSetEx8 (
   @param[in]  TokenNumber The PCD token number to set a current value for.\r
   @param[in]  Value The 16-bit value to set.\r
 \r
-  @retval UINT8 Return the value been set.\r
+  @return Return the value been set.\r
 \r
 **/\r
 UINT16\r
@@ -565,7 +566,7 @@ LibPcdSetEx16 (
   IN UINT16            Value\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -582,7 +583,7 @@ LibPcdSetEx16 (
   @param[in]  TokenNumber The PCD token number to set a current value for.\r
   @param[in]  Value The 32-bit value to set.\r
 \r
-  @retval UINT32 Return the value been set.\r
+  @return Return the value been set.\r
 \r
 **/\r
 UINT32\r
@@ -593,7 +594,7 @@ LibPcdSetEx32 (
   IN UINT32            Value\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -610,7 +611,7 @@ LibPcdSetEx32 (
   @param[in]  TokenNumber The PCD token number to set a current value for.\r
   @param[in]  Value The 64-bit value to set.\r
 \r
-  @retval UINT64 Return the value been set.\r
+  @return Return the value been set.\r
 \r
 **/\r
 UINT64\r
@@ -621,7 +622,7 @@ LibPcdSetEx64 (
   IN UINT64            Value\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -643,7 +644,7 @@ LibPcdSetEx64 (
   @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.\r
   @param[in]  Buffer A pointer to the buffer to set.\r
 \r
-  @retval VOID * Return the pinter to the buffer been set.\r
+  @return Return the pinter to the buffer been set.\r
 \r
 **/\r
 VOID *\r
@@ -655,7 +656,7 @@ LibPcdSetExPtr (
   IN      VOID              *Buffer\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return NULL;\r
 }\r
@@ -672,7 +673,7 @@ LibPcdSetExPtr (
   @param[in]  TokenNumber The PCD token number to set a current value for.\r
   @param[in]  Value The Boolean value to set.\r
 \r
-  @retval Boolean Return the value been set.\r
+  @return Return the value been set.\r
 \r
 **/\r
 BOOLEAN\r
@@ -683,7 +684,7 @@ LibPcdSetExBool (
   IN BOOLEAN           Value\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return FALSE;\r
 }\r
@@ -703,8 +704,6 @@ LibPcdSetExBool (
   @param[in]  NotificationFunction The function to call when the token \r
               specified by Guid and TokenNumber is set.\r
 \r
-  @retval VOID\r
-\r
 **/\r
 VOID\r
 EFIAPI\r
@@ -714,7 +713,7 @@ LibPcdCallbackOnSet (
   IN PCD_CALLBACK             NotificationFunction\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 }\r
 \r
 \r
@@ -727,8 +726,6 @@ LibPcdCallbackOnSet (
   @param[in]  TokenNumber Specify the token number.\r
   @param[in]  NotificationFunction The callback function to be unregistered.\r
 \r
-  @retval VOID\r
-\r
 **/\r
 VOID\r
 EFIAPI\r
@@ -738,7 +735,7 @@ LibPcdCancelCallback (
   IN PCD_CALLBACK             NotificationFunction\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 }\r
 \r
 \r
@@ -756,7 +753,7 @@ LibPcdCancelCallback (
   @param[in]  TokenNumber   The previous PCD token number.  If 0, then retrieves the first PCD \r
                             token number.\r
 \r
-  @retval UINTN            The next valid token number.\r
+  @return The next valid token number.\r
 \r
 **/\r
 UINTN           \r
@@ -766,7 +763,7 @@ LibPcdGetNextToken (
   IN       UINTN              TokenNumber\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return 0;\r
 }\r
@@ -781,13 +778,11 @@ LibPcdGetNextToken (
   then NULL is returned. \r
 \r
   If Guid is not NULL and is not a valid token space in the current platform, then ASSERT().\r
-\r
-\r
   \r
   @param[in]  Guid  Pointer to a 128-bit unique value that designates from which namespace \r
                     to start the search.\r
 \r
-  @retval CONST GUID *  The next valid token namespace.\r
+  @return The next valid token namespace.\r
 \r
 **/\r
 GUID *           \r
@@ -796,30 +791,33 @@ LibPcdGetNextTokenSpace (
   IN CONST GUID  *Guid\r
   )\r
 {\r
-  ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r
+  ASSERT (FALSE);\r
 \r
   return NULL;\r
 }\r
 \r
 \r
-\r
 /**\r
+  Sets a value of a patchable PCD entry that is type pointer.\r
+  \r
   Sets the PCD entry specified by PatchVariable to the value specified by Buffer \r
-  and SizeOfValue.  Buffer is returned.  If SizeOfValue is greater than \r
-  MaximumDatumSize, then set SizeOfValue to MaximumDatumSize and return \r
+  and SizeOfBuffer.  Buffer is returned.  If SizeOfBuffer is greater than \r
+  MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return \r
   NULL to indicate that the set operation was not actually performed.  \r
-  If SizeOfValue is set to MAX_ADDRESS, then SizeOfValue must be set to \r
+  If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to \r
   MaximumDatumSize and NULL must be returned.\r
   \r
   If PatchVariable is NULL, then ASSERT().\r
-  If SizeOfValue is NULL, then ASSERT().\r
-  If SizeOfValue > 0 and Buffer is NULL, then ASSERT().\r
+  If SizeOfBuffer is NULL, then ASSERT().\r
+  If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
 \r
   @param[in] PatchVariable      A pointer to the global variable in a module that is \r
                                 the target of the set operation.\r
   @param[in] MaximumDatumSize   The maximum size allowed for the PCD entry specified by PatchVariable.\r
   @param[in, out] SizeOfBuffer  A pointer to the size, in bytes, of Buffer.\r
   @param[in] Buffer             A pointer to the buffer to used to set the target variable.\r
+  \r
+  @return Return the pointer to the buffer been set.\r
 \r
 **/\r
 VOID *\r