diff options
Diffstat (limited to 'MdeModulePkg/Library')
8 files changed, 42 insertions, 30 deletions
diff --git a/MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.c b/MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.c index 1d45729eed..d2895778b2 100644 --- a/MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.c +++ b/MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.c @@ -1,5 +1,5 @@ /** @file
- Null Dxe Capsule Library instance.
+ Null Dxe Capsule Library instance does nothing and returns unsupport status.
Copyright (c) 2007 - 2008 Intel Corporation
All rights reserved. This program and the accompanying materials
@@ -15,7 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include <Library/CapsuleLib.h>
/**
- Check those capsules are supported by the firmwares.
+ The firmware checks whether the capsule image is supported
+ by the CapsuleGuid in CapsuleHeader or other specific information in capsule image.
@param CapsuleHeader Point to the UEFI capsule image to be checked.
@@ -31,7 +32,8 @@ SupportCapsuleImage ( }
/**
- The firmware implements to process the capsule image.
+ The firmware specific implementation processes the capsule image
+ if it recognized the format of this capsule image.
@param CapsuleHeader Point to the UEFI capsule image to be processed.
diff --git a/MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf b/MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf index dd2a95083e..1e7a967421 100644 --- a/MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf +++ b/MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf @@ -1,5 +1,6 @@ #/** @file
-# Capsule library NULL instance for DXE_DRIVER, DXE_RUNTIME_DRIVER
+# NULL Dxe Capsule library instance.
+# It can make core modules pass package level build.
#
# Copyright (c) 2006 - 2008, Intel Corporation.
#
diff --git a/MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.c b/MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.c index e664428d0e..b87af37a91 100644 --- a/MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.c +++ b/MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.c @@ -1,7 +1,8 @@ /** @file
- Implements CRC32 guided section handler to parse CRC32 encapsulation section,
- extract data and authenticate 32 bit CRC value.
+ This library registers CRC32 guided section handler
+ to parse CRC32 encapsulation section and extract raw data.
+ It uses UEFI boot service CalculateCrc32 to authenticate 32 bit CRC value.
Copyright (c) 2007 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
@@ -24,15 +25,19 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #define EFI_SECITON_SIZE_MASK 0x00ffffff
+///
+/// CRC32 Guided Section header
+///
typedef struct {
- EFI_GUID_DEFINED_SECTION GuidedSectionHeader;
- UINT32 CRC32Checksum;
+ EFI_GUID_DEFINED_SECTION GuidedSectionHeader; ///< EFI guided section header
+ UINT32 CRC32Checksum; ///< 32bit CRC check sum
} CRC32_SECTION_HEADER;
/**
- The implementation of Crc32 guided section GetInfo() to get
- size and attribute of the guided section.
+ GetInfo gets raw data size and attribute of the input guided section.
+ It first checks whether the input guid section is supported.
+ If not, EFI_INVALID_PARAMETER will return.
@param InputSection Buffer containing the input GUIDed section to be processed.
@param OutputBufferSize The size of OutputBuffer.
@@ -74,13 +79,16 @@ Crc32GuidedSectionGetInfo ( /**
- The implementation of Crc32 Guided section extraction to get the section data.
+ Extraction handler tries to extract raw data from the input guided section.
+ It also does authentication check for 32bit CRC value in the input guided section.
+ It first checks whether the input guid section is supported.
+ If not, EFI_INVALID_PARAMETER will return.
@param InputSection Buffer containing the input GUIDed section to be processed.
- @param OutputBuffer to contain the output data, which is allocated by the caller.
+ @param OutputBuffer Buffer to contain the output raw data 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.
+ authentication status of the output buffer.
@retval EFI_SUCCESS Section Data and Auth Status is extracted successfully.
@retval EFI_INVALID_PARAMETER The GUID in InputSection does not match this instance guid.
@@ -161,13 +169,13 @@ Crc32GuidedSectionHandler ( }
/**
- Register Crc32 section handler.
+ Register the handler to extract CRC32 guided section.
@param ImageHandle ImageHandle of the loaded driver.
@param SystemTable Pointer to the EFI System Table.
- @retval RETURN_SUCCESS Register successfully.
- @retval RETURN_OUT_OF_RESOURCES No enough memory to register this handler.
+ @retval EFI_SUCCESS Register successfully.
+ @retval EFI_OUT_OF_RESOURCES No enough memory to register this handler.
**/
EFI_STATUS
EFIAPI
diff --git a/MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf b/MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf index 360ee66540..f13098f8d3 100644 --- a/MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf +++ b/MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf @@ -1,5 +1,8 @@ #/** @file
-# Crc32SectionExtract library instance registers Crc32 handler into ExtractGuidedSectionLib.
+# This library doesn't produce any library class. In its constructor function,
+# it uses ExtractGuidedSectionLib service to registers CRC32 guided section handler
+# that parses CRC32 encapsulation section and extracts raw data.
+# It uses UEFI boot service CalculateCrc32 to authenticate 32 bit CRC value.
#
# Copyright (c) 2006 - 2008, Intel Corporation
#
@@ -10,7 +13,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.
#
-#
#**/
[Defines]
@@ -43,6 +45,6 @@ BaseMemoryLib
[Protocols]
- gEfiCrc32GuidedSectionExtractionProtocolGuid
- gEfiSecurityPolicyProtocolGuid
+ gEfiCrc32GuidedSectionExtractionProtocolGuid # ALWAYS CONSUMED used as Guid, not protocol service
+ gEfiSecurityPolicyProtocolGuid # ALWAYS CONSUMED
\ No newline at end of file diff --git a/MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.c b/MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.c index 40acc57c95..1f60871a66 100644 --- a/MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.c +++ b/MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.c @@ -1,6 +1,5 @@ /** @file
- Null Recovery Library instance.
- This library class defines a set of methods related do recovery.
+ Null Recovery Library instance does nothing and returns unsupport status.
Copyright (c) 2006 - 2008, Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials
@@ -13,9 +12,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/
#include <PiPei.h>
+#include <Library/RecoveryLib.h>
/**
- Calling this function causes the system do recovery.
+ Calling this function causes the system do recovery boot path.
@retval EFI_UNSUPPORTED Recovery is not supported.
**/
diff --git a/MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.inf b/MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.inf index 041b5a320c..cdfbb49af5 100644 --- a/MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.inf +++ b/MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.inf @@ -1,6 +1,7 @@ #/** @file
#
# Null Recovery library instance for PEIM module
+# It can make core modules pass package level build.
#
# Copyright (c) 2006 - 2008, Intel Corporation. <BR>
# All rights reserved. This program and the accompanying materials
diff --git a/MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.c b/MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.c index 6cceceab08..096a6af885 100644 --- a/MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.c +++ b/MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.c @@ -1,5 +1,5 @@ /** @file
- S3 Library. This library class defines a set of methods related do S3 mode
+ Null S3 Library instance does nothing and returns unsupport status.
Copyright (c) 2006 - 2008, Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials
@@ -12,6 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/
#include <PiPei.h>
+#include <Library/S3Lib.h>
/**
This function is responsible for calling the S3 resume vector in the ACPI Tables.
diff --git a/MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.inf b/MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.inf index b2ba7271d8..df99874b38 100644 --- a/MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.inf +++ b/MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.inf @@ -1,6 +1,7 @@ #/** @file
#
-# A NULL instance of S3 Library for PEIM
+# Null S3 library instance for PEIM module
+# It can make core modules pass package level build.
#
# Copyright (c) 2006 - 2008, Intel Corporation.
#
@@ -29,13 +30,9 @@ # VALID_ARCHITECTURES = IA32 X64 IPF EBC (EBC is for build only)
#
-[Sources.common]
+[Sources]
PeiS3LibNull.c
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
-
-[LibraryClasses]
- BaseLib
-
|