From b9d5a7f1dc0079ad269bfdcde28cd958b50cf4ed Mon Sep 17 00:00:00 2001 From: lgao4 Date: Wed, 5 May 2010 02:06:23 +0000 Subject: 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 --- .../PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.c | 12 +++++++----- .../PeiExtractGuidedSectionLib.inf | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'MdePkg/Library/PeiExtractGuidedSectionLib') 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.
+ Copyright (c) 2007 - 2010, 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 @@ -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. -- cgit v1.2.3