summaryrefslogtreecommitdiff
path: root/MdePkg/Library/PeiExtractGuidedSectionLib
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2010-05-05 02:06:23 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2010-05-05 02:06:23 +0000
commitb9d5a7f1dc0079ad269bfdcde28cd958b50cf4ed (patch)
treed0634528335baf6c7bb568496dbeff3bdf172314 /MdePkg/Library/PeiExtractGuidedSectionLib
parentfcd7e6778ad04d0b9f9f8e5e4d1a75c8696393dd (diff)
downloadedk2-platforms-b9d5a7f1dc0079ad269bfdcde28cd958b50cf4ed.tar.xz
Move SecExtractGuidedSectionLib instance from OvmfPkg to MdePkg
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10459 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/PeiExtractGuidedSectionLib')
-rw-r--r--MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.c12
-rw-r--r--MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf2
2 files changed, 8 insertions, 6 deletions
diff --git a/MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.c b/MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.c
index 6b2797778c..d5c20c5a96 100644
--- a/MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.c
+++ b/MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.c
@@ -1,7 +1,7 @@
/** @file
Provide generic extract guided section functions for PEI phase.
- Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
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
@@ -67,7 +67,7 @@ PeiGetExtractGuidedSectionHandlerInfo (
HandlerInfo->ExtractGetInfoHandlerTable = (EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER *) (
(UINT8 *)HandlerInfo->ExtractDecodeHandlerTable +
PcdGet32 (PcdMaximumGuidedExtractHandler) *
- sizeof (EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER)
+ sizeof (EXTRACT_GUIDED_SECTION_DECODE_HANDLER)
);
}
//
@@ -94,6 +94,7 @@ PeiGetExtractGuidedSectionHandlerInfo (
//
// No enough resource to build guid hob.
//
+ *InfoPointer = NULL;
return EFI_OUT_OF_RESOURCES;
}
//
@@ -109,7 +110,7 @@ PeiGetExtractGuidedSectionHandlerInfo (
HandlerInfo->ExtractGetInfoHandlerTable = (EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER *) (
(UINT8 *)HandlerInfo->ExtractDecodeHandlerTable +
PcdGet32 (PcdMaximumGuidedExtractHandler) *
- sizeof (EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER)
+ sizeof (EXTRACT_GUIDED_SECTION_DECODE_HANDLER)
);
//
// return the created HandlerInfo.
@@ -148,7 +149,8 @@ ExtractGuidedSectionGetGuidList (
//
Status = PeiGetExtractGuidedSectionHandlerInfo (&HandlerInfo);
if (EFI_ERROR (Status)) {
- return Status;
+ *ExtractHandlerGuidTable = NULL;
+ return 0;
}
//
@@ -238,7 +240,7 @@ ExtractGuidedSectionRegisterHandlers (
CopyGuid (HandlerInfo->ExtractHandlerGuidTable + HandlerInfo->NumberOfExtractHandler, SectionGuid);
HandlerInfo->ExtractDecodeHandlerTable [HandlerInfo->NumberOfExtractHandler] = DecodeHandler;
HandlerInfo->ExtractGetInfoHandlerTable [HandlerInfo->NumberOfExtractHandler++] = GetInfoHandler;
-
+
return RETURN_SUCCESS;
}
diff --git a/MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf b/MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
index ff1bf2f7c6..639c058948 100644
--- a/MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
+++ b/MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
@@ -21,7 +21,7 @@
FILE_GUID = 41ddf016-2a11-415f-8880-00d938e9541a
MODULE_TYPE = PEIM
VERSION_STRING = 1.0
- LIBRARY_CLASS = ExtractGuidedSectionLib|PEIM PEI_CORE SEC
+ LIBRARY_CLASS = ExtractGuidedSectionLib|PEIM PEI_CORE
#
# The following information is for reference only and not required by the build tools.