From eceb3a4cb9b97d331ba91ea0a930465c05e8e20b Mon Sep 17 00:00:00 2001 From: lgao4 Date: Tue, 15 Jul 2008 11:12:43 +0000 Subject: [PATCH] Code scrub for the Debug library, PostCode library, Print library, and ExtractGuidedSection library. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5478 6f19259b-4bc3-4df7-8a09-765794883524 --- MdePkg/Include/Library/DebugLib.h | 11 ++-- .../Include/Library/ExtractGuidedSectionLib.h | 34 +++++------ MdePkg/Include/Library/PostCodeLib.h | 32 +++++----- MdePkg/Include/Library/PrintLib.h | 22 ++++--- MdePkg/Include/Library/SerialPortLib.h | 20 +++---- MdePkg/Include/Library/UefiDecompressLib.h | 34 +++++++---- .../BaseDebugLibNull/BaseDebugLibNull.inf | 5 +- MdePkg/Library/BaseDebugLibNull/DebugLib.c | 13 ++--- .../BasePostCodeLibDebug.inf | 3 +- .../Library/BasePostCodeLibDebug/PostCode.c | 24 ++++---- .../Library/BasePostCodeLibPort80/PostCode.c | 31 +++++----- MdePkg/Library/BasePrintLib/BasePrintLib.inf | 4 +- MdePkg/Library/BasePrintLib/PrintLib.c | 30 +++++----- .../Library/BasePrintLib/PrintLibInternal.c | 58 ++++++++++++++----- .../Library/BasePrintLib/PrintLibInternal.h | 26 ++++----- .../BaseUefiDecompressLib.c | 46 ++++++++------- .../BaseUefiDecompressLibInternals.h | 17 +++--- .../Library/DxeDebugLibSerialPort/DebugLib.c | 16 ++--- .../DxeDebugLibSerialPort.inf | 6 +- .../DxeExtractGuidedSectionLib.c | 37 +++++++----- .../DxeExtractGuidedSectionLib.inf | 4 +- .../PostCode.c | 31 +++++----- .../PeiExtractGuidedSectionLib.c | 52 +++++++++++------ .../PeiExtractGuidedSectionLib.inf | 4 +- .../SerialPortLibNull/SerialPortLibNull.c | 20 +++---- .../SerialPortLibNull/SerialPortLibNull.inf | 7 +-- MdePkg/Library/UefiDebugLibConOut/DebugLib.c | 15 ++--- .../UefiDebugLibConOut/UefiDebugLibConOut.inf | 5 +- MdePkg/Library/UefiDebugLibStdErr/DebugLib.c | 13 +++-- .../UefiDebugLibStdErr/UefiDebugLibStdErr.inf | 6 +- 30 files changed, 348 insertions(+), 278 deletions(-) diff --git a/MdePkg/Include/Library/DebugLib.h b/MdePkg/Include/Library/DebugLib.h index 47ac3dc4f2..5f0c923fb4 100644 --- a/MdePkg/Include/Library/DebugLib.h +++ b/MdePkg/Include/Library/DebugLib.h @@ -75,6 +75,7 @@ @param ErrorLevel The error level of the debug message. @param Format Format string for the debug message to print. + @param ... The variable argument list. **/ VOID @@ -129,10 +130,10 @@ DebugAssert ( If Length is greater than (MAX_ADDRESS ?Buffer + 1), then ASSERT(). - @param Buffer Pointer to the target buffer to fill with PcdDebugClearMemoryValue. + @param Buffer Pointer to the target buffer to be filled with PcdDebugClearMemoryValue. @param Length Number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue. - @return Buffer + @return Buffer Pointer to the target buffer filled with PcdDebugClearMemoryValue. **/ VOID * @@ -201,11 +202,11 @@ DebugCodeEnabled ( Returns TRUE if DEBUG_CLEAR_MEMORY()macro is enabled. - This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of + This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set. Otherwise FALSE is returned. - @retval TRUE The DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set. - @retval FALSE The DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is clear. + @retval TRUE The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set. + @retval FALSE The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is clear. **/ BOOLEAN diff --git a/MdePkg/Include/Library/ExtractGuidedSectionLib.h b/MdePkg/Include/Library/ExtractGuidedSectionLib.h index 27faeeceb0..72e979d0e3 100644 --- a/MdePkg/Include/Library/ExtractGuidedSectionLib.h +++ b/MdePkg/Include/Library/ExtractGuidedSectionLib.h @@ -1,7 +1,8 @@ /** @file - Extract Guided Section Library class + Extract Guided Section Library class defintions, + which can provide many handlers for the different guided section data. - Copyright (c) 2007, Intel Corporation + Copyright (c) 2007 - 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 @@ -10,13 +11,12 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - ExtractGuidedSectionLib.h **/ #ifndef __EXTRACT_GUIDED_SECTION_H__ #define __EXTRACT_GUIDED_SECTION_H__ /** - Get information Handler for the input guided section data. + Get information for the input guided section data. It will ASSERT () if the pointer to OutputBufferSize is NULL. It will ASSERT () if the pointer to ScratchBufferSize is NULL. It will ASSERT () if the pointer to SectionAttribute is NULL. @@ -27,7 +27,7 @@ @param[out] SectionAttribute The attribute of the input guided section. @retval RETURN_SUCCESS Get the required information successfully. - @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. **/ typedef @@ -40,21 +40,21 @@ RETURN_STATUS ); /** - 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. It will ASSERT () if the pointer to AuthenticationStatus is NULL. @param[in] InputSection Buffer containing the input GUIDed section to be processed. - @param[out] OutputBuffer OutputBuffer to point to the start of the section's contents. + @param[out] OutputBuffer OutputBuffer directly points to the start of the section's contents, if guided data is not prcessed. Otherwise, - OutputBuffer to contain the output data, which is allocated by the caller. + OutputBuffer contains the output data, which is allocated by the caller. @param[out] ScratchBuffer A pointer to a caller-allocated buffer for function internal use. @param[out] AuthenticationStatus A pointer to a caller-allocated UINT32 that indicates the authentication status of the output buffer. @retval RETURN_SUCCESS Get the output data and AuthenticationStatus successfully. - @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. **/ typedef @@ -70,12 +70,12 @@ RETURN_STATUS Register Guided Section Extract and GetInfo Handler. @param[in] SectionGuid The guid matches this Extraction Handler. - @param[in] GetInfoHandler Handler to get info from guided section. + @param[in] GetInfoHandler Handler to get information from guided section. @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. - @retval RETURN_INVALID_PARAMETER Input pointer to Guid value is not valid. + @retval RETURN_INVALID_PARAMETER Pointer to Guid value is not valid. **/ RETURN_STATUS @@ -88,18 +88,18 @@ ExtractGuidedSectionRegisterHandlers ( /** Get the supported exract guided section Handler guid table, which is maintained - by library. The caller can directly get this guid table pointer + by library. The caller can directly get the guid table without responsibility to allocate or free this table buffer. It will ASSERT () if ExtractHandlerGuidTable = NULL. - @param[in, out] ExtractHandlerGuidTable The extract Handler guid pointer list. + @param[out] ExtractHandlerGuidTable The extract Handler guid pointer list. - @retval return the number of the supported extract guided Handler. + @return the number of the supported extract guided Handler. **/ UINTN EFIAPI ExtractGuidedSectionGetGuidList ( - IN OUT GUID **ExtractHandlerGuidTable + OUT GUID **ExtractHandlerGuidTable ); /** @@ -120,7 +120,7 @@ ExtractGuidedSectionGetGuidList ( @retval RETURN_SUCCESS Get the required information successfully. @retval RETURN_UNSUPPORTED Guided section data is not supported. - @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. **/ RETURN_STATUS @@ -154,7 +154,7 @@ ExtractGuidedSectionGetInfo ( @retval RETURN_SUCCESS Get the output data and AuthenticationStatus successfully. @retval RETURN_UNSUPPORTED Guided section data is not supported to be decoded. - @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. **/ RETURN_STATUS EFIAPI diff --git a/MdePkg/Include/Library/PostCodeLib.h b/MdePkg/Include/Library/PostCodeLib.h index 5a80c561df..17ece49e4d 100644 --- a/MdePkg/Include/Library/PostCodeLib.h +++ b/MdePkg/Include/Library/PostCodeLib.h @@ -1,7 +1,7 @@ /** @file - Report Status Code Library public .h file + Post Code Library functions defintion. - Copyright (c) 2006, 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 @@ -28,12 +28,12 @@ display the 32-bit value on the status reporting device. PostCode() must actively prevent recursion. If PostCode() is called while - processing another any other Report Status Code Library function, then + processing another any other Post Code Library function, then PostCode() must return Value immediately. @param Value The 32-bit value to write to the POST card. - @return Value + @return Value The 32-bit value to write to the POST card. **/ UINT32 @@ -55,16 +55,16 @@ PostCode ( value on the status reporting device. PostCodeWithDescription()must actively prevent recursion. If - PostCodeWithDescription() is called while processing another any other Report - Status Code Library function, then PostCodeWithDescription() must return Value - immediately. + PostCodeWithDescription() is called while processing another any other + Post Code Library function, then PostCodeWithDescription() + must return Value immediately. @param Value The 32-bit value to write to the POST card. @param Description Pointer to an ASCII string that is a description of the POST code value. This is an optional parameter that may be NULL. - @return Value + @return Value The 32-bit value to write to the POST card. **/ UINT32 @@ -97,14 +97,13 @@ PostCodeEnabled ( /** Returns TRUE if POST code descriptions are enabled. - This function returns TRUE if the - POST_CODE_PROPERTY_POST_CODE_ENABLED bit of - PcdPostCodePropertyMask is set. Otherwise FALSE is returned. + This function returns TRUE if the POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED + bit of PcdPostCodePropertyMask is set. Otherwise FALSE is returned. - @retval TRUE The POST_CODE_PROPERTY_POST_CODE_ENABLED - bit of PcdPostCodeProperyMask is set. - @retval FALSE The POST_CODE_PROPERTY_POST_CODE_ENABLED - bit of PcdPostCodeProperyMask is clear. + @retval TRUE The POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED bit of + PcdPostCodeProperyMask is set. + @retval FALSE The POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED bit of + PcdPostCodeProperyMask is clear. **/ BOOLEAN @@ -122,7 +121,7 @@ PostCodeDescriptionEnabled ( @param Value The 32-bit value to write to the POST card. - @return Value + @return Value The 32-bit value to write to the POST card. **/ #define POST_CODE(Value) PostCodeEnabled() ? PostCode(Value) : Value @@ -139,6 +138,7 @@ PostCodeDescriptionEnabled ( @param Description Pointer to an ASCII string that is a description of the POST code value. + @return Value The 32-bit value to write to the POST card. **/ #define POST_CODE_WITH_DESCRIPTION(Value,Description) \ PostCodeEnabled() ? \ diff --git a/MdePkg/Include/Library/PrintLib.h b/MdePkg/Include/Library/PrintLib.h index c5c550c2e7..21eea03278 100644 --- a/MdePkg/Include/Library/PrintLib.h +++ b/MdePkg/Include/Library/PrintLib.h @@ -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. diff --git a/MdePkg/Include/Library/SerialPortLib.h b/MdePkg/Include/Library/SerialPortLib.h index 19f56f7edd..dc4031a974 100644 --- a/MdePkg/Include/Library/SerialPortLib.h +++ b/MdePkg/Include/Library/SerialPortLib.h @@ -1,8 +1,7 @@ - /** @file - Serial I/O Port library functions with no library constructor/destructor + Serial I/O Port library functions definition. - Copyright (c) 2006, 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 @@ -30,15 +29,15 @@ SerialPortInitialize ( ); /** - Write data to serial device. + Write data from buffer to serial device. - If the buffer is NULL, then return 0; + If the Buffer is NULL, then return 0; if NumberOfBytes is zero, then return 0. @param Buffer Point of data buffer which need to be writed. @param NumberOfBytes Number of output bytes which are cached in Buffer. - @retval 0 Write data failed. + @retval 0 Write data failed, or No data is to be written. @retval !0 Actual number of bytes writed to serial device. **/ @@ -53,13 +52,14 @@ SerialPortWrite ( /** Read data from serial device and save the datas in buffer. - If the buffer is NULL, then return zero; + If the Buffer is NULL, then return zero; if NumberOfBytes is zero, then return zero. - @param Buffer Point of data buffer which need to be writed. - @param NumberOfBytes Number of output bytes which are cached in Buffer. + @param Buffer Point of data buffer, which contains the data + returned from the serial device. + @param NumberOfBytes Number of bytes which will be read. - @retval 0 Read data failed. + @retval 0 Read data failed, No data is to be read. @retval !0 Aactual number of bytes read from serial device. **/ diff --git a/MdePkg/Include/Library/UefiDecompressLib.h b/MdePkg/Include/Library/UefiDecompressLib.h index afedf307b5..2af91de273 100644 --- a/MdePkg/Include/Library/UefiDecompressLib.h +++ b/MdePkg/Include/Library/UefiDecompressLib.h @@ -1,7 +1,12 @@ /** @file - Return UEFI Decompress Protocol + UEFI Decompress Library Functions defintion - Copyright (c) 2006, Intel Corporation + The UEFI Decompress Library enables the decompression of objects that + were compressed using the UEFI compression scheme. The UEFI Decompress + Library is independent of environment and requires the caller to allocate + all required memory buffers. + + 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 @@ -16,7 +21,9 @@ #define __UEFI_DECPOMPRESS_LIB_H__ /** - Retrieves the size of the uncompressed buffer and the size of the scratch buffer. + Given a compressed source buffer, this function retrieves the size of + the uncompressed buffer and the size of the scratch buffer required + to decompress the compressed source buffer. Retrieves the size of the uncompressed buffer and the temporary scratch buffer required to decompress the buffer specified by Source and SourceSize. @@ -43,10 +50,14 @@ is required to decompress the compressed buffer specified by Source and SourceSize. - @retval RETURN_SUCCESS The size of destination buffer and the size of scratch - buffer are successull retrieved. - @retval RETURN_INVALID_PARAMETER The source data is corrupted - + @retval RETURN_SUCCESS The size of the uncompressed data was returned + in DestinationSize and the size of the scratch + buffer was returned in ScratchSize. + @retval RETURN_INVALID_PARAMETER + The size of the uncompressed data or the size of + the scratch buffer cannot be determined from + the compressed data specified by Source + and SourceSize. **/ RETURN_STATUS EFIAPI @@ -60,6 +71,7 @@ UefiDecompressGetInfo ( /** Decompresses a compressed source buffer. + Extracts decompressed data to its original form. This function is designed so that the decompression algorithm can be implemented without using any memory services. As a result, this function is not allowed to call any memory allocation services in its implementation. It is the caller's r @@ -79,9 +91,11 @@ UefiDecompressGetInfo ( This is an optional parameter that may be NULL if the required scratch buffer size is 0. - @retval RETURN_SUCCESS Decompression is successfull - @retval RETURN_INVALID_PARAMETER The source data is corrupted - + @retval RETURN_SUCCESS Decompression completed successfully, and + the uncompressed buffer is returned in Destination. + @retval RETURN_INVALID_PARAMETER + The source buffer specified by Source is corrupted + (not in a valid compressed format). **/ RETURN_STATUS EFIAPI diff --git a/MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf b/MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf index d1d208e189..26a411b41e 100644 --- a/MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf +++ b/MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf @@ -1,8 +1,7 @@ #/** @file -# Component description file for NULL Debug Library +# Null Base Debug Library instance with empty functions. # -# Debug Library with empty functions. -# Copyright (c) 2007, Intel Corporation. +# Copyright (c) 2007 - 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 diff --git a/MdePkg/Library/BaseDebugLibNull/DebugLib.c b/MdePkg/Library/BaseDebugLibNull/DebugLib.c index 73319d729b..a540411bca 100644 --- a/MdePkg/Library/BaseDebugLibNull/DebugLib.c +++ b/MdePkg/Library/BaseDebugLibNull/DebugLib.c @@ -1,7 +1,7 @@ /** @file - Base Debug Library that uses PrintLib to print messages to a memory buffer. + Null Base Debug Library instance with empty functions. - Copyright (c) 2006, 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 @@ -28,10 +28,9 @@ the message specified by Format and the associated variable argument list to the debug output device. - If Format is NULL, then ASSERT(). - @param ErrorLevel The error level of the debug message. @param Format Format string for the debug message to print. + @param ... The variable argument list. **/ VOID @@ -180,11 +179,11 @@ DebugCodeEnabled ( Returns TRUE if DEBUG_CLEAR_MEMORY()macro is enabled. - This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of + This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set. Otherwise FALSE is returned. - @retval TRUE The DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set. - @retval FALSE The DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is clear. + @retval TRUE The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set. + @retval FALSE The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is clear. @return Always return FALSE. diff --git a/MdePkg/Library/BasePostCodeLibDebug/BasePostCodeLibDebug.inf b/MdePkg/Library/BasePostCodeLibDebug/BasePostCodeLibDebug.inf index fd34dd24cf..d915130c65 100644 --- a/MdePkg/Library/BasePostCodeLibDebug/BasePostCodeLibDebug.inf +++ b/MdePkg/Library/BasePostCodeLibDebug/BasePostCodeLibDebug.inf @@ -1,8 +1,7 @@ #/** @file -# Component description file for Debug Base Post Code Library. # # Post Code Library that layers on top of a Debug Library instance. -# Copyright (c) 2007, Intel Corporation. +# Copyright (c) 2007 - 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 diff --git a/MdePkg/Library/BasePostCodeLibDebug/PostCode.c b/MdePkg/Library/BasePostCodeLibDebug/PostCode.c index 6b99d8986c..4335acb1ae 100644 --- a/MdePkg/Library/BasePostCodeLibDebug/PostCode.c +++ b/MdePkg/Library/BasePostCodeLibDebug/PostCode.c @@ -1,7 +1,7 @@ /** @file - Report Status Code Library Post Code functions for DXE Phase. + Base Post Code Library instance based on Debug Library. - Copyright (c) 2006, 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 @@ -31,12 +31,12 @@ display the 32-bit value on the status reporting device. PostCode() must actively prevent recursion. If PostCode() is called while - processing another any other Report Status Code Library function, then + processing another any other Post Code Library function, then PostCode() must return Value immediately. - @param Value The 32-bit value to write to the POST card. + @param Value The 32-bit value to write to the POST card. - @return Value + @return Value The 32-bit value to write to the POST card. **/ UINT32 @@ -62,8 +62,8 @@ PostCode ( value on the status reporting device. PostCodeWithDescription()must actively prevent recursion. If - PostCodeWithDescription() is called while processing another any other Report - Status Code Library function, then PostCodeWithDescription() must return Value + PostCodeWithDescription() is called while processing another any other Post + Code Library function, then PostCodeWithDescription() must return Value immediately. @param Value The 32-bit value to write to the POST card. @@ -71,7 +71,7 @@ PostCode ( POST code value. This is an optional parameter that may be NULL. - @return Value + @return Value The 32-bit value to write to the POST card. **/ UINT32 @@ -111,12 +111,12 @@ PostCodeEnabled ( /** Returns TRUE if POST code descriptions are enabled. - This function returns TRUE if the POST_CODE_PROPERTY_POST_CODE_ENABLED + This function returns TRUE if the POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED bit of PcdPostCodePropertyMask is set. Otherwise FALSE is returned. - @retval TRUE The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of + @retval TRUE The POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED bit of PcdPostCodeProperyMask is set. - @retval FALSE The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of + @retval FALSE The POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED bit of PcdPostCodeProperyMask is clear. **/ @@ -126,5 +126,5 @@ PostCodeDescriptionEnabled ( VOID ) { - return (BOOLEAN) ((PcdGet8(PcdPostCodePropertyMask) & POST_CODE_PROPERTY_POST_CODE_ENABLED) != 0); + return (BOOLEAN) ((PcdGet8(PcdPostCodePropertyMask) & POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED) != 0); } diff --git a/MdePkg/Library/BasePostCodeLibPort80/PostCode.c b/MdePkg/Library/BasePostCodeLibPort80/PostCode.c index 7ac4efce28..358c9ba1da 100644 --- a/MdePkg/Library/BasePostCodeLibPort80/PostCode.c +++ b/MdePkg/Library/BasePostCodeLibPort80/PostCode.c @@ -1,7 +1,7 @@ /** @file - Report Status Code Library Post Code functions for DXE Phase. + Post Code Library instance that writes post code values to I/O port 0x80. - Copyright (c) 2006, 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 @@ -31,12 +31,12 @@ display the 32-bit value on the status reporting device. PostCode() must actively prevent recursion. If PostCode() is called while - processing another any other Report Status Code Library function, then + processing another any other Post Code Library function, then PostCode() must return Value immediately. @param Value The 32-bit value to write to the POST card. - @return Value + @return Value The 32-bit value to write to the POST card. **/ UINT32 @@ -62,16 +62,16 @@ PostCode ( value on the status reporting device. PostCodeWithDescription()must actively prevent recursion. If - PostCodeWithDescription() is called while processing another any other Report - Status Code Library function, then PostCodeWithDescription() must return Value + PostCodeWithDescription() is called while processing another any other Post + Code Library function, then PostCodeWithDescription() must return Value immediately. @param Value The 32-bit value to write to the POST card. @param Description Pointer to an ASCII string that is a description of the POST code value. This is an optional parameter that may - be NULL. + be NULL. Ihis parameter is ignored in this implementation. - @return Value + @return Value The 32-bit value to write to the POST card. **/ UINT32 @@ -111,14 +111,13 @@ PostCodeEnabled ( /** Returns TRUE if POST code descriptions are enabled. - This function returns TRUE if the - POST_CODE_PROPERTY_POST_CODE_ENABLED bit of - PcdPostCodePropertyMask is set. Otherwise FALSE is returned. + This function returns TRUE if the POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED + bit of PcdPostCodePropertyMask is set. Otherwise FALSE is returned. - @retval TRUE The POST_CODE_PROPERTY_POST_CODE_ENABLED - bit of PcdPostCodeProperyMask is set. - @retval FALSE The POST_CODE_PROPERTY_POST_CODE_ENABLED - bit of PcdPostCodeProperyMask is clear. + @retval TRUE The POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED bit of + PcdPostCodeProperyMask is set. + @retval FALSE The POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED bit of + PcdPostCodeProperyMask is clear. **/ BOOLEAN @@ -127,5 +126,5 @@ PostCodeDescriptionEnabled ( VOID ) { - return (BOOLEAN) ((PcdGet8(PcdPostCodePropertyMask) & POST_CODE_PROPERTY_POST_CODE_ENABLED) != 0); + return (BOOLEAN) ((PcdGet8(PcdPostCodePropertyMask) & POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED) != 0); } diff --git a/MdePkg/Library/BasePrintLib/BasePrintLib.inf b/MdePkg/Library/BasePrintLib/BasePrintLib.inf index 0a03cd71cf..1f3844b384 100644 --- a/MdePkg/Library/BasePrintLib/BasePrintLib.inf +++ b/MdePkg/Library/BasePrintLib/BasePrintLib.inf @@ -1,8 +1,8 @@ #/** @file # Component description file for Base Print Library. # -# Print Library implementation. -# Copyright (c) 2007, Intel Corporation. +# Base Print Library instance implementation. +# Copyright (c) 2007 - 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 diff --git a/MdePkg/Library/BasePrintLib/PrintLib.c b/MdePkg/Library/BasePrintLib/PrintLib.c index 548ec5490f..c2f1b5119c 100644 --- a/MdePkg/Library/BasePrintLib/PrintLib.c +++ b/MdePkg/Library/BasePrintLib/PrintLib.c @@ -1,7 +1,7 @@ /** @file - Print Library. + Base Print Library instance implementation. - 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 @@ -23,7 +23,7 @@ #define ERROR_STATUS_NUMBER 24 #define ASSERT_UNICODE_BUFFER(Buffer) ASSERT ((((UINTN) (Buffer)) & 0x01) == 0) -GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 *StatusString [] = { +GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 *gStatusString[] = { "Success", // RETURN_SUCCESS = 0 "Warning Unknown Glyph", // RETURN_WARN_UNKNOWN_GLYPH = 1 "Warning Delete Failure", // RETURN_WARN_DELETE_FAILURE = 2 @@ -424,12 +424,12 @@ BasePrintLibVSPrint ( // Index = Status & ~MAX_BIT; if (Index > 0 && Index <= ERROR_STATUS_NUMBER) { - ArgumentString = StatusString [Index + WARNING_STATUS_NUMBER]; + ArgumentString = gStatusString [Index + WARNING_STATUS_NUMBER]; } } else { Index = Status; if (Index <= WARNING_STATUS_NUMBER) { - ArgumentString = StatusString [Index]; + ArgumentString = gStatusString [Index]; } } if (ArgumentString == ValueBuffer) { @@ -583,13 +583,14 @@ BasePrintLibVSPrint ( VA_LIST is used this rountine allows the nesting of Vararg routines. Thus this is the main print working routine. - @param Buffer Character buffer to print the results of the parsing + @param StartOfBuffer Character buffer to print the results of the parsing of Format into. @param BufferSize Maximum number of characters to put into buffer. Zero means no limit. @param Flags Intial flags value. Can only have FORMAT_UNICODE and OUTPUT_UNICODE set @param FormatString Null-terminated format string. + @param ... The variable argument list. @return Number of characters printed not including the Null-terminator. @@ -684,7 +685,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. @@ -730,7 +731,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 @@ -776,7 +777,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. @@ -876,7 +878,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 @@ -920,7 +922,8 @@ 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. @@ -943,7 +946,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. @@ -989,7 +992,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. @@ -1014,6 +1017,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. diff --git a/MdePkg/Library/BasePrintLib/PrintLibInternal.c b/MdePkg/Library/BasePrintLib/PrintLibInternal.c index 4a9b15fec1..572819e041 100644 --- a/MdePkg/Library/BasePrintLib/PrintLibInternal.c +++ b/MdePkg/Library/BasePrintLib/PrintLibInternal.c @@ -1,7 +1,7 @@ /** @file - Print Library worker functions. + Print Library internal worker functions. - 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 @@ -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. @param Increment Character increment in Buffer. - @return Number of characters printed. + @return Buffer Buffer filled with the input Character. **/ CHAR8 * BasePrintLibFillBuffer ( - CHAR8 *Buffer, - CHAR8 *EndBuffer, - INTN Length, - UINTN Character, - INTN Increment + OUT CHAR8 *Buffer, + IN CHAR8 *EndBuffer, + IN INTN Length, + IN UINTN Character, + IN INTN Increment ) { INTN Index; @@ -69,7 +69,6 @@ BasePrintLibFillBuffer ( **/ UINTN -EFIAPI BasePrintLibValueToString ( IN OUT CHAR8 *Buffer, IN INT64 Value, @@ -89,6 +88,10 @@ BasePrintLibValueToString ( *(Buffer++) = mHexStr[Remainder]; Digits++; } while (Value != 0); + + // + // the length of Buffer string converted from Value + // return Digits; } @@ -149,6 +152,9 @@ BasePrintLibConvertValueToString ( UINTN Index; UINTN Radix; + // + // Make sure Buffer is not NULL and Width < MAXIMUM + // ASSERT (Buffer != NULL); ASSERT (Width < MAXIMUM_VALUE_CHARACTERS); // @@ -162,11 +168,16 @@ BasePrintLibConvertValueToString ( ASSERT (((Flags & COMMA_TYPE) != 0 && (Flags & RADIX_HEX) != 0) == FALSE); OriginalBuffer = Buffer; - + + // + // Width is 0 or COMMA_TYPE is set, PREFIX_ZERO is ignored. + // if (Width == 0 || (Flags & COMMA_TYPE) != 0) { Flags &= (~PREFIX_ZERO); } - + // + // If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed. + // if (Width == 0) { Width = MAXIMUM_VALUE_CHARACTERS - 1; } @@ -174,20 +185,32 @@ BasePrintLibConvertValueToString ( // Set the tag for the end of the input Buffer. // EndBuffer = Buffer + Width * Increment; - + + // + // Convert decimal negative + // if ((Value < 0) && ((Flags & RADIX_HEX) == 0)) { Value = -Value; Buffer = BasePrintLibFillBuffer (Buffer, EndBuffer, 1, '-', Increment); Width--; } - + + // + // Count the length of the value string. + // Radix = ((Flags & RADIX_HEX) == 0)? 10 : 16; Count = BasePrintLibValueToString (ValueBuffer, Value, Radix); - + + // + // Append Zero + // if ((Flags & PREFIX_ZERO) != 0) { Buffer = BasePrintLibFillBuffer (Buffer, EndBuffer, Width - Count, '0', Increment); } - + + // + // Print Comma type for every 3 characters + // Digits = Count % 3; if (Digits != 0) { Digits = 3 - Digits; @@ -204,7 +227,10 @@ BasePrintLibConvertValueToString ( } } } - + + // + // Print Null-terminator + // BasePrintLibFillBuffer (Buffer, EndBuffer + Increment, 1, 0, Increment); return ((Buffer - OriginalBuffer) / Increment); diff --git a/MdePkg/Library/BasePrintLib/PrintLibInternal.h b/MdePkg/Library/BasePrintLib/PrintLibInternal.h index 62e51838e3..704842a716 100644 --- a/MdePkg/Library/BasePrintLib/PrintLibInternal.h +++ b/MdePkg/Library/BasePrintLib/PrintLibInternal.h @@ -1,7 +1,7 @@ /** @file - Print Library Internal Functions. + Base Print Library instance Internal Functions definition. - 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 @@ -12,8 +12,8 @@ **/ -#ifndef __PRINT_LIB_INTERNAL_H -#define __PRINT_LIB_INTERNAL_H +#ifndef __PRINT_LIB_INTERNAL_H__ +#define __PRINT_LIB_INTERNAL_H__ #include #include @@ -91,20 +91,21 @@ BasePrintLibVSPrint ( VA_LIST is used this rountine allows the nesting of Vararg routines. Thus this is the main print working routine - @param Buffer Character buffer to print the results of the parsing + @param StartOfBuffer Character buffer to print the results of the parsing of Format into. @param BufferSize Maximum number of characters to put into buffer. Zero means no limit. @param Flags Intial flags value. Can only have FORMAT_UNICODE and OUTPUT_UNICODE set @param FormatString Null-terminated format string. + @param ... The variable argument list. @return Number of characters printed. **/ UINTN BasePrintLibSPrint ( - OUT CHAR8 *Buffer, + OUT CHAR8 *StartOfBuffer, IN UINTN BufferSize, IN UINTN Flags, IN CONST CHAR8 *FormatString, @@ -123,16 +124,16 @@ BasePrintLibSPrint ( @param Character Character to be placed into Buffer. @param Increment Character increment in Buffer. - @return Number of characters printed. + @return Buffer Buffer filled with the input Character. **/ CHAR8 * BasePrintLibFillBuffer ( - CHAR8 *Buffer, - CHAR8 *EndBuffer, - INTN Length, - UINTN Character, - INTN Increment + OUT CHAR8 *Buffer, + IN CHAR8 *EndBuffer, + IN INTN Length, + IN UINTN Character, + IN INTN Increment ); /** @@ -148,7 +149,6 @@ BasePrintLibFillBuffer ( **/ UINTN -EFIAPI BasePrintLibValueToString ( IN OUT CHAR8 *Buffer, IN INT64 Value, diff --git a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c index fefa765d7e..feba9fdd6d 100644 --- a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c +++ b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c @@ -1,7 +1,7 @@ /** @file - UEFI Decompress Library. + UEFI Decompress Library implementation refer to UEFI specification. - Copyright (c) 2006, 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 @@ -23,7 +23,7 @@ #include "BaseUefiDecompressLibInternals.h" /** - Read NumOfBit of bits from source into mBitBuf + Read NumOfBit of bits from source into mBitBuf. Shift mBitBuf NumOfBits left. Read in NumOfBits of bits from source. @@ -79,7 +79,7 @@ FillBuf ( } /** - Get NumOfBits of bits out from mBitBuf + Get NumOfBits of bits out from mBitBuf. Get NumOfBits of bits out from mBitBuf. Fill mBitBuf with subsequent NumOfBits of bits from source. Returns NumOfBits of bits that are @@ -122,7 +122,7 @@ GetBits ( @param NumOfChar Number of symbols in the symbol set @param BitLen Code length array @param TableBits The width of the mapping table - @param Table The table + @param Table The table to be created @retval 0 OK. @retval BAD_TABLE The table is corrupted. @@ -225,7 +225,7 @@ MakeTable ( *Pointer = Avail++; } - if (Index3 & Mask) { + if ((Index3 & Mask) != 0) { Pointer = &Sd->mRight[*Pointer]; } else { Pointer = &Sd->mLeft[*Pointer]; @@ -273,7 +273,7 @@ DecodeP ( do { - if (Sd->mBitBuf & Mask) { + if ((Sd->mBitBuf & Mask) != 0) { Val = Sd->mRight[Val]; } else { Val = Sd->mLeft[Val]; @@ -542,7 +542,7 @@ DecodeC ( Mask = 1U << (BITBUFSIZ - 1 - 12); do { - if (Sd->mBitBuf & Mask) { + if ((Sd->mBitBuf & Mask) != 0) { Index2 = Sd->mRight[Index2]; } else { Index2 = Sd->mLeft[Index2]; @@ -561,9 +561,7 @@ DecodeC ( /** Decode the source data and put the resulting data into the destination buffer. - - Decode the source data and put the resulting data into the destination buffer. - + @param Sd The global scratch data **/ @@ -638,7 +636,9 @@ Done: } /** - Retrieves the size of the uncompressed buffer and the size of the scratch buffer. + Given a compressed source buffer, this function retrieves the size of + the uncompressed buffer and the size of the scratch buffer required + to decompress the compressed source buffer. Retrieves the size of the uncompressed buffer and the temporary scratch buffer required to decompress the buffer specified by Source and SourceSize. @@ -665,10 +665,14 @@ Done: is required to decompress the compressed buffer specified by Source and SourceSize. - @retval RETURN_SUCCESS The size of destination buffer and the size of scratch - buffer are successull retrieved. - @retval RETURN_INVALID_PARAMETER The source data is corrupted - + @retval RETURN_SUCCESS The size of the uncompressed data was returned + in DestinationSize and the size of the scratch + buffer was returned in ScratchSize. + @retval RETURN_INVALID_PARAMETER + The size of the uncompressed data or the size of + the scratch buffer cannot be determined from + the compressed data specified by Source + and SourceSize. **/ RETURN_STATUS EFIAPI @@ -704,6 +708,7 @@ UefiDecompressGetInfo ( /** Decompresses a compressed source buffer. + Extracts decompressed data to its original form. This function is designed so that the decompression algorithm can be implemented without using any memory services. As a result, this function is not allowed to call any memory allocation services in its implementation. It is the caller's r @@ -723,9 +728,11 @@ UefiDecompressGetInfo ( This is an optional parameter that may be NULL if the required scratch buffer size is 0. - @retval RETURN_SUCCESS Decompression is successfull - @retval RETURN_INVALID_PARAMETER The source data is corrupted - + @retval RETURN_SUCCESS Decompression completed successfully, and + the uncompressed buffer is returned in Destination. + @retval RETURN_INVALID_PARAMETER + The source buffer specified by Source is corrupted + (not in a valid compressed format). **/ RETURN_STATUS EFIAPI @@ -769,7 +776,6 @@ UefiDecompress ( // // The length of the field 'Position Set Code Length Array Size' in Block Header. // For UEFI 2.0 de/compression algorithm(Version 1), mPBit = 4 - // For Tiano de/compression algorithm(Version 2), mPBit = 5 // Sd->mPBit = 4; Sd->mSrcBase = (UINT8 *)Src; diff --git a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLibInternals.h b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLibInternals.h index 84638866b5..57a44a502f 100644 --- a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLibInternals.h +++ b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLibInternals.h @@ -1,7 +1,7 @@ /** @file - Internal include file for Base UEFI Decompress Libary. + Internal data structure defintions for Base UEFI Decompress Libary. - Copyright (c) 2006, 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 @@ -40,8 +40,8 @@ #endif typedef struct { - UINT8 *mSrcBase; ///< Starting address of compressed data - UINT8 *mDstBase; ///< Starting address of decompressed data + UINT8 *mSrcBase; // Starting address of compressed data + UINT8 *mDstBase; // Starting address of decompressed data UINT32 mOutBuf; UINT32 mInBuf; @@ -64,13 +64,12 @@ typedef struct { /// /// The length of the field 'Position Set Code Length Array Size' in Block Header. /// For UEFI 2.0 de/compression algorithm, mPBit = 4 - /// For Tiano de/compression algorithm, mPBit = 5 /// UINT8 mPBit; } SCRATCH_DATA; /** - Read NumOfBit of bits from source into mBitBuf + Read NumOfBit of bits from source into mBitBuf. Shift mBitBuf NumOfBits left. Read in NumOfBits of bits from source. @@ -85,7 +84,7 @@ FillBuf ( ); /** - Get NumOfBits of bits out from mBitBuf + Get NumOfBits of bits out from mBitBuf. Get NumOfBits of bits out from mBitBuf. Fill mBitBuf with subsequent NumOfBits of bits from source. Returns NumOfBits of bits that are @@ -113,7 +112,7 @@ GetBits ( @param NumOfChar Number of symbols in the symbol set @param BitLen Code length array @param TableBits The width of the mapping table - @param Table The table + @param Table The table to be created. @retval 0 OK. @retval BAD_TABLE The table is corrupted. @@ -200,8 +199,6 @@ DecodeC ( /** Decode the source data and put the resulting data into the destination buffer. - Decode the source data and put the resulting data into the destination buffer. - @param Sd The global scratch data **/ diff --git a/MdePkg/Library/DxeDebugLibSerialPort/DebugLib.c b/MdePkg/Library/DxeDebugLibSerialPort/DebugLib.c index 4fc33ee402..b98761a9e5 100644 --- a/MdePkg/Library/DxeDebugLibSerialPort/DebugLib.c +++ b/MdePkg/Library/DxeDebugLibSerialPort/DebugLib.c @@ -1,7 +1,8 @@ /** @file - UEFI Debug Library that uses PrintLib to send messages to CONOUT. + Base Debug library instance base on Serial Port library. + It uses PrintLib to send debug messages to serial port device. - Copyright (c) 2006, 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 @@ -39,6 +40,7 @@ @param ErrorLevel The error level of the debug message. @param Format Format string for the debug message to print. + @param ... The variable argument list. **/ VOID @@ -143,10 +145,10 @@ DebugAssert ( If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT(). - @param Buffer Pointer to the target buffer to fill with PcdDebugClearMemoryValue. + @param Buffer Pointer to the target buffer to be filled with PcdDebugClearMemoryValue. @param Length Number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue. - @return Buffer + @return Buffer Pointer to the target buffer filled with PcdDebugClearMemoryValue. **/ VOID * @@ -235,11 +237,11 @@ DebugCodeEnabled ( Returns TRUE if DEBUG_CLEAR_MEMORY()macro is enabled. - This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of + This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set. Otherwise FALSE is returned. - @retval TRUE The DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set. - @retval FALSE The DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is clear. + @retval TRUE The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set. + @retval FALSE The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is clear. **/ BOOLEAN diff --git a/MdePkg/Library/DxeDebugLibSerialPort/DxeDebugLibSerialPort.inf b/MdePkg/Library/DxeDebugLibSerialPort/DxeDebugLibSerialPort.inf index be9f1b91ce..9eb047fd94 100644 --- a/MdePkg/Library/DxeDebugLibSerialPort/DxeDebugLibSerialPort.inf +++ b/MdePkg/Library/DxeDebugLibSerialPort/DxeDebugLibSerialPort.inf @@ -1,8 +1,8 @@ #/** @file -# Debug Library for Dxe drivers +# Base Debug library instance base on Serial Port library. +# It uses PrintLib to send debug messages to serial port device. # -# Library to abstract Framework extensions that conflict with UEFI 2.0 Specification -# 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 diff --git a/MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.c b/MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.c index 752594484c..b98e8f3ae9 100644 --- a/MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.c +++ b/MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.c @@ -1,7 +1,7 @@ /** @file - Provide generic extract guided section functions. + Provide generic extract guided section functions for Dxe phase. - Copyright (c) 2007, Intel Corporation
+ Copyright (c) 2007 - 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 @@ -69,17 +69,19 @@ DxeExtractGuidedSectionLibConstructor ( } /** - Get the supported exract guided section Handler guid list. - If ExtractHandlerGuidTable = NULL, then ASSERT. + Get the supported exract guided section Handler guid table, which is maintained + by library. The caller can directly get the guid table + without responsibility to allocate or free this table buffer. + It will ASSERT () if ExtractHandlerGuidTable = NULL. - @param[in, out] ExtractHandlerGuidTable The extract Handler guid pointer list. + @param[out] ExtractHandlerGuidTable The extract Handler guid pointer list. - @retval return the number of the supported extract guided Handler. + @return the number of the supported extract guided Handler. **/ UINTN EFIAPI ExtractGuidedSectionGetGuidList ( - IN OUT GUID **ExtractHandlerGuidTable + OUT GUID **ExtractHandlerGuidTable ) { ASSERT (ExtractHandlerGuidTable != NULL); @@ -167,8 +169,8 @@ ExtractGuidedSectionRegisterHandlers ( @param[out] SectionAttribute The attribute of the input guided section. @retval RETURN_SUCCESS Get the required information successfully. - @retval RETURN_INVALID_PARAMETER The input data can't be parsed correctly. - The GUID in InputSection does not match any registered guid list. + @retval RETURN_UNSUPPORTED Guided section data is not supported. + @retval RETURN_INVALID_PARAMETER The input data is not the valid guided section. **/ RETURN_STATUS @@ -203,7 +205,7 @@ ExtractGuidedSectionGetInfo ( // Not found, the input guided section is not supported. // if (Index == mNumberOfExtractHandler) { - return RETURN_INVALID_PARAMETER; + return RETURN_UNSUPPORTED; } // @@ -237,9 +239,9 @@ ExtractGuidedSectionGetInfo ( A pointer to a caller-allocated UINT32 that indicates the authentication status of the output buffer. - @retval RETURN_SUCCESS Get the output data, size and AuthenticationStatus successfully. - @retval RETURN_INVALID_PARAMETER The input data can't be parsed correctly. - The GUID in InputSection does not match any registered guid. + @retval RETURN_SUCCESS Get the output data and AuthenticationStatus successfully. + @retval RETURN_UNSUPPORTED Guided section data is not supported to be decoded. + @retval RETURN_INVALID_PARAMETER The input data is not the valid guided section. **/ RETURN_STATUS @@ -253,6 +255,9 @@ ExtractGuidedSectionDecode ( { UINT32 Index; + // + // Check the input parameters + // if (InputSection == NULL) { return RETURN_INVALID_PARAMETER; } @@ -261,7 +266,7 @@ ExtractGuidedSectionDecode ( ASSERT (AuthenticationStatus != NULL); // - // Search the match registered GetInfo handler for the input guided section. + // Search the match registered extract handler for the input guided section. // for (Index = 0; Index < mNumberOfExtractHandler; Index ++) { if (CompareGuid (&mExtractHandlerGuidTable[Index], &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid))) { @@ -273,11 +278,11 @@ ExtractGuidedSectionDecode ( // Not found, the input guided section is not supported. // if (Index == mNumberOfExtractHandler) { - return RETURN_INVALID_PARAMETER; + return RETURN_UNSUPPORTED; } // - // Call the match handler to getinfo for the input section data. + // Call the match handler to extract raw data for the input section data. // return mExtractDecodeHandlerTable [Index] ( InputSection, diff --git a/MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf b/MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf index e61291dbdd..7bed5477e0 100644 --- a/MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf +++ b/MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf @@ -2,7 +2,7 @@ # Component description file for DXE ExtractGuidedSection Library # # This library provides generic extract guided section functions for DXE module. -# Copyright (c) 2007, Intel Corporation. +# Copyright (c) 2007 - 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 @@ -20,7 +20,7 @@ FILE_GUID = f773469b-e265-4b0c-b0a6-2f971fbfe72b MODULE_TYPE = DXE_DRIVER VERSION_STRING = 1.0 - LIBRARY_CLASS = ExtractGuidedSectionLib + LIBRARY_CLASS = ExtractGuidedSectionLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER EDK_RELEASE_VERSION = 0x00020000 EFI_SPECIFICATION_VERSION = 0x00020000 diff --git a/MdePkg/Library/PeiDxePostCodeLibReportStatusCode/PostCode.c b/MdePkg/Library/PeiDxePostCodeLibReportStatusCode/PostCode.c index 3d5901548b..1b8cd899c3 100644 --- a/MdePkg/Library/PeiDxePostCodeLibReportStatusCode/PostCode.c +++ b/MdePkg/Library/PeiDxePostCodeLibReportStatusCode/PostCode.c @@ -1,7 +1,8 @@ /** @file - Report Status Code Library Post Code functions for DXE Phase. + Post code library instace bases on report status code library + PostCode Library for PEIMs and DXE drivers that send PostCode to ReportStatusCode - Copyright (c) 2006, 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 @@ -45,12 +46,12 @@ display the 32-bit value on the status reporting device. PostCode() must actively prevent recursion. If PostCode() is called while - processing another any other Report Status Code Library function, then + processing another any other Post Code Library function, then PostCode() must return Value immediately. @param Value The 32-bit value to write to the POST card. - @return Value + @return Value The 32-bit value to write to the POST card. **/ UINT32 @@ -76,8 +77,8 @@ PostCode ( value on the status reporting device. PostCodeWithDescription()must actively prevent recursion. If - PostCodeWithDescription() is called while processing another any other Report - Status Code Library function, then PostCodeWithDescription() must return Value + PostCodeWithDescription() is called while processing another any other Post + Code Library function, then PostCodeWithDescription() must return Value immediately. @param Value The 32-bit value to write to the POST card. @@ -85,7 +86,7 @@ PostCode ( POST code value. This is an optional parameter that may be NULL. - @return Value + @return Value The 32-bit value to write to the POST card. **/ UINT32 @@ -138,14 +139,13 @@ PostCodeEnabled ( /** Returns TRUE if POST code descriptions are enabled. - This function returns TRUE if the - POST_CODE_PROPERTY_POST_CODE_ENABLED bit of - PcdPostCodePropertyMask is set. Otherwise FALSE is returned. + This function returns TRUE if the POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED + bit of PcdPostCodePropertyMask is set. Otherwise FALSE is returned. - @retval TRUE The POST_CODE_PROPERTY_POST_CODE_ENABLED - bit of PcdPostCodeProperyMask is set. - @retval FALSE The POST_CODE_PROPERTY_POST_CODE_ENABLED - bit of PcdPostCodeProperyMask is clear. + @retval TRUE The POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED bit of + PcdPostCodeProperyMask is set. + @retval FALSE The POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED bit of + PcdPostCodeProperyMask is clear. **/ BOOLEAN @@ -154,5 +154,6 @@ PostCodeDescriptionEnabled ( VOID ) { - return (BOOLEAN) ((PcdGet8(PcdPostCodePropertyMask) & POST_CODE_PROPERTY_POST_CODE_ENABLED) != 0); + return (BOOLEAN) ((PcdGet8(PcdPostCodePropertyMask) & POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED) != 0); } + diff --git a/MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.c b/MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.c index aa6c2fa33e..2b09c46cc9 100644 --- a/MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.c +++ b/MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.c @@ -1,7 +1,7 @@ /** @file - Provide generic extract guided section functions. + Provide generic extract guided section functions for PEI phase. - Copyright (c) 2007, Intel Corporation
+ Copyright (c) 2007 - 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 @@ -97,6 +97,9 @@ PeiGetExtractGuidedSectionHandlerInfo ( // return EFI_OUT_OF_RESOURCES; } + // + // Init HandlerInfo structure + // HandlerInfo->Signature = PEI_EXTRACT_HANDLER_INFO_SIGNATURE; HandlerInfo->NumberOfExtractHandler = 0; HandlerInfo->ExtractHandlerGuidTable = (GUID *) (HandlerInfo + 1); @@ -109,7 +112,9 @@ PeiGetExtractGuidedSectionHandlerInfo ( PcdGet32 (PcdMaximumGuidedExtractHandler) * sizeof (EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER) ); - + // + // return the created HandlerInfo. + // *InfoPointer = HandlerInfo; return EFI_SUCCESS; } @@ -118,14 +123,14 @@ PeiGetExtractGuidedSectionHandlerInfo ( Get the supported exract guided section Handler guid list. If ExtractHandlerGuidTable = NULL, then ASSERT. - @param[in, out] ExtractHandlerGuidTable The extract Handler guid pointer list. + @param[out] ExtractHandlerGuidTable The extract Handler guid pointer list. - @retval return the number of the supported extract guided Handler. + @return the number of the supported extract guided Handler. **/ UINTN EFIAPI ExtractGuidedSectionGetGuidList ( - IN OUT GUID **ExtractHandlerGuidTable + OUT GUID **ExtractHandlerGuidTable ) { EFI_STATUS Status; @@ -133,11 +138,17 @@ ExtractGuidedSectionGetGuidList ( ASSERT (ExtractHandlerGuidTable != NULL); + // + // Get all registered handler information + // Status = PeiGetExtractGuidedSectionHandlerInfo (&HandlerInfo); if (EFI_ERROR (Status)) { return Status; } + // + // Get GuidTable and Table Number + // *ExtractHandlerGuidTable = HandlerInfo->ExtractHandlerGuidTable; return HandlerInfo->NumberOfExtractHandler; } @@ -232,8 +243,8 @@ ExtractGuidedSectionRegisterHandlers ( @param[out] SectionAttribute The attribute of the input guided section. @retval RETURN_SUCCESS Get the required information successfully. - @retval RETURN_INVALID_PARAMETER The input data can't be parsed correctly. - The GUID in InputSection does not match any registered guid list. + @retval RETURN_UNSUPPORTED Guided section data is not supported. + @retval RETURN_INVALID_PARAMETER The input data is not the valid guided section. **/ RETURN_STATUS @@ -261,7 +272,7 @@ ExtractGuidedSectionGetInfo ( ASSERT (SectionAttribute != NULL); // - // Get the registered handler information. + // Get all registered handler information. // Status = PeiGetExtractGuidedSectionHandlerInfo (&HandlerInfo); if (EFI_ERROR (Status)) { @@ -281,7 +292,7 @@ ExtractGuidedSectionGetInfo ( // Not found, the input guided section is not supported. // if (Index == HandlerInfo->NumberOfExtractHandler) { - return RETURN_INVALID_PARAMETER; + return RETURN_UNSUPPORTED; } // @@ -316,8 +327,8 @@ ExtractGuidedSectionGetInfo ( authentication status of the output buffer. @retval RETURN_SUCCESS Get the output data, size and AuthenticationStatus successfully. - @retval RETURN_INVALID_PARAMETER The input data can't be parsed correctly. - The GUID in InputSection does not match any registered guid list. + @retval RETURN_UNSUPPORTED Guided section data is not supported to be decoded. + @retval RETURN_INVALID_PARAMETER The input data is not the valid guided section. **/ RETURN_STATUS @@ -333,20 +344,25 @@ ExtractGuidedSectionDecode ( EFI_STATUS Status; PEI_EXTRACT_GUIDED_SECTION_HANDLER_INFO *HandlerInfo; + // + // Check input parameter + // if (InputSection == NULL) { return RETURN_INVALID_PARAMETER; - } - + } ASSERT (OutputBuffer != NULL); ASSERT (AuthenticationStatus != NULL); - + + // + // Get all registered handler information. + // Status = PeiGetExtractGuidedSectionHandlerInfo (&HandlerInfo); if (EFI_ERROR (Status)) { return Status; } // - // Search the match registered GetInfo handler for the input guided section. + // Search the match registered Extract handler for the input guided section. // for (Index = 0; Index < HandlerInfo->NumberOfExtractHandler; Index ++) { if (CompareGuid (HandlerInfo->ExtractHandlerGuidTable + Index, &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid))) { @@ -358,11 +374,11 @@ ExtractGuidedSectionDecode ( // Not found, the input guided section is not supported. // if (Index == HandlerInfo->NumberOfExtractHandler) { - return RETURN_INVALID_PARAMETER; + return RETURN_UNSUPPORTED; } // - // Call the match handler to getinfo for the input section data. + // Call the match handler to extract raw data for the input guided section. // return HandlerInfo->ExtractDecodeHandlerTable [Index] ( InputSection, diff --git a/MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf b/MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf index c80ea1c9d8..d0853d261e 100644 --- a/MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf +++ b/MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf @@ -2,7 +2,7 @@ # Component description file for PEIM ExtractGuidedSection Library # # This library provides generic extract guided section functions for PEIM and PEI_CORE module. -# Copyright (c) 2007, Intel Corporation. +# Copyright (c) 2007 - 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 @@ -20,7 +20,7 @@ FILE_GUID = 41ddf016-2a11-415f-8880-00d938e9541a MODULE_TYPE = PEIM VERSION_STRING = 1.0 - LIBRARY_CLASS = ExtractGuidedSectionLib + LIBRARY_CLASS = ExtractGuidedSectionLib|PEIM PEI_CORE EDK_RELEASE_VERSION = 0x00020000 EFI_SPECIFICATION_VERSION = 0x00020000 diff --git a/MdePkg/Library/SerialPortLibNull/SerialPortLibNull.c b/MdePkg/Library/SerialPortLibNull/SerialPortLibNull.c index 78223fcbe0..1fdc6586a5 100644 --- a/MdePkg/Library/SerialPortLibNull/SerialPortLibNull.c +++ b/MdePkg/Library/SerialPortLibNull/SerialPortLibNull.c @@ -1,7 +1,7 @@ /** @file - Serial I/O Port library functions with no library constructor/destructor + Null Serial Port library instance with empty functions. - Copyright (c) 2006, 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 @@ -18,11 +18,10 @@ #include -/* - +/** Programmed hardware of Serial port. - @return Always return EFI_UNSUPPORTED. + @return Always return RETURN_UNSUPPORTED. **/ RETURN_STATUS @@ -40,8 +39,7 @@ SerialPortInitialize ( @param Buffer Point of data buffer which need to be writed. @param NumberOfBytes Number of output bytes which are cached in Buffer. - @retval 0 Write data failed. - @retval !0 Actual number of bytes writed to serial device. + @retval 0 No data is to be written. **/ UINTN @@ -58,11 +56,11 @@ SerialPortWrite ( /** Read data from serial device and save the datas in buffer. - @param Buffer Point of data buffer which need to be writed. - @param NumberOfBytes Number of output bytes which are cached in Buffer. + @param Buffer Point of data buffer, which contains the data + returned from the serial device. + @param NumberOfBytes Number of bytes which will be read. - @retval 0 Read data failed. - @retval !0 Aactual number of bytes read from serial device. + @retval 0 No data is to be read. **/ UINTN diff --git a/MdePkg/Library/SerialPortLibNull/SerialPortLibNull.inf b/MdePkg/Library/SerialPortLibNull/SerialPortLibNull.inf index bc27b584aa..a6d436c8df 100644 --- a/MdePkg/Library/SerialPortLibNull/SerialPortLibNull.inf +++ b/MdePkg/Library/SerialPortLibNull/SerialPortLibNull.inf @@ -1,8 +1,7 @@ #/** @file -# Memory Status Code Library for UEFI drivers +# Null Serial Port library instance with empty functions # -# Lib to provide memory journal status code reporting Routines -# Copyright (c) 2006, 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 @@ -18,7 +17,7 @@ INF_VERSION = 0x00010005 BASE_NAME = SerialPortLibNull FILE_GUID = E4541241-8897-411a-91F8-7D7E45837146 - MODULE_TYPE = PEIM + MODULE_TYPE = BASE VERSION_STRING = 1.0 LIBRARY_CLASS = SerialPortLib EDK_RELEASE_VERSION = 0x00020000 diff --git a/MdePkg/Library/UefiDebugLibConOut/DebugLib.c b/MdePkg/Library/UefiDebugLibConOut/DebugLib.c index ff4de53729..393c698690 100644 --- a/MdePkg/Library/UefiDebugLibConOut/DebugLib.c +++ b/MdePkg/Library/UefiDebugLibConOut/DebugLib.c @@ -1,7 +1,7 @@ /** @file - UEFI Debug Library that uses PrintLib to send messages to CONOUT. + UEFI Debug Library that sends messages to the Console Output Device in the EFI System Table. - 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 @@ -42,6 +42,7 @@ @param ErrorLevel The error level of the debug message. @param Format Format string for the debug message to print. + @param ... The variable argument list. **/ VOID @@ -155,10 +156,10 @@ DebugAssert ( If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT(). - @param Buffer Pointer to the target buffer to fill with PcdDebugClearMemoryValue. + @param Buffer Pointer to the target buffer to be filled with PcdDebugClearMemoryValue. @param Length Number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue. - @return Buffer + @return Buffer Pointer to the target buffer filled with PcdDebugClearMemoryValue. **/ VOID * @@ -247,11 +248,11 @@ DebugCodeEnabled ( Returns TRUE if DEBUG_CLEAR_MEMORY()macro is enabled. - This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of + This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set. Otherwise FALSE is returned. - @retval TRUE The DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set. - @retval FALSE The DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is clear. + @retval TRUE The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set. + @retval FALSE The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is clear. **/ BOOLEAN diff --git a/MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf b/MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf index 0a51c142c4..f918ad9684 100644 --- a/MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf +++ b/MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf @@ -1,8 +1,7 @@ #/** @file -# Debug Library for UEFI drivers # -# Library to abstract Framework extensions that conflict with UEFI 2.0 Specification -# Copyright (c) 2007, Intel Corporation. +# Debug Lib that sends messages to the Console Output Device in the EFI System Table. +# Copyright (c) 2007 - 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 diff --git a/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c b/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c index 50bb2bc50e..a7d4d2829b 100644 --- a/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c +++ b/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c @@ -1,7 +1,7 @@ /** @file - UEFI Debug Library that uses PrintLib to send messages to STDERR. + UEFI Debug Lib that sends messages to the Standard Error Device in the EFI System Table. - 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 @@ -41,6 +41,7 @@ @param ErrorLevel The error level of the debug message. @param Format Format string for the debug message to print. + @param ... The variable argument list. **/ VOID @@ -156,7 +157,7 @@ DebugAssert ( @param Buffer Pointer to the target buffer to fill with PcdDebugClearMemoryValue. @param Length Number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue. - @return Buffer + @return Buffer Pointer to the target buffer filled with PcdDebugClearMemoryValue. **/ VOID * @@ -245,11 +246,11 @@ DebugCodeEnabled ( Returns TRUE if DEBUG_CLEAR_MEMORY()macro is enabled. - This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of + This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set. Otherwise FALSE is returned. - @retval TRUE The DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set. - @retval FALSE The DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is clear. + @retval TRUE The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set. + @retval FALSE The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is clear. **/ BOOLEAN diff --git a/MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf b/MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf index de03bc64c6..672e582b7b 100644 --- a/MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf +++ b/MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf @@ -1,8 +1,8 @@ #/** @file -# Debug Library for UEFI drivers # -# Library to abstract Framework extensions that conflict with UEFI 2.0 Specification -# Copyright (c) 2007, Intel Corporation. +# UEFI Debug Lib that sends messages to the Standard Error Device in the EFI System Table. +# +# Copyright (c) 2007 - 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 -- 2.39.2