summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/DxeExtractGuidedSectionLib
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2008-07-15 11:12:43 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2008-07-15 11:12:43 +0000
commiteceb3a4cb9b97d331ba91ea0a930465c05e8e20b (patch)
tree2f30cbf356491a3bea738c3facb2c37d056ffd66 /MdePkg/Library/DxeExtractGuidedSectionLib
parent329d3f3d01b5470a2311ada36e36664519eb3447 (diff)
downloadedk2-eceb3a4cb9b97d331ba91ea0a930465c05e8e20b.tar.gz
edk2-eceb3a4cb9b97d331ba91ea0a930465c05e8e20b.tar.bz2
edk2-eceb3a4cb9b97d331ba91ea0a930465c05e8e20b.zip
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
Diffstat (limited to 'MdePkg/Library/DxeExtractGuidedSectionLib')
-rw-r--r--MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.c37
-rw-r--r--MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf4
2 files changed, 23 insertions, 18 deletions
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<BR>
+ Copyright (c) 2007 - 2008, Intel Corporation<BR>
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