From: qwang12 Date: Fri, 12 Sep 2008 01:56:56 +0000 (+0000) Subject: Delete the unused PEIMs. EDK 2 PEI core now support this feature by gEfiMdeModulePkgT... X-Git-Tag: edk2-stable201903~20339 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;ds=inline;h=1e52ce5da84272244230e4dae4bfcb03f41c9662;p=mirror_edk2.git Delete the unused PEIMs. EDK 2 PEI core now support this feature by gEfiMdeModulePkgTokenSpaceGuid.PcdFrameworkFvHobCompatibilitySupport. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5884 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/EdkCompatibilityPkg/Compatibility/FvInfoToFvHobThunk/FvInfoToFvHobThunk.c b/EdkCompatibilityPkg/Compatibility/FvInfoToFvHobThunk/FvInfoToFvHobThunk.c deleted file mode 100644 index a98331edc0..0000000000 --- a/EdkCompatibilityPkg/Compatibility/FvInfoToFvHobThunk/FvInfoToFvHobThunk.c +++ /dev/null @@ -1,110 +0,0 @@ -/** @file - Module produces EFI_FIRMWARE_VOLUME_INFO_PPI based on each FV HOB if no such PPI exist for the FV. - - UEFI PI Spec supersedes Intel's Framework Specs. - EFI_FIRMWARE_VOLUME_INFO_PPI defined in PI spec is required by PI PEI core to dispatch PEIMs or find DXE core - in the FV. - This module produces produces EFI_FIRMWARE_VOLUME_INFO_PPI based on each FV HOB if no such PPI exist for the FV. - This module is used on platform when both of these two conditions are true: - 1) Framework platform module produces FV HOB but does not build EFI_FIRMWARE_VOLUME_INFO_PPI. - 2) The platform has PI PEI core that cosumes EFI_FIRMWARE_VOLUME_INFO_PPI to dispatch PEIMs or DXE core - in FVs other than Boot Fimware Volume. - -Copyright (c) 2008 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: - -**/ - -#include -#include -#include -#include -#include -#include -#include - - -/** - Check if there is a matching EFI_PEI_FIRMWARE_VOLUME_INFO_PPI for the FV described by FvHob. - - This function located all existing instance of EFI_PEI_FIRMWARE_VOLUME_INFO_PPI in the platform. - Then it compare the base address of the FVs found with that of FvHob. If a matching base address is - found, the function return TRUE. Otherwise, FALSE is returned. - - If a matching base address of FV is found but the length of FV does not match, then ASSERT (). - - @param FvHob The FV Hob. - - @retval TRUE A instance of EFI_PEI_FIRMWARE_VOLUME_INFO_PPI is already installed. - -**/ -BOOLEAN -FvInfoPpiInstalled ( - EFI_HOB_FIRMWARE_VOLUME * FvHob - ) -{ - EFI_STATUS Status; - UINTN Idx; - EFI_PEI_FIRMWARE_VOLUME_INFO_PPI *FvInfoPpi; - - for (Idx = 0; ; Idx++) { - Status = PeiServicesLocatePpi ( - &gEfiPeiFirmwareVolumeInfoPpiGuid, - Idx, - NULL, - (VOID **) &FvInfoPpi - ); - if (!EFI_ERROR (Status)) { - if (FvHob->BaseAddress == (EFI_PHYSICAL_ADDRESS) (UINTN) FvInfoPpi->FvInfo) { - ASSERT (FvHob->Length == (UINT64) FvInfoPpi->FvInfoSize); - return TRUE; - } - } else { - break; - } - } - - return FALSE; -} - -/** - PEIM's standard entry point. - - @param FfsHeader Image's header - @param PeiServices Pointer of EFI_PEI_SERVICES - @return EFI_SUCESS This entry point always return successfully. - -**/ -EFI_STATUS -EFIAPI -PeimEntry ( - IN EFI_PEI_FILE_HANDLE FfsHeader, - IN CONST EFI_PEI_SERVICES **PeiServices - ) -{ - EFI_PEI_HOB_POINTERS HobPointer; - - for (HobPointer.Raw = GetNextHob (EFI_HOB_TYPE_FV, GetHobList ()); - HobPointer.Raw != NULL; - HobPointer.Raw = GetNextHob (EFI_HOB_TYPE_FV, GET_NEXT_HOB (HobPointer))) { - if (!FvInfoPpiInstalled (HobPointer.FirmwareVolume)) { - PiLibInstallFvInfoPpi ( - &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) HobPointer.FirmwareVolume->BaseAddress)->FileSystemGuid), - (VOID *) (UINTN) HobPointer.FirmwareVolume->BaseAddress, - (UINT32) HobPointer.FirmwareVolume->Length, - NULL, - NULL - ); - } - } - - return EFI_SUCCESS; -} - diff --git a/EdkCompatibilityPkg/Compatibility/FvInfoToFvHobThunk/FvInfoToFvHobThunk.inf b/EdkCompatibilityPkg/Compatibility/FvInfoToFvHobThunk/FvInfoToFvHobThunk.inf deleted file mode 100644 index ade8980f38..0000000000 --- a/EdkCompatibilityPkg/Compatibility/FvInfoToFvHobThunk/FvInfoToFvHobThunk.inf +++ /dev/null @@ -1,64 +0,0 @@ -#/** @file -# Module produces EFI_FIRMWARE_VOLUME_INFO_PPI based on each FV HOB if no such PPI exist for the FV. -# -# UEFI PI Spec supersedes Intel's Framework Specs. -# EFI_FIRMWARE_VOLUME_INFO_PPI defined in PI spec is required by PI PEI core to dispatch PEIMs or find DXE cores -# in the FV. -# This module produces produces EFI_FIRMWARE_VOLUME_INFO_PPI based on each FV HOB if no such PPI exist for the FV. -# This module is used on platform when both of these two conditions are true: -# 1) Framework platform module produces FV HOB but does not build EFI_FIRMWARE_VOLUME_INFO_PPI. -# 2) The platform has PI PEI core that cosumes EFI_FIRMWARE_VOLUME_INFO_PPI to dispatch PEIMs in FVs other -# than Boot Fimware Volume. -# -# -# Copyright (c) 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. -# -# -#**/ - -[Defines] - INF_VERSION = 0x00010005 - BASE_NAME = FvInfoToFvHobThunk - FILE_GUID = 9E00A9F6-B88E-4ab5-A825-15970E12731A - MODULE_TYPE = PEIM - VERSION_STRING = 1.0 - EDK_RELEASE_VERSION = 0x00020000 - EFI_SPECIFICATION_VERSION = 0x00020000 - - ENTRY_POINT = PeimEntry - -# -# The following information is for reference only and not required by the build tools. -# -# VALID_ARCHITECTURES = IA32 X64 IPF EBC -# - -[Sources.common] - FvInfoToFvHobThunk.c - -[Packages] - MdePkg/MdePkg.dec - IntelFrameworkPkg/IntelFrameworkPkg.dec - -[LibraryClasses] - PeimEntryPoint - PeiServicesLib - PeiServicesTablePointerLib - DebugLib - HobLib - PeiPiLib - -[Ppis] - gEfiPeiFirmwareVolumeInfoPpiGuid - -[Depex] - # This DPX ensure that this module is dispatched as late as possible in PEI phase - # so that all FV HOB has been built. - gEfiPeiMemoryDiscoveredPpiGuid