Reviewed-by: Sai Chaganty <[email protected]> -----Original Message----- From: [email protected] <[email protected]> On Behalf Of Oram, Isaac W Sent: Friday, October 15, 2021 2:26 PM To: [email protected] Cc: Chiu, Chasel <[email protected]>; Desimone, Nathaniel L <[email protected]>; Liming Gao <[email protected]>; Dong, Eric <[email protected]> Subject: [edk2-devel][edk2-platforms][PATCH V1 11/11] MinPlatformPkg/ReportFvLib: Remove obsolete PeiReportFvLib instance
All boards have been updated to use the new libraries or custom instances. Cc: Chasel Chiu <[email protected]> Cc: Nate DeSimone <[email protected]> Cc: Liming Gao <[email protected]> Cc: Eric Dong <[email protected]> Signed-off-by: Isaac Oram <[email protected]> --- Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc | 1 - Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c | 143 -------------------- Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf | 50 ------- 3 files changed, 194 deletions(-) diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc index 1dfca06a10..58415326f4 100644 --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc @@ -93,7 +93,6 @@ # PEI phase common # FspWrapperPlatformLib|MinPlatformPkg/FspWrapper/Library/PeiFspWrapperPlatformLib/PeiFspWrapperPlatformLib.inf - ReportFvLib|MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf ReportCpuHobLib|IntelSiliconPkg/Library/ReportCpuHobLib/ReportCpuHobLib.inf TestPointCheckLib|MinPlatformPkg/Test/Library/TestPointCheckLib/PeiTestPointCheckLib.inf TestPointLib|MinPlatformPkg/Test/Library/TestPointLib/PeiTestPointLib.inf diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c deleted file mode 100644 index 833a77c702..0000000000 --- a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c +++ /dev/null @@ -1,143 +0,0 @@ -/** @file - Source code file for Report Firmware Volume (FV) library - -Copyright (c) 2018 - 2020, Intel Corporation. All rights reserved.<BR> -SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#include <Base.h> -#include <Library/BaseMemoryLib.h> -#include <Library/DebugLib.h> -#include <Library/HobLib.h> -#include <Library/PeiServicesLib.h> -#include <Library/ReportFvLib.h> -#include <Guid/FirmwareFileSystem2.h> -#include <Ppi/FirmwareVolumeInfo.h> - -VOID -ReportPreMemFv ( - VOID - ) -{ - /// - /// Note : FSP FVs except FSP-T FV are installed in IntelFsp2WrapperPkg in Dispatch mode. - /// - if (PcdGetBool(PcdFspWrapperBootMode)) { - DEBUG ((DEBUG_INFO, "Install FlashFvFspT - 0x%x, 0x%x\n", PcdGet32 (PcdFlashFvFspTBase), PcdGet32 (PcdFlashFvFspTSize))); - PeiServicesInstallFvInfo2Ppi ( - &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvFspTBase))->FileSystemGuid), - (VOID *) (UINTN) PcdGet32 (PcdFlashFvFspTBase), - PcdGet32 (PcdFlashFvFspTSize), - NULL, - NULL, - 0 - ); - } - DEBUG ((DEBUG_INFO, "Install FlashFvSecurity - 0x%x, 0x%x\n", PcdGet32 (PcdFlashFvSecurityBase), PcdGet32 (PcdFlashFvSecuritySize))); - PeiServicesInstallFvInfo2Ppi ( - &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvSecurityBase))->FileSystemGuid), - (VOID *) (UINTN) PcdGet32 (PcdFlashFvSecurityBase), - PcdGet32 (PcdFlashFvSecuritySize), - NULL, - NULL, - 0 - ); - if (PcdGet8 (PcdBootStage) >= 6) { - DEBUG (( - DEBUG_INFO, - "Install FlashFvAdvancedPreMemory - 0x%x, 0x%x\n", - PcdGet32 (PcdFlashFvAdvancedPreMemoryBase), - PcdGet32 (PcdFlashFvAdvancedPreMemorySize) - )); - PeiServicesInstallFvInfo2Ppi ( - &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvAdvancedPreMemoryBase))->FileSystemGuid), - (VOID *) (UINTN) PcdGet32 (PcdFlashFvAdvancedPreMemoryBase), - PcdGet32 (PcdFlashFvAdvancedPreMemorySize), - NULL, - NULL, - 0 - ); - } -} - -VOID -ReportPostMemFv ( - VOID - ) -{ - EFI_STATUS Status; - EFI_BOOT_MODE BootMode; - - Status = PeiServicesGetBootMode (&BootMode); - ASSERT_EFI_ERROR (Status); - - /// - /// Note : FSP FVs except FSP-T FV are installed in IntelFsp2WrapperPkg in Dispatch mode. - /// - - /// - /// Build HOB for DXE - /// - if (BootMode == BOOT_IN_RECOVERY_MODE) { - /// - /// Prepare the recovery service - /// - } else { - DEBUG ((DEBUG_INFO, "Install FlashFvPostMemory - 0x%x, 0x%x\n", PcdGet32 (PcdFlashFvPostMemoryBase), PcdGet32 (PcdFlashFvPostMemorySize))); - PeiServicesInstallFvInfo2Ppi ( - &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvPostMemoryBase))->FileSystemGuid), - (VOID *) (UINTN) PcdGet32 (PcdFlashFvPostMemoryBase), - PcdGet32 (PcdFlashFvPostMemorySize), - NULL, - NULL, - 0 - ); - DEBUG ((DEBUG_INFO, "Install FlashFvUefiBoot - 0x%x, 0x%x\n", PcdGet32 (PcdFlashFvUefiBootBase), PcdGet32 (PcdFlashFvUefiBootSize))); - PeiServicesInstallFvInfo2Ppi ( - &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvUefiBootBase))->FileSystemGuid), - (VOID *) (UINTN) PcdGet32 (PcdFlashFvUefiBootBase), - PcdGet32 (PcdFlashFvUefiBootSize), - NULL, - NULL, - 0 - ); - DEBUG ((DEBUG_INFO, "Install FlashFvOsBoot - 0x%x, 0x%x\n", PcdGet32 (PcdFlashFvOsBootBase), PcdGet32 (PcdFlashFvOsBootSize))); - PeiServicesInstallFvInfo2Ppi ( - &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvOsBootBase))->FileSystemGuid), - (VOID *) (UINTN) PcdGet32 (PcdFlashFvOsBootBase), - PcdGet32 (PcdFlashFvOsBootSize), - NULL, - NULL, - 0 - ); - if (PcdGet8 (PcdBootStage) >= 6) { - DEBUG ((DEBUG_INFO, "Install FlashFvAdvanced - 0x%x, 0x%x\n", PcdGet32 (PcdFlashFvAdvancedBase), PcdGet32 (PcdFlashFvAdvancedSize))); - PeiServicesInstallFvInfo2Ppi ( - &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvAdvancedBase))->FileSystemGuid), - (VOID *) (UINTN) PcdGet32 (PcdFlashFvAdvancedBase), - PcdGet32 (PcdFlashFvAdvancedSize), - NULL, - NULL, - 0 - ); - } - } - - // - // Report resource HOB for flash FV - // - BuildResourceDescriptorHob ( - EFI_RESOURCE_MEMORY_MAPPED_IO, - (EFI_RESOURCE_ATTRIBUTE_PRESENT | - EFI_RESOURCE_ATTRIBUTE_INITIALIZED | - EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE), - (UINTN) PcdGet32 (PcdFlashAreaBaseAddress), - (UINTN) PcdGet32 (PcdFlashAreaSize) - ); - BuildMemoryAllocationHob ( - (UINTN) PcdGet32 (PcdFlashAreaBaseAddress), - (UINTN) PcdGet32 (PcdFlashAreaSize), - EfiMemoryMappedIO - ); -} diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf deleted file mode 100644 index 4258d0f2e7..0000000000 --- a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf +++ /dev/null @@ -1,50 +0,0 @@ -### @file -# Component information file for the Report Firmware Volume (FV) library. -# -# Copyright (c) 2018 - 2020, Intel Corporation. All rights reserved.<BR> -# -# SPDX-License-Identifier: BSD-2-Clause-Patent -# -### - -[Defines] - INF_VERSION = 0x00010017 - BASE_NAME = PeiReportFvLib - FILE_GUID = 44328FA5-E4DD-4A15-ABDF-C6584AC363D9 - VERSION_STRING = 1.0 - MODULE_TYPE = PEIM - LIBRARY_CLASS = ReportFvLib - -[LibraryClasses] - BaseMemoryLib - DebugLib - HobLib - PeiServicesLib - -[Packages] - MdePkg/MdePkg.dec - MdeModulePkg/MdeModulePkg.dec - MinPlatformPkg/MinPlatformPkg.dec - -[Sources] - PeiReportFvLib.c - -[Pcd] - gMinPlatformPkgTokenSpaceGuid.PcdBootStage ## CONSUMES - gMinPlatformPkgTokenSpaceGuid.PcdFspWrapperBootMode ## CONSUMES - gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaBaseAddress ## CONSUMES - gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize ## CONSUMES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspTBase ## CONSUMES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspTSize ## CONSUMES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPostMemoryBase ## CONSUMES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPostMemorySize ## CONSUMES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvUefiBootBase ## CONSUMES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvUefiBootSize ## CONSUMES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvOsBootBase ## CONSUMES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvOsBootSize ## CONSUMES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvSecurityBase ## CONSUMES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvSecuritySize ## CONSUMES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvAdvancedPreMemoryBase ## CONSUMES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvAdvancedPreMemorySize ## CONSUMES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvAdvancedBase ## CONSUMES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvAdvancedSize ## CONSUMES -- 2.27.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#82562): https://edk2.groups.io/g/devel/message/82562 Mute This Topic: https://groups.io/mt/86528596/21656 Group Owner: [email protected] Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
