From 2ea767cc9438b19182674d147712cc8d2c35a466 Mon Sep 17 00:00:00 2001 From: klu2 Date: Tue, 10 Oct 2006 09:59:34 +0000 Subject: Set Hob type for FvMainCompactFv to EFI_HOB_TYPE_UNUSED after decompressed. The can improve the performance of Dxe dispatcher. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1706 6f19259b-4bc3-4df7-8a09-765794883524 --- EdkModulePkg/Core/DxeIplX64Peim/DxeIpl.h | 3 ++- EdkModulePkg/Core/DxeIplX64Peim/DxeLoadX64.c | 17 +++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/EdkModulePkg/Core/DxeIplX64Peim/DxeIpl.h b/EdkModulePkg/Core/DxeIplX64Peim/DxeIpl.h index 13b1a69..53ee7e2 100644 --- a/EdkModulePkg/Core/DxeIplX64Peim/DxeIpl.h +++ b/EdkModulePkg/Core/DxeIplX64Peim/DxeIpl.h @@ -104,7 +104,8 @@ EFI_STATUS PeiProcessFile ( IN UINT16 SectionType, IN OUT EFI_FFS_FILE_HEADER **RealFfsFileHeader, - OUT VOID **Pe32Data + OUT VOID **Pe32Data, + IN EFI_PEI_HOB_POINTERS *OrigHob ); EFI_STATUS diff --git a/EdkModulePkg/Core/DxeIplX64Peim/DxeLoadX64.c b/EdkModulePkg/Core/DxeIplX64Peim/DxeLoadX64.c index d01daaf..33ca3bb 100644 --- a/EdkModulePkg/Core/DxeIplX64Peim/DxeLoadX64.c +++ b/EdkModulePkg/Core/DxeIplX64Peim/DxeLoadX64.c @@ -435,7 +435,8 @@ Returns: Status = PeiProcessFile ( SectionType, &FfsFileHeader, - Pe32Data + Pe32Data, + &Hob ); CopyMem (FileName, &FfsFileHeader->Name, sizeof (EFI_GUID)); return Status; @@ -650,7 +651,8 @@ Returns: Status = PeiProcessFile ( EFI_SECTION_PE32, &FfsHeader, - &Pe32Data + &Pe32Data, + NULL ); if (EFI_ERROR (Status)) { @@ -675,7 +677,8 @@ EFI_STATUS PeiProcessFile ( IN UINT16 SectionType, IN OUT EFI_FFS_FILE_HEADER **RealFfsFileHeader, - OUT VOID **Pe32Data + OUT VOID **Pe32Data, + IN EFI_PEI_HOB_POINTERS *OrigHob ) /*++ @@ -930,11 +933,17 @@ Returns: return EFI_NOT_FOUND; } + if (OrigHob != NULL) { + // + // + OrigHob->Header->HobType = EFI_HOB_TYPE_UNUSED; + } + // // Reture the FfsHeader that contain Pe32Data. // *RealFfsFileHeader = FfsFileHeader; - return PeiProcessFile (SectionType, RealFfsFileHeader, Pe32Data); + return PeiProcessFile (SectionType, RealFfsFileHeader, Pe32Data, OrigHob); } } // -- cgit v1.1