]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Code scrub for the Debug library, PostCode library, Print library, and ExtractGuidedS...
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 15 Jul 2008 11:12:43 +0000 (11:12 +0000)
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 15 Jul 2008 11:12:43 +0000 (11:12 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5478 6f19259b-4bc3-4df7-8a09-765794883524

30 files changed:
MdePkg/Include/Library/DebugLib.h
MdePkg/Include/Library/ExtractGuidedSectionLib.h
MdePkg/Include/Library/PostCodeLib.h
MdePkg/Include/Library/PrintLib.h
MdePkg/Include/Library/SerialPortLib.h
MdePkg/Include/Library/UefiDecompressLib.h
MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
MdePkg/Library/BaseDebugLibNull/DebugLib.c
MdePkg/Library/BasePostCodeLibDebug/BasePostCodeLibDebug.inf
MdePkg/Library/BasePostCodeLibDebug/PostCode.c
MdePkg/Library/BasePostCodeLibPort80/PostCode.c
MdePkg/Library/BasePrintLib/BasePrintLib.inf
MdePkg/Library/BasePrintLib/PrintLib.c
MdePkg/Library/BasePrintLib/PrintLibInternal.c
MdePkg/Library/BasePrintLib/PrintLibInternal.h
MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c
MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLibInternals.h
MdePkg/Library/DxeDebugLibSerialPort/DebugLib.c
MdePkg/Library/DxeDebugLibSerialPort/DxeDebugLibSerialPort.inf
MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.c
MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
MdePkg/Library/PeiDxePostCodeLibReportStatusCode/PostCode.c
MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.c
MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
MdePkg/Library/SerialPortLibNull/SerialPortLibNull.c
MdePkg/Library/SerialPortLibNull/SerialPortLibNull.inf
MdePkg/Library/UefiDebugLibConOut/DebugLib.c
MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf
MdePkg/Library/UefiDebugLibStdErr/DebugLib.c
MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf

index 47ac3dc4f2441e6779d789b7403120ceaff17362..5f0c923fb45e93886a162dc0b41ae6d8c623e122 100644 (file)
@@ -75,6 +75,7 @@
 \r
   @param  ErrorLevel  The error level of the debug message.\r
   @param  Format      Format string for the debug message to print.\r
+  @param  ...         The variable argument list.\r
 \r
 **/\r
 VOID\r
@@ -129,10 +130,10 @@ DebugAssert (
 \r
   If Length is greater than (MAX_ADDRESS ?Buffer + 1), then ASSERT(). \r
 \r
-  @param   Buffer  Pointer to the target buffer to fill with PcdDebugClearMemoryValue.\r
+  @param   Buffer  Pointer to the target buffer to be filled with PcdDebugClearMemoryValue.\r
   @param   Length  Number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue. \r
 \r
-  @return  Buffer\r
+  @return  Buffer  Pointer to the target buffer filled with PcdDebugClearMemoryValue.\r
 \r
 **/\r
 VOID *\r
@@ -201,11 +202,11 @@ DebugCodeEnabled (
   \r
   Returns TRUE if DEBUG_CLEAR_MEMORY()macro is enabled.\r
 \r
-  This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of \r
+  This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of \r
   PcdDebugProperyMask is set.  Otherwise FALSE is returned.\r
 \r
-  @retval  TRUE    The DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set.\r
-  @retval  FALSE   The DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is clear.\r
+  @retval  TRUE    The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set.\r
+  @retval  FALSE   The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is clear.\r
 \r
 **/\r
 BOOLEAN\r
index 27faeeceb02bd4e303d15c3a7c9640884341d47f..72e979d0e3b953ec1df28e48d61e27c1dadfccc5 100644 (file)
@@ -1,7 +1,8 @@
 /** @file\r
-  Extract Guided Section Library class\r
+  Extract Guided Section Library class defintions, \r
+  which can provide many handlers for the different guided section data.\r
 \r
-  Copyright (c) 2007, Intel Corporation\r
+  Copyright (c) 2007 - 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
   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 \r
-  ExtractGuidedSectionLib.h\r
 **/\r
 #ifndef __EXTRACT_GUIDED_SECTION_H__\r
 #define __EXTRACT_GUIDED_SECTION_H__\r
 \r
 /**
-  Get information Handler for the input guided section data.\r
+  Get information for the input guided section data.\r
   It will ASSERT () if the pointer to OutputBufferSize is NULL.\r
   It will ASSERT () if the pointer to ScratchBufferSize is NULL.
   It will ASSERT () if the pointer to SectionAttribute is NULL.\r
@@ -27,7 +27,7 @@
   @param[out] SectionAttribute      The attribute of the input guided section.\r
 
   @retval  RETURN_SUCCESS           Get the required information successfully.\r
-  @retval  RETURN_INVALID_PARAMETER The input data can't be parsed correctly.\r
+  @retval  RETURN_INVALID_PARAMETER The input data is not the valid guided section.\r
 \r
 **/\r
 typedef\r
@@ -40,21 +40,21 @@ RETURN_STATUS
   );\r
 \r
 /**
-  Extract data Handler for one specific guided section.
+  Extract data and Auth from the specific guided section.
   It will ASSERT () if the pointer to OutputBuffer is NULL.\r
   It will ASSERT () if the pointer to AuthenticationStatus is NULL.\r
 \r
   @param[in]  InputSection  Buffer containing the input GUIDed section to be processed. \r
-  @param[out] OutputBuffer  OutputBuffer to point to the start of the section's contents.\r
+  @param[out] OutputBuffer  OutputBuffer directly points to the start of the section's contents,\r
                             if guided data is not prcessed. Otherwise,\r
-                            OutputBuffer to contain the output data, which is allocated by the caller.\r
+                            OutputBuffer contains the output data, which is allocated by the caller.\r
   @param[out] ScratchBuffer A pointer to a caller-allocated buffer for function internal use. \r
   @param[out] AuthenticationStatus \r
                             A pointer to a caller-allocated UINT32 that indicates the\r
                             authentication status of the output buffer. 
 
   @retval  RETURN_SUCCESS               Get the output data and AuthenticationStatus successfully.\r
-  @retval  RETURN_INVALID_PARAMETER The input data can't be parsed correctly.\r
+  @retval  RETURN_INVALID_PARAMETER     The input data is not the valid guided section.\r
 \r
 **/\r
 typedef\r
@@ -70,12 +70,12 @@ RETURN_STATUS
   Register Guided Section Extract and GetInfo Handler.\r
 \r
   @param[in]     SectionGuid    The guid matches this Extraction Handler.
-  @param[in]     GetInfoHandler Handler to get info from guided section.\r
+  @param[in]     GetInfoHandler Handler to get information from guided section.\r
   @param[in]     DecodeHandler  Handler to extract guided section.
 
   @retval  RETURN_SUCCESS           Register Guided Section Extract Handler successfully.
   @retval  RETURN_OUT_OF_RESOURCES  Resource is not enough to register new Handler. \r
-  @retval  RETURN_INVALID_PARAMETER Input pointer to Guid value is not valid.\r
+  @retval  RETURN_INVALID_PARAMETER Pointer to Guid value is not valid.\r
 \r
 **/\r
 RETURN_STATUS\r
@@ -88,18 +88,18 @@ ExtractGuidedSectionRegisterHandlers (
 \r
 /**
   Get the supported exract guided section Handler guid table, which is maintained\r
-  by library. The caller can directly get this guid table pointer \r
+  by library. The caller can directly get the guid table \r
   without responsibility to allocate or free this table buffer.  \r
   It will ASSERT () if ExtractHandlerGuidTable = NULL.\r
 \r
-  @param[in, out]  ExtractHandlerGuidTable   The extract Handler guid pointer list.
+  @param[out]  ExtractHandlerGuidTable   The extract Handler guid pointer list.
 \r
-  @retval  return the number of the supported extract guided Handler.
+  @return the number of the supported extract guided Handler.
 **/\r
 UINTN\r
 EFIAPI\r
 ExtractGuidedSectionGetGuidList (\r
-  IN OUT  GUID  **ExtractHandlerGuidTable\r
+  OUT  GUID  **ExtractHandlerGuidTable\r
   );\r
 \r
 /**
@@ -120,7 +120,7 @@ ExtractGuidedSectionGetGuidList (
 
   @retval  RETURN_SUCCESS           Get the required information successfully.\r
   @retval  RETURN_UNSUPPORTED       Guided section data is not supported.\r
-  @retval  RETURN_INVALID_PARAMETER The input data can't be parsed correctly.\r
+  @retval  RETURN_INVALID_PARAMETER The input data is not the valid guided section.\r
 \r
 **/\r
 RETURN_STATUS\r
@@ -154,7 +154,7 @@ ExtractGuidedSectionGetInfo (
 
   @retval  RETURN_SUCCESS           Get the output data and AuthenticationStatus successfully.\r
   @retval  RETURN_UNSUPPORTED       Guided section data is not supported to be decoded.\r
-  @retval  RETURN_INVALID_PARAMETER The input data can't be parsed correctly.
+  @retval  RETURN_INVALID_PARAMETER The input data is not the valid guided section.
 **/\r
 RETURN_STATUS\r
 EFIAPI\r
index 5a80c561df16e0a083d3b5b7a1d32f161f91ff13..17ece49e4d03ead316b72d56321ee9a312680926 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  Report Status Code Library public .h file\r
+  Post Code Library functions defintion.\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
   display the 32-bit value on the status reporting device.\r
   \r
   PostCode() must actively prevent recursion.  If PostCode() is called while \r
-  processing another any other Report Status Code Library function, then \r
+  processing another any other Post Code Library function, then \r
   PostCode() must return Value immediately.\r
 \r
   @param  Value  The 32-bit value to write to the POST card.\r
 \r
-  @return  Value\r
+  @return  Value The 32-bit value to write to the POST card.\r
 \r
 **/\r
 UINT32\r
@@ -55,16 +55,16 @@ PostCode (
   value on the status reporting device.  \r
 \r
   PostCodeWithDescription()must actively prevent recursion.  If \r
-  PostCodeWithDescription() is called while processing another any other Report \r
-  Status Code Library function, then PostCodeWithDescription() must return Value \r
-  immediately.\r
+  PostCodeWithDescription() is called while processing another any other \r
+  Post Code Library function, then PostCodeWithDescription() \r
+  must return Value immediately.\r
 \r
   @param  Value        The 32-bit value to write to the POST card.\r
   @param  Description  Pointer to an ASCII string that is a description of the \r
                        POST code value.  This is an optional parameter that may \r
                        be NULL.\r
 \r
-  @return  Value\r
+  @return  Value       The 32-bit value to write to the POST card.\r
 \r
 **/\r
 UINT32\r
@@ -97,14 +97,13 @@ PostCodeEnabled (
 /**\r
   Returns TRUE if POST code descriptions are enabled.\r
 \r
-  This function returns TRUE if the \r
-  POST_CODE_PROPERTY_POST_CODE_ENABLED bit of \r
-  PcdPostCodePropertyMask is set.  Otherwise FALSE is returned.\r
+  This function returns TRUE if the POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED\r
+  bit of PcdPostCodePropertyMask is set.  Otherwise FALSE is returned.\r
 \r
-  @retval  TRUE   The POST_CODE_PROPERTY_POST_CODE_ENABLED \r
-                  bit of PcdPostCodeProperyMask is set.\r
-  @retval  FALSE  The POST_CODE_PROPERTY_POST_CODE_ENABLED \r
-                  bit of PcdPostCodeProperyMask is clear.\r
+  @retval  TRUE   The POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED bit of\r
+                  PcdPostCodeProperyMask is set.\r
+  @retval  FALSE  The POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED bit of\r
+                  PcdPostCodeProperyMask is clear.\r
 \r
 **/\r
 BOOLEAN\r
@@ -122,7 +121,7 @@ PostCodeDescriptionEnabled (
 \r
   @param  Value  The 32-bit value to write to the POST card.\r
 \r
-  @return  Value\r
+  @return  Value The 32-bit value to write to the POST card.\r
 \r
 **/\r
 #define POST_CODE(Value)  PostCodeEnabled() ? PostCode(Value) : Value\r
@@ -139,6 +138,7 @@ PostCodeDescriptionEnabled (
   @param  Description  Pointer to an ASCII string that is a description of the \r
                        POST code value.\r
 \r
+  @return Value        The 32-bit value to write to the POST card.\r
 **/\r
 #define POST_CODE_WITH_DESCRIPTION(Value,Description)  \\r
   PostCodeEnabled()                              ?     \\r
index c5c550c2e726acbcbdad41253f9db130db6c4cc1..21eea032788de0fb02a5a5b1f28f30a323750a4d 100644 (file)
@@ -1,7 +1,7 @@
 /** @file
-  Library that provides print services
+  Library header file that defines print services
 
-  Copyright (c) 2006 - 2007, Intel Corporation                                                         
+  Copyright (c) 2006 - 2008, Intel Corporation                                                         
   All rights reserved. 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        
@@ -110,6 +110,7 @@ UnicodeVSPrint (
                           Unicode string.
   @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.
   @param  FormatString    Null-terminated Unicode format string.
+  @param  ...             The variable argument list.
   
   @return The number of Unicode characters in the produced output buffer not including the
           Null-terminator.
@@ -150,7 +151,7 @@ UnicodeSPrint (
   @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated 
                           Unicode string.
   @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.
-  @param  FormatString    Null-terminated Unicode format string.
+  @param  FormatString    Null-terminated ASCII format string.
   @param  Marker          VA_LIST marker for the variable argument list.
   
   @return The number of Unicode characters in the produced output buffer not including the
@@ -192,7 +193,8 @@ UnicodeVSPrintAsciiFormat (
   @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated 
                           Unicode string.
   @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.
-  @param  FormatString    Null-terminated Unicode format string.
+  @param  FormatString    Null-terminated ASCII format string.
+  @param  ...             The variable argument list.
   
   @return The number of Unicode characters in the produced output buffer not including the
           Null-terminator.
@@ -282,7 +284,7 @@ UnicodeValueToString (
   @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated 
                           ASCII string.
   @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.
-  @param  FormatString    Null-terminated Unicode format string.
+  @param  FormatString    Null-terminated ASCII format string.
   @param  Marker          VA_LIST marker for the variable argument list.
   
   @return The number of ASCII characters in the produced output buffer not including the
@@ -323,8 +325,9 @@ AsciiVSPrint (
   @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated 
                           ASCII string.
   @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.
-  @param  FormatString    Null-terminated Unicode format string.
-  
+  @param  FormatString    Null-terminated ASCII format string.
+  @param  ...             The variable argument list. 
+   
   @return The number of ASCII characters in the produced output buffer not including the
           Null-terminator.
 
@@ -340,7 +343,7 @@ AsciiSPrint (
 
 /**
   Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated
-  ASCII format string and a VA_LIST argument list.
+  Unicode format string and a VA_LIST argument list.
   
   Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer
   and BufferSize.
@@ -382,7 +385,7 @@ AsciiVSPrintUnicodeFormat (
 
 /**
   Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated
-  ASCII format string and  variable argument list.
+  Unicode format string and  variable argument list.
   
   Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer
   and BufferSize.
@@ -407,6 +410,7 @@ AsciiVSPrintUnicodeFormat (
                           ASCII string.
   @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.
   @param  FormatString    Null-terminated Unicode format string.
+  @param  ...             The variable argument list.
   
   @return The number of ASCII characters in the produced output buffer not including the
           Null-terminator.
index 19f56f7edd57db475b5ce2454324dc5d36c2b614..dc4031a974dbf091a49531a92ead1552a01a573a 100644 (file)
@@ -1,8 +1,7 @@
-\r
 /** @file\r
-  Serial I/O Port library functions with no library constructor/destructor\r
+  Serial I/O Port library functions definition.\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
@@ -30,15 +29,15 @@ SerialPortInitialize (
   );\r
 \r
 /**\r
-  Write data to serial device. \r
+  Write data from buffer to serial device. \r
  \r
-  If the buffer is NULL, then return 0; \r
+  If the Buffer is NULL, then return 0; \r
   if NumberOfBytes is zero, then return 0. \r
 \r
   @param  Buffer           Point of data buffer which need to be writed.\r
   @param  NumberOfBytes    Number of output bytes which are cached in Buffer.\r
 \r
-  @retval 0                Write data failed.\r
+  @retval 0                Write data failed, or No data is to be written.\r
   @retval !0               Actual number of bytes writed to serial device.\r
 \r
 **/\r
@@ -53,13 +52,14 @@ SerialPortWrite (
 /**\r
   Read data from serial device and save the datas in buffer.\r
  \r
-  If the buffer is NULL, then return zero;\r
+  If the Buffer is NULL, then return zero;\r
   if NumberOfBytes is zero, then return zero.\r
 \r
-  @param  Buffer           Point of data buffer which need to be writed.\r
-  @param  NumberOfBytes    Number of output bytes which are cached in Buffer.\r
+  @param  Buffer           Point of data buffer, which contains the data \r
+                           returned from the serial device.\r
+  @param  NumberOfBytes    Number of bytes which will be read.\r
 \r
-  @retval 0                Read data failed.\r
+  @retval 0                Read data failed, No data is to be read.\r
   @retval !0               Aactual number of bytes read from serial device.\r
 \r
 **/\r
index afedf307b59b64acc837a2c97347c006ee406fe0..2af91de2739a9f3908f271cd52d68f39856c7a66 100644 (file)
@@ -1,7 +1,12 @@
 /** @file\r
-  Return UEFI Decompress Protocol \r
+  UEFI Decompress Library Functions defintion\r
 \r
-  Copyright (c) 2006, Intel Corporation                                                         \r
+  The UEFI Decompress Library enables the decompression of objects that \r
+  were compressed using the UEFI compression scheme. The UEFI Decompress \r
+  Library is independent of environment and requires the caller to allocate \r
+  all required memory buffers.\r
+\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
@@ -16,7 +21,9 @@
 #define __UEFI_DECPOMPRESS_LIB_H__\r
 \r
 /**\r
-  Retrieves the size of the uncompressed buffer and the size of the scratch buffer.\r
+  Given a compressed source buffer, this function retrieves the size of \r
+  the uncompressed buffer and the size of the scratch buffer required \r
+  to decompress the compressed source buffer.\r
 \r
   Retrieves the size of the uncompressed buffer and the temporary scratch buffer \r
   required to decompress the buffer specified by Source and SourceSize.\r
                           is required to decompress the compressed buffer specified \r
                           by Source and SourceSize.\r
 \r
-  @retval  RETURN_SUCCESS The size of destination buffer and the size of scratch \r
-                          buffer are successull retrieved.\r
-  @retval  RETURN_INVALID_PARAMETER The source data is corrupted\r
-\r
+  @retval  RETURN_SUCCESS The size of the uncompressed data was returned \r
+                          in DestinationSize and the size of the scratch \r
+                          buffer was returned in ScratchSize.\r
+  @retval  RETURN_INVALID_PARAMETER \r
+                          The size of the uncompressed data or the size of \r
+                          the scratch buffer cannot be determined from \r
+                          the compressed data specified by Source \r
+                          and SourceSize.\r
 **/\r
 RETURN_STATUS\r
 EFIAPI\r
@@ -60,6 +71,7 @@ UefiDecompressGetInfo (
 /**\r
   Decompresses a compressed source buffer.\r
 \r
+  Extracts decompressed data to its original form.\r
   This function is designed so that the decompression algorithm can be implemented\r
   without using any memory services.  As a result, this function is not allowed to\r
   call any memory allocation services in its implementation.  It is the caller's r\r
@@ -79,9 +91,11 @@ UefiDecompressGetInfo (
                       This is an optional parameter that may be NULL if the \r
                       required scratch buffer size is 0.\r
                      \r
-  @retval  RETURN_SUCCESS Decompression is successfull\r
-  @retval  RETURN_INVALID_PARAMETER The source data is corrupted\r
-\r
+  @retval  RETURN_SUCCESS Decompression completed successfully, and \r
+                          the uncompressed buffer is returned in Destination.\r
+  @retval  RETURN_INVALID_PARAMETER \r
+                          The source buffer specified by Source is corrupted \r
+                          (not in a valid compressed format).\r
 **/\r
 RETURN_STATUS\r
 EFIAPI\r
index d1d208e189cad5948501d2b18fb77b520f996bbd..26a411b41e21c20cbd7ba099d0eefc69b79be98e 100644 (file)
@@ -1,8 +1,7 @@
 #/** @file\r
-# Component description file for NULL Debug Library\r
+# Null Base Debug Library instance with empty functions.\r
 #\r
-# Debug Library with empty functions.\r
-# Copyright (c) 2007, Intel Corporation.\r
+# Copyright (c) 2007 - 2008, Intel Corporation.\r
 #\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
index 73319d729bf579c26faec67bb9aa3b92ade89dfe..a540411bcaa872e1b8546e0233c8df468423ee98 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  Base Debug Library that uses PrintLib to print messages to a memory buffer.\r
+  Null Base Debug Library instance with empty functions.\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
   the message specified by Format and the associated variable argument list to \r
   the debug output device.\r
 \r
-  If Format is NULL, then ASSERT().\r
-\r
   @param  ErrorLevel  The error level of the debug message.\r
   @param  Format      Format string for the debug message to print.\r
+  @param  ...         The variable argument list.\r
 \r
 **/\r
 VOID\r
@@ -180,11 +179,11 @@ DebugCodeEnabled (
   \r
   Returns TRUE if DEBUG_CLEAR_MEMORY()macro is enabled.\r
 \r
-  This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of \r
+  This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of \r
   PcdDebugProperyMask is set.  Otherwise FALSE is returned.\r
 \r
-  @retval  TRUE    The DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set.\r
-  @retval  FALSE   The DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is clear.\r
+  @retval  TRUE    The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set.\r
+  @retval  FALSE   The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is clear.\r
   \r
   @return  Always return FALSE.\r
 \r
index fd34dd24cf08e860c9ac6a971a4dce2b67d8c944..d915130c65d3ea95e2627c8932e3d9b5ea4c8380 100644 (file)
@@ -1,8 +1,7 @@
 #/** @file\r
-# Component description file for Debug Base Post Code Library.\r
 #\r
 # Post Code Library that layers on top of a Debug Library instance.\r
-# Copyright (c) 2007, Intel Corporation.\r
+# Copyright (c) 2007 - 2008, Intel Corporation.\r
 #\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
index 6b99d8986ca181b8eb0853365266ae1b737f7484..4335acb1aea2fff605cd960496c3fc51ecc16cb7 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  Report Status Code Library Post Code functions for DXE Phase.\r
+  Base Post Code Library instance based on Debug Library.\r
 \r
-  Copyright (c) 2006, Intel Corporation<BR>\r
+  Copyright (c) 2006 - 2008, Intel Corporation<BR>\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
   display the 32-bit value on the status reporting device.\r
   \r
   PostCode() must actively prevent recursion.  If PostCode() is called while \r
-  processing another any other Report Status Code Library function, then \r
+  processing another any other Post Code Library function, then \r
   PostCode() must return Value immediately.\r
 \r
-  @param  Value  The 32-bit value to write to the POST card.\r
+  @param   Value  The 32-bit value to write to the POST card.\r
 \r
-  @return  Value\r
+  @return  Value  The 32-bit value to write to the POST card.\r
 \r
 **/\r
 UINT32\r
@@ -62,8 +62,8 @@ PostCode (
   value on the status reporting device.  \r
 \r
   PostCodeWithDescription()must actively prevent recursion.  If \r
-  PostCodeWithDescription() is called while processing another any other Repor\r
-  Status Code Library function, then PostCodeWithDescription() must return Value \r
+  PostCodeWithDescription() is called while processing another any other Pos\r
+  Code Library function, then PostCodeWithDescription() must return Value \r
   immediately.\r
 \r
   @param  Value        The 32-bit value to write to the POST card.\r
@@ -71,7 +71,7 @@ PostCode (
                        POST code value.  This is an optional parameter that may \r
                        be NULL.\r
 \r
-  @return  Value\r
+  @return  Value       The 32-bit value to write to the POST card.\r
 \r
 **/\r
 UINT32\r
@@ -111,12 +111,12 @@ PostCodeEnabled (
 /**\r
   Returns TRUE if POST code descriptions are enabled.\r
 \r
-  This function returns TRUE if the POST_CODE_PROPERTY_POST_CODE_ENABLED\r
+  This function returns TRUE if the POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED\r
   bit of PcdPostCodePropertyMask is set.  Otherwise FALSE is returned.\r
 \r
-  @retval  TRUE   The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of\r
+  @retval  TRUE   The POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED bit of\r
                   PcdPostCodeProperyMask is set.\r
-  @retval  FALSE  The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of\r
+  @retval  FALSE  The POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED bit of\r
                   PcdPostCodeProperyMask is clear.\r
 \r
 **/\r
@@ -126,5 +126,5 @@ PostCodeDescriptionEnabled (
   VOID\r
   )\r
 {\r
-  return (BOOLEAN) ((PcdGet8(PcdPostCodePropertyMask) & POST_CODE_PROPERTY_POST_CODE_ENABLED) != 0);\r
+  return (BOOLEAN) ((PcdGet8(PcdPostCodePropertyMask) & POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED) != 0);\r
 }\r
index 7ac4efce28f27b001008615b40a804a06bcac311..358c9ba1da0f66592fc10819a0f8c0beef764ea8 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  Report Status Code Library Post Code functions for DXE Phase.\r
+  Post Code Library instance that writes post code values to I/O port 0x80.\r
 \r
-  Copyright (c) 2006, Intel Corporation<BR>\r
+  Copyright (c) 2006 - 2008, Intel Corporation<BR>\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
   display the 32-bit value on the status reporting device.\r
   \r
   PostCode() must actively prevent recursion.  If PostCode() is called while \r
-  processing another any other Report Status Code Library function, then \r
+  processing another any other Post Code Library function, then \r
   PostCode() must return Value immediately.\r
 \r
   @param  Value  The 32-bit value to write to the POST card.\r
 \r
-  @return  Value\r
+  @return  Value The 32-bit value to write to the POST card.\r
 \r
 **/\r
 UINT32\r
@@ -62,16 +62,16 @@ PostCode (
   value on the status reporting device.  \r
 \r
   PostCodeWithDescription()must actively prevent recursion.  If \r
-  PostCodeWithDescription() is called while processing another any other Repor\r
-  Status Code Library function, then PostCodeWithDescription() must return Value \r
+  PostCodeWithDescription() is called while processing another any other Pos\r
+  Code Library function, then PostCodeWithDescription() must return Value \r
   immediately.\r
 \r
   @param  Value        The 32-bit value to write to the POST card.\r
   @param  Description  Pointer to an ASCII string that is a description of the \r
                        POST code value.  This is an optional parameter that may \r
-                       be NULL.\r
+                       be NULL. Ihis parameter is ignored in this implementation. \r
 \r
-  @return  Value\r
+  @return  Value       The 32-bit value to write to the POST card.\r
 \r
 **/\r
 UINT32\r
@@ -111,14 +111,13 @@ PostCodeEnabled (
 /**\r
   Returns TRUE if POST code descriptions are enabled.\r
 \r
-  This function returns TRUE if the \r
-  POST_CODE_PROPERTY_POST_CODE_ENABLED bit of \r
-  PcdPostCodePropertyMask is set.  Otherwise FALSE is returned.\r
+  This function returns TRUE if the POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED\r
+  bit of PcdPostCodePropertyMask is set.  Otherwise FALSE is returned.\r
 \r
-  @retval  TRUE   The POST_CODE_PROPERTY_POST_CODE_ENABLED \r
-                  bit of PcdPostCodeProperyMask is set.\r
-  @retval  FALSE  The POST_CODE_PROPERTY_POST_CODE_ENABLED \r
-                  bit of PcdPostCodeProperyMask is clear.\r
+  @retval  TRUE   The POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED bit of\r
+                  PcdPostCodeProperyMask is set.\r
+  @retval  FALSE  The POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED bit of\r
+                  PcdPostCodeProperyMask is clear.\r
 \r
 **/\r
 BOOLEAN\r
@@ -127,5 +126,5 @@ PostCodeDescriptionEnabled (
   VOID\r
   )\r
 {\r
-  return (BOOLEAN) ((PcdGet8(PcdPostCodePropertyMask) & POST_CODE_PROPERTY_POST_CODE_ENABLED) != 0);\r
+  return (BOOLEAN) ((PcdGet8(PcdPostCodePropertyMask) & POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED) != 0);\r
 }\r
index 0a03cd71cffc65fc8ec9efe439d3439923d6bcc9..1f3844b384e0cb90c2eccf78a25e083c60839ac1 100644 (file)
@@ -1,8 +1,8 @@
 #/** @file\r
 # Component description file for Base Print Library.\r
 #\r
-# Print Library implementation.\r
-# Copyright (c) 2007, Intel Corporation.\r
+# Base Print Library instance implementation.\r
+# Copyright (c) 2007 - 2008, Intel Corporation.\r
 #\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
index 548ec5490f746308c22048eddbc754c9185d9861..c2f1b5119c777a466f2b96fa8e4fa4811d45f05d 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  Print Library.\r
+  Base Print Library instance implementation.\r
 \r
-  Copyright (c) 2006 - 2007, Intel Corporation<BR>\r
+  Copyright (c) 2006 - 2008, Intel Corporation<BR>\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
@@ -23,7 +23,7 @@
 #define ERROR_STATUS_NUMBER           24\r
 #define ASSERT_UNICODE_BUFFER(Buffer) ASSERT ((((UINTN) (Buffer)) & 0x01) == 0)\r
 \r
-GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 *StatusString [] = {\r
+GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 *gStatusString[] = {\r
   "Success",                      //  RETURN_SUCCESS                = 0\r
   "Warning Unknown Glyph",        //  RETURN_WARN_UNKNOWN_GLYPH     = 1\r
   "Warning Delete Failure",       //  RETURN_WARN_DELETE_FAILURE    = 2\r
@@ -424,12 +424,12 @@ BasePrintLibVSPrint (
           //\r
           Index = Status & ~MAX_BIT;\r
           if (Index > 0 && Index <= ERROR_STATUS_NUMBER) {\r
-            ArgumentString = StatusString [Index + WARNING_STATUS_NUMBER];\r
+            ArgumentString = gStatusString [Index + WARNING_STATUS_NUMBER];\r
           }\r
         } else {\r
           Index = Status;\r
           if (Index <= WARNING_STATUS_NUMBER) {\r
-            ArgumentString = StatusString [Index];\r
+            ArgumentString = gStatusString [Index];\r
           }\r
         }\r
         if (ArgumentString == ValueBuffer) {\r
@@ -583,13 +583,14 @@ BasePrintLibVSPrint (
   VA_LIST is used this rountine allows the nesting of Vararg routines. Thus \r
   this is the main print working routine.\r
 \r
-  @param  Buffer        Character buffer to print the results of the parsing\r
+  @param  StartOfBuffer Character buffer to print the results of the parsing\r
                         of Format into.\r
   @param  BufferSize    Maximum number of characters to put into buffer.\r
                         Zero means no limit.\r
   @param  Flags         Intial flags value.\r
                         Can only have FORMAT_UNICODE and OUTPUT_UNICODE set\r
   @param  FormatString  Null-terminated format string.\r
+  @param  ...           The variable argument list.\r
 \r
   @return Number of characters printed not including the Null-terminator.\r
 \r
@@ -684,7 +685,7 @@ UnicodeVSPrint (
                           Unicode string.\r
   @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.\r
   @param  FormatString    Null-terminated Unicode format string.\r
-  \r
+  @param  ...             The variable argument list.\r
   @return The number of Unicode characters in the produced output buffer not including the\r
           Null-terminator.\r
 \r
@@ -730,7 +731,7 @@ UnicodeSPrint (
   @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated \r
                           Unicode string.\r
   @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.\r
-  @param  FormatString    Null-terminated Unicode format string.\r
+  @param  FormatString    Null-terminated ASCII format string.\r
   @param  Marker          VA_LIST marker for the variable argument list.\r
   \r
   @return The number of Unicode characters in the produced output buffer not including the\r
@@ -776,7 +777,8 @@ UnicodeVSPrintAsciiFormat (
   @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated \r
                           Unicode string.\r
   @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.\r
-  @param  FormatString    Null-terminated Unicode format string.\r
+  @param  FormatString    Null-terminated ASCII format string.\r
+  @param  ...             The variable argument list.\r
   \r
   @return The number of Unicode characters in the produced output buffer not including the\r
           Null-terminator.\r
@@ -876,7 +878,7 @@ UnicodeValueToString (
   @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated \r
                           ASCII string.\r
   @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.\r
-  @param  FormatString    Null-terminated Unicode format string.\r
+  @param  FormatString    Null-terminated ASCII format string.\r
   @param  Marker          VA_LIST marker for the variable argument list.\r
   \r
   @return The number of ASCII characters in the produced output buffer not including the\r
@@ -920,7 +922,8 @@ AsciiVSPrint (
   @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated \r
                           ASCII string.\r
   @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.\r
-  @param  FormatString    Null-terminated Unicode format string.\r
+  @param  FormatString    Null-terminated ASCII format string.\r
+  @param  ...             The variable argument list.\r
   \r
   @return The number of ASCII characters in the produced output buffer not including the\r
           Null-terminator.\r
@@ -943,7 +946,7 @@ AsciiSPrint (
 \r
 /**\r
   Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated\r
-  ASCII format string and a VA_LIST argument list.\r
+  Unicode format string and a VA_LIST argument list.\r
   \r
   Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer\r
   and BufferSize.\r
@@ -989,7 +992,7 @@ AsciiVSPrintUnicodeFormat (
 \r
 /**\r
   Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated\r
-  ASCII format string and  variable argument list.\r
+  Unicode format string and  variable argument list.\r
   \r
   Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer\r
   and BufferSize.\r
@@ -1014,6 +1017,7 @@ AsciiVSPrintUnicodeFormat (
                           ASCII string.\r
   @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.\r
   @param  FormatString    Null-terminated Unicode format string.\r
+  @param  ...             The variable argument list.\r
   \r
   @return The number of ASCII characters in the produced output buffer not including the\r
           Null-terminator.\r
index 4a9b15fec17530f0ee0e2ca292693a3aa44a6938..572819e041b31f8f89c6b0c3f7b7fe7a60a711f2 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  Print Library worker functions.\r
+  Print Library internal worker functions.\r
 \r
-  Copyright (c) 2006 - 2007, Intel Corporation<BR>\r
+  Copyright (c) 2006 - 2008, Intel Corporation<BR>\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
@@ -34,16 +34,16 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 mHexStr[] = {'0','1','2','3','4','5','
   @param  Character   Character to be placed into Buffer.\r
   @param  Increment   Character increment in Buffer.\r
 \r
-  @return Number of characters printed.\r
+  @return Buffer      Buffer filled with the input Character.\r
 \r
 **/\r
 CHAR8 *\r
 BasePrintLibFillBuffer (\r
-  CHAR8   *Buffer,\r
-  CHAR8   *EndBuffer,\r
-  INTN    Length,\r
-  UINTN   Character,\r
-  INTN    Increment\r
+  OUT CHAR8   *Buffer,\r
+  IN  CHAR8   *EndBuffer,\r
+  IN  INTN    Length,\r
+  IN  UINTN   Character,\r
+  IN  INTN    Increment\r
   )\r
 {\r
   INTN  Index;\r
@@ -69,7 +69,6 @@ BasePrintLibFillBuffer (
 \r
 **/\r
 UINTN\r
-EFIAPI\r
 BasePrintLibValueToString (\r
   IN OUT CHAR8  *Buffer,\r
   IN INT64      Value,\r
@@ -89,6 +88,10 @@ BasePrintLibValueToString (
     *(Buffer++) = mHexStr[Remainder];\r
     Digits++;\r
   } while (Value != 0);\r
+\r
+  //\r
+  // the length of Buffer string converted from Value\r
+  //\r
   return Digits;\r
 }\r
 \r
@@ -149,6 +152,9 @@ BasePrintLibConvertValueToString (
   UINTN  Index;\r
   UINTN  Radix;\r
 \r
+  //\r
+  // Make sure Buffer is not NULL and Width < MAXIMUM\r
+  //\r
   ASSERT (Buffer != NULL);\r
   ASSERT (Width < MAXIMUM_VALUE_CHARACTERS);\r
   //\r
@@ -162,11 +168,16 @@ BasePrintLibConvertValueToString (
   ASSERT (((Flags & COMMA_TYPE) != 0 && (Flags & RADIX_HEX) != 0) == FALSE);\r
 \r
   OriginalBuffer = Buffer;\r
-\r
+  \r
+  //\r
+  // Width is 0 or COMMA_TYPE is set, PREFIX_ZERO is ignored.\r
+  //\r
   if (Width == 0 || (Flags & COMMA_TYPE) != 0) {\r
     Flags &= (~PREFIX_ZERO);\r
   }\r
-\r
+  //\r
+  // If Width is 0 then a width of  MAXIMUM_VALUE_CHARACTERS is assumed.\r
+  //\r
   if (Width == 0) {\r
     Width = MAXIMUM_VALUE_CHARACTERS - 1;\r
   }\r
@@ -174,20 +185,32 @@ BasePrintLibConvertValueToString (
   // Set the tag for the end of the input Buffer.\r
   //\r
   EndBuffer = Buffer + Width * Increment;\r
-\r
+  \r
+  //\r
+  // Convert decimal negative\r
+  //\r
   if ((Value < 0) && ((Flags & RADIX_HEX) == 0)) {\r
     Value = -Value;\r
     Buffer = BasePrintLibFillBuffer (Buffer, EndBuffer, 1, '-', Increment);\r
     Width--;\r
   }\r
-\r
+  \r
+  //\r
+  // Count the length of the value string.\r
+  //\r
   Radix = ((Flags & RADIX_HEX) == 0)? 10 : 16;\r
   Count = BasePrintLibValueToString (ValueBuffer, Value, Radix);\r
-\r
+  \r
+  //\r
+  // Append Zero\r
+  //\r
   if ((Flags & PREFIX_ZERO) != 0) {\r
     Buffer = BasePrintLibFillBuffer (Buffer, EndBuffer, Width - Count, '0', Increment);\r
   }\r
-\r
+  \r
+  //\r
+  // Print Comma type for every 3 characters\r
+  //\r
   Digits = Count % 3;\r
   if (Digits != 0) {\r
     Digits = 3 - Digits;\r
@@ -204,7 +227,10 @@ BasePrintLibConvertValueToString (
       }\r
     }\r
   }\r
-\r
+  \r
+  //\r
+  // Print Null-terminator\r
+  //\r
   BasePrintLibFillBuffer (Buffer, EndBuffer + Increment, 1, 0, Increment);\r
 \r
   return ((Buffer - OriginalBuffer) / Increment);\r
index 62e51838e3ce22599aad30cbfc359b9071e09c44..704842a716acd5c667c7fdbacf3c87d7875bb999 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  Print Library Internal Functions.\r
+  Base Print Library instance Internal Functions definition.\r
 \r
-  Copyright (c) 2006 - 2007, 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,8 +12,8 @@
 \r
 **/\r
 \r
-#ifndef __PRINT_LIB_INTERNAL_H\r
-#define __PRINT_LIB_INTERNAL_H\r
+#ifndef __PRINT_LIB_INTERNAL_H__\r
+#define __PRINT_LIB_INTERNAL_H__\r
 \r
 #include <Base.h>\r
 #include <Library/PrintLib.h>\r
@@ -91,20 +91,21 @@ BasePrintLibVSPrint (
   VA_LIST is used this rountine allows the nesting of Vararg routines. Thus \r
   this is the main print working routine\r
 \r
-  @param  Buffer        Character buffer to print the results of the parsing\r
+  @param  StartOfBuffer Character buffer to print the results of the parsing\r
                         of Format into.\r
   @param  BufferSize    Maximum number of characters to put into buffer.\r
                         Zero means no limit.\r
   @param  Flags         Intial flags value.\r
                         Can only have FORMAT_UNICODE and OUTPUT_UNICODE set\r
   @param  FormatString  Null-terminated format string.\r
+  @param  ...           The variable argument list.\r
 \r
   @return Number of characters printed.\r
 \r
 **/\r
 UINTN\r
 BasePrintLibSPrint (\r
-  OUT CHAR8        *Buffer,\r
+  OUT CHAR8        *StartOfBuffer,\r
   IN  UINTN        BufferSize,\r
   IN  UINTN        Flags,\r
   IN  CONST CHAR8  *FormatString,\r
@@ -123,16 +124,16 @@ BasePrintLibSPrint (
   @param  Character   Character to be placed into Buffer.\r
   @param  Increment   Character increment in Buffer.\r
 \r
-  @return Number of characters printed.\r
+  @return Buffer      Buffer filled with the input Character.\r
 \r
 **/\r
 CHAR8 *\r
 BasePrintLibFillBuffer (\r
-  CHAR8   *Buffer,\r
-  CHAR8   *EndBuffer,\r
-  INTN    Length,\r
-  UINTN   Character,\r
-  INTN    Increment\r
+  OUT CHAR8   *Buffer,\r
+  IN  CHAR8   *EndBuffer,\r
+  IN  INTN    Length,\r
+  IN  UINTN   Character,\r
+  IN  INTN    Increment\r
   );\r
 \r
 /**\r
@@ -148,7 +149,6 @@ BasePrintLibFillBuffer (
 \r
 **/\r
 UINTN\r
-EFIAPI\r
 BasePrintLibValueToString (\r
   IN OUT CHAR8  *Buffer, \r
   IN INT64      Value, \r
index fefa765d7e1da045e46e0c6fcfb825a35c36b538..feba9fdd6d7a194b74c430644a9218873e852975 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  UEFI Decompress Library.\r
+  UEFI Decompress Library implementation refer to UEFI specification.\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
@@ -23,7 +23,7 @@
 #include "BaseUefiDecompressLibInternals.h"\r
 \r
 /**\r
-  Read NumOfBit of bits from source into mBitBuf\r
+  Read NumOfBit of bits from source into mBitBuf.\r
 \r
   Shift mBitBuf NumOfBits left. Read in NumOfBits of bits from source.\r
 \r
@@ -79,7 +79,7 @@ FillBuf (
 }\r
 \r
 /**\r
-  Get NumOfBits of bits out from mBitBuf\r
+  Get NumOfBits of bits out from mBitBuf.\r
 \r
   Get NumOfBits of bits out from mBitBuf. Fill mBitBuf with subsequent \r
   NumOfBits of bits from source. Returns NumOfBits of bits that are \r
@@ -122,7 +122,7 @@ GetBits (
   @param  NumOfChar Number of symbols in the symbol set\r
   @param  BitLen    Code length array\r
   @param  TableBits The width of the mapping table\r
-  @param  Table     The table\r
+  @param  Table     The table to be created\r
 \r
   @retval  0 OK.\r
   @retval  BAD_TABLE The table is corrupted.\r
@@ -225,7 +225,7 @@ MakeTable (
           *Pointer = Avail++;\r
         }\r
 \r
-        if (Index3 & Mask) {\r
+        if ((Index3 & Mask) != 0) {\r
           Pointer = &Sd->mRight[*Pointer];\r
         } else {\r
           Pointer = &Sd->mLeft[*Pointer];\r
@@ -273,7 +273,7 @@ DecodeP (
 \r
     do {\r
 \r
-      if (Sd->mBitBuf & Mask) {\r
+      if ((Sd->mBitBuf & Mask) != 0) {\r
         Val = Sd->mRight[Val];\r
       } else {\r
         Val = Sd->mLeft[Val];\r
@@ -542,7 +542,7 @@ DecodeC (
     Mask = 1U << (BITBUFSIZ - 1 - 12);\r
 \r
     do {\r
-      if (Sd->mBitBuf & Mask) {\r
+      if ((Sd->mBitBuf & Mask) != 0) {\r
         Index2 = Sd->mRight[Index2];\r
       } else {\r
         Index2 = Sd->mLeft[Index2];\r
@@ -561,9 +561,7 @@ DecodeC (
 \r
 /**\r
   Decode the source data and put the resulting data into the destination buffer.\r
-\r
-  Decode the source data and put the resulting data into the destination buffer.\r
-  \r
\r
   @param  Sd The global scratch data\r
 \r
 **/\r
@@ -638,7 +636,9 @@ Done:
 }\r
 \r
 /**\r
-  Retrieves the size of the uncompressed buffer and the size of the scratch buffer.\r
+  Given a compressed source buffer, this function retrieves the size of \r
+  the uncompressed buffer and the size of the scratch buffer required \r
+  to decompress the compressed source buffer.\r
 \r
   Retrieves the size of the uncompressed buffer and the temporary scratch buffer \r
   required to decompress the buffer specified by Source and SourceSize.\r
@@ -665,10 +665,14 @@ Done:
                           is required to decompress the compressed buffer specified \r
                           by Source and SourceSize.\r
 \r
-  @retval  RETURN_SUCCESS The size of destination buffer and the size of scratch \r
-                          buffer are successull retrieved.\r
-  @retval  RETURN_INVALID_PARAMETER The source data is corrupted\r
-\r
+  @retval  RETURN_SUCCESS The size of the uncompressed data was returned \r
+                          in DestinationSize and the size of the scratch \r
+                          buffer was returned in ScratchSize.\r
+  @retval  RETURN_INVALID_PARAMETER \r
+                          The size of the uncompressed data or the size of \r
+                          the scratch buffer cannot be determined from \r
+                          the compressed data specified by Source \r
+                          and SourceSize.\r
 **/\r
 RETURN_STATUS\r
 EFIAPI\r
@@ -704,6 +708,7 @@ UefiDecompressGetInfo (
 /**\r
   Decompresses a compressed source buffer.\r
 \r
+  Extracts decompressed data to its original form.\r
   This function is designed so that the decompression algorithm can be implemented\r
   without using any memory services.  As a result, this function is not allowed to\r
   call any memory allocation services in its implementation.  It is the caller's r\r
@@ -723,9 +728,11 @@ UefiDecompressGetInfo (
                       This is an optional parameter that may be NULL if the \r
                       required scratch buffer size is 0.\r
                      \r
-  @retval  RETURN_SUCCESS Decompression is successfull\r
-  @retval  RETURN_INVALID_PARAMETER The source data is corrupted\r
-\r
+  @retval  RETURN_SUCCESS Decompression completed successfully, and \r
+                          the uncompressed buffer is returned in Destination.\r
+  @retval  RETURN_INVALID_PARAMETER \r
+                          The source buffer specified by Source is corrupted \r
+                          (not in a valid compressed format).\r
 **/\r
 RETURN_STATUS\r
 EFIAPI\r
@@ -769,7 +776,6 @@ UefiDecompress (
   //\r
   // The length of the field 'Position Set Code Length Array Size' in Block Header.\r
   // For UEFI 2.0 de/compression algorithm(Version 1), mPBit = 4\r
-  // For Tiano de/compression algorithm(Version 2), mPBit = 5\r
   //\r
   Sd->mPBit     = 4;\r
   Sd->mSrcBase  = (UINT8 *)Src;\r
index 84638866b5e55dd7d059ff13702ec2958d163862..57a44a502fde0bbefacb042e6e3a4b07740c0b22 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  Internal include file for Base UEFI Decompress Libary.\r
+  Internal data structure defintions for Base UEFI Decompress Libary.\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
@@ -40,8 +40,8 @@
 #endif\r
 \r
 typedef struct {\r
-  UINT8   *mSrcBase;  ///< Starting address of compressed data\r
-  UINT8   *mDstBase;  ///< Starting address of decompressed data\r
+  UINT8   *mSrcBase;  // Starting address of compressed data\r
+  UINT8   *mDstBase;  // Starting address of decompressed data\r
   UINT32  mOutBuf;\r
   UINT32  mInBuf;\r
 \r
@@ -64,13 +64,12 @@ typedef struct {
   ///\r
   /// The length of the field 'Position Set Code Length Array Size' in Block Header.\r
   /// For UEFI 2.0 de/compression algorithm, mPBit = 4\r
-  /// For Tiano de/compression algorithm, mPBit = 5\r
   ///\r
   UINT8   mPBit;\r
 } SCRATCH_DATA;\r
 \r
 /**\r
-  Read NumOfBit of bits from source into mBitBuf\r
+  Read NumOfBit of bits from source into mBitBuf.\r
 \r
   Shift mBitBuf NumOfBits left. Read in NumOfBits of bits from source.\r
 \r
@@ -85,7 +84,7 @@ FillBuf (
   );\r
 \r
 /**\r
-  Get NumOfBits of bits out from mBitBuf\r
+  Get NumOfBits of bits out from mBitBuf.\r
 \r
   Get NumOfBits of bits out from mBitBuf. Fill mBitBuf with subsequent\r
   NumOfBits of bits from source. Returns NumOfBits of bits that are\r
@@ -113,7 +112,7 @@ GetBits (
   @param  NumOfChar Number of symbols in the symbol set\r
   @param  BitLen    Code length array\r
   @param  TableBits The width of the mapping table\r
-  @param  Table     The table\r
+  @param  Table     The table to be created.\r
 \r
   @retval  0 OK.\r
   @retval  BAD_TABLE The table is corrupted.\r
@@ -200,8 +199,6 @@ DecodeC (
 /**\r
   Decode the source data and put the resulting data into the destination buffer.\r
 \r
-  Decode the source data and put the resulting data into the destination buffer.\r
-\r
   @param  Sd The global scratch data\r
 \r
 **/\r
index 4fc33ee402370d510ed7b9a5ce67bff3c2cf8fba..b98761a9e52e54c17ce9fd70fbcde242768e6fcb 100644 (file)
@@ -1,7 +1,8 @@
 /** @file\r
-  UEFI Debug Library that uses PrintLib to send messages to CONOUT.\r
+  Base Debug library instance base on Serial Port library.\r
+  It uses PrintLib to send debug messages to serial port device.\r
 \r
-  Copyright (c) 2006, Intel Corporation<BR>\r
+  Copyright (c) 2006 - 2008, Intel Corporation<BR>\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
@@ -39,6 +40,7 @@
 \r
   @param  ErrorLevel  The error level of the debug message.\r
   @param  Format      Format string for the debug message to print.\r
+  @param  ...         The variable argument list.\r
 \r
 **/\r
 VOID\r
@@ -143,10 +145,10 @@ DebugAssert (
 \r
   If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT(). \r
 \r
-  @param   Buffer  Pointer to the target buffer to fill with PcdDebugClearMemoryValue.\r
+  @param   Buffer  Pointer to the target buffer to be filled with PcdDebugClearMemoryValue.\r
   @param   Length  Number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue. \r
 \r
-  @return  Buffer\r
+  @return  Buffer  Pointer to the target buffer filled with PcdDebugClearMemoryValue.\r
 \r
 **/\r
 VOID *\r
@@ -235,11 +237,11 @@ DebugCodeEnabled (
   \r
   Returns TRUE if DEBUG_CLEAR_MEMORY()macro is enabled.\r
 \r
-  This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of \r
+  This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of \r
   PcdDebugProperyMask is set.  Otherwise FALSE is returned.\r
 \r
-  @retval  TRUE    The DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set.\r
-  @retval  FALSE   The DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is clear.\r
+  @retval  TRUE    The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set.\r
+  @retval  FALSE   The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is clear.\r
 \r
 **/\r
 BOOLEAN\r
index be9f1b91cedb1bd1089809a098a16a0fca933cc5..9eb047fd94d45fe1c3beda95c5d0d0dc2abd8dbd 100644 (file)
@@ -1,8 +1,8 @@
 #/** @file\r
-# Debug Library for Dxe drivers\r
+#  Base Debug library instance base on Serial Port library.\r
+#  It uses PrintLib to send debug messages to serial port device.\r
 #\r
-# Library to abstract Framework extensions that conflict with UEFI 2.0 Specification\r
-# Copyright (c) 2006 - 2007, Intel Corporation.\r
+#  Copyright (c) 2006 - 2008, Intel Corporation.\r
 #\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
index 752594484c4bc6611a4129e6848f3dc2cadffec4..b98e8f3ae96c9e726a1b3f2d954cecbac1033955 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  Provide generic extract guided section functions.\r
+  Provide generic extract guided section functions for Dxe phase.\r
 \r
-  Copyright (c) 2007, Intel Corporation<BR>\r
+  Copyright (c) 2007 - 2008, Intel Corporation<BR>\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
@@ -69,17 +69,19 @@ DxeExtractGuidedSectionLibConstructor (
 }\r
 \r
 /**
-  Get the supported exract guided section Handler guid list.\r
-  If ExtractHandlerGuidTable = NULL, then ASSERT.\r
+  Get the supported exract guided section Handler guid table, which is maintained\r
+  by library. The caller can directly get the guid table \r
+  without responsibility to allocate or free this table buffer.  \r
+  It will ASSERT () if ExtractHandlerGuidTable = NULL.\r
 \r
-  @param[in, out]  ExtractHandlerGuidTable   The extract Handler guid pointer list.
+  @param[out]  ExtractHandlerGuidTable   The extract Handler guid pointer list.
 \r
-  @retval  return the number of the supported extract guided Handler.
+  @return the number of the supported extract guided Handler.
 **/\r
 UINTN\r
 EFIAPI\r
 ExtractGuidedSectionGetGuidList (\r
-  IN OUT  GUID  **ExtractHandlerGuidTable\r
+  OUT  GUID  **ExtractHandlerGuidTable\r
   )\r
 {\r
   ASSERT (ExtractHandlerGuidTable != NULL);\r
@@ -167,8 +169,8 @@ ExtractGuidedSectionRegisterHandlers (
   @param[out] SectionAttribute      The attribute of the input guided section.\r
 
   @retval  RETURN_SUCCESS           Get the required information successfully.\r
-  @retval  RETURN_INVALID_PARAMETER The input data can't be parsed correctly. \r
-                                    The GUID in InputSection does not match any registered guid list.\r
+  @retval  RETURN_UNSUPPORTED       Guided section data is not supported.\r
+  @retval  RETURN_INVALID_PARAMETER The input data is not the valid guided section.\r
 \r
 **/\r
 RETURN_STATUS\r
@@ -203,7 +205,7 @@ ExtractGuidedSectionGetInfo (
   // Not found, the input guided section is not supported. \r
   //\r
   if (Index == mNumberOfExtractHandler) {\r
-    return RETURN_INVALID_PARAMETER;\r
+    return RETURN_UNSUPPORTED;\r
   }\r
 \r
   //\r
@@ -237,9 +239,9 @@ ExtractGuidedSectionGetInfo (
                             A pointer to a caller-allocated UINT32 that indicates the\r
                             authentication status of the output buffer. 
 
-  @retval  RETURN_SUCCESS           Get the output data, size and AuthenticationStatus successfully.\r
-  @retval  RETURN_INVALID_PARAMETER The input data can't be parsed correctly. \r
-                                    The GUID in InputSection does not match any registered guid.\r
+  @retval  RETURN_SUCCESS           Get the output data and AuthenticationStatus successfully.\r
+  @retval  RETURN_UNSUPPORTED       Guided section data is not supported to be decoded.\r
+  @retval  RETURN_INVALID_PARAMETER The input data is not the valid guided section.
 
 **/\r
 RETURN_STATUS\r
@@ -253,6 +255,9 @@ ExtractGuidedSectionDecode (
 {\r
   UINT32 Index;\r
   \r
+  //\r
+  // Check the input parameters\r
+  //\r
   if (InputSection == NULL) {\r
     return RETURN_INVALID_PARAMETER;\r
   }\r
@@ -261,7 +266,7 @@ ExtractGuidedSectionDecode (
   ASSERT (AuthenticationStatus != NULL);\r
 \r
   //\r
-  // Search the match registered GetInfo handler for the input guided section.\r
+  // Search the match registered extract handler for the input guided section.\r
   //\r
   for (Index = 0; Index < mNumberOfExtractHandler; Index ++) {\r
     if (CompareGuid (&mExtractHandlerGuidTable[Index], &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid))) {\r
@@ -273,11 +278,11 @@ ExtractGuidedSectionDecode (
   // Not found, the input guided section is not supported. \r
   //\r
   if (Index == mNumberOfExtractHandler) {\r
-    return RETURN_INVALID_PARAMETER;\r
+    return RETURN_UNSUPPORTED;\r
   }\r
 \r
   //\r
-  // Call the match handler to getinfo for the input section data.\r
+  // Call the match handler to extract raw data for the input section data.\r
   //\r
   return mExtractDecodeHandlerTable [Index] (\r
             InputSection,\r
index e61291dbdd72cb31ce7ad85be7beb77b43e58803..7bed5477e0a786775384d6c24a7e9da89a1a0a44 100644 (file)
@@ -2,7 +2,7 @@
 # Component description file for DXE ExtractGuidedSection Library\r
 #\r
 # This library provides generic extract guided section functions for DXE module.\r
-# Copyright (c) 2007, Intel Corporation.\r
+# Copyright (c) 2007 - 2008, Intel Corporation.\r
 #\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
@@ -20,7 +20,7 @@
   FILE_GUID                      = f773469b-e265-4b0c-b0a6-2f971fbfe72b\r
   MODULE_TYPE                    = DXE_DRIVER\r
   VERSION_STRING                 = 1.0\r
-  LIBRARY_CLASS                  = ExtractGuidedSectionLib\r
+  LIBRARY_CLASS                  = ExtractGuidedSectionLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER \r
   EDK_RELEASE_VERSION            = 0x00020000\r
   EFI_SPECIFICATION_VERSION      = 0x00020000\r
 \r
index 3d5901548be4d282d1bc3eb60165392901670916..1b8cd899c3f219362f773863328a06f935a970b6 100644 (file)
@@ -1,7 +1,8 @@
 /** @file\r
-  Report Status Code Library Post Code functions for DXE Phase.\r
+  Post code library instace bases on report status code library\r
+  PostCode Library for PEIMs and DXE drivers that send PostCode to ReportStatusCode\r
 \r
-  Copyright (c) 2006, Intel Corporation<BR>\r
+  Copyright (c) 2006 - 2008, Intel Corporation<BR>\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
   display the 32-bit value on the status reporting device.\r
 \r
   PostCode() must actively prevent recursion.  If PostCode() is called while\r
-  processing another any other Report Status Code Library function, then\r
+  processing another any other Post Code Library function, then\r
   PostCode() must return Value immediately.\r
 \r
   @param  Value  The 32-bit value to write to the POST card.\r
 \r
-  @return  Value\r
+  @return  Value The 32-bit value to write to the POST card.\r
 \r
 **/\r
 UINT32\r
@@ -76,8 +77,8 @@ PostCode (
   value on the status reporting device.\r
 \r
   PostCodeWithDescription()must actively prevent recursion.  If\r
-  PostCodeWithDescription() is called while processing another any other Report\r
-  Status Code Library function, then PostCodeWithDescription() must return Value\r
+  PostCodeWithDescription() is called while processing another any other Post\r
+  Code Library function, then PostCodeWithDescription() must return Value\r
   immediately.\r
 \r
   @param  Value        The 32-bit value to write to the POST card.\r
@@ -85,7 +86,7 @@ PostCode (
                        POST code value.  This is an optional parameter that may\r
                        be NULL.\r
 \r
-  @return  Value\r
+  @return  Value       The 32-bit value to write to the POST card.\r
 \r
 **/\r
 UINT32\r
@@ -138,14 +139,13 @@ PostCodeEnabled (
 /**\r
   Returns TRUE if POST code descriptions are enabled.\r
 \r
-  This function returns TRUE if the\r
-  POST_CODE_PROPERTY_POST_CODE_ENABLED bit of\r
-  PcdPostCodePropertyMask is set.  Otherwise FALSE is returned.\r
+  This function returns TRUE if the POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED\r
+  bit of PcdPostCodePropertyMask is set.  Otherwise FALSE is returned.\r
 \r
-  @retval  TRUE   The POST_CODE_PROPERTY_POST_CODE_ENABLED\r
-                  bit of PcdPostCodeProperyMask is set.\r
-  @retval  FALSE  The POST_CODE_PROPERTY_POST_CODE_ENABLED\r
-                  bit of PcdPostCodeProperyMask is clear.\r
+  @retval  TRUE   The POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED bit of\r
+                  PcdPostCodeProperyMask is set.\r
+  @retval  FALSE  The POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED bit of\r
+                  PcdPostCodeProperyMask is clear.\r
 \r
 **/\r
 BOOLEAN\r
@@ -154,5 +154,6 @@ PostCodeDescriptionEnabled (
   VOID\r
   )\r
 {\r
-  return (BOOLEAN) ((PcdGet8(PcdPostCodePropertyMask) & POST_CODE_PROPERTY_POST_CODE_ENABLED) != 0);\r
+  return (BOOLEAN) ((PcdGet8(PcdPostCodePropertyMask) & POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED) != 0);\r
 }\r
+\r
index aa6c2fa33e10e9a8b121b9c751c8d052c18b1ed5..2b09c46cc9d9151986d194f461f82fd8cf8ceea3 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  Provide generic extract guided section functions.\r
+  Provide generic extract guided section functions for PEI phase.\r
 \r
-  Copyright (c) 2007, Intel Corporation<BR>\r
+  Copyright (c) 2007 - 2008, Intel Corporation<BR>\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
@@ -97,6 +97,9 @@ PeiGetExtractGuidedSectionHandlerInfo (
     //\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
+  //\r
+  // Init HandlerInfo structure\r
+  //\r
   HandlerInfo->Signature = PEI_EXTRACT_HANDLER_INFO_SIGNATURE;\r
   HandlerInfo->NumberOfExtractHandler     = 0;\r
   HandlerInfo->ExtractHandlerGuidTable    = (GUID *) (HandlerInfo + 1);\r
@@ -109,7 +112,9 @@ PeiGetExtractGuidedSectionHandlerInfo (
                                               PcdGet32 (PcdMaximumGuidedExtractHandler) * \r
                                               sizeof (EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER)\r
                                              );\r
-  \r
+  //\r
+  // return the created HandlerInfo.\r
+  //\r
   *InfoPointer = HandlerInfo;\r
   return EFI_SUCCESS;\r
 }\r
@@ -118,14 +123,14 @@ PeiGetExtractGuidedSectionHandlerInfo (
   Get the supported exract guided section Handler guid list.\r
   If ExtractHandlerGuidTable = NULL, then ASSERT.\r
 \r
-  @param[in, out]  ExtractHandlerGuidTable   The extract Handler guid pointer list.
+  @param[out]  ExtractHandlerGuidTable   The extract Handler guid pointer list.
 \r
-  @retval  return the number of the supported extract guided Handler.
+  @return the number of the supported extract guided Handler.
 **/\r
 UINTN\r
 EFIAPI\r
 ExtractGuidedSectionGetGuidList (\r
-  IN OUT  GUID  **ExtractHandlerGuidTable\r
+  OUT  GUID  **ExtractHandlerGuidTable\r
   )\r
 {\r
   EFI_STATUS Status;\r
@@ -133,11 +138,17 @@ ExtractGuidedSectionGetGuidList (
 \r
   ASSERT (ExtractHandlerGuidTable != NULL);\r
 \r
+  //\r
+  // Get all registered handler information\r
+  //\r
   Status = PeiGetExtractGuidedSectionHandlerInfo (&HandlerInfo);\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
 \r
+  //\r
+  // Get GuidTable and Table Number\r
+  //\r
   *ExtractHandlerGuidTable = HandlerInfo->ExtractHandlerGuidTable;\r
   return HandlerInfo->NumberOfExtractHandler;\r
 }\r
@@ -232,8 +243,8 @@ ExtractGuidedSectionRegisterHandlers (
   @param[out] SectionAttribute      The attribute of the input guided section.\r
 
   @retval  RETURN_SUCCESS           Get the required information successfully.\r
-  @retval  RETURN_INVALID_PARAMETER The input data can't be parsed correctly. \r
-                                    The GUID in InputSection does not match any registered guid list.\r
+  @retval  RETURN_UNSUPPORTED       Guided section data is not supported.\r
+  @retval  RETURN_INVALID_PARAMETER The input data is not the valid guided section.\r
 \r
 **/\r
 RETURN_STATUS\r
@@ -261,7 +272,7 @@ ExtractGuidedSectionGetInfo (
   ASSERT (SectionAttribute != NULL);\r
 \r
   //\r
-  // Get the registered handler information.\r
+  // Get all registered handler information.\r
   //\r
   Status = PeiGetExtractGuidedSectionHandlerInfo (&HandlerInfo);\r
   if (EFI_ERROR (Status)) {\r
@@ -281,7 +292,7 @@ ExtractGuidedSectionGetInfo (
   // Not found, the input guided section is not supported. \r
   //\r
   if (Index == HandlerInfo->NumberOfExtractHandler) {\r
-    return RETURN_INVALID_PARAMETER;\r
+    return RETURN_UNSUPPORTED;\r
   }\r
 \r
   //\r
@@ -316,8 +327,8 @@ ExtractGuidedSectionGetInfo (
                             authentication status of the output buffer. 
 
   @retval  RETURN_SUCCESS           Get the output data, size and AuthenticationStatus successfully.\r
-  @retval  RETURN_INVALID_PARAMETER The input data can't be parsed correctly. \r
-                                    The GUID in InputSection does not match any registered guid list.\r
+  @retval  RETURN_UNSUPPORTED       Guided section data is not supported to be decoded.\r
+  @retval  RETURN_INVALID_PARAMETER The input data is not the valid guided section.
 
 **/\r
 RETURN_STATUS\r
@@ -333,20 +344,25 @@ ExtractGuidedSectionDecode (
   EFI_STATUS Status;\r
   PEI_EXTRACT_GUIDED_SECTION_HANDLER_INFO *HandlerInfo;\r
   \r
+  //\r
+  // Check input parameter\r
+  //\r
   if (InputSection == NULL) {\r
     return RETURN_INVALID_PARAMETER;\r
-  }\r
-  \r
+  }  \r
   ASSERT (OutputBuffer != NULL);\r
   ASSERT (AuthenticationStatus != NULL);\r
-  \r
+\r
+  //\r
+  // Get all registered handler information.\r
+  //  \r
   Status = PeiGetExtractGuidedSectionHandlerInfo (&HandlerInfo);\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
 \r
   //\r
-  // Search the match registered GetInfo handler for the input guided section.\r
+  // Search the match registered Extract handler for the input guided section.\r
   //\r
   for (Index = 0; Index < HandlerInfo->NumberOfExtractHandler; Index ++) {\r
     if (CompareGuid (HandlerInfo->ExtractHandlerGuidTable + Index, &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid))) {\r
@@ -358,11 +374,11 @@ ExtractGuidedSectionDecode (
   // Not found, the input guided section is not supported. \r
   //\r
   if (Index == HandlerInfo->NumberOfExtractHandler) {\r
-    return RETURN_INVALID_PARAMETER;\r
+    return RETURN_UNSUPPORTED;\r
   }\r
 \r
   //\r
-  // Call the match handler to getinfo for the input section data.\r
+  // Call the match handler to extract raw data for the input guided section.\r
   //\r
   return HandlerInfo->ExtractDecodeHandlerTable [Index] (\r
             InputSection,\r
index c80ea1c9d8eef41f71fe69dc69ab7dfb19f5936d..d0853d261e947d55efb14e2b051f663f87ab6a60 100644 (file)
@@ -2,7 +2,7 @@
 # Component description file for PEIM ExtractGuidedSection Library\r
 #\r
 # This library provides generic extract guided section functions for PEIM and PEI_CORE module.\r
-# Copyright (c) 2007, Intel Corporation.\r
+# Copyright (c) 2007 - 2008, Intel Corporation.\r
 #\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
@@ -20,7 +20,7 @@
   FILE_GUID                      = 41ddf016-2a11-415f-8880-00d938e9541a\r
   MODULE_TYPE                    = PEIM\r
   VERSION_STRING                 = 1.0\r
-  LIBRARY_CLASS                  = ExtractGuidedSectionLib\r
+  LIBRARY_CLASS                  = ExtractGuidedSectionLib|PEIM PEI_CORE\r
   EDK_RELEASE_VERSION            = 0x00020000\r
   EFI_SPECIFICATION_VERSION      = 0x00020000\r
 \r
index 78223fcbe00c89e00ba43e4f8314e745411be393..1fdc6586a5612ba9f5f5d7b37f17f2a088aaea22 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  Serial I/O Port library functions with no library constructor/destructor\r
+  Null Serial Port library instance with empty functions.\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
 \r
 #include <Library/SerialPortLib.h>\r
 \r
-/*\r
-\r
+/**\r
   Programmed hardware of Serial port.\r
 \r
-  @return    Always return EFI_UNSUPPORTED.\r
+  @return    Always return RETURN_UNSUPPORTED.\r
 \r
 **/\r
 RETURN_STATUS\r
@@ -40,8 +39,7 @@ SerialPortInitialize (
   @param  Buffer           Point of data buffer which need to be writed.\r
   @param  NumberOfBytes    Number of output bytes which are cached in Buffer.\r
 \r
-  @retval 0                Write data failed.\r
-  @retval !0               Actual number of bytes writed to serial device.\r
+  @retval 0                No data is to be written.\r
 \r
 **/\r
 UINTN\r
@@ -58,11 +56,11 @@ SerialPortWrite (
 /**\r
   Read data from serial device and save the datas in buffer.\r
 \r
-  @param  Buffer           Point of data buffer which need to be writed.\r
-  @param  NumberOfBytes    Number of output bytes which are cached in Buffer.\r
+  @param  Buffer           Point of data buffer, which contains the data \r
+                           returned from the serial device.\r
+  @param  NumberOfBytes    Number of bytes which will be read.\r
 \r
-  @retval 0                Read data failed.\r
-  @retval !0               Aactual number of bytes read from serial device.\r
+  @retval 0                No data is to be read.\r
 \r
 **/\r
 UINTN\r
index bc27b584aa4ea753647405b8096d54f41dc38820..a6d436c8df1e2796dcf9939dd381a26f8709d029 100644 (file)
@@ -1,8 +1,7 @@
 #/** @file\r
-# Memory Status Code Library for UEFI drivers\r
+#  Null Serial Port library instance with empty functions\r
 #\r
-# Lib to provide memory journal status code reporting Routines\r
-# Copyright (c) 2006, Intel Corporation.\r
+#  Copyright (c) 2006 - 2008, Intel Corporation.\r
 #\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
@@ -18,7 +17,7 @@
   INF_VERSION                    = 0x00010005\r
   BASE_NAME                      = SerialPortLibNull\r
   FILE_GUID                      = E4541241-8897-411a-91F8-7D7E45837146\r
-  MODULE_TYPE                    = PEIM\r
+  MODULE_TYPE                    = BASE\r
   VERSION_STRING                 = 1.0\r
   LIBRARY_CLASS                  = SerialPortLib\r
   EDK_RELEASE_VERSION            = 0x00020000\r
index ff4de53729b425722fc392b063d2f23516563cc8..393c69869074be1a7c32f7562c415db08689f32f 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  UEFI Debug Library that uses PrintLib to send messages to CONOUT.\r
+  UEFI Debug Library that sends messages to the Console Output Device in the EFI System Table.\r
 \r
-  Copyright (c) 2006 - 2007, Intel Corporation<BR>\r
+  Copyright (c) 2006 - 2008, Intel Corporation<BR>\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
@@ -42,6 +42,7 @@
 \r
   @param  ErrorLevel  The error level of the debug message.\r
   @param  Format      Format string for the debug message to print.\r
+  @param  ...         The variable argument list.\r
 \r
 **/\r
 VOID\r
@@ -155,10 +156,10 @@ DebugAssert (
 \r
   If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT(). \r
 \r
-  @param   Buffer  Pointer to the target buffer to fill with PcdDebugClearMemoryValue.\r
+  @param   Buffer  Pointer to the target buffer to be filled with PcdDebugClearMemoryValue.\r
   @param   Length  Number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue. \r
 \r
-  @return  Buffer\r
+  @return  Buffer  Pointer to the target buffer filled with PcdDebugClearMemoryValue.\r
 \r
 **/\r
 VOID *\r
@@ -247,11 +248,11 @@ DebugCodeEnabled (
   \r
   Returns TRUE if DEBUG_CLEAR_MEMORY()macro is enabled.\r
 \r
-  This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of \r
+  This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of \r
   PcdDebugProperyMask is set.  Otherwise FALSE is returned.\r
 \r
-  @retval  TRUE    The DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set.\r
-  @retval  FALSE   The DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is clear.\r
+  @retval  TRUE    The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set.\r
+  @retval  FALSE   The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is clear.\r
 \r
 **/\r
 BOOLEAN\r
index 0a51c142c4a00fa33befd0537500b25b937d9bcf..f918ad9684c12d2c5be4cad3eccdcea9a309f5a3 100644 (file)
@@ -1,8 +1,7 @@
 #/** @file\r
-# Debug Library for UEFI drivers\r
 #\r
-# Library to abstract Framework extensions that conflict with UEFI 2.0 Specification\r
-# Copyright (c) 2007, Intel Corporation.\r
+#  Debug Lib that sends messages to the Console Output Device in the EFI System Table.\r
+#  Copyright (c) 2007 - 2008, Intel Corporation.\r
 #\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
index 50bb2bc50e43e6d803a32da2323beb7e8e9b6c56..a7d4d2829bdcac7a770532d7b87c853916183f19 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  UEFI Debug Library that uses PrintLib to send messages to STDERR.\r
+  UEFI Debug Lib that sends messages to the Standard Error Device in the EFI System Table.\r
 \r
-  Copyright (c) 2006 - 2007, Intel Corporation<BR>\r
+  Copyright (c) 2006 - 2008, Intel Corporation<BR>\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
@@ -41,6 +41,7 @@
 \r
   @param  ErrorLevel  The error level of the debug message.\r
   @param  Format      Format string for the debug message to print.\r
+  @param  ...         The variable argument list.\r
 \r
 **/\r
 VOID\r
@@ -156,7 +157,7 @@ DebugAssert (
   @param   Buffer  Pointer to the target buffer to fill with PcdDebugClearMemoryValue.\r
   @param   Length  Number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue. \r
 \r
-  @return  Buffer\r
+  @return  Buffer  Pointer to the target buffer filled with PcdDebugClearMemoryValue.\r
 \r
 **/\r
 VOID *\r
@@ -245,11 +246,11 @@ DebugCodeEnabled (
   \r
   Returns TRUE if DEBUG_CLEAR_MEMORY()macro is enabled.\r
 \r
-  This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of \r
+  This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of \r
   PcdDebugProperyMask is set.  Otherwise FALSE is returned.\r
 \r
-  @retval  TRUE    The DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set.\r
-  @retval  FALSE   The DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is clear.\r
+  @retval  TRUE    The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set.\r
+  @retval  FALSE   The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is clear.\r
 \r
 **/\r
 BOOLEAN\r
index de03bc64c61e1758aede94b37613af0cd33cde34..672e582b7bd9e1dfd4e1f1ff89b16d1b1386532d 100644 (file)
@@ -1,8 +1,8 @@
 #/** @file\r
-# Debug Library for UEFI drivers\r
 #\r
-# Library to abstract Framework extensions that conflict with UEFI 2.0 Specification\r
-# Copyright (c) 2007, Intel Corporation.\r
+#  UEFI Debug Lib that sends messages to the Standard Error Device in the EFI System Table.\r
+#\r
+#  Copyright (c) 2007 - 2008, Intel Corporation.\r
 #\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