diff options
author | lzeng14 <lzeng14@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-10-27 08:45:50 +0000 |
---|---|---|
committer | lzeng14 <lzeng14@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-10-27 08:45:50 +0000 |
commit | 30f001ca5f08974c8d5a5483f8b8e1a4f46a1025 (patch) | |
tree | d62379284334ffba61bd2a83d80b08cc4b2c6a94 /MdePkg/Library/DxeExtractGuidedSectionLib | |
parent | 59d88f42ca8b2d1556e52930a164f908814b9b9e (diff) | |
download | edk2-platforms-30f001ca5f08974c8d5a5483f8b8e1a4f46a1025.tar.xz |
Add core FFS3 support, ExtractGuidedSectionLib/GuidedSectionExtractionLib/PiFirmwareFile.h.
Signed-off-by: lzeng14
Reviewed-by: lgao4
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12582 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/DxeExtractGuidedSectionLib')
-rw-r--r-- | MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.c b/MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.c index b8bb83c20e..609b329f62 100644 --- a/MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.c +++ b/MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.c @@ -1,7 +1,7 @@ /** @file
Provide generic extract guided section functions for Dxe phase.
- Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2007 - 2011, 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
@@ -259,17 +259,24 @@ ExtractGuidedSectionGetInfo ( )
{
UINT32 Index;
+ EFI_GUID *SectionDefinitionGuid;
ASSERT (InputSection != NULL);
ASSERT (OutputBufferSize != NULL);
ASSERT (ScratchBufferSize != NULL);
ASSERT (SectionAttribute != NULL);
+
+ if (IS_SECTION2 (InputSection)) {
+ SectionDefinitionGuid = &(((EFI_GUID_DEFINED_SECTION2 *) InputSection)->SectionDefinitionGuid);
+ } else {
+ SectionDefinitionGuid = &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid);
+ }
//
// Search the match registered GetInfo handler for the input guided section.
//
for (Index = 0; Index < mNumberOfExtractHandler; Index ++) {
- if (CompareGuid (&mExtractHandlerGuidTable[Index], &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid))) {
+ if (CompareGuid (&mExtractHandlerGuidTable[Index], SectionDefinitionGuid)) {
//
// Call the match handler to getinfo for the input section data.
//
@@ -333,6 +340,7 @@ ExtractGuidedSectionDecode ( )
{
UINT32 Index;
+ EFI_GUID *SectionDefinitionGuid;
//
// Check the input parameters
@@ -341,11 +349,17 @@ ExtractGuidedSectionDecode ( ASSERT (OutputBuffer != NULL);
ASSERT (AuthenticationStatus != NULL);
+ if (IS_SECTION2 (InputSection)) {
+ SectionDefinitionGuid = &(((EFI_GUID_DEFINED_SECTION2 *) InputSection)->SectionDefinitionGuid);
+ } else {
+ SectionDefinitionGuid = &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid);
+ }
+
//
// 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))) {
+ if (CompareGuid (&mExtractHandlerGuidTable[Index], SectionDefinitionGuid)) {
//
// Call the match handler to extract raw data for the input section data.
//
|