]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Synchronize interface function comment from declaration in library class header file...
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 10 Dec 2008 03:04:00 +0000 (03:04 +0000)
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 10 Dec 2008 03:04:00 +0000 (03:04 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6949 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Library/PeiMemoryLib/CompareMemWrapper.c
MdePkg/Library/PeiMemoryLib/MemLibInternals.h
MdePkg/Library/PeiPcdLib/PeiPcdLib.c
MdePkg/Library/PeiPciLibPciCfg2/PciLib.c
MdePkg/Library/PeiPciSegmentLibPciCfg2/PciSegmentLib.c

index 34d8a47d84fc5b352e0fdee480bbee512668681d..27da96d56b08f56c8d012a723d616a9c0d34b598 100644 (file)
@@ -31,7 +31,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   If all Length bytes of the two buffers are identical, then 0 is returned.  Otherwise, the\r
   value returned is the first mismatched byte in SourceBuffer subtracted from the first\r
   mismatched byte in DestinationBuffer.\r
-\r
+  \r
   If Length > 0 and DestinationBuffer is NULL, then ASSERT().\r
   If Length > 0 and SourceBuffer is NULL, then ASSERT().\r
   If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT().\r
index 468b464454f5fce6ab12cb4c3dca7514a9463e0d..e216b9445b0099fc04075c2968b121e4f1c36b37 100644 (file)
 #include <Library/BaseLib.h>\r
 \r
 /**\r
-  Copy Length bytes from Source to Destination.\r
+  Copies a source buffer to a destination buffer, and returns the destination buffer.\r
 \r
-  @param  DestinationBuffer Target of copy\r
-  @param  SourceBuffer      Place to copy from\r
-  @param  Length            Number of bytes to copy\r
+  This function wraps the gPS->CopyMem ().\r
+  \r
+  @param  DestinationBuffer   Pointer to the destination buffer of the memory copy.\r
+  @param  SourceBuffer        Pointer to the source buffer of the memory copy.\r
+  @param  Length              Number of bytes to copy from SourceBuffer to DestinationBuffer.\r
 \r
-  @return Destination\r
+  @return DestinationBuffer.\r
 \r
 **/\r
 VOID *\r
 EFIAPI\r
 InternalMemCopyMem (\r
-  OUT     VOID                      *DestinationBuffer,\r
-  IN      CONST VOID                *SourceBuffer,\r
+  OUT     VOID                      *Destination,\r
+  IN      CONST VOID                *Source,\r
   IN      UINTN                     Length\r
   );\r
 \r
 /**\r
-  Set Buffer to Value for Size bytes.\r
+  Fills a target buffer with a byte value, and returns the target buffer.\r
 \r
-  @param  Buffer Memory to set.\r
-  @param  Length Number of bytes to set\r
-  @param  Value Value of the set operation.\r
+  This function wraps the gPS->SetMem ().\r
+  \r
+  @param  Buffer    Memory to set.\r
+  @param  Size    Number of bytes to set.\r
+  @param  Value     Value of the set operation.\r
 \r
-  @return Buffer\r
+  @return Buffer.\r
 \r
 **/\r
 VOID *\r
 EFIAPI\r
 InternalMemSetMem (\r
   OUT     VOID                      *Buffer,\r
-  IN      UINTN                     Length,\r
+  IN      UINTN                     Size,\r
   IN      UINT8                     Value\r
   );\r
 \r
index ac5bbcf0581d6b21246d4510401147f8d6c8a6e8..7bbb0f8039b208794df850f1711fe46f44111ea8 100644 (file)
@@ -49,11 +49,14 @@ GetPcdPpiPointer (
 }\r
 \r
 /**\r
+  This function provides a means by which SKU support can be established in the PCD infrastructure.\r
+\r
   Sets the current SKU in the PCD database to the value specified by SkuId.  SkuId is returned.\r
-  If SkuId not less than PCD_MAX_SKU_ID, then ASSERT().\r
-  \r
-  @param[in]  SkuId     System sku id. The SKU value that will be used when the PCD service will retrieve and \r
-                        set values.\r
+\r
+  @param[in]  SkuId The SKU value that will be used when the PCD service will retrieve and \r
+                    set values associated with a PCD token.\r
+                    \r
+  If SkuId >= 0x100, then ASSERT().                  \r
 \r
   @return Return the SKU ID that just be set.\r
 \r
@@ -61,7 +64,7 @@ GetPcdPpiPointer (
 UINTN\r
 EFIAPI\r
 LibPcdSetSku (\r
-  IN UINTN  SkuId\r
+  IN UINTN   SkuId\r
   )\r
 {\r
 \r
@@ -75,6 +78,8 @@ LibPcdSetSku (
 \r
 \r
 /**\r
+  This function provides a means by which to retrieve a value for a given PCD token.\r
+  \r
   Returns the 8-bit value for the token specified by TokenNumber. \r
 \r
   @param[in]  TokenNumber The PCD token number to retrieve a current value for.\r
@@ -85,7 +90,7 @@ LibPcdSetSku (
 UINT8\r
 EFIAPI\r
 LibPcdGet8 (\r
-  IN UINTN                        TokenNumber\r
+  IN UINTN             TokenNumber\r
   )\r
 {\r
   return (GetPcdPpiPointer ())->Get8 (TokenNumber);\r
@@ -94,9 +99,11 @@ LibPcdGet8 (
 \r
 \r
 /**\r
+  This function provides a means by which to retrieve a value for a given PCD token.\r
+  \r
   Returns the 16-bit value for the token specified by TokenNumber. \r
 \r
-  @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
+  @param[in]  TokenNumber The PCD token number to retrieve a current value for.\r
 \r
   @return Returns the 16-bit value for the token specified by TokenNumber. \r
 \r
@@ -104,7 +111,7 @@ LibPcdGet8 (
 UINT16\r
 EFIAPI\r
 LibPcdGet16 (\r
-  IN UINTN                        TokenNumber\r
+  IN UINTN             TokenNumber\r
   )\r
 {\r
   return (GetPcdPpiPointer ())->Get16 (TokenNumber);\r
@@ -113,6 +120,8 @@ LibPcdGet16 (
 \r
 \r
 /**\r
+  This function provides a means by which to retrieve a value for a given PCD token.\r
+  \r
   Returns the 32-bit value for the token specified by TokenNumber. \r
 \r
   @param[in]  TokenNumber The PCD token number to retrieve a current value for.\r
@@ -123,7 +132,7 @@ LibPcdGet16 (
 UINT32\r
 EFIAPI\r
 LibPcdGet32 (\r
-  IN UINTN                        TokenNumber\r
+  IN UINTN             TokenNumber\r
   )\r
 {\r
   return (GetPcdPpiPointer ())->Get32 (TokenNumber);\r
@@ -132,6 +141,8 @@ LibPcdGet32 (
 \r
 \r
 /**\r
+  This function provides a means by which to retrieve a value for a given PCD token.\r
+  \r
   Returns the 64-bit value for the token specified by TokenNumber.\r
 \r
   @param[in]  TokenNumber The PCD token number to retrieve a current value for.\r
@@ -142,7 +153,7 @@ LibPcdGet32 (
 UINT64\r
 EFIAPI\r
 LibPcdGet64 (\r
-  IN UINTN                        TokenNumber\r
+  IN UINTN             TokenNumber\r
   )\r
 {\r
   return (GetPcdPpiPointer ())->Get64 (TokenNumber);\r
@@ -151,6 +162,8 @@ LibPcdGet64 (
 \r
 \r
 /**\r
+  This function provides a means by which to retrieve a value for a given PCD token.\r
+  \r
   Returns the pointer to the buffer of the token specified by TokenNumber.\r
 \r
   @param[in]  TokenNumber The PCD token number to retrieve a current value for.\r
@@ -161,7 +174,7 @@ LibPcdGet64 (
 VOID *\r
 EFIAPI\r
 LibPcdGetPtr (\r
-  IN UINTN                        TokenNumber\r
+  IN UINTN             TokenNumber\r
   )\r
 {\r
   return (GetPcdPpiPointer ())->GetPtr (TokenNumber);\r
@@ -170,6 +183,8 @@ LibPcdGetPtr (
 \r
 \r
 /**\r
+  This function provides a means by which to retrieve a value for a given PCD token.\r
+  \r
   Returns the Boolean value of the token specified by TokenNumber. \r
 \r
   @param[in]  TokenNumber The PCD token number to retrieve a current value for.\r
@@ -180,7 +195,7 @@ LibPcdGetPtr (
 BOOLEAN \r
 EFIAPI\r
 LibPcdGetBool (\r
-  IN UINTN                        TokenNumber\r
+  IN UINTN             TokenNumber\r
   )\r
 {\r
   return (GetPcdPpiPointer ())->GetBool (TokenNumber);\r
@@ -189,7 +204,7 @@ LibPcdGetBool (
 \r
 \r
 /**\r
-  Returns the size of the token specified by TokenNumber. \r
+  This function provides a means by which to retrieve the size of a given PCD token.\r
 \r
   @param[in]  TokenNumber The PCD token number to retrieve a current value for.\r
 \r
@@ -199,7 +214,7 @@ LibPcdGetBool (
 UINTN\r
 EFIAPI\r
 LibPcdGetSize (\r
-  IN UINTN                        TokenNumber\r
+  IN UINTN             TokenNumber\r
   )\r
 {\r
   return (GetPcdPpiPointer ())->GetSize (TokenNumber);\r
@@ -208,7 +223,10 @@ LibPcdGetSize (
 \r
 \r
 /**\r
+  This function provides a means by which to retrieve a value for a given PCD token.\r
+  \r
   Returns the 8-bit value for the token specified by TokenNumber and Guid.\r
+  \r
   If Guid is NULL, then ASSERT(). \r
 \r
   @param[in]  Guid Pointer to a 128-bit unique value that designates \r
@@ -233,7 +251,10 @@ LibPcdGetEx8 (
 \r
 \r
 /**\r
+  This function provides a means by which to retrieve a value for a given PCD token.\r
+\r
   Returns the 16-bit value for the token specified by TokenNumber and Guid.\r
+  \r
   If Guid is NULL, then ASSERT(). \r
 \r
   @param[in]  Guid Pointer to a 128-bit unique value that designates \r
@@ -285,12 +306,15 @@ LibPcdGetEx32 (
 \r
 \r
 /**\r
+  This function provides a means by which to retrieve a value for a given PCD token.\r
+  \r
   Returns the 64-bit value for the token specified by TokenNumber and Guid.\r
+  \r
   If Guid is NULL, then ASSERT(). \r
 \r
-  @param[in]  Guid Pointer to a 128-bit unique value that designates \r
-              which namespace to retrieve a value from.\r
-  @param[in]  TokenNumber The PCD token number to retrieve a current value for.\r
+  @param[in]  Guid          Pointer to a 128-bit unique value that designates \r
+                            which namespace to retrieve a value from.\r
+  @param[in]  TokenNumber   The PCD token number to retrieve a current value for.\r
 \r
   @return Return the UINT64.\r
 \r
@@ -309,12 +333,15 @@ LibPcdGetEx64 (
 \r
 \r
 /**\r
-  Returns the pointer to the token specified by TokenNumber and Guid.\r
+  This function provides a means by which to retrieve a value for a given PCD token.\r
+  \r
+  Returns the pointer to the buffer of token specified by TokenNumber and Guid.\r
+  \r
   If Guid is NULL, then ASSERT(). \r
 \r
-  @param[in]  Guid Pointer to a 128-bit unique value that designates \r
-              which namespace to retrieve a value from.\r
-  @param[in]  TokenNumber The PCD token number to retrieve a current value for.\r
+  @param[in]  Guid          Pointer to a 128-bit unique value that designates \r
+                            which namespace to retrieve a value from.\r
+  @param[in]  TokenNumber   The PCD token number to retrieve a current value for.\r
 \r
   @return Return the VOID* pointer.\r
 \r
@@ -334,12 +361,15 @@ LibPcdGetExPtr (
 \r
 \r
 /**\r
+  This function provides a means by which to retrieve a value for a given PCD token.\r
+  \r
   Returns the Boolean value of the token specified by TokenNumber and Guid. \r
+  \r
   If Guid is NULL, then ASSERT(). \r
 \r
-  @param[in]  Guid Pointer to a 128-bit unique value that designates \r
-              which namespace to retrieve a value from.\r
-  @param[in]  TokenNumber The PCD token number to retrieve a current value for.\r
+  @param[in]  Guid          Pointer to a 128-bit unique value that designates \r
+                            which namespace to retrieve a value from.\r
+  @param[in]  TokenNumber   The PCD token number to retrieve a current value for.\r
 \r
   @return Return the BOOLEAN.\r
 \r
@@ -358,12 +388,15 @@ LibPcdGetExBool (
 \r
 \r
 /**\r
+  This function provides a means by which to retrieve the size of a given PCD token.\r
+  \r
   Returns the size of the token specified by TokenNumber and Guid. \r
+  \r
   If Guid is NULL, then ASSERT(). \r
 \r
-  @param[in]  Guid Pointer to a 128-bit unique value that designates \r
-              which namespace to retrieve a value from.\r
-  @param[in]  TokenNumber The PCD token number to retrieve a current value for.\r
+  @param[in]  Guid          Pointer to a 128-bit unique value that designates \r
+                            which namespace to retrieve a value from.\r
+  @param[in]  TokenNumber   The PCD token number to retrieve a current value for.\r
 \r
   @return Return the size.\r
 \r
@@ -382,12 +415,13 @@ LibPcdGetExSize (
 \r
 \r
 /**\r
+  This function provides a means by which to set a value for a given PCD token.\r
+  \r
   Sets the 8-bit value for the token specified by TokenNumber \r
   to the value specified by Value.  Value is returned.\r
-  If fail to set pcd value, then ASSERT_EFI_ERROR().\r
   \r
-  @param[in]  TokenNumber The PCD token number to set a current value for.\r
-  @param[in]  Value The 8-bit value to set.\r
+  @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
   @return Return the value been set.\r
 \r
@@ -411,12 +445,13 @@ LibPcdSet8 (
 \r
 \r
 /**\r
+  This function provides a means by which to set a value for a given PCD token.\r
+  \r
   Sets the 16-bit value for the token specified by TokenNumber \r
   to the value specified by Value.  Value is returned.\r
-  If fail to set pcd value, then ASSERT_EFI_ERROR().\r
   \r
-  @param[in]  TokenNumber The PCD token number to set a current value for.\r
-  @param[in]  Value The 16-bit value to set.\r
+  @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
   @return Return the value been set.\r
 \r
@@ -440,12 +475,13 @@ LibPcdSet16 (
 \r
 \r
 /**\r
+  This function provides a means by which to set a value for a given PCD token.\r
+  \r
   Sets the 32-bit value for the token specified by TokenNumber \r
   to the value specified by Value.  Value is returned.\r
-  If fail to set pcd value, then ASSERT_EFI_ERROR().\r
   \r
-  @param[in]  TokenNumber The PCD token number to set a current value for.\r
-  @param[in]  Value The 32-bit value to set.\r
+  @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
   @return Return the value been set.\r
 \r
@@ -454,7 +490,7 @@ UINT32
 EFIAPI\r
 LibPcdSet32 (\r
   IN UINTN             TokenNumber,\r
-  IN UINT32             Value\r
+  IN UINT32            Value\r
   )\r
 {\r
   EFI_STATUS Status;\r
@@ -469,12 +505,13 @@ LibPcdSet32 (
 \r
 \r
 /**\r
+  This function provides a means by which to set a value for a given PCD token.\r
+  \r
   Sets the 64-bit value for the token specified by TokenNumber \r
   to the value specified by Value.  Value is returned.\r
-  If fail to set pcd value, then ASSERT_EFI_ERROR().\r
   \r
-  @param[in]  TokenNumber The PCD token number to set a current value for.\r
-  @param[in]  Value The 64-bit value to set.\r
+  @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
   @return Return the value been set.\r
 \r
@@ -483,7 +520,7 @@ UINT64
 EFIAPI\r
 LibPcdSet64 (\r
   IN UINTN             TokenNumber,\r
-  IN UINT64             Value\r
+  IN UINT64            Value\r
   )\r
 {\r
   EFI_STATUS Status;\r
@@ -498,23 +535,23 @@ LibPcdSet64 (
 \r
 \r
 /**\r
-  Sets a buffer for the token specified by TokenNumber to \r
-  the value specified by Buffer and SizeOfBuffer.  Buffer to\r
-  be set is returned. The content of the buffer could be \r
-  overwritten if a Callback on SET is registered with this\r
-  TokenNumber.\r
+  This function provides a means by which to set a value for a given PCD token.\r
   \r
-  If SizeOfBuffer is greater than the maximum \r
-  size support by TokenNumber, then set SizeOfBuffer to the \r
-  maximum size supported by TokenNumber and return NULL to \r
-  indicate that the set operation was not actually performed. \r
+  Sets a buffer for the token specified by TokenNumber to the value \r
+  specified by Buffer and SizeOfBuffer.  Buffer is returned.  \r
+  If SizeOfBuffer is greater than the maximum size support by TokenNumber, \r
+  then set SizeOfBuffer to the maximum size supported by TokenNumber and \r
+  return NULL to indicate that the set operation was not actually performed.  \r
+\r
+  If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the \r
+  maximum size supported by TokenName and NULL must be returned.\r
   \r
+  If SizeOfBuffer is NULL, then ASSERT().\r
   If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
   \r
-  @param[in]        TokenNumber     The PCD token number to set a current value for.\r
-  @param[in, out]   SizeOfBuffer    The size, in bytes, of Buffer.\r
-                                    In out, returns actual size of buffer is set.\r
-  @param[in]        Buffer          A pointer to the buffer to set.\r
+  @param[in]      TokenNumber   The PCD token number to set a current value for.\r
+  @param[in, out] SizeOfBuffer  The size, in bytes, of Buffer.\r
+  @param[in]      Buffer        A pointer to the buffer to set.\r
 \r
   @return Return the pointer for the buffer been set.\r
 \r
@@ -522,9 +559,9 @@ LibPcdSet64 (
 VOID *\r
 EFIAPI\r
 LibPcdSetPtr (\r
-  IN       UINTN             TokenNumber,\r
-  IN OUT   UINTN             *SizeOfBuffer,\r
-  IN CONST VOID              *Buffer\r
+  IN        UINTN             TokenNumber,\r
+  IN OUT    UINTN             *SizeOfBuffer,\r
+  IN CONST  VOID              *Buffer\r
   )\r
 {\r
   EFI_STATUS Status;\r
@@ -547,12 +584,13 @@ LibPcdSetPtr (
 \r
 \r
 /**\r
+  This function provides a means by which to set a value for a given PCD token.\r
+  \r
   Sets the Boolean value for the token specified by TokenNumber \r
   to the value specified by Value.  Value is returned.\r
-  If fail to set pcd value, then ASSERT_EFI_ERROR().\r
   \r
-  @param[in]  TokenNumber The PCD token number to set a current value for.\r
-  @param[in]  Value The boolean value to set.\r
+  @param[in]  TokenNumber   The PCD token number to set a current value for.\r
+  @param[in]  Value         The boolean value to set.\r
 \r
   @return Return the value been set.\r
 \r
@@ -576,15 +614,17 @@ LibPcdSetBool (
 \r
 \r
 /**\r
+  This function provides a means by which to set a value for a given PCD token.\r
+  \r
   Sets the 8-bit value for the token specified by TokenNumber and \r
   Guid to the value specified by Value. Value is returned.\r
+  \r
   If Guid is NULL, then ASSERT().\r
-  If fail to set pcd value, then ASSERT_EFI_ERROR().\r
   \r
-  @param[in]  Guid Pointer to a 128-bit unique value that \r
-              designates which namespace to set a value from.\r
-  @param[in]  TokenNumber The PCD token number to set a current value for.\r
-  @param[in]  Value The 8-bit value to set.\r
+  @param[in]  Guid          Pointer to a 128-bit unique value that \r
+                            designates which namespace to set a value from.\r
+  @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
   @return Return the value been set.\r
 \r
@@ -611,15 +651,17 @@ LibPcdSetEx8 (
 \r
 \r
 /**\r
+  This function provides a means by which to set a value for a given PCD token.\r
+  \r
   Sets the 16-bit value for the token specified by TokenNumber and \r
   Guid to the value specified by Value. Value is returned.\r
+  \r
   If Guid is NULL, then ASSERT().\r
-  If fail to set pcd value, then ASSERT_EFI_ERROR().\r
   \r
-  @param[in]  Guid Pointer to a 128-bit unique value that \r
-              designates which namespace to set a value from.\r
-  @param[in]  TokenNumber The PCD token number to set a current value for.\r
-  @param[in]  Value The 16-bit value to set.\r
+  @param[in]  Guid          Pointer to a 128-bit unique value that \r
+                            designates which namespace to set a value from.\r
+  @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
   @return Return the value been set.\r
 \r
@@ -644,15 +686,17 @@ LibPcdSetEx16 (
 \r
 \r
 /**\r
+  This function provides a means by which to set a value for a given PCD token.\r
+  \r
   Sets the 32-bit value for the token specified by TokenNumber and \r
   Guid to the value specified by Value. Value is returned.\r
+  \r
   If Guid is NULL, then ASSERT().\r
-  If fail to set pcd value, then ASSERT_EFI_ERROR().\r
   \r
-  @param[in]  Guid Pointer to a 128-bit unique value that \r
-              designates which namespace to set a value from.\r
-  @param[in]  TokenNumber The PCD token number to set a current value for.\r
-  @param[in]  Value The 32-bit value to set.\r
+  @param[in]  Guid          Pointer to a 128-bit unique value that \r
+                            designates which namespace to set a value from.\r
+  @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
   @return Return the value been set.\r
 \r
@@ -662,7 +706,7 @@ EFIAPI
 LibPcdSetEx32 (\r
   IN CONST GUID        *Guid,\r
   IN UINTN             TokenNumber,\r
-  IN UINT32             Value\r
+  IN UINT32            Value\r
   )\r
 {\r
   EFI_STATUS Status;\r
@@ -679,15 +723,16 @@ LibPcdSetEx32 (
 \r
 \r
 /**\r
+  This function provides a means by which to set a value for a given PCD token.\r
+  \r
   Sets the 64-bit value for the token specified by TokenNumber and \r
   Guid to the value specified by Value. Value is returned.\r
   If Guid is NULL, then ASSERT().\r
-  If fail to set pcd value, then ASSERT_EFI_ERROR().\r
   \r
-  @param[in]  Guid Pointer to a 128-bit unique value that \r
-              designates which namespace to set a value from.\r
-  @param[in]  TokenNumber The PCD token number to set a current value for.\r
-  @param[in]  Value The 64-bit value to set.\r
+  @param[in]  Guid          Pointer to a 128-bit unique value that \r
+                            designates which namespace to set a value from.\r
+  @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
   @return Return the value been set.\r
 \r
@@ -713,20 +758,23 @@ LibPcdSetEx64 (
 \r
 \r
 /**\r
+  This function provides a means by which to set a value for a given PCD token.\r
+  \r
   Sets a buffer for the token specified by TokenNumber to the value specified by \r
   Buffer and SizeOfBuffer.  Buffer is returned.  If SizeOfBuffer is greater than \r
   the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size \r
   supported by TokenNumber and return NULL to indicate that the set operation \r
   was not actually performed. \r
   \r
+  If Guid is NULL, then ASSERT().\r
+  If SizeOfBuffer is NULL, then ASSERT().\r
   If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
   \r
-  @param[in]  Guid Pointer to a 128-bit unique value that \r
-              designates which namespace to set a value from.\r
-  @param[in]  TokenNumber The PCD token number to set a current value for.\r
-  @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.\r
-                  In out, returns actual size of buffer is set.\r
-  @param[in]  Buffer A pointer to the buffer to set.\r
+  @param[in]  Guid              Pointer to a 128-bit unique value that \r
+                                designates which namespace to set a value from.\r
+  @param[in]  TokenNumber       The PCD token number to set a current value for.\r
+  @param[in, out] SizeOfBuffer  The size, in bytes, of Buffer.\r
+  @param[in]  Buffer            A pointer to the buffer to set.\r
 \r
   @return Return the pinter to the buffer been set.\r
 \r
@@ -759,15 +807,17 @@ LibPcdSetExPtr (
 \r
 \r
 /**\r
+  This function provides a means by which to set a value for a given PCD token.\r
+  \r
   Sets the Boolean value for the token specified by TokenNumber and \r
   Guid to the value specified by Value. Value is returned.\r
+  \r
   If Guid is NULL, then ASSERT().\r
-  If fail to set pcd value, then ASSERT_EFI_ERROR().\r
   \r
-  @param[in]  Guid Pointer to a 128-bit unique value that \r
-              designates which namespace to set a value from.\r
-  @param[in]  TokenNumber The PCD token number to set a current value for.\r
-  @param[in]  Value The Boolean value to set.\r
+  @param[in]  Guid          Pointer to a 128-bit unique value that \r
+                            designates which namespace to set a value from.\r
+  @param[in]  TokenNumber   The PCD token number to set a current value for.\r
+  @param[in]  Value         The Boolean value to set.\r
 \r
   @return Return the value been set.\r
 \r
@@ -793,17 +843,20 @@ LibPcdSetExBool (
 \r
 \r
 /**\r
+  Set up a notification function that is called when a specified token is set.\r
+  \r
   When the token specified by TokenNumber and Guid is set, \r
   then notification function specified by NotificationFunction is called.  \r
   If Guid is NULL, then the default token space is used. \r
+  \r
   If NotificationFunction is NULL, then ASSERT().\r
-  If fail to set callback, then ASSERT_EFI_ERROR().\r
-  @param[in]  Guid Pointer to a 128-bit unique value that designates which \r
-              namespace to set a value from.  If NULL, then the default \r
-              token space is used.\r
-  @param[in]  TokenNumber The PCD token number to monitor.\r
-  @param[in]  NotificationFunction The function to call when the token \r
-              specified by Guid and TokenNumber is set.\r
+\r
+  @param[in]  Guid      Pointer to a 128-bit unique value that designates which \r
+                        namespace to set a value from.  If NULL, then the default \r
+                        token space is used.\r
+  @param[in]  TokenNumber   The PCD token number to monitor.\r
+  @param[in]  NotificationFunction  The function to call when the token \r
+                                    specified by Guid and TokenNumber is set.\r
 \r
 **/\r
 VOID\r
@@ -827,11 +880,15 @@ LibPcdCallbackOnSet (
 \r
 /**\r
   Disable a notification function that was established with LibPcdCallbackonSet().\r
+  \r
+  Disable a notification function that was previously established with LibPcdCallbackOnSet(). \r
+  \r
   If NotificationFunction is NULL, then ASSERT().\r
-  If fail to cancel callback, then ASSERT_EFI_ERROR().\r
+  If LibPcdCallbackOnSet() was not previously called with Guid, TokenNumber, \r
+  and NotificationFunction, then ASSERT().\r
   \r
-  @param[in]  Guid Specify the GUID token space.\r
-  @param[in]  TokenNumber Specify the token number.\r
+  @param[in]  Guid          Specify the GUID token space.\r
+  @param[in]  TokenNumber   Specify the token number.\r
   @param[in]  NotificationFunction The callback function to be unregistered.\r
 \r
 **/\r
@@ -855,27 +912,29 @@ LibPcdCancelCallback (
 \r
 \r
 /**\r
+  Retrieves the next token in a token space.\r
+  \r
   Retrieves the next PCD token number from the token space specified by Guid.  \r
   If Guid is NULL, then the default token space is used.  If TokenNumber is 0, \r
   then the first token number is returned.  Otherwise, the token number that \r
   follows TokenNumber in the token space is returned.  If TokenNumber is the last \r
-  token number in the token space, then 0 is returned.  If TokenNumber is not 0 and \r
-  is not in the token space specified by Guid, then ASSERT().\r
-  If fail to get token in given token space, then ASSERT_EFI_ERROR().\r
+  token number in the token space, then 0 is returned.  \r
   \r
-  @param[in]  Guid          Pointer to a 128-bit unique value that designates which namespace \r
-                            to set a value from.  If NULL, then the default token space is used.\r
-  @param[in]  TokenNumber   The previous PCD token number.  If 0, then retrieves the first PCD \r
-                            token number.\r
+  If TokenNumber is not 0 and is not in the token space specified by Guid, then ASSERT().\r
+\r
+  @param[in]  Guid        Pointer to a 128-bit unique value that designates which namespace \r
+                          to set a value from.  If NULL, then the default token space is used.\r
+  @param[in]  TokenNumber The previous PCD token number.  If 0, then retrieves the first PCD \r
+                          token number.\r
 \r
   @return The next valid token number.\r
 \r
 **/\r
-UINTN                      \r
+UINTN           \r
 EFIAPI\r
 LibPcdGetNextToken (\r
-  IN CONST GUID             *Guid, OPTIONAL\r
-  IN       UINTN            TokenNumber\r
+  IN CONST GUID               *Guid,       OPTIONAL\r
+  IN UINTN                    TokenNumber\r
   )\r
 {\r
   EFI_STATUS Status;\r
@@ -896,8 +955,7 @@ LibPcdGetNextToken (
   platform. If Guid is NULL, then the GUID of the first non-local token space of the \r
   current platform is returned. If Guid is the last non-local token space, \r
   then NULL is returned. \r
-  If fail to get next token space, then ASSERT_EFI_ERROR().\r
-  \r
+\r
   If Guid is not NULL and is not a valid token space in the current platform, then ASSERT().\r
 \r
 \r
index 0d2ba6ceccb3b33f1bfad3aed734522a595ee40a..1406813f43e0f078bacd0518f7bc2eb389fc17ff 100644 (file)
@@ -170,7 +170,7 @@ PciRegisterForRuntimeAccess (
   @param  Address Address that encodes the PCI Bus, Device, Function and\r
                   Register.\r
 \r
-  @return The value read from the PCI configuration register.\r
+  @return The read value from the PCI configuration register.\r
 \r
 **/\r
 UINT8\r
@@ -195,7 +195,7 @@ PciRead8 (
 \r
   @param  Address Address that encodes the PCI Bus, Device, Function and\r
                   Register.\r
-  @param  Data    The value to write.\r
+  @param  Value   The value to write.\r
 \r
   @return The value written to the PCI configuration register.\r
 \r
@@ -204,12 +204,12 @@ UINT8
 EFIAPI\r
 PciWrite8 (\r
   IN      UINTN                     Address,\r
-  IN      UINT8                     Data\r
+  IN      UINT8                     Value\r
   )\r
 {\r
   ASSERT_INVALID_PCI_ADDRESS (Address, 0);\r
 \r
-  return (UINT8) PeiPciLibPciCfg2WriteWorker (Address, EfiPeiPciCfgWidthUint8, Data);\r
+  return (UINT8) PeiPciLibPciCfg2WriteWorker (Address, EfiPeiPciCfgWidthUint8, Value);\r
 }\r
 \r
 /**\r
@@ -550,12 +550,12 @@ UINT16
 EFIAPI\r
 PciWrite16 (\r
   IN      UINTN                     Address,\r
-  IN      UINT16                    Data\r
+  IN      UINT16                    Value\r
   )\r
 {\r
   ASSERT_INVALID_PCI_ADDRESS (Address, 1);\r
 \r
-  return (UINT16) PeiPciLibPciCfg2WriteWorker (Address, EfiPeiPciCfgWidthUint16, Data);\r
+  return (UINT16) PeiPciLibPciCfg2WriteWorker (Address, EfiPeiPciCfgWidthUint16, Value);\r
 }\r
 \r
 /**\r
@@ -904,12 +904,12 @@ UINT32
 EFIAPI\r
 PciWrite32 (\r
   IN      UINTN                     Address,\r
-  IN      UINT32                    Data\r
+  IN      UINT32                    Value\r
   )\r
 {\r
   ASSERT_INVALID_PCI_ADDRESS (Address, 3);\r
 \r
-  return PeiPciLibPciCfg2WriteWorker (Address, EfiPeiPciCfgWidthUint32, Data);\r
+  return PeiPciLibPciCfg2WriteWorker (Address, EfiPeiPciCfgWidthUint32, Value);\r
 }\r
 \r
 /**\r
@@ -1328,7 +1328,7 @@ PciReadBuffer (
   @param  Size          Size in bytes of the transfer.\r
   @param  Buffer        Pointer to a buffer containing the data to write.\r
 \r
-  @return Size\r
+  @return Size written to StartAddress.\r
 \r
 **/\r
 UINTN\r
index 215fdabc2e819d30bc9d243e14abc6d58660e134..7d59b0a380f03fcb66da9b8d358a11f5efb842bb 100644 (file)
@@ -204,7 +204,7 @@ PciSegmentRegisterForRuntimeAccess (
 UINT8\r
 EFIAPI\r
 PciSegmentRead8 (\r
-  IN      UINT64                    Address\r
+  IN UINT64                    Address\r
   )\r
 {\r
   ASSERT_INVALID_PCI_SEGMENT_ADDRESS (Address, 0);\r
@@ -229,8 +229,8 @@ PciSegmentRead8 (
 UINT8\r
 EFIAPI\r
 PciSegmentWrite8 (\r
-  IN      UINT64                    Address,\r
-  IN      UINT8                     Value\r
+  IN UINT64                    Address,\r
+  IN UINT8                     Value\r
   )\r
 {\r
   ASSERT_INVALID_PCI_SEGMENT_ADDRESS (Address, 0);\r
@@ -258,8 +258,8 @@ PciSegmentWrite8 (
 UINT8\r
 EFIAPI\r
 PciSegmentOr8 (\r
-  IN      UINT64                    Address,\r
-  IN      UINT8                     OrData\r
+  IN UINT64                    Address,\r
+  IN UINT8                     OrData\r
   )\r
 {\r
   return PciSegmentWrite8 (Address, (UINT8) (PciSegmentRead8 (Address) | OrData));\r
@@ -284,8 +284,8 @@ PciSegmentOr8 (
 UINT8\r
 EFIAPI\r
 PciSegmentAnd8 (\r
-  IN      UINT64                    Address,\r
-  IN      UINT8                     AndData\r
+  IN UINT64                    Address,\r
+  IN UINT8                     AndData\r
   )\r
 {\r
   return PciSegmentWrite8 (Address, (UINT8) (PciSegmentRead8 (Address) & AndData));\r
@@ -314,9 +314,9 @@ PciSegmentAnd8 (
 UINT8\r
 EFIAPI\r
 PciSegmentAndThenOr8 (\r
-  IN      UINT64                    Address,\r
-  IN      UINT8                     AndData,\r
-  IN      UINT8                     OrData\r
+  IN UINT64                    Address,\r
+  IN UINT8                     AndData,\r
+  IN UINT8                     OrData\r
   )\r
 {\r
   return PciSegmentWrite8 (Address, (UINT8) ((PciSegmentRead8 (Address) & AndData) | OrData));\r
@@ -346,9 +346,9 @@ PciSegmentAndThenOr8 (
 UINT8\r
 EFIAPI\r
 PciSegmentBitFieldRead8 (\r
-  IN      UINT64                    Address,\r
-  IN      UINTN                     StartBit,\r
-  IN      UINTN                     EndBit\r
+  IN UINT64                    Address,\r
+  IN UINTN                     StartBit,\r
+  IN UINTN                     EndBit\r
   )\r
 {\r
   return BitFieldRead8 (PciSegmentRead8 (Address), StartBit, EndBit);\r
@@ -380,10 +380,10 @@ PciSegmentBitFieldRead8 (
 UINT8\r
 EFIAPI\r
 PciSegmentBitFieldWrite8 (\r
-  IN      UINT64                    Address,\r
-  IN      UINTN                     StartBit,\r
-  IN      UINTN                     EndBit,\r
-  IN      UINT8                     Value\r
+  IN UINT64                    Address,\r
+  IN UINTN                     StartBit,\r
+  IN UINTN                     EndBit,\r
+  IN UINT8                     Value\r
   )\r
 {\r
   return PciSegmentWrite8 (\r
@@ -421,10 +421,10 @@ PciSegmentBitFieldWrite8 (
 UINT8\r
 EFIAPI\r
 PciSegmentBitFieldOr8 (\r
-  IN      UINT64                    Address,\r
-  IN      UINTN                     StartBit,\r
-  IN      UINTN                     EndBit,\r
-  IN      UINT8                     OrData\r
+  IN UINT64                    Address,\r
+  IN UINTN                     StartBit,\r
+  IN UINTN                     EndBit,\r
+  IN UINT8                     OrData\r
   )\r
 {\r
   return PciSegmentWrite8 (\r
@@ -462,10 +462,10 @@ PciSegmentBitFieldOr8 (
 UINT8\r
 EFIAPI\r
 PciSegmentBitFieldAnd8 (\r
-  IN      UINT64                    Address,\r
-  IN      UINTN                     StartBit,\r
-  IN      UINTN                     EndBit,\r
-  IN      UINT8                     AndData\r
+  IN UINT64                    Address,\r
+  IN UINTN                     StartBit,\r
+  IN UINTN                     EndBit,\r
+  IN UINT8                     AndData\r
   )\r
 {\r
   return PciSegmentWrite8 (\r
@@ -506,11 +506,11 @@ PciSegmentBitFieldAnd8 (
 UINT8\r
 EFIAPI\r
 PciSegmentBitFieldAndThenOr8 (\r
-  IN      UINT64                    Address,\r
-  IN      UINTN                     StartBit,\r
-  IN      UINTN                     EndBit,\r
-  IN      UINT8                     AndData,\r
-  IN      UINT8                     OrData\r
+  IN UINT64                    Address,\r
+  IN UINTN                     StartBit,\r
+  IN UINTN                     EndBit,\r
+  IN UINT8                     AndData,\r
+  IN UINT8                     OrData\r
   )\r
 {\r
   return PciSegmentWrite8 (\r
@@ -536,7 +536,7 @@ PciSegmentBitFieldAndThenOr8 (
 UINT16\r
 EFIAPI\r
 PciSegmentRead16 (\r
-  IN      UINT64                    Address\r
+  IN UINT64                    Address\r
   )\r
 {\r
   ASSERT_INVALID_PCI_SEGMENT_ADDRESS (Address, 1);\r
@@ -562,8 +562,8 @@ PciSegmentRead16 (
 UINT16\r
 EFIAPI\r
 PciSegmentWrite16 (\r
-  IN      UINT64                    Address,\r
-  IN      UINT16                    Value\r
+  IN UINT64                    Address,\r
+  IN UINT16                    Value\r
   )\r
 {\r
   ASSERT_INVALID_PCI_SEGMENT_ADDRESS (Address, 1);\r
@@ -595,8 +595,8 @@ PciSegmentWrite16 (
 UINT16\r
 EFIAPI\r
 PciSegmentOr16 (\r
-  IN      UINT64                    Address,\r
-  IN      UINT16                    OrData\r
+  IN UINT64                    Address,\r
+  IN UINT16                    OrData\r
   )\r
 {\r
   return PciSegmentWrite16 (Address, (UINT16) (PciSegmentRead16 (Address) | OrData));\r
@@ -623,8 +623,8 @@ PciSegmentOr16 (
 UINT16\r
 EFIAPI\r
 PciSegmentAnd16 (\r
-  IN      UINT64                    Address,\r
-  IN      UINT16                    AndData\r
+  IN UINT64                    Address,\r
+  IN UINT16                    AndData\r
   )\r
 {\r
   return PciSegmentWrite16 (Address, (UINT16) (PciSegmentRead16 (Address) & AndData));\r
@@ -654,9 +654,9 @@ PciSegmentAnd16 (
 UINT16\r
 EFIAPI\r
 PciSegmentAndThenOr16 (\r
-  IN      UINT64                    Address,\r
-  IN      UINT16                    AndData,\r
-  IN      UINT16                    OrData\r
+  IN UINT64                    Address,\r
+  IN UINT16                    AndData,\r
+  IN UINT16                    OrData\r
   )\r
 {\r
   return PciSegmentWrite16 (Address, (UINT16) ((PciSegmentRead16 (Address) & AndData) | OrData));\r
@@ -687,9 +687,9 @@ PciSegmentAndThenOr16 (
 UINT16\r
 EFIAPI\r
 PciSegmentBitFieldRead16 (\r
-  IN      UINT64                    Address,\r
-  IN      UINTN                     StartBit,\r
-  IN      UINTN                     EndBit\r
+  IN UINT64                    Address,\r
+  IN UINTN                     StartBit,\r
+  IN UINTN                     EndBit\r
   )\r
 {\r
   return BitFieldRead16 (PciSegmentRead16 (Address), StartBit, EndBit);\r
@@ -722,10 +722,10 @@ PciSegmentBitFieldRead16 (
 UINT16\r
 EFIAPI\r
 PciSegmentBitFieldWrite16 (\r
-  IN      UINT64                    Address,\r
-  IN      UINTN                     StartBit,\r
-  IN      UINTN                     EndBit,\r
-  IN      UINT16                    Value\r
+  IN UINT64                    Address,\r
+  IN UINTN                     StartBit,\r
+  IN UINTN                     EndBit,\r
+  IN UINT16                    Value\r
   )\r
 {\r
   return PciSegmentWrite16 (\r
@@ -758,10 +758,10 @@ PciSegmentBitFieldWrite16 (
 UINT16\r
 EFIAPI\r
 PciSegmentBitFieldOr16 (\r
-  IN      UINT64                    Address,\r
-  IN      UINTN                     StartBit,\r
-  IN      UINTN                     EndBit,\r
-  IN      UINT16                    OrData\r
+  IN UINT64                    Address,\r
+  IN UINTN                     StartBit,\r
+  IN UINTN                     EndBit,\r
+  IN UINT16                    OrData\r
   )\r
 {\r
   return PciSegmentWrite16 (\r
@@ -771,38 +771,39 @@ PciSegmentBitFieldOr16 (
 }\r
 \r
 /**\r
-  Reads a bit field in a 16-bit PCI configuration register, performs a bitwise\r
-  AND, and writes the result back to the bit field in the 16-bit register.\r
-\r
-  Reads the 16-bit PCI configuration register specified by Address, performs a\r
-  bitwise AND between the read result and the value specified by AndData, and\r
-  writes the result to the 16-bit PCI configuration register specified by\r
-  Address. The value written to the PCI configuration register is returned.\r
-  This function must guarantee that all PCI read and write operations are\r
-  serialized. Extra left bits in AndData are stripped.\r
+  Reads a bit field in a 16-bit PCI configuration, performs a bitwise OR,\r
+  and writes the result back to the bit field in the 16-bit port.\r
 \r
+  Reads the 16-bit PCI configuration register specified by Address,\r
+  performs a bitwise OR between the read result and the value specified by OrData,\r
+  and writes the result to the 16-bit PCI configuration register specified by Address.\r
+  The value written to the PCI configuration register is returned.\r
+  This function must guarantee that all PCI read and write operations are serialized.\r
+  Extra left bits in OrData are stripped.\r
+  \r
   If any reserved bits in Address are set, then ASSERT().\r
-  If StartBit is greater than 15, then ASSERT().\r
-  If EndBit is greater than 15, then ASSERT().\r
+  If Address is not aligned on a 16-bit boundary, then ASSERT().\r
+  If StartBit is greater than 7, then ASSERT().\r
+  If EndBit is greater than 7, then ASSERT().\r
   If EndBit is less than StartBit, then ASSERT().\r
 \r
-  @param  Address   PCI configuration register to write.\r
+  @param  Address   Address that encodes the PCI Segment, Bus, Device, Function, and Register.\r
   @param  StartBit  The ordinal of the least significant bit in the bit field.\r
-                    Range 0..15.\r
+                    The ordinal of the least significant bit in a byte is bit 0.\r
   @param  EndBit    The ordinal of the most significant bit in the bit field.\r
-                    Range 0..15.\r
-  @param  AndData   The value to AND with the PCI configuration register.\r
+                    The ordinal of the most significant bit in a byte is bit 7.\r
+  @param  AndData   The value to AND with the read value from the PCI configuration register.\r
 \r
-  @return The value written back to the PCI configuration register.\r
+  @return The value written to the PCI configuration register.\r
 \r
 **/\r
 UINT16\r
 EFIAPI\r
 PciSegmentBitFieldAnd16 (\r
-  IN      UINT64                    Address,\r
-  IN      UINTN                     StartBit,\r
-  IN      UINTN                     EndBit,\r
-  IN      UINT16                    AndData\r
+  IN UINT64                    Address,\r
+  IN UINTN                     StartBit,\r
+  IN UINTN                     EndBit,\r
+  IN UINT16                    AndData\r
   )\r
 {\r
   return PciSegmentWrite16 (\r
@@ -843,11 +844,11 @@ PciSegmentBitFieldAnd16 (
 UINT16\r
 EFIAPI\r
 PciSegmentBitFieldAndThenOr16 (\r
-  IN      UINT64                    Address,\r
-  IN      UINTN                     StartBit,\r
-  IN      UINTN                     EndBit,\r
-  IN      UINT16                    AndData,\r
-  IN      UINT16                    OrData\r
+  IN UINT64                    Address,\r
+  IN UINTN                     StartBit,\r
+  IN UINTN                     EndBit,\r
+  IN UINT16                    AndData,\r
+  IN UINT16                    OrData\r
   )\r
 {\r
   return PciSegmentWrite16 (\r
@@ -873,7 +874,7 @@ PciSegmentBitFieldAndThenOr16 (
 UINT32\r
 EFIAPI\r
 PciSegmentRead32 (\r
-  IN      UINT64                    Address\r
+  IN UINT64                    Address\r
   )\r
 {\r
   ASSERT_INVALID_PCI_SEGMENT_ADDRESS (Address, 3);\r
@@ -899,8 +900,8 @@ PciSegmentRead32 (
 UINT32\r
 EFIAPI\r
 PciSegmentWrite32 (\r
-  IN      UINT64                    Address,\r
-  IN      UINT32                    Value\r
+  IN UINT64                    Address,\r
+  IN UINT32                    Value\r
   )\r
 {\r
   ASSERT_INVALID_PCI_SEGMENT_ADDRESS (Address, 3);\r
@@ -929,8 +930,8 @@ PciSegmentWrite32 (
 UINT32\r
 EFIAPI\r
 PciSegmentOr32 (\r
-  IN      UINT64                    Address,\r
-  IN      UINT32                    OrData\r
+  IN UINT64                    Address,\r
+  IN UINT32                    OrData\r
   )\r
 {\r
   return PciSegmentWrite32 (Address, PciSegmentRead32 (Address) | OrData);\r
@@ -957,8 +958,8 @@ PciSegmentOr32 (
 UINT32\r
 EFIAPI\r
 PciSegmentAnd32 (\r
-  IN      UINT64                    Address,\r
-  IN      UINT32                    AndData\r
+  IN UINT64                    Address,\r
+  IN UINT32                    AndData\r
   )\r
 {\r
   return PciSegmentWrite32 (Address, PciSegmentRead32 (Address) & AndData);\r
@@ -988,9 +989,9 @@ PciSegmentAnd32 (
 UINT32\r
 EFIAPI\r
 PciSegmentAndThenOr32 (\r
-  IN      UINT64                    Address,\r
-  IN      UINT32                    AndData,\r
-  IN      UINT32                    OrData\r
+  IN UINT64                    Address,\r
+  IN UINT32                    AndData,\r
+  IN UINT32                    OrData\r
   )\r
 {\r
   return PciSegmentWrite32 (Address, (PciSegmentRead32 (Address) & AndData) | OrData);\r
@@ -1021,9 +1022,9 @@ PciSegmentAndThenOr32 (
 UINT32\r
 EFIAPI\r
 PciSegmentBitFieldRead32 (\r
-  IN      UINT64                    Address,\r
-  IN      UINTN                     StartBit,\r
-  IN      UINTN                     EndBit\r
+  IN UINT64                    Address,\r
+  IN UINTN                     StartBit,\r
+  IN UINTN                     EndBit\r
   )\r
 {\r
   return BitFieldRead32 (PciSegmentRead32 (Address), StartBit, EndBit);\r
@@ -1056,10 +1057,10 @@ PciSegmentBitFieldRead32 (
 UINT32\r
 EFIAPI\r
 PciSegmentBitFieldWrite32 (\r
-  IN      UINT64                    Address,\r
-  IN      UINTN                     StartBit,\r
-  IN      UINTN                     EndBit,\r
-  IN      UINT32                    Value\r
+  IN UINT64                    Address,\r
+  IN UINTN                     StartBit,\r
+  IN UINTN                     EndBit,\r
+  IN UINT32                    Value\r
   )\r
 {\r
   return PciSegmentWrite32 (\r
@@ -1097,10 +1098,10 @@ PciSegmentBitFieldWrite32 (
 UINT32\r
 EFIAPI\r
 PciSegmentBitFieldOr32 (\r
-  IN      UINT64                    Address,\r
-  IN      UINTN                     StartBit,\r
-  IN      UINTN                     EndBit,\r
-  IN      UINT32                    OrData\r
+  IN UINT64                    Address,\r
+  IN UINTN                     StartBit,\r
+  IN UINTN                     EndBit,\r
+  IN UINT32                    OrData\r
   )\r
 {\r
   return PciSegmentWrite32 (\r
@@ -1113,17 +1114,18 @@ PciSegmentBitFieldOr32 (
   Reads a bit field in a 32-bit PCI configuration register, performs a bitwise\r
   AND, and writes the result back to the bit field in the 32-bit register.\r
 \r
-  Reads the 32-bit PCI configuration register specified by Address, performs a\r
-  bitwise AND between the read result and the value specified by AndData, and\r
-  writes the result to the 32-bit PCI configuration register specified by\r
-  Address. The value written to the PCI configuration register is returned.\r
-  This function must guarantee that all PCI read and write operations are\r
-  serialized. Extra left bits in AndData are stripped.\r
-\r
+  \r
+  Reads the 32-bit PCI configuration register specified by Address, performs a bitwise\r
+  AND between the read result and the value specified by AndData, and writes the result\r
+  to the 32-bit PCI configuration register specified by Address. The value written to\r
+  the PCI configuration register is returned.  This function must guarantee that all PCI\r
+  read and write operations are serialized.  Extra left bits in AndData are stripped.\r
   If any reserved bits in Address are set, then ASSERT().\r
+  If Address is not aligned on a 32-bit boundary, then ASSERT().\r
   If StartBit is greater than 31, then ASSERT().\r
   If EndBit is greater than 31, then ASSERT().\r
   If EndBit is less than StartBit, then ASSERT().\r
+  \r
 \r
   @param  Address   PCI configuration register to write.\r
   @param  StartBit  The ordinal of the least significant bit in the bit field.\r
@@ -1138,10 +1140,10 @@ PciSegmentBitFieldOr32 (
 UINT32\r
 EFIAPI\r
 PciSegmentBitFieldAnd32 (\r
-  IN      UINT64                    Address,\r
-  IN      UINTN                     StartBit,\r
-  IN      UINTN                     EndBit,\r
-  IN      UINT32                    AndData\r
+  IN UINT64                    Address,\r
+  IN UINTN                     StartBit,\r
+  IN UINTN                     EndBit,\r
+  IN UINT32                    AndData\r
   )\r
 {\r
   return PciSegmentWrite32 (\r
@@ -1182,11 +1184,11 @@ PciSegmentBitFieldAnd32 (
 UINT32\r
 EFIAPI\r
 PciSegmentBitFieldAndThenOr32 (\r
-  IN      UINT64                    Address,\r
-  IN      UINTN                     StartBit,\r
-  IN      UINTN                     EndBit,\r
-  IN      UINT32                    AndData,\r
-  IN      UINT32                    OrData\r
+  IN UINT64                    Address,\r
+  IN UINTN                     StartBit,\r
+  IN UINTN                     EndBit,\r
+  IN UINT32                    AndData,\r
+  IN UINT32                    OrData\r
   )\r
 {\r
   return PciSegmentWrite32 (\r
@@ -1198,28 +1200,32 @@ PciSegmentBitFieldAndThenOr32 (
 /**\r
   Reads a range of PCI configuration registers into a caller supplied buffer.\r
 \r
-  Reads the range of PCI configuration registers specified by StartAddress\r
-  and Size into the buffer specified by Buffer.\r
-  This function only allows the PCI configuration registers from a single PCI function to be read.\r
-  Size is returned.\r
-  \r
-  If any reserved bits in StartAddress are set, then ASSERT().\r
+  Reads the range of PCI configuration registers specified by StartAddress and\r
+  Size into the buffer specified by Buffer. This function only allows the PCI\r
+  configuration registers from a single PCI function to be read. Size is\r
+  returned. When possible 32-bit PCI configuration read cycles are used to read\r
+  from StartAdress to StartAddress + Size. Due to alignment restrictions, 8-bit\r
+  and 16-bit PCI configuration read cycles may be used at the beginning and the\r
+  end of the range.\r
+\r
+  If StartAddress > 0x0FFFFFFF, then ASSERT().\r
   If ((StartAddress & 0xFFF) + Size) > 0x1000, then ASSERT().\r
   If Size > 0 and Buffer is NULL, then ASSERT().\r
 \r
-  @param  StartAddress  Starting address that encodes the PCI Segment, Bus, Device, Function, and Register.\r
+  @param  StartAddress  Starting address that encodes the PCI Segment, Bus, Device,\r
+                        Function and Register.\r
   @param  Size          Size in bytes of the transfer.\r
   @param  Buffer        Pointer to a buffer receiving the data read.\r
 \r
-  @return The parameter of Size.\r
+  @return Size\r
 \r
 **/\r
 UINTN\r
 EFIAPI\r
 PciSegmentReadBuffer (\r
-  IN      UINT64                    StartAddress,\r
-  IN      UINTN                     Size,\r
-  OUT     VOID                      *Buffer\r
+  IN  UINT64                   StartAddress,\r
+  IN  UINTN                    Size,\r
+  OUT VOID                     *Buffer\r
   )\r
 {\r
   UINTN                             ReturnValue;\r
@@ -1290,18 +1296,23 @@ PciSegmentReadBuffer (
 \r
 \r
 /**\r
-  Copies the data in a caller supplied buffer to a specified range of PCI configuration space.\r
-\r
-  Writes the range of PCI configuration registers specified by StartAddress\r
-  and Size from the buffer specified by Buffer.\r
-  This function only allows the PCI configuration registers from a single PCI function to be written.\r
-  Size is returned.\r
-  \r
-  If any reserved bits in StartAddress are set, then ASSERT().\r
+  Copies the data in a caller supplied buffer to a specified range of PCI\r
+  configuration space.\r
+\r
+  Writes the range of PCI configuration registers specified by StartAddress and\r
+  Size from the buffer specified by Buffer. This function only allows the PCI\r
+  configuration registers from a single PCI function to be written. Size is\r
+  returned. When possible 32-bit PCI configuration write cycles are used to\r
+  write from StartAdress to StartAddress + Size. Due to alignment restrictions,\r
+  8-bit and 16-bit PCI configuration write cycles may be used at the beginning\r
+  and the end of the range.\r
+\r
+  If StartAddress > 0x0FFFFFFF, then ASSERT().\r
   If ((StartAddress & 0xFFF) + Size) > 0x1000, then ASSERT().\r
   If Size > 0 and Buffer is NULL, then ASSERT().\r
 \r
-  @param  StartAddress  Starting address that encodes the PCI Segment, Bus, Device, Function, and Register.\r
+  @param  StartAddress  Starting address that encodes the PCI Segment, Bus, Device,\r
+                        Function and Register.\r
   @param  Size          Size in bytes of the transfer.\r
   @param  Buffer        Pointer to a buffer containing the data to write.\r
 \r
@@ -1311,9 +1322,9 @@ PciSegmentReadBuffer (
 UINTN\r
 EFIAPI\r
 PciSegmentWriteBuffer (\r
-  IN      UINT64                    StartAddress,\r
-  IN      UINTN                     Size,\r
-  IN      VOID                      *Buffer\r
+  IN UINT64                    StartAddress,\r
+  IN UINTN                     Size,\r
+  IN VOID                      *Buffer\r
   )\r
 {\r
   UINTN                             ReturnValue;\r