diff --git a/MdeModulePkg/Core/Dxe/DxeMain.h b/MdeModulePkg/Core/Dxe/DxeMain.h index ed531f7bcc..b033009275 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain.h +++ b/MdeModulePkg/Core/Dxe/DxeMain.h @@ -79,7 +79,6 @@ Revision History #include #include #include -#include #include #include #include @@ -203,7 +202,6 @@ extern EFI_DXE_SERVICES *gDxeCoreDS; extern EFI_HANDLE gDxeCoreImageHandle; extern EFI_DECOMPRESS_PROTOCOL gEfiDecompress; -extern EFI_PEI_PE_COFF_LOADER_PROTOCOL *gEfiPeiPeCoffLoader; extern EFI_RUNTIME_ARCH_PROTOCOL *gRuntime; extern EFI_CPU_ARCH_PROTOCOL *gCpu; diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h index 71ca9c360e..52df88f1bf 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h @@ -42,7 +42,6 @@ Abstract: #include #include #include -#include #include #include #include @@ -61,15 +60,6 @@ Abstract: extern BOOLEAN gInMemory; -EFI_STATUS -PeiFindFile ( - IN UINT8 Type, - IN EFI_SECTION_TYPE SectionType, - OUT EFI_GUID *FileName, - OUT VOID **Pe32Data - ) -; - EFI_STATUS PeiLoadFile ( IN EFI_PEI_FILE_HANDLE FileHandle, @@ -100,31 +90,6 @@ GetImageReadFunction ( ) ; -EFI_STATUS -PeiImageRead ( - IN VOID *FileHandle, - IN UINTN FileOffset, - IN OUT UINTN *ReadSize, - OUT VOID *Buffer - ) -; - -EFI_STATUS -EFIAPI -DxeIplLoadFile ( - IN EFI_PEI_FV_FILE_LOADER_PPI *This, - IN EFI_FFS_FILE_HEADER *FfsHeader, - OUT EFI_PHYSICAL_ADDRESS *ImageAddress, - OUT UINT64 *ImageSize, - OUT EFI_PHYSICAL_ADDRESS *EntryPoint - ); - -EFI_STATUS -ShadowDxeIpl ( - IN EFI_FFS_FILE_HEADER *DxeIpl, - IN EFI_PEI_PE_COFF_LOADER_PROTOCOL *PeiEfiPeiPeCoffLoader - ); - EFI_STATUS EFIAPI DxeLoadCore ( @@ -140,14 +105,6 @@ HandOffToDxeCore ( IN EFI_PEI_PPI_DESCRIPTOR *EndOfPeiSignal ); -EFI_STATUS -PeiProcessFile ( - IN EFI_SECTION_TYPE SectionType, - IN EFI_FFS_FILE_HEADER *FfsFileHeader, - OUT VOID **Pe32Data, - IN EFI_PEI_HOB_POINTERS *OrigHob - ); - EFI_STATUS EFIAPI PeimInitializeDxeIpl ( diff --git a/MdeModulePkg/Core/Pei/Image/Image.c b/MdeModulePkg/Core/Pei/Image/Image.c index a430d3ea7a..bf7f6e5ae0 100644 --- a/MdeModulePkg/Core/Pei/Image/Image.c +++ b/MdeModulePkg/Core/Pei/Image/Image.c @@ -557,8 +557,7 @@ InitializeImageServices ( Routine Description: - Regitser PeCoffLoader to PeiCore PrivateData. And install - Pei Load File PPI. + Install Pei Load File PPI. Arguments: diff --git a/MdeModulePkg/Core/Pei/PeiMain.h b/MdeModulePkg/Core/Pei/PeiMain.h index 2d1e29d9f4..e14afd0723 100644 --- a/MdeModulePkg/Core/Pei/PeiMain.h +++ b/MdeModulePkg/Core/Pei/PeiMain.h @@ -44,11 +44,11 @@ Revision History #include #include #include +#include #include #include #include #include -#include #include #include #include @@ -1399,8 +1399,7 @@ InitializeImageServices ( Routine Description: - Regitser PeCoffLoader to PeiCore PrivateData. And install - Pei Load File PPI. + Install Pei Load File PPI. Arguments: diff --git a/MdeModulePkg/Core/Pei/PeiMain.inf b/MdeModulePkg/Core/Pei/PeiMain.inf index d8db002ea8..1760081cd3 100644 --- a/MdeModulePkg/Core/Pei/PeiMain.inf +++ b/MdeModulePkg/Core/Pei/PeiMain.inf @@ -87,7 +87,6 @@ [Guids] gPeiAprioriFileNameGuid gEfiFirmwareFileSystem2Guid - gEfiPeiPeCoffLoaderGuid [Ppis] gEfiPeiSecurityPpiGuid # PPI_NOTIFY SOMETIMES_CONSUMED diff --git a/MdeModulePkg/Include/Library/PeCoffLoaderLib.h b/MdeModulePkg/Include/Library/PeCoffLoaderLib.h deleted file mode 100644 index df0133cf34..0000000000 --- a/MdeModulePkg/Include/Library/PeCoffLoaderLib.h +++ /dev/null @@ -1,34 +0,0 @@ -/*++ - -Copyright (c) 2006, 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 -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -Module Name: - - EdkPeCoffLoaderLib.h - -Abstract: - Wrap the Base PE/COFF loader with the PE COFF Protocol - - - ---*/ - -#ifndef __PE_COFF_LOADER_LIB_H_ -#define __PE_COFF_LOADER_LIB_H_ - -#include - -EFI_PEI_PE_COFF_LOADER_PROTOCOL* -EFIAPI -GetPeCoffLoaderProtocol ( - VOID - ); - -#endif diff --git a/MdeModulePkg/Library/DxePeCoffLoaderFromHobLib/DxePeCoffLoaderFromHobLib.inf b/MdeModulePkg/Library/DxePeCoffLoaderFromHobLib/DxePeCoffLoaderFromHobLib.inf deleted file mode 100644 index 2340e69e3c..0000000000 --- a/MdeModulePkg/Library/DxePeCoffLoaderFromHobLib/DxePeCoffLoaderFromHobLib.inf +++ /dev/null @@ -1,47 +0,0 @@ -#/** @file -# EdkPeCoffLoaderLib library instance -# -# This library gets PeCoffLoader Protocol from Hob List -# Copyright (c) 2006, 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 -# http://opensource.org/licenses/bsd-license.php -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# -#**/ - -[Defines] - INF_VERSION = 0x00010005 - BASE_NAME = EdkDxePeCoffLoaderFromHobLib - FILE_GUID = ed3de5c8-c389-44f2-a35e-2ebdc9802a49 - MODULE_TYPE = DXE_DRIVER - VERSION_STRING = 1.0 - LIBRARY_CLASS = PeCoffLoaderLib|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 - - -# -# The following information is for reference only and not required by the build tools. -# -# VALID_ARCHITECTURES = IA32 X64 IPF EBC -# - -[Sources.common] - PeCoff.c - -[Packages] - MdeModulePkg/MdeModulePkg.dec - MdePkg/MdePkg.dec - -[LibraryClasses] - HobLib - - -[Guids] - gEfiPeiPeCoffLoaderGuid # ALWAYS_CONSUMED - diff --git a/MdeModulePkg/Library/DxePeCoffLoaderFromHobLib/EdkDxePeCoffLoaderFromHobLib.msa b/MdeModulePkg/Library/DxePeCoffLoaderFromHobLib/EdkDxePeCoffLoaderFromHobLib.msa deleted file mode 100644 index 7351c7351a..0000000000 --- a/MdeModulePkg/Library/DxePeCoffLoaderFromHobLib/EdkDxePeCoffLoaderFromHobLib.msa +++ /dev/null @@ -1,48 +0,0 @@ - - - - EdkDxePeCoffLoaderFromHobLib - DXE_DRIVER - ed3de5c8-c389-44f2-a35e-2ebdc9802a49 - 1.0 - EdkPeCoffLoaderLib library instance - This library gets PeCoffLoader Protocol from Hob List - Copyright (c) 2006, 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 - http://opensource.org/licenses/bsd-license.php - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052 - - - IA32 X64 IPF EBC - false - EdkDxePeCoffLoaderFromHobLib - - - - EdkPeCoffLoaderLib - - - HobLib - - - - PeCoff.c - - - - - - - - gEfiPeiPeCoffLoaderGuid - - - - EFI_SPECIFICATION_VERSION 0x00020000 - EDK_RELEASE_VERSION 0x00020000 - - \ No newline at end of file diff --git a/MdeModulePkg/Library/DxePeCoffLoaderFromHobLib/PeCoff.c b/MdeModulePkg/Library/DxePeCoffLoaderFromHobLib/PeCoff.c deleted file mode 100644 index 44ec3ca1a9..0000000000 --- a/MdeModulePkg/Library/DxePeCoffLoaderFromHobLib/PeCoff.c +++ /dev/null @@ -1,44 +0,0 @@ -/*++ - -Copyright (c) 2006, 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 -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -Module Name: - - Decompress.c - -Abstract: - ---*/ - - -#include - -#include - -#include -#include - - - -EFI_PEI_PE_COFF_LOADER_PROTOCOL * -EFIAPI -GetPeCoffLoaderProtocol ( - ) -{ - EFI_HOB_GUID_TYPE *GuidHob; - - GuidHob = GetFirstGuidHob (&gEfiPeiPeCoffLoaderGuid); - if (GuidHob == NULL) { - return NULL; - } else { - return (EFI_PEI_PE_COFF_LOADER_PROTOCOL *)(*(UINTN *)(GET_GUID_HOB_DATA (GuidHob))); - } -} - diff --git a/MdeModulePkg/Library/PeiDxePeCoffLoaderLib/PeCoffLoader.c b/MdeModulePkg/Library/PeiDxePeCoffLoaderLib/PeCoffLoader.c deleted file mode 100644 index c8f6b871aa..0000000000 --- a/MdeModulePkg/Library/PeiDxePeCoffLoaderLib/PeCoffLoader.c +++ /dev/null @@ -1,123 +0,0 @@ -/*++ - -Copyright (c) 2006 - 2007, 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 -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -Module Name: - - EdkPeCoffLoader.c - -Abstract: - - Wrap the Base PE/COFF loader with the PE COFF Protocol - - ---*/ - - -#include - -#include - -#include - -#include - - -STATIC -EFI_STATUS -EFIAPI -PeCoffLoaderLibGetImageInfo ( - IN EFI_PEI_PE_COFF_LOADER_PROTOCOL *This, - IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext - ) -{ - EFI_STATUS Status; - - Status = PeCoffLoaderGetImageInfo (ImageContext); - if (EFI_ERROR (Status)) { - return Status; - } - - switch (ImageContext->ImageType) { - - case EFI_IMAGE_SUBSYSTEM_EFI_APPLICATION: - ImageContext->ImageCodeMemoryType = EfiLoaderCode; - ImageContext->ImageDataMemoryType = EfiLoaderData; - break; - - case EFI_IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER: - ImageContext->ImageCodeMemoryType = EfiBootServicesCode; - ImageContext->ImageDataMemoryType = EfiBootServicesData; - break; - - case EFI_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER: - case EFI_IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER: - ImageContext->ImageCodeMemoryType = EfiRuntimeServicesCode; - ImageContext->ImageDataMemoryType = EfiRuntimeServicesData; - break; - - default: - ImageContext->ImageError = IMAGE_ERROR_INVALID_SUBSYSTEM; - return RETURN_UNSUPPORTED; - } - - return Status; -} - -STATIC -EFI_STATUS -EFIAPI -PeCoffLoaderLibLoadImage ( - IN EFI_PEI_PE_COFF_LOADER_PROTOCOL *This, - IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext - ) -{ - return PeCoffLoaderLoadImage (ImageContext); -} - -STATIC -EFI_STATUS -EFIAPI -PeCoffLoaderLibRelocateImage ( - IN EFI_PEI_PE_COFF_LOADER_PROTOCOL *This, - IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext - ) -{ - return PeCoffLoaderRelocateImage (ImageContext); -} - -STATIC -EFI_STATUS -EFIAPI -PeCoffLoaderLibUnloadimage ( - IN EFI_PEI_PE_COFF_LOADER_PROTOCOL *This, - IN PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext - ) -{ - return EFI_SUCCESS; -} - - -EFI_PEI_PE_COFF_LOADER_PROTOCOL mPeiEfiPeiPeCoffLoader = { - PeCoffLoaderLibGetImageInfo, - PeCoffLoaderLibLoadImage, - PeCoffLoaderLibRelocateImage, - PeCoffLoaderLibUnloadimage -}; - -EFI_PEI_PE_COFF_LOADER_PROTOCOL * -EFIAPI -GetPeCoffLoaderProtocol ( - ) -{ - return &mPeiEfiPeiPeCoffLoader; -} - - diff --git a/MdeModulePkg/Library/PeiDxePeCoffLoaderLib/PeCoffLoaderLib.inf b/MdeModulePkg/Library/PeiDxePeCoffLoaderLib/PeCoffLoaderLib.inf deleted file mode 100644 index 1c60764e95..0000000000 --- a/MdeModulePkg/Library/PeiDxePeCoffLoaderLib/PeCoffLoaderLib.inf +++ /dev/null @@ -1,45 +0,0 @@ -#/** @file -# DxePeCoffLoaderLib library instance -# -# This library provides PeCoffLoader protocol based on PeCoffLib functions. -# Copyright (c) 2006, 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 -# http://opensource.org/licenses/bsd-license.php -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# -#**/ - -[Defines] - INF_VERSION = 0x00010005 - BASE_NAME = PeiDxePeCoffLoaderLib - FILE_GUID = 858bbbc9-474f-4556-a361-0ae52a44ffa5 - MODULE_TYPE = PEIM - VERSION_STRING = 1.0 - LIBRARY_CLASS = PeCoffLoaderLib|DXE_CORE PEIM - EDK_RELEASE_VERSION = 0x00020000 - EFI_SPECIFICATION_VERSION = 0x00020000 - - -# -# The following information is for reference only and not required by the build tools. -# -# VALID_ARCHITECTURES = IA32 X64 IPF EBC -# - -[Sources.common] - PeCoffLoader.c - - -[Packages] - MdePkg/MdePkg.dec - MdeModulePkg/MdeModulePkg.dec - - -[LibraryClasses] - PeCoffLib - diff --git a/MdeModulePkg/Library/PeiDxePeCoffLoaderLib/PeCoffLoaderLib.msa b/MdeModulePkg/Library/PeiDxePeCoffLoaderLib/PeCoffLoaderLib.msa deleted file mode 100644 index b015020ec3..0000000000 --- a/MdeModulePkg/Library/PeiDxePeCoffLoaderLib/PeCoffLoaderLib.msa +++ /dev/null @@ -1,44 +0,0 @@ - - - - PeiDxePeCoffLoaderLib - PEIM - 858bbbc9-474f-4556-a361-0ae52a44ffa5 - 1.0 - DxePeCoffLoaderLib library instance - This library provides PeCoffLoader protocol based on PeCoffLib functions. - Copyright (c) 2006, 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 - http://opensource.org/licenses/bsd-license.php - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052 - - - IA32 X64 IPF EBC - false - PeiDxePeCoffLoaderLib - - - - PeiDxeCorePeCoffLoaderLib - - - PeCoffLib - - - - PeCoffLoader.c - PeCoffLoaderLibInternals.h - - - - - - - EFI_SPECIFICATION_VERSION 0x00020000 - EDK_RELEASE_VERSION 0x00020000 - - \ No newline at end of file diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index b0027fe61c..4ed02e1a86 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -29,7 +29,6 @@ [LibraryClasses.common] IpIoLib|Include/Library/IpIoLib.h NetLib|Include/Library/NetLib.h - PeCoffLoaderLib|Include/Library/PeCoffLoaderLib.h ResetSystemLib|Include/Library/ResetSystemLib.h UdpIoLib|Include/Library/UdpIoLib.h S3Lib|Include/Library/S3Lib.h