diff options
author | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-04-10 07:13:54 +0000 |
---|---|---|
committer | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-04-10 07:13:54 +0000 |
commit | ed7752ec44001d317f79c8631dccd9650c396617 (patch) | |
tree | d1a5c69c928a254f9f25154e67f839beed6d5a77 /IntelFrameworkModulePkg | |
parent | 7859df05bc72e11927877e2f4886af4024731984 (diff) | |
download | edk2-platforms-ed7752ec44001d317f79c8631dccd9650c396617.tar.xz |
Add some function/header comments.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5037 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg')
17 files changed, 334 insertions, 428 deletions
diff --git a/IntelFrameworkModulePkg/Include/Guid/CustomDecompress.h b/IntelFrameworkModulePkg/Include/Guid/CustomDecompress.h index c03524e02b..3e98785c2b 100644 --- a/IntelFrameworkModulePkg/Include/Guid/CustomDecompress.h +++ b/IntelFrameworkModulePkg/Include/Guid/CustomDecompress.h @@ -1,5 +1,6 @@ /** @file
-
+ Custom decompress Guid definitions
+
Copyright (c) 2006 - 2007, 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
@@ -9,20 +10,12 @@ http://opensource.org/licenses/bsd-license.php THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-Module Name:
-
- CustomDecompress.h
-
-Abstract:
-
- Custom decompress Guid definitions
-
**/
#ifndef __EFI_CUSTOM_DECOMPRESS_GUID_H__
#define __EFI_CUSTOM_DECOMPRESS_GUID_H__
-#define TINAO_CUSTOM_DECOMPRESS_GUID \
+#define TIANO_CUSTOM_DECOMPRESS_GUID \
{ 0xA31280AD, 0x481E, 0x41B6, { 0x95, 0xE8, 0x12, 0x7F, 0x4C, 0x98, 0x47, 0x79 } }
extern GUID gTianoCustomDecompressGuid;
diff --git a/IntelFrameworkModulePkg/Include/Guid/DataHubProducer.h b/IntelFrameworkModulePkg/Include/Guid/DataHubProducer.h index ec7c1fdb89..0385be1de1 100644 --- a/IntelFrameworkModulePkg/Include/Guid/DataHubProducer.h +++ b/IntelFrameworkModulePkg/Include/Guid/DataHubProducer.h @@ -36,5 +36,4 @@ extern EFI_GUID gEfiMemoryProducerGuid; extern EFI_GUID gEfiMiscProducerGuid;
-
-#endif
+#endif // _DATAHUB_PRODUCER_H_
diff --git a/IntelFrameworkModulePkg/Include/Guid/DataHubStatusCodeRecord.h b/IntelFrameworkModulePkg/Include/Guid/DataHubStatusCodeRecord.h index 54382f4ef3..34c1fefe37 100644 --- a/IntelFrameworkModulePkg/Include/Guid/DataHubStatusCodeRecord.h +++ b/IntelFrameworkModulePkg/Include/Guid/DataHubStatusCodeRecord.h @@ -32,4 +32,5 @@ typedef struct { extern EFI_GUID gEfiDataHubStatusCodeRecordGuid;
-#endif
+#endif // __STATUS_CODE_H__
+
diff --git a/IntelFrameworkModulePkg/Include/Guid/PciHotplugDevice.h b/IntelFrameworkModulePkg/Include/Guid/PciHotplugDevice.h index 197a0465b7..e2c6e7ae84 100644 --- a/IntelFrameworkModulePkg/Include/Guid/PciHotplugDevice.h +++ b/IntelFrameworkModulePkg/Include/Guid/PciHotplugDevice.h @@ -20,4 +20,5 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. extern EFI_GUID gEfiPciHotplugDeviceGuid;
-#endif
+#endif // __PCI_HOTPLUG_DEVICE_GUID_H_
+
diff --git a/IntelFrameworkModulePkg/Include/Guid/PciOptionRomTable.h b/IntelFrameworkModulePkg/Include/Guid/PciOptionRomTable.h index ef9e345de5..32ab10ac3d 100644 --- a/IntelFrameworkModulePkg/Include/Guid/PciOptionRomTable.h +++ b/IntelFrameworkModulePkg/Include/Guid/PciOptionRomTable.h @@ -37,4 +37,5 @@ typedef struct { EFI_PCI_OPTION_ROM_DESCRIPTOR *PciOptionRomDescriptors;
} EFI_PCI_OPTION_ROM_TABLE;
-#endif
+#endif // __PCI_OPTION_ROM_TABLE_GUID_H_
+
diff --git a/IntelFrameworkModulePkg/Include/Library/OemHookStatusCodeLib.h b/IntelFrameworkModulePkg/Include/Library/OemHookStatusCodeLib.h index b26189c941..5f5726ea8a 100644 --- a/IntelFrameworkModulePkg/Include/Library/OemHookStatusCodeLib.h +++ b/IntelFrameworkModulePkg/Include/Library/OemHookStatusCodeLib.h @@ -1,4 +1,3 @@ -
/** @file
OEM hook status code library functions with no library constructor/destructor
@@ -11,8 +10,6 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
- Module Name: OemHookStatusCodeLib.h
-
**/
#ifndef __OEM_HOOK_STATUSCODE_LIB__
@@ -70,4 +67,5 @@ OemHookStatusCodeReport ( IN EFI_STATUS_CODE_DATA *Data OPTIONAL
);
-#endif
+#endif // __OEM_HOOK_STATUSCODE_LIB__
+
diff --git a/IntelFrameworkModulePkg/Include/Protocol/VgaMiniPort.h b/IntelFrameworkModulePkg/Include/Protocol/VgaMiniPort.h index bb9802420c..714028993c 100644 --- a/IntelFrameworkModulePkg/Include/Protocol/VgaMiniPort.h +++ b/IntelFrameworkModulePkg/Include/Protocol/VgaMiniPort.h @@ -22,6 +22,16 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. typedef struct _EFI_VGA_MINI_PORT_PROTOCOL EFI_VGA_MINI_PORT_PROTOCOL;
+/**
+ Sets the text display mode of a VGA controller
+
+ @param This Protocol instance pointer.
+ @param Mode Mode number. 0 - 80x25 1-80x50
+
+ @retval EFI_SUCCESS The mode was set
+ @retval EFI_DEVICE_ERROR The device is not functioning properly.
+
+**/
typedef
EFI_STATUS
(EFIAPI *EFI_VGA_MINI_PORT_SET_MODE) (
@@ -29,20 +39,6 @@ EFI_STATUS IN UINTN ModeNumber
);
-/*++
-
- Routine Description:
- Sets the text display mode of a VGA controller
-
- Arguments:
- This - Protocol instance pointer.
- Mode - Mode number. 0 - 80x25 1-80x50
-
- Returns:
- EFI_SUCCESS - The mode was set
- EFI_DEVICE_ERROR - The device is not functioning properly.
-
---*/
struct _EFI_VGA_MINI_PORT_PROTOCOL {
EFI_VGA_MINI_PORT_SET_MODE SetMode;
diff --git a/IntelFrameworkModulePkg/Library/BaseReportStatusCodeLib/BaseReportStatusCodeLib.c b/IntelFrameworkModulePkg/Library/BaseReportStatusCodeLib/BaseReportStatusCodeLib.c index a335ae74c3..973e14b07a 100644 --- a/IntelFrameworkModulePkg/Library/BaseReportStatusCodeLib/BaseReportStatusCodeLib.c +++ b/IntelFrameworkModulePkg/Library/BaseReportStatusCodeLib/BaseReportStatusCodeLib.c @@ -1,5 +1,6 @@ /** @file
- Report Status Code Library for DXE Phase.
+ Implementation for ReportStatusCodeLib library class. This
+ library instance can be used to any phase: SEC/PEI/DXE.
Copyright (c) 2006 - 2007, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
@@ -12,7 +13,6 @@ **/
-
#include <Base.h>
#include <Framework/StatusCode.h>
#include <Guid/StatusCodeDataTypeId.h>
@@ -528,3 +528,4 @@ ReportDebugCodeEnabled ( {
return (BOOLEAN) ((PcdGet8(PcdReportStatusCodePropertyMask) & REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED) != 0);
}
+
diff --git a/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c b/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c index d3d99eac2c..93b7c110bc 100644 --- a/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c +++ b/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c @@ -1,5 +1,8 @@ /**@file
UEFI and Custom Decompress Library
+ The function of UefiTianoDecompress() is interface for this module,
+ it will do tiano or uefi decompress with different verison parameter.
+ See EFI specification 1.1 Chapter 17 to get LZ77 compress/decompress.
Copyright (c) 2006, Intel Corporation
All rights reserved. This program and the accompanying materials
@@ -15,25 +18,17 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include <Guid/CustomDecompress.h>
#include "BaseUefiTianoCustomDecompressLibInternals.h"
+/**
+ Shift mBitBuf NumOfBits left. Read in NumOfBits of bits from source.
+
+ @param Sd The global scratch data
+ @param NumOfBits The number of bits to shift and read.
+**/
VOID
FillBuf (
IN SCRATCH_DATA *Sd,
IN UINT16 NumOfBits
)
-/*++
-
-Routine Description:
-
- Shift mBitBuf NumOfBits left. Read in NumOfBits of bits from source.
-
-Arguments:
-
- Sd - The global scratch data
- NumOfBits - The number of bits to shift and read.
-
-Returns: (VOID)
-
---*/
{
Sd->mBitBuf = (UINT32) (Sd->mBitBuf << NumOfBits);
@@ -64,29 +59,24 @@ Returns: (VOID) Sd->mBitBuf |= Sd->mSubBitBuf >> Sd->mBitCount;
}
-UINT32
-GetBits (
- IN SCRATCH_DATA *Sd,
- IN UINT16 NumOfBits
- )
-/*++
-
-Routine Description:
+/**
+ 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
popped out.
-Arguments:
+ @param Sd The global scratch data.
+ @param NumOfBits The number of bits to pop and read.
- Sd - The global scratch data.
- NumOfBits - The number of bits to pop and read.
+ @return The bits that are popped out.
-Returns:
-
- The bits that are popped out.
-
---*/
+**/
+UINT32
+GetBits (
+ IN SCRATCH_DATA *Sd,
+ IN UINT16 NumOfBits
+ )
{
UINT32 OutBits;
@@ -97,6 +87,22 @@ Returns: return OutBits;
}
+/**
+ Creates Huffman Code mapping table according to code length array.
+
+ Creates Huffman Code mapping table for Extra Set, Char&Len Set
+ and Position Set according to code length array.
+
+ @param Sd The global scratch data
+ @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
+
+ @retval 0 OK.
+ @retval BAD_TABLE The table is corrupted.
+
+**/
UINT16
MakeTable (
IN SCRATCH_DATA *Sd,
@@ -105,26 +111,6 @@ MakeTable ( IN UINT16 TableBits,
OUT UINT16 *Table
)
-/*++
-
-Routine Description:
-
- Creates Huffman Code mapping table according to code length array.
-
-Arguments:
-
- Sd - The global scratch data
- NumOfChar - Number of symbols in the symbol set
- BitLen - Code length array
- TableBits - The width of the mapping table
- Table - The table
-
-Returns:
-
- 0 - OK.
- BAD_TABLE - The table is corrupted.
-
---*/
{
UINT16 Count[17];
UINT16 Weight[17];
@@ -235,25 +221,17 @@ Returns: return 0;
}
+/**
+ Decodes a position value.
+
+ @param Sd the global scratch data
+
+ @return The position value decoded.
+**/
UINT32
DecodeP (
IN SCRATCH_DATA *Sd
)
-/*++
-
-Routine Description:
-
- Decodes a position value.
-
-Arguments:
-
- Sd - the global scratch data
-
-Returns:
-
- The position value decoded.
-
---*/
{
UINT16 Val;
UINT32 Mask;
@@ -288,6 +266,21 @@ Returns: return Pos;
}
+/**
+ Reads code lengths for the Extra Set or the Position Set.
+
+ Read in the Extra Set or Pointion Set Length Arrary, then
+ generate the Huffman code mapping for them.
+
+ @param Sd The global scratch data.
+ @param nn Number of symbols.
+ @param nbit Number of bits needed to represent nn.
+ @param Special The special symbol that needs to be taken care of.
+
+ @retval 0 OK.
+ @retval BAD_TABLE Table is corrupted.
+
+**/
UINT16
ReadPTLen (
IN SCRATCH_DATA *Sd,
@@ -295,25 +288,6 @@ ReadPTLen ( IN UINT16 nbit,
IN UINT16 Special
)
-/*++
-
-Routine Description:
-
- Reads code lengths for the Extra Set or the Position Set
-
-Arguments:
-
- Sd - The global scratch data
- nn - Number of symbols
- nbit - Number of bits needed to represent nn
- Special - The special symbol that needs to be taken care of
-
-Returns:
-
- 0 - OK.
- BAD_TABLE - Table is corrupted.
-
---*/
{
UINT16 Number;
UINT16 CharC;
@@ -369,23 +343,19 @@ Returns: return MakeTable (Sd, nn, Sd->mPTLen, 8, Sd->mPTTable);
}
+/**
+ Reads code lengths for Char&Len Set.
+
+ Read in and decode the Char&Len Set Code Length Array, then
+ generate the Huffman Code mapping table for the Char&Len Set.
+
+ @param Sd the global scratch data
+
+**/
VOID
ReadCLen (
SCRATCH_DATA *Sd
)
-/*++
-
-Routine Description:
-
- Reads code lengths for Char&Len Set.
-
-Arguments:
-
- Sd - the global scratch data
-
-Returns: (VOID)
-
---*/
{
UINT16 Number;
UINT16 CharC;
@@ -462,25 +432,22 @@ Returns: (VOID) return ;
}
-UINT16
-DecodeC (
- SCRATCH_DATA *Sd
- )
-/*++
-
-Routine Description:
-
+/**
Decode a character/length value.
+
+ Read one value from mBitBuf, Get one code from mBitBuf. If it is at block boundary, generates
+ Huffman code mapping table for Extra Set, Code&Len Set and
+ Position Set.
-Arguments:
-
- Sd - The global scratch data.
-
-Returns:
+ @param Sd The global scratch data.
- The value decoded.
+ @return The value decoded.
---*/
+**/
+UINT16
+DecodeC (
+ SCRATCH_DATA *Sd
+ )
{
UINT16 Index2;
UINT32 Mask;
@@ -527,23 +494,15 @@ Returns: return Index2;
}
+/**
+ Decode the source data ad put the resulting data into the destination buffer.
+
+ @param Sd - The global scratch data
+**/
VOID
Decode (
SCRATCH_DATA *Sd
)
-/*++
-
-Routine Description:
-
- Decode the source data and put the resulting data into the destination buffer.
-
-Arguments:
-
- Sd - The global scratch data
-
-Returns: (VOID)
-
- --*/
{
UINT16 BytesRemain;
UINT32 DataIdx;
@@ -595,6 +554,17 @@ Done: return ;
}
+/**
+ The internal implementation of *_DECOMPRESS_PROTOCOL.GetInfo().
+
+ @param Source The source buffer containing the compressed data.
+ @param SourceSize The size of source buffer
+ @param DestinationSize The size of destination buffer.
+ @param ScratchSize The size of scratch buffer.
+
+ @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
+**/
RETURN_STATUS
EFIAPI
UefiDecompressGetInfo (
@@ -603,25 +573,6 @@ UefiDecompressGetInfo ( OUT UINT32 *DestinationSize,
OUT UINT32 *ScratchSize
)
-/*++
-
-Routine Description:
-
- The internal implementation of *_DECOMPRESS_PROTOCOL.GetInfo().
-
-Arguments:
-
- Source - The source buffer containing the compressed data.
- SourceSize - The size of source buffer
- DestinationSize - The size of destination buffer.
- ScratchSize - The size of scratch buffer.
-
-Returns:
-
- RETURN_SUCCESS - The size of destination buffer and the size of scratch buffer are successull retrieved.
- RETURN_INVALID_PARAMETER - The source data is corrupted
-
---*/
{
UINT32 CompressedSize;
@@ -644,6 +595,17 @@ Returns: return RETURN_SUCCESS;
}
+/**
+ The internal implementation of *_DECOMPRESS_PROTOCOL.Decompress().
+
+ @param Source The source buffer containing the compressed data.
+ @param Destination The destination buffer to store the decompressed data
+ @param Scratch The buffer used internally by the decompress routine. This buffer is needed to store intermediate data.
+ @param Version 1 for UEFI Decompress algoruthm, 2 for Tiano Decompess algorithm
+
+ @retval RETURN_SUCCESS Decompression is successfull
+ @retval RETURN_INVALID_PARAMETER The source data is corrupted
+**/
RETURN_STATUS
EFIAPI
UefiTianoDecompress (
@@ -652,25 +614,6 @@ UefiTianoDecompress ( IN OUT VOID *Scratch,
IN UINT32 Version
)
-/*++
-
-Routine Description:
-
- The internal implementation of *_DECOMPRESS_PROTOCOL.Decompress().
-
-Arguments:
-
- Source - The source buffer containing the compressed data.
- Destination - The destination buffer to store the decompressed data
- Scratch - The buffer used internally by the decompress routine. This buffer is needed to store intermediate data.
- Version - 1 for UEFI Decompress algoruthm, 2 for Tiano Decompess algorithm
-
-Returns:
-
- RETURN_SUCCESS - Decompression is successfull
- RETURN_INVALID_PARAMETER - The source data is corrupted
-
---*/
{
volatile UINT32 Index;
UINT32 CompSize;
@@ -743,6 +686,16 @@ Returns: return RETURN_SUCCESS;
}
+/**
+ The internal implementation of *_DECOMPRESS_PROTOCOL.Decompress().
+
+ @param Source - The source buffer containing the compressed data.
+ @param Destination - The destination buffer to store the decompressed data
+ @param Scratch - The buffer used internally by the decompress routine. This buffer is needed to store intermediate data.
+
+ @retval RETURN_SUCCESS - Decompression is successfull
+ @retval RETURN_INVALID_PARAMETER - The source data is corrupted
+**/
RETURN_STATUS
EFIAPI
UefiDecompress (
@@ -750,28 +703,22 @@ UefiDecompress ( IN OUT VOID *Destination,
IN OUT VOID *Scratch
)
-/*++
-
-Routine Description:
-
- The internal implementation of *_DECOMPRESS_PROTOCOL.Decompress().
-
-Arguments:
-
- Source - The source buffer containing the compressed data.
- Destination - The destination buffer to store the decompressed data
- Scratch - The buffer used internally by the decompress routine. This buffer is needed to store intermediate data.
-
-Returns:
-
- RETURN_SUCCESS - Decompression is successfull
- RETURN_INVALID_PARAMETER - The source data is corrupted
-
---*/
{
return UefiTianoDecompress (Source, Destination, Scratch, 1);
}
+/**
+ The internal implementation of Tiano decompress GetInfo.
+
+ @param InputSection Buffer containing the input GUIDed section to be processed.
+ @param OutputBufferSize The size of OutputBuffer.
+ @param ScratchBufferSize The size of ScratchBuffer.
+ @param SectionAttribute The attribute of the input guided section.
+
+ @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
+ The GUID in InputSection does not match this instance guid.
+**/
RETURN_STATUS
EFIAPI
TianoDecompressGetInfo (
@@ -780,25 +727,7 @@ TianoDecompressGetInfo ( OUT UINT32 *ScratchBufferSize,
OUT UINT16 *SectionAttribute
)
-/*++
-
-Routine Description:
-
- The internal implementation of Tiano decompress GetInfo.
-
-Arguments:
- InputSection Buffer containing the input GUIDed section to be processed.
- OutputBufferSize The size of OutputBuffer.
- ScratchBufferSize The size of ScratchBuffer.
- SectionAttribute The attribute of the input guided section.
-
-Returns:
- RETURN_SUCCESS - The size of destination buffer and the size of scratch buffer are successull retrieved.
- RETURN_INVALID_PARAMETER - The source data is corrupted
- The GUID in InputSection does not match this instance guid.
-
---*/
{
ASSERT (SectionAttribute != NULL);
@@ -827,6 +756,22 @@ Returns: );
}
+/**
+ The implementation of Tiano Decompress().
+
+ @param InputSection Buffer containing the input GUIDed section to be processed.
+ @param OutputBuffer OutputBuffer to point 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.
+ @param ScratchBuffer A pointer to a caller-allocated buffer for function internal use.
+ @param AuthenticationStatus A pointer to a caller-allocated UINT32 that indicates the
+ authentication status of the output buffer.
+
+ @retval RETURN_SUCCESS Decompression is successfull
+ @retval RETURN_INVALID_PARAMETER The source data is corrupted, or
+ The GUID in InputSection does not match this instance guid.
+
+--*/
RETURN_STATUS
EFIAPI
TianoDecompress (
@@ -835,28 +780,6 @@ TianoDecompress ( IN VOID *ScratchBuffer, OPTIONAL
OUT UINT32 *AuthenticationStatus
)
-/*++
-
-Routine Description:
-
- The implementation of Tiano Decompress().
-
-Arguments:
- InputSection Buffer containing the input GUIDed section to be processed.
- OutputBuffer OutputBuffer to point 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.
- ScratchBuffer A pointer to a caller-allocated buffer for function internal use.
- AuthenticationStatus A pointer to a caller-allocated UINT32 that indicates the
- authentication status of the output buffer. -
-Returns:
-
- RETURN_SUCCESS - Decompression is successfull
- RETURN_INVALID_PARAMETER - The source data is corrupted, or
- The GUID in InputSection does not match this instance guid.
-
---*/
{
ASSERT (OutputBuffer != NULL);
@@ -886,11 +809,11 @@ Returns: );
}
-/** +/**
Register TianoDecompress handler.
- +
@retval RETURN_SUCCESS Register successfully.
- @retval RETURN_OUT_OF_RESOURCES No enough memory to store this handler. + @retval RETURN_OUT_OF_RESOURCES No enough memory to store this handler.
**/
EFI_STATUS
EFIAPI
diff --git a/IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeSupport.c b/IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeSupport.c index 7c9a62f49e..42f7699e22 100644 --- a/IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeSupport.c +++ b/IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeSupport.c @@ -15,7 +15,7 @@ #include "ReportStatusCodeLibInternal.h"
/**
- Locatet he report status code service.
+ Locate he report status code service.
@return EFI_REPORT_STATUS_CODE function point to
ReportStatusCode.
@@ -40,7 +40,47 @@ InternalGetReportStatusCode ( return NULL;
}
+/**
+ Reports a status code with full parameters.
+
+ The function reports a status code. If ExtendedData is NULL and ExtendedDataSize
+ is 0, then an extended data buffer is not reported. If ExtendedData is not
+ NULL and ExtendedDataSize is not 0, then an extended data buffer is allocated.
+ ExtendedData is assumed not have the standard status code header, so this function
+ is responsible for allocating a buffer large enough for the standard header and
+ the extended data passed into this function. The standard header is filled in
+ with a GUID specified by ExtendedDataGuid. If ExtendedDataGuid is NULL, then a
+ GUID of gEfiStatusCodeSpecificDatauid is used. The status code is reported with
+ an instance specified by Instance and a caller ID specified by CallerId. If
+ CallerId is NULL, then a caller ID of gEfiCallerIdGuid is used.
+
+ ReportStatusCodeEx()must actively prevent recursion. If ReportStatusCodeEx()
+ is called while processing another any other Report Status Code Library function,
+ then ReportStatusCodeEx() must return EFI_DEVICE_ERROR immediately.
+
+ If ExtendedData is NULL and ExtendedDataSize is not zero, then ASSERT().
+ If ExtendedData is not NULL and ExtendedDataSize is zero, then ASSERT().
+
+ @param Type Status code type.
+ @param Value Status code value.
+ @param Instance Status code instance number.
+ @param CallerId Pointer to a GUID that identifies the caller of this
+ function. If this parameter is NULL, then a caller
+ ID of gEfiCallerIdGuid is used.
+ @param ExtendedDataGuid Pointer to the GUID for the extended data buffer.
+ If this parameter is NULL, then a the status code
+ standard header is filled in with
+ gEfiStatusCodeSpecificDataGuid.
+ @param ExtendedData Pointer to the extended data buffer. This is an
+ optional parameter that may be NULL.
+ @param ExtendedDataSize The size, in bytes, of the extended data buffer.
+
+ @retval EFI_SUCCESS The status code was reported.
+ @retval EFI_OUT_OF_RESOURCES There were not enough resources to allocate
+ the extended data section if it was specified.
+ @retval EFI_UNSUPPORTED Report status code is not supported
+**/
EFI_STATUS
EFIAPI
InternalReportStatusCodeEx (
diff --git a/IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/ReportStatusCodeLib.c b/IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/ReportStatusCodeLib.c index d4f0daddc4..7e2cc8b27a 100644 --- a/IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/ReportStatusCodeLib.c +++ b/IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/ReportStatusCodeLib.c @@ -13,8 +13,6 @@ **/
#include "ReportStatusCodeLibInternal.h"
-
-
EFI_REPORT_STATUS_CODE mReportStatusCode = NULL;
diff --git a/IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/ReportStatusCodeLibInternal.h b/IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/ReportStatusCodeLibInternal.h index d2dc4c615e..5f4c7abf9b 100644 --- a/IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/ReportStatusCodeLibInternal.h +++ b/IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/ReportStatusCodeLibInternal.h @@ -33,7 +33,7 @@ /**
- Locatet he report status code service.
+ Locate he report status code service.
@return EFI_REPORT_STATUS_CODE function point to
ReportStatusCode.
diff --git a/IntelFrameworkModulePkg/Library/GraphicsLib/Graphics.c b/IntelFrameworkModulePkg/Library/GraphicsLib/Graphics.c index ea8c7d5157..f75963e712 100644 --- a/IntelFrameworkModulePkg/Library/GraphicsLib/Graphics.c +++ b/IntelFrameworkModulePkg/Library/GraphicsLib/Graphics.c @@ -37,37 +37,30 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include <Library/DebugLib.h>
#include <Library/PcdLib.h>
-EFI_STATUS
-GetGraphicsBitMapFromFV (
- IN EFI_GUID *FileNameGuid,
- OUT VOID **Image,
- OUT UINTN *ImageSize
- )
-/*++
-
-Routine Description:
-
+/**
Return the graphics image file named FileNameGuid into Image and return it's
size in ImageSize. All Firmware Volumes (FV) in the system are searched for the
file name.
-Arguments:
-
- FileNameGuid - File Name of graphics file in the FV(s).
+ @param FileNameGuid - File Name of graphics file in the FV(s).
- Image - Pointer to pointer to return graphics image. If NULL, a
- buffer will be allocated.
+ @param Image - Pointer to pointer to return graphics image. If NULL, a
+ buffer will be allocated.
- ImageSize - Size of the graphics Image in bytes. Zero if no image found.
+ @param ImageSize - Size of the graphics Image in bytes. Zero if no image found.
+ @retval EFI_SUCCESS - Image and ImageSize are valid.
+ @retval EFI_BUFFER_TOO_SMALL - Image not big enough. ImageSize has required size
+ @retval EFI_NOT_FOUND - FileNameGuid not found
-Returns:
-
- EFI_SUCCESS - Image and ImageSize are valid.
- EFI_BUFFER_TOO_SMALL - Image not big enough. ImageSize has required size
- EFI_NOT_FOUND - FileNameGuid not found
+**/
---*/
+EFI_STATUS
+GetGraphicsBitMapFromFV (
+ IN EFI_GUID *FileNameGuid,
+ OUT VOID **Image,
+ OUT UINTN *ImageSize
+ )
{
EFI_STATUS Status;
UINTN FvProtocolCount;
@@ -120,48 +113,42 @@ Returns: return EFI_NOT_FOUND;
}
-STATIC
-EFI_STATUS
-ConvertBmpToGopBlt (
- IN VOID *BmpImage,
- IN UINTN BmpImageSize,
- IN OUT VOID **GopBlt,
- IN OUT UINTN *GopBltSize,
- OUT UINTN *PixelHeight,
- OUT UINTN *PixelWidth
- )
-/*++
-
-Routine Description:
-
+/**
Convert a *.BMP graphics image to a GOP/UGA blt buffer. If a NULL Blt buffer
is passed in a GopBlt buffer will be allocated by this routine. If a GopBlt
buffer is passed in it will be used if it is big enough.
-Arguments:
+ @param BmpImage - Pointer to BMP file
- BmpImage - Pointer to BMP file
+ @param BmpImageSize - Number of bytes in BmpImage
- BmpImageSize - Number of bytes in BmpImage
+ @param GopBlt - Buffer containing GOP version of BmpImage.
- GopBlt - Buffer containing GOP version of BmpImage.
+ @param GopBltSize - Size of GopBlt in bytes.
- GopBltSize - Size of GopBlt in bytes.
+ @param PixelHeight - Height of GopBlt/BmpImage in pixels
- PixelHeight - Height of GopBlt/BmpImage in pixels
+ @param PixelWidth - Width of GopBlt/BmpImage in pixels
- PixelWidth - Width of GopBlt/BmpImage in pixels
+ @retval EFI_SUCCESS - GopBlt and GopBltSize are returned.
+ @retval EFI_UNSUPPORTED - BmpImage is not a valid *.BMP image
+ @retval EFI_BUFFER_TOO_SMALL - The passed in GopBlt buffer is not big enough.
+ GopBltSize will contain the required size.
+ @retval EFI_OUT_OF_RESOURCES - No enough buffer to allocate
-Returns:
-
- EFI_SUCCESS - GopBlt and GopBltSize are returned.
- EFI_UNSUPPORTED - BmpImage is not a valid *.BMP image
- EFI_BUFFER_TOO_SMALL - The passed in GopBlt buffer is not big enough.
- GopBltSize will contain the required size.
- EFI_OUT_OF_RESOURCES - No enough buffer to allocate
+**/
+STATIC
+EFI_STATUS
+ConvertBmpToGopBlt (
+ IN VOID *BmpImage,
+ IN UINTN BmpImageSize,
+ IN OUT VOID **GopBlt,
+ IN OUT UINTN *GopBltSize,
+ OUT UINTN *PixelHeight,
+ OUT UINTN *PixelWidth
+ )
---*/
{
UINT8 *Image;
UINT8 *ImageHeader;
@@ -296,30 +283,23 @@ Returns: return EFI_SUCCESS;
}
-
-EFI_STATUS
-LockKeyboards (
- IN CHAR16 *Password
- )
-/*++
-
-Routine Description:
+/**
Use Console Control Protocol to lock the Console In Spliter virtual handle.
This is the ConInHandle and ConIn handle in the EFI system table. All key
presses will be ignored until the Password is typed in. The only way to
disable the password is to type it in to a ConIn device.
-Arguments:
- Password - Password used to lock ConIn device
-
+ @param Password - Password used to lock ConIn device
-Returns:
-
- EFI_SUCCESS - ConsoleControl has been flipped to graphics and logo
+ @retval EFI_SUCCESS - ConsoleControl has been flipped to graphics and logo
displayed.
- EFI_UNSUPPORTED - Logo not found
+ @retval EFI_UNSUPPORTED - Logo not found
---*/
+**/
+EFI_STATUS
+LockKeyboards (
+ IN CHAR16 *Password
+ )
{
EFI_STATUS Status;
EFI_CONSOLE_CONTROL_PROTOCOL *ConsoleControl;
@@ -333,30 +313,22 @@ Returns: return Status;
}
-
-EFI_STATUS
-EnableQuietBoot (
- IN EFI_GUID *LogoFile
- )
-/*++
-
-Routine Description:
-
+/**
Use Console Control to turn off UGA based Simple Text Out consoles from going
to the UGA device. Put up LogoFile on every UGA device that is a console
-Arguments:
-
- LogoFile - File name of logo to display on the center of the screen.
+ @param LogoFile - File name of logo to display on the center of the screen.
+ @retval EFI_SUCCESS - ConsoleControl has been flipped to graphics and logo
+ displayed.
+ @retval EFI_UNSUPPORTED - Logo not found
-Returns:
-
- EFI_SUCCESS - ConsoleControl has been flipped to graphics and logo
- displayed.
- EFI_UNSUPPORTED - Logo not found
+**/
+EFI_STATUS
+EnableQuietBoot (
+ IN EFI_GUID *LogoFile
+ )
---*/
{
EFI_STATUS Status;
EFI_CONSOLE_CONTROL_PROTOCOL *ConsoleControl;
@@ -571,28 +543,18 @@ Returns: return Status;
}
+/**
+ Use Console Control to turn on GOP/UGA based Simple Text Out consoles. The GOP/UGA
+ Simple Text Out screens will now be synced up with all non GOP/UGA output devices
+ @retval EFI_SUCCESS - GOP/UGA devices are back in text mode and synced up.
+ @retval EFI_UNSUPPORTED - Logo not found
+**/
EFI_STATUS
DisableQuietBoot (
VOID
)
-/*++
-
-Routine Description:
- Use Console Control to turn on GOP/UGA based Simple Text Out consoles. The GOP/UGA
- Simple Text Out screens will now be synced up with all non GOP/UGA output devices
-
-Arguments:
-
- NONE
-
-Returns:
-
- EFI_SUCCESS - GOP/UGA devices are back in text mode and synced up.
- EFI_UNSUPPORTED - Logo not found
-
---*/
{
EFI_STATUS Status;
EFI_CONSOLE_CONTROL_PROTOCOL *ConsoleControl;
@@ -624,51 +586,46 @@ static EFI_GRAPHICS_OUTPUT_BLT_PIXEL mEfiColors[16] = { { 0xff, 0xff, 0xff, 0x00 }
};
-STATIC
-UINTN
-_IPrint (
- IN EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput,
- IN EFI_UGA_DRAW_PROTOCOL *UgaDraw,
- IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *Sto,
- IN UINTN X,
- IN UINTN Y,
- IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Foreground,
- IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Background,
- IN CHAR16 *fmt,
- IN VA_LIST args
- )
-/*++
-
-Routine Description:
-
+/**
Display string worker for: Print, PrintAt, IPrint, IPrintAt
-Arguments:
+ @param GraphicsOutput - Graphics output protocol interface
- GraphicsOutput - Graphics output protocol interface
+ @param UgaDraw - UGA draw protocol interface
- UgaDraw - UGA draw protocol interface
+ @param Sto - Simple text out protocol interface
- Sto - Simple text out protocol interface
+ @param X - X coordinate to start printing
- X - X coordinate to start printing
+ @param Y - Y coordinate to start printing
- Y - Y coordinate to start printing
+ @param Foreground - Foreground color
- Foreground - Foreground color
+ @param Background - Background color
- Background - Background color
+ @param fmt - Format string
- fmt - Format string
+ @param args - Print arguments
- args - Print arguments
-Returns:
+ @retval EFI_SUCCESS - success
+ @retval EFI_OUT_OF_RESOURCES - out of resources
- EFI_SUCCESS - success
- EFI_OUT_OF_RESOURCES - out of resources
+**/
+STATIC
+UINTN
+_IPrint (
+ IN EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput,
+ IN EFI_UGA_DRAW_PROTOCOL *UgaDraw,
+ IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *Sto,
+ IN UINTN X,
+ IN UINTN Y,
+ IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Foreground,
+ IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Background,
+ IN CHAR16 *fmt,
+ IN VA_LIST args
+ )
---*/
{
VOID *Buffer;
EFI_STATUS Status;
@@ -812,7 +769,25 @@ Error: return Status;
}
+/**
+ Prints a formatted unicode string to the default console
+
+ @param X - X coordinate to start printing
+
+ @param Y - Y coordinate to start printing
+
+ @param ForeGround - Foreground color
+
+ @param BackGround - Background color
+
+ @param Fmt - Format string
+
+ @param ... - Print arguments
+
+ @retval Length of string printed to the console
+
+**/
UINTN
PrintXY (
IN UINTN X,
@@ -822,31 +797,6 @@ PrintXY ( IN CHAR16 *Fmt,
...
)
-/*++
-
-Routine Description:
-
- Prints a formatted unicode string to the default console
-
-Arguments:
-
- X - X coordinate to start printing
-
- Y - Y coordinate to start printing
-
- ForeGround - Foreground color
-
- BackGround - Background color
-
- Fmt - Format string
-
- ... - Print arguments
-
-Returns:
-
- Length of string printed to the console
-
---*/
{
EFI_HANDLE Handle;
@@ -894,3 +844,4 @@ Returns: return _IPrint (GraphicsOutput, UgaDraw, Sto, X, Y, ForeGround, BackGround, Fmt, Args);
}
+
diff --git a/IntelFrameworkModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.c b/IntelFrameworkModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.c index b9df977052..4da04ad69b 100644 --- a/IntelFrameworkModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.c +++ b/IntelFrameworkModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.c @@ -10,8 +10,6 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
- Module Name: OemHookStatusCodeLibNull.c
-
**/
#include <PiPei.h>
diff --git a/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c b/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c index 64808f5a13..44f733e7b3 100644 --- a/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c +++ b/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c @@ -1,5 +1,5 @@ /** @file
- Report Status Code Library for DXE Phase.
+ Report Status Code Library for PEI Phase.
Copyright (c) 2006, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
diff --git a/IntelFrameworkModulePkg/Library/SmmRuntimeDxeReportStatusCodeLibFramework/ReportStatusCodeLib.c b/IntelFrameworkModulePkg/Library/SmmRuntimeDxeReportStatusCodeLibFramework/ReportStatusCodeLib.c index d4f0daddc4..eca0fdcf0f 100644 --- a/IntelFrameworkModulePkg/Library/SmmRuntimeDxeReportStatusCodeLibFramework/ReportStatusCodeLib.c +++ b/IntelFrameworkModulePkg/Library/SmmRuntimeDxeReportStatusCodeLibFramework/ReportStatusCodeLib.c @@ -1,5 +1,5 @@ /** @file
- Report Status Code Library for DXE Phase.
+ Report Status Code Library for SMM Runtime driver.
Copyright (c) 2006 - 2007, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
diff --git a/IntelFrameworkModulePkg/Library/SmmRuntimeDxeReportStatusCodeLibFramework/SmmRuntimeDxeSupport.c b/IntelFrameworkModulePkg/Library/SmmRuntimeDxeReportStatusCodeLibFramework/SmmRuntimeDxeSupport.c index 882cad677f..dcd0b38c72 100644 --- a/IntelFrameworkModulePkg/Library/SmmRuntimeDxeReportStatusCodeLibFramework/SmmRuntimeDxeSupport.c +++ b/IntelFrameworkModulePkg/Library/SmmRuntimeDxeReportStatusCodeLibFramework/SmmRuntimeDxeSupport.c @@ -42,7 +42,7 @@ STATIC BOOLEAN mHaveExitedBootServices = FALSE;
/**
- Locatet he report status code service.
+ Locate he report status code service.
@return EFI_REPORT_STATUS_CODE function point to
ReportStatusCode.
@@ -92,7 +92,7 @@ ReportStatusCodeLibVirtualAddressChange ( }
/**
- Updatet the In Runtime Indicator.
+ Update the In Runtime Indicator.
@param[in] Event The Event that is being processed
@param[in] Context Event Context
@@ -191,7 +191,13 @@ ReportStatusCodeLibConstruct ( return Status;
}
-
+/**
+ Desctructor of library will close events.
+
+ @param ImageHandle callder module's image handle
+ @param SystemTable pointer to EFI system table.
+ @return the status of close event.
+**/
EFI_STATUS
EFIAPI
ReportStatusCodeLibDestruct (
@@ -215,7 +221,6 @@ ReportStatusCodeLibDestruct ( return Status;
}
-
/**
Reports a status code with full parameters.
@@ -299,3 +304,4 @@ InternalReportStatusCodeEx ( }
return InternalReportStatusCode (Type, Value, Instance, CallerId, mStatusCodeData);
}
+
|