From nobody Sat May 4 19:24:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+82157+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+82157+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1634333145; cv=none; d=zohomail.com; s=zohoarc; b=kQDQMIieOCtLCXwISBe3IQJ3rKb7nDz6p2k4o3MbTqDk/OcWNlANMXrVbGO8w09LmLr4l8z15+Rvu29XHR3Ds1s/XaV5WxktwddHB+aabMssaHmsAJktCfJEAOXIDDuqMY8BANs206uOC3p3GeOIjMnMIr2bxad17QAJvH4Z1Y4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634333145; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=Vx0pk/XPfpPFK3GQza877DGrmPUI3wgGL5Dfefqjq2o=; b=ElYAXyzhzQu7TORR9UNHD04SbSYeCbgibrb+CV9GQBSd/AITN1IFvdfDG2SWY+Rp630PVqgGdurb0E1yAhyMisThBa8W6//ChR8uDa2xSybJrotZio4xSy/KF54QLAC6DFr5AgyVHVc2rWVL8NyRNkLvs0avq4YGRv2ccMKU6JU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+82157+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1634333145925850.8150866241001; Fri, 15 Oct 2021 14:25:45 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id ZDXmYY1788612x5GFsLx1P9R; Fri, 15 Oct 2021 14:25:45 -0700 X-Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web10.3237.1634333142518073531 for ; Fri, 15 Oct 2021 14:25:45 -0700 X-IronPort-AV: E=McAfee;i="6200,9189,10138"; a="288852219" X-IronPort-AV: E=Sophos;i="5.85,376,1624345200"; d="scan'208";a="288852219" X-Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2021 14:25:44 -0700 X-IronPort-AV: E=Sophos;i="5.85,376,1624345200"; d="scan'208";a="492709777" X-Received: from iworam-desk.amr.corp.intel.com ([10.7.150.79]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2021 14:25:43 -0700 From: "Oram, Isaac W" To: devel@edk2.groups.io Cc: Chasel Chiu , Nate DeSimone , Liming Gao , Eric Dong Subject: [edk2-devel][edk2-platforms][PATCH V1 01/11] MinPlatformPkg/ReportFvLib: Add ReportMmFv to API Date: Fri, 15 Oct 2021 14:25:24 -0700 Message-Id: <56e26f25e6f8df6c5d4bf6a4a6f0361dc915fad1.1634331939.git.isaac.w.oram@intel.com> In-Reply-To: References: MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,isaac.w.oram@intel.com X-Gm-Message-State: EyzacGfTX7MIP09HA1bwA64Ix1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1634333145; bh=uvxRhu3OJKCoEdYu3BJnTt6Ip89hicnkcqdOyzIm3fc=; h=Cc:Date:From:Reply-To:Subject:To; b=kvIa0ZsTTZhbzhjhy7PClrG44uN+FHzxPf/7UeOZoLSwN+aBt24MYYbaRCCPQUJtzv9 Mcef0JMDttoHquYq61U5UmFH+ZkxMQ7yTAz3iQo59ZRaTxB2ktmgBJ8yjIyJo53TEajbN wHuNCtdMa5VTZaf6nfnXV7i4qf53mE3OX9U= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1634333146224100004 Content-Type: text/plain; charset="utf-8" Add ReportMmFv (); API for enabling boards to publish additional regions for MM driver use. This results in different instances of the library for PEI and MM. Added MinPlatformPkg library instances to the CorePeiLib.dsc and CoreDxeLib.dsc as the default library instances. Cc: Chasel Chiu Cc: Nate DeSimone Cc: Liming Gao Cc: Eric Dong Signed-off-by: Isaac Oram --- Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc = | 2 + Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc = | 1 + Platform/Intel/MinPlatformPkg/Include/Library/ReportFvLib.h = | 18 ++- Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc = | 9 +- Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportFvLib/ReportFvLib= Mm.c | 53 +++++++ Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportFvLib/ReportFvLib= Mm.inf | 33 +++++ Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportFvLib/ReportFvLib= Pei.c | 146 ++++++++++++++++++++ Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportFvLib/ReportFvLib= Pei.inf | 50 +++++++ 8 files changed, 307 insertions(+), 5 deletions(-) diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc b/Pla= tform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc index 209ccdaf54..0127ca7641 100644 --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc @@ -96,6 +96,8 @@ BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf VariableReadLib|MinPlatformPkg/Library/SmmVariableReadLib/TraditionalMmV= ariableReadLib.inf VariableWriteLib|MinPlatformPkg/Library/SmmVariableWriteLib/TraditionalM= mVariableWriteLib.inf + ReportFvLib|MinPlatformPkg/PlatformInit/Library/ReportFvLib/ReportFvLibM= m.inf + =20 [LibraryClasses.common.SMM_CORE] PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc b/Pla= tform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc index c12189bd9a..da4d0d6a1a 100644 --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc @@ -73,3 +73,4 @@ PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.= inf !endif VariableReadLib|MinPlatformPkg/Library/PeiVariableReadLib/PeiVariableRea= dLib.inf + ReportFvLib|MinPlatformPkg/PlatformInit/Library/ReportFvLib/ReportFvLibP= ei.inf diff --git a/Platform/Intel/MinPlatformPkg/Include/Library/ReportFvLib.h b/= Platform/Intel/MinPlatformPkg/Include/Library/ReportFvLib.h index 5c40bd0e6e..ba76728add 100644 --- a/Platform/Intel/MinPlatformPkg/Include/Library/ReportFvLib.h +++ b/Platform/Intel/MinPlatformPkg/Include/Library/ReportFvLib.h @@ -4,7 +4,7 @@ =20 This library installs pre-memory and post-memory firmware volumes. =20 -Copyright (c) 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2018 - 2021, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -15,6 +15,15 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include =20 +// +// This is used by board code to produce a table of FV to publish for MM u= se. +// The end of the table is indicated by base and size both equal to zero. +// +typedef struct { + UINT32 FvBase; + UINT32 FvSize; +} FV_INFO; + VOID ReportPreMemFv ( VOID @@ -25,4 +34,9 @@ ReportPostMemFv ( VOID ); =20 -#endif \ No newline at end of file +VOID +ReportMmFv ( + FV_INFO **FvInfoTable + ); + +#endif diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc b/Platform/In= tel/MinPlatformPkg/MinPlatformPkg.dsc index a09f8db3ab..1dfca06a10 100644 --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc @@ -107,8 +107,10 @@ TestPointCheckLib|MinPlatformPkg/Test/Library/TestPointCheckLib/DxeTestP= ointCheckLib.inf TestPointLib|MinPlatformPkg/Test/Library/TestPointLib/DxeTestPointLib.inf =20 +[LibraryClasses.common.DXE_SMM_DRIVER, LibraryClasses.common.MM_STANDALONE] + SpiFlashCommonLib|MinPlatformPkg/Flash/Library/SpiFlashCommonLibNull/Spi= FlashCommonLibNull.inf + [LibraryClasses.common.DXE_SMM_DRIVER] - SpiFlashCommonLib|MinPlatformPkg/Flash/Library/SpiFlashCommonLibNull/Spi= FlashCommonLibNull.inf TestPointCheckLib|MinPlatformPkg/Test/Library/TestPointCheckLib/SmmTestP= ointCheckLib.inf TestPointLib|MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointLib.inf =20 @@ -117,7 +119,6 @@ MemoryAllocationLib|StandaloneMmPkg/Library/StandaloneMmMemoryAllocation= Lib/StandaloneMmMemoryAllocationLib.inf MmServicesTableLib|MdePkg/Library/StandaloneMmServicesTableLib/Standalon= eMmServicesTableLib.inf PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf - SpiFlashCommonLib|MinPlatformPkg/Flash/Library/SpiFlashCommonLibNull/Spi= FlashCommonLibNull.inf StandaloneMmDriverEntryPoint|MdePkg/Library/StandaloneMmDriverEntryPoint= /StandaloneMmDriverEntryPoint.inf VariableReadLib|MinPlatformPkg/Library/SmmVariableReadLib/StandaloneMmVa= riableReadLib.inf VariableWriteLib|MinPlatformPkg/Library/SmmVariableWriteLib/StandaloneMm= VariableWriteLib.inf @@ -189,7 +190,9 @@ MinPlatformPkg/PlatformInit/Library/BoardInitLibNull/BoardInitLibNull.inf MinPlatformPkg/PlatformInit/Library/MultiBoardInitSupportLib/PeiMultiBoa= rdInitSupportLib.inf MinPlatformPkg/PlatformInit/Library/MultiBoardInitSupportLib/DxeMultiBoa= rdInitSupportLib.inf - MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf + MinPlatformPkg/PlatformInit/Library/ReportFvLib/ReportFvLibPei.inf + MinPlatformPkg/PlatformInit/Library/ReportFvLib/ReportFvLibMm.inf + MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf MinPlatformPkg/PlatformInit/SiliconPolicyPei/SiliconPolicyPeiPreMem.inf MinPlatformPkg/PlatformInit/SiliconPolicyPei/SiliconPolicyPeiPostMem.inf diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportFvLib= /ReportFvLibMm.c b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/Repor= tFvLib/ReportFvLibMm.c new file mode 100644 index 0000000000..a6339d130d --- /dev/null +++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportFvLib/Report= FvLibMm.c @@ -0,0 +1,53 @@ +/** @file + Source code file for Report Firmware Volume (FV) library management mode= functionality + + ReportPreMemFv (); is not supported by this libary instance + ReportPostMemFv (); is not supported by this libary instance + + Copyright (c) 2018 - 2021, Intel Corporation. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#include +#include +#include +#include +#include + +// +// This platform driver knows there are multiple FVs on FD. +// Variable region and MicroCode region are required. +// +FV_INFO mBoardFvInfoTable[] =3D { + {0, 0}, // {PcdGet32 (PcdFlashNvStorageVariableBase), PcdGet32 (PcdFlash= NvStorageVariableSize)}, + {0, 0}, // {PcdGet32 (PcdFlashFvMicrocodeBase), PcdGet32 (PcdFlashFvMicr= ocodeSize)}, + {0, 0} +}; + +/* + Return the firmware volumes that are needed for MM functionality. + NV storage and microcode FV are required. + + @param FvInfoTable Pointer to table of FV to be published + + @return VOID +*/ +VOID +ReportMmFv ( + FV_INFO **FvInfoTable + ) +{ + mBoardFvInfoTable[0].FvBase =3D PcdGet32 (PcdFlashNvStorageVariableBase); + mBoardFvInfoTable[0].FvSize =3D PcdGet32 (PcdFlashNvStorageVariableSize); + mBoardFvInfoTable[1].FvBase =3D PcdGet32 (PcdFlashFvMicrocodeBase); + mBoardFvInfoTable[1].FvSize =3D PcdGet32 (PcdFlashFvMicrocodeSize); + + DEBUG ((DEBUG_INFO, "MM FvInfo Table:\nNvStorageVariableBase 0x%X\nMicro= codeBase 0x%X\n", mBoardFvInfoTable[0].FvBase, mBoardFvInfoTable[1].FvBase,= mBoardFvInfoTable[2].FvBase)); + ASSERT (mBoardFvInfoTable[0].FvBase !=3D 0); + ASSERT (mBoardFvInfoTable[0].FvSize !=3D 0); + ASSERT (mBoardFvInfoTable[1].FvBase !=3D 0); + ASSERT (mBoardFvInfoTable[1].FvSize !=3D 0); + + *FvInfoTable =3D &mBoardFvInfoTable[0]; +} diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportFvLib= /ReportFvLibMm.inf b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/Rep= ortFvLib/ReportFvLibMm.inf new file mode 100644 index 0000000000..41268f179e --- /dev/null +++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportFvLib/Report= FvLibMm.inf @@ -0,0 +1,33 @@ +### @file +# Component information file for the Report Firmware Volume (FV) library. +# +# Copyright (c) 2018 - 2021, Intel Corporation. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +### + +[Defines] + INF_VERSION =3D 0x00010017 + BASE_NAME =3D ReportFvLibMm + FILE_GUID =3D 57c12e02-a65f-4994-bd76-bb6e3fd14df4 + VERSION_STRING =3D 1.0 + MODULE_TYPE =3D BASE + LIBRARY_CLASS =3D ReportFvLib | DXE_SMM_DRIVER MM_STAND= ALONE + +[LibraryClasses] + DebugLib + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + MinPlatformPkg/MinPlatformPkg.dec + +[Sources] + ReportFvLibMm.c + +[Pcd] + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase ## CONSU= MES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize ## CONSU= MES + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvMicrocodeBase ## CONSU= MES + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvMicrocodeSize ## CONSU= MES diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportFvLib= /ReportFvLibPei.c b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/Repo= rtFvLib/ReportFvLibPei.c new file mode 100644 index 0000000000..7fb755266d --- /dev/null +++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportFvLib/Report= FvLibPei.c @@ -0,0 +1,146 @@ +/** @file + Source code file for Report Firmware Volume (FV) library + + ReportMmFv (); is not supported in this library instance + + @copyright + Copyright (c) 2018 - 2021, Intel Corporation. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#include +#include +#include +#include +#include +#include +#include +#include + +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 (Pc= dFlashFvFspTBase), PcdGet32 (PcdFlashFvFspTSize))); + PeiServicesInstallFvInfo2Ppi ( + &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvFspTBa= se))->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 (PcdFlashFvSecurity= Base))->FileSystemGuid), + (VOID *) (UINTN) PcdGet32 (PcdFlashFvSecurityBase), + PcdGet32 (PcdFlashFvSecuritySize), + NULL, + NULL, + 0 + ); + if (PcdGet8 (PcdBootStage) >=3D 6) { + DEBUG (( + DEBUG_INFO, + "Install FlashFvAdvancedPreMemory - 0x%x, 0x%x\n", + PcdGet32 (PcdFlashFvAdvancedPreMemoryBase), + PcdGet32 (PcdFlashFvAdvancedPreMemorySize) + )); + PeiServicesInstallFvInfo2Ppi ( + &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvAdvanc= edPreMemoryBase))->FileSystemGuid), + (VOID *) (UINTN) PcdGet32 (PcdFlashFvAdvancedPreMemoryBase), + PcdGet32 (PcdFlashFvAdvancedPreMemorySize), + NULL, + NULL, + 0 + ); + } +} + +VOID +ReportPostMemFv ( + VOID + ) +{ + EFI_STATUS Status; + EFI_BOOT_MODE BootMode; + + Status =3D 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 =3D=3D BOOT_IN_RECOVERY_MODE) { + /// + /// Prepare the recovery service + /// + } else { + DEBUG ((DEBUG_INFO, "Install FlashFvPostMemory - 0x%x, 0x%x\n", PcdGet= 32 (PcdFlashFvPostMemoryBase), PcdGet32 (PcdFlashFvPostMemorySize))); + PeiServicesInstallFvInfo2Ppi ( + &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvPostMe= moryBase))->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 (PcdFlashFvUefiBo= otBase))->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 (PcdFlashFvOsBoot= Base))->FileSystemGuid), + (VOID *) (UINTN) PcdGet32 (PcdFlashFvOsBootBase), + PcdGet32 (PcdFlashFvOsBootSize), + NULL, + NULL, + 0 + ); + if (PcdGet8 (PcdBootStage) >=3D 6) { + DEBUG ((DEBUG_INFO, "Install FlashFvAdvanced - 0x%x, 0x%x\n", PcdGet= 32 (PcdFlashFvAdvancedBase), PcdGet32 (PcdFlashFvAdvancedSize))); + PeiServicesInstallFvInfo2Ppi ( + &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvAdva= ncedBase))->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/ReportFvLib= /ReportFvLibPei.inf b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/Re= portFvLib/ReportFvLibPei.inf new file mode 100644 index 0000000000..fdb61347c4 --- /dev/null +++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportFvLib/Report= FvLibPei.inf @@ -0,0 +1,50 @@ +### @file +# Component information file for the Report Firmware Volume (FV) library. +# +# Copyright (c) 2018 - 2021, Intel Corporation. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +### + +[Defines] + INF_VERSION =3D 0x00010017 + BASE_NAME =3D ReportFvLibPei + FILE_GUID =3D 44328FA5-E4DD-4A15-ABDF-C6584AC363D9 + VERSION_STRING =3D 1.0 + MODULE_TYPE =3D PEIM + LIBRARY_CLASS =3D ReportFvLib | PEIM + +[LibraryClasses] + BaseMemoryLib + DebugLib + HobLib + PeiServicesLib + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + MinPlatformPkg/MinPlatformPkg.dec + +[Sources] + ReportFvLibPei.c + +[Pcd] + gMinPlatformPkgTokenSpaceGuid.PcdBootStage ## CONSU= MES + gMinPlatformPkgTokenSpaceGuid.PcdFspWrapperBootMode ## CONSU= MES + gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaBaseAddress ## CONSU= MES + gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize ## CONSU= MES + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspTBase ## CONSU= MES + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspTSize ## CONSU= MES + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPostMemoryBase ## CONSU= MES + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPostMemorySize ## CONSU= MES + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvUefiBootBase ## CONSU= MES + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvUefiBootSize ## CONSU= MES + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvOsBootBase ## CONSU= MES + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvOsBootSize ## CONSU= MES + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvSecurityBase ## CONSU= MES + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvSecuritySize ## CONSU= MES + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvAdvancedPreMemoryBase ## CONSU= MES + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvAdvancedPreMemorySize ## CONSU= MES + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvAdvancedBase ## CONSU= MES + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvAdvancedSize ## CONSU= MES --=20 2.27.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#82157): https://edk2.groups.io/g/devel/message/82157 Mute This Topic: https://groups.io/mt/86360109/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sat May 4 19:24:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+82158+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+82158+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1634333146; cv=none; d=zohomail.com; s=zohoarc; b=kbH4tiazJXymYesNf4nEN+0HwE9UXFVmEqM6KXNpqb2YMhUpTHDdcQnNKFjV2CsfS5Z/Ij36qY0/djyzc+T7JoraA4coz7epGVD0dTAwp6xROzXbERdPwvQ9NRiWs7YWEyHtl+YYdk9USuh0TLX0KKpkdK33Qc1viBiJk4cak4s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634333146; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=ojbtGAmthU75RjZOuCiTcHnp7dniT3PQBVkhNrhczAk=; b=cM4SsUzOWQbo0RqEswlVFJZqdSYflHvPEqDh1VXVege/2hTQpSeuUqIYHPJvK2tBVZzYiszM4/13eoiDHf3KfTLh+1TAYdIlXgneE1/fT0qLZ2vf5Wda595LMYmIDP8Y04efBJ7htKYkxosrjfdM/jFW5qnrCTZll25vfoIpebg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+82158+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1634333146801194.98832546642984; Fri, 15 Oct 2021 14:25:46 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 6wvoYY1788612xOAw7WAJscO; Fri, 15 Oct 2021 14:25:46 -0700 X-Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web09.3269.1634333145254405393 for ; Fri, 15 Oct 2021 14:25:45 -0700 X-IronPort-AV: E=McAfee;i="6200,9189,10138"; a="288852220" X-IronPort-AV: E=Sophos;i="5.85,376,1624345200"; d="scan'208";a="288852220" X-Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2021 14:25:44 -0700 X-IronPort-AV: E=Sophos;i="5.85,376,1624345200"; d="scan'208";a="492709783" X-Received: from iworam-desk.amr.corp.intel.com ([10.7.150.79]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2021 14:25:44 -0700 From: "Oram, Isaac W" To: devel@edk2.groups.io Cc: Chasel Chiu , Nate DeSimone , Rangasai V Chaganty , Deepika Kethi Reddy , Kathappan Esakkithevar Subject: [edk2-devel][edk2-platforms][PATCH V1 02/11] CometlakeOpenBoardPkg/ReportFvLib: Switch to new library instances. Date: Fri, 15 Oct 2021 14:25:25 -0700 Message-Id: <49caf51af33a21df476c434210fce19cc7e9784e.1634331939.git.isaac.w.oram@intel.com> In-Reply-To: References: MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,isaac.w.oram@intel.com X-Gm-Message-State: PaZeiDZIZO2tRGsu7PIoP10ux1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1634333146; bh=8a0ZsOYJdMmeWA6m6mOMAHWc9rkn7QNfBCOhCkARcUc=; h=Cc:Date:From:Reply-To:Subject:To; b=Oc1mfI+rid6pJyJLfkSdAAuAaLoPdoNaLlvx2irRtjt3ysTiiZEt0pyFxa5jhA+WOvj sep9ik8gQD83kBpYwkl0oihjMGA0EdRfL3BvjLLNIDcIorPLpLOuHHjnm7+dLwRruJvTs kXLM2TT7vH+72cUi3XRRWl9GBf8xuOAMfiw= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1634333148305100012 Content-Type: text/plain; charset="utf-8" MinPlatformPkg shared ReportFvLib has split into PEI and SMM instances. Default versions are already included via CorePeiLib.dsc and CoreDxeLib.dsc Cc: Chasel Chiu Cc: Nate DeSimone Cc: Rangasai V Chaganty Cc: Deepika Kethi Reddy Cc: Kathappan Esakkithevar Signed-off-by: Isaac Oram Reviewed-by: Kathappan Esakkithevar Reviewed-by: Nate DeSimone Reviewed-by: Sai Chaganty --- Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc | 1 - 1 file changed, 1 deletion(-) diff --git a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPk= g.dsc b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc index 44a1bd54d6..3a92eb4575 100644 --- a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc +++ b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc @@ -121,7 +121,6 @@ PciSegmentInfoLib|$(PLATFORM_PACKAGE)/Pci/Library/PciSegmentInfoLibSimpl= e/PciSegmentInfoLibSimple.inf PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootMa= nagerLib/DxePlatformBootManagerLib.inf - ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiR= eportFvLib.inf TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull= /TestPointCheckLibNull.inf =20 ####################################### --=20 2.27.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#82158): https://edk2.groups.io/g/devel/message/82158 Mute This Topic: https://groups.io/mt/86360110/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sat May 4 19:24:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+82159+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+82159+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1634333146; cv=none; d=zohomail.com; s=zohoarc; b=m4sGMajX3ZXHiQYV5+JcUw6cIKpChI37ZaRuRdWLwTYXprD/9bKws4G/A/7EdMzIDrI6fptLxVdXl0EKIUn7A/D8G9Aik2J9BY4C1Pp3AdK69wWIv9I2V1iETIruwkK96UO7xDj6Dk+oBvSBfydDHmbFUStLNhGcioJ+o/5jOb8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634333146; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=BhcYFXTM71fiqP5lq5zffKaznmGPBzfxTfT4DOrfY04=; b=C7kgtoEJ5BPphJkxdvSEw1D0N+EKGsHmptuK7KKLaFqYHev1ePqNUIays0egnUM3oc/VBrC5hmvWPaJwB0gB94bAGDc+CQQQGRag8+4lae9vMxwN+fKpF4l97GtC20NpUUV/5drjMEwpf5wP3ELTgwNKjbYp/n8a7vfLY87uspk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+82159+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1634333146415170.2749644811703; Fri, 15 Oct 2021 14:25:46 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id TzoiYY1788612xr02Szuh138; Fri, 15 Oct 2021 14:25:46 -0700 X-Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web10.3237.1634333142518073531 for ; Fri, 15 Oct 2021 14:25:45 -0700 X-IronPort-AV: E=McAfee;i="6200,9189,10138"; a="288852221" X-IronPort-AV: E=Sophos;i="5.85,376,1624345200"; d="scan'208";a="288852221" X-Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2021 14:25:44 -0700 X-IronPort-AV: E=Sophos;i="5.85,376,1624345200"; d="scan'208";a="492709787" X-Received: from iworam-desk.amr.corp.intel.com ([10.7.150.79]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2021 14:25:44 -0700 From: "Oram, Isaac W" To: devel@edk2.groups.io Cc: Chasel Chiu , Nate DeSimone , Benjamin Doron , Jeremy Soller Subject: [edk2-devel][edk2-platforms][PATCH V1 03/11] KabyOpenBoardPkg/ReportFvLib: Switch to new library instances. Date: Fri, 15 Oct 2021 14:25:26 -0700 Message-Id: <3e31b4fb3cf9ff9dabcfb14e8dc1695a42cf0e5c.1634331939.git.isaac.w.oram@intel.com> In-Reply-To: References: MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,isaac.w.oram@intel.com X-Gm-Message-State: 1dXpa7y7w3hN6JqTpslioUXmx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1634333146; bh=9WYhYduJY4Gs2+PmYMU8pomNyEuxzf0pzwLv3Uz5Brs=; h=Cc:Date:From:Reply-To:Subject:To; b=BB3lcOx78vyTearS2kTOUTFup9KSviEoNoMbr75p4+ZgV1chgCk95jtNYUI6l9pYjQ2 JFmMB7r9HK0g5wmoxKs1nV4/hyJpIQZ3F94RLaqKxcjPYgxS5JoT3+CbWNErKUqNx+dVR mCl/SFy4Qr82AUgaCpfS+gfOhUtHsCIP7Zg= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1634334049925100001 Content-Type: text/plain; charset="utf-8" MinPlatformPkg shared ReportFvLib has split into PEI and SMM instances. Default versions are already included via CorePeiLib.dsc and CoreDxeLib.dsc Cc: Chasel Chiu Cc: Nate DeSimone Cc: Benjamin Doron Cc: Jeremy Soller Signed-off-by: Isaac Oram Reviewed-by: Nate DeSimone --- Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/OpenBoardPkg.dsc | 1= - Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc | 1= - Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc | 1= - 3 files changed, 3 deletions(-) diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/OpenBoar= dPkg.dsc b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/OpenBoardP= kg.dsc index 97573ab2e6..77055b489a 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/OpenBoardPkg.dsc +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/OpenBoardPkg.dsc @@ -173,7 +173,6 @@ PciSegmentInfoLib|$(PLATFORM_PACKAGE)/Pci/Library/PciSegmentInfoLibSimpl= e/PciSegmentInfoLibSimple.inf PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootMa= nagerLib/DxePlatformBootManagerLib.inf - ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiR= eportFvLib.inf TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull= /TestPointCheckLibNull.inf =20 ####################################### diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.ds= c b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc index 7f276d3512..75e4f3b2e9 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc @@ -119,7 +119,6 @@ PciSegmentInfoLib|$(PLATFORM_PACKAGE)/Pci/Library/PciSegmentInfoLibSimpl= e/PciSegmentInfoLibSimple.inf PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootMa= nagerLib/DxePlatformBootManagerLib.inf - ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiR= eportFvLib.inf TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull= /TestPointCheckLibNull.inf =20 ####################################### diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.= dsc b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc index f64555e391..50f95a1300 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc +++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc @@ -161,7 +161,6 @@ PciSegmentInfoLib|$(PLATFORM_PACKAGE)/Pci/Library/PciSegmentInfoLibSimpl= e/PciSegmentInfoLibSimple.inf PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootMa= nagerLib/DxePlatformBootManagerLib.inf - ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiR= eportFvLib.inf TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull= /TestPointCheckLibNull.inf =20 ####################################### --=20 2.27.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#82159): https://edk2.groups.io/g/devel/message/82159 Mute This Topic: https://groups.io/mt/86360111/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sat May 4 19:24:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+82161+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+82161+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1634333147; cv=none; d=zohomail.com; s=zohoarc; b=XoFa+7aE44WfqAmDRVhDU/+EsNONhmwGUpMgyYBpf2S5PyBPv/71DQhBhsHB7HKjMZ5VoOXAGgciMii02TJ93RhHwla9jAL9nm2ZAUdl54Uv9IFtj4MU8QAEGUlcxV5GZl50l53KkXEX8mzMAegLNb0fNROHHsX+sq49K0yU+vw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634333147; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=Cwnt0osW8nEtnZsnqLSEpgnSuQfMeO/6w3bKo1BVq44=; b=XzJvmyMJovl9BQd8UVKlfAcxMWlOLPpI9rvYdC6q6DCqozqCPGvpYqKsEavbTuAy6cLJop5/lm2jBQEQcvfsw3any9nQWEk8dTwDTs8/cs2tMysZSb8HRNqoFImR2NGwYFQATzn8u6KOzSktzDBis2tHyVVmdz193ErJ48ozUXY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+82161+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1634333147524989.3553011785383; Fri, 15 Oct 2021 14:25:47 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id mrrUYY1788612xLmxFpNrKGb; Fri, 15 Oct 2021 14:25:47 -0700 X-Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web09.3269.1634333145254405393 for ; Fri, 15 Oct 2021 14:25:45 -0700 X-IronPort-AV: E=McAfee;i="6200,9189,10138"; a="288852228" X-IronPort-AV: E=Sophos;i="5.85,376,1624345200"; d="scan'208";a="288852228" X-Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2021 14:25:44 -0700 X-IronPort-AV: E=Sophos;i="5.85,376,1624345200"; d="scan'208";a="492709791" X-Received: from iworam-desk.amr.corp.intel.com ([10.7.150.79]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2021 14:25:44 -0700 From: "Oram, Isaac W" To: devel@edk2.groups.io Cc: Sai Chaganty , Nate DeSimone , Heng Luo Subject: [edk2-devel][edk2-platforms][PATCH V1 04/11] TigerLakeOpenBoardPkg/ReportFvLib: Switch to new library instances. Date: Fri, 15 Oct 2021 14:25:27 -0700 Message-Id: <751f014f6868e8629788ebcbe5894fe49bca63c2.1634331939.git.isaac.w.oram@intel.com> In-Reply-To: References: MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,isaac.w.oram@intel.com X-Gm-Message-State: iJO2aHCmNLBfraODckMCjhNXx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1634333147; bh=ezNu1w0/p6UG/ljMFTQBCrYi9oNwISYQ8RG4rFKPCuc=; h=Cc:Date:From:Reply-To:Subject:To; b=U4ztLJYqq0y1ZC3KERz6NuVdTl40rXwh5e3oAikfES4v1MINO9xiXiscy4Pt9sN4APH JgNXOLTELou9vtDA3sTKfZMS4r2KBDOsikXn6ngCN61HcPqKi2U2JrmMSxRCD9FMGn1ap gWw07mE0NRqoyZJ/smdEoeqpb85LYUnhRzY= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1634333148450100016 Content-Type: text/plain; charset="utf-8" MinPlatformPkg shared ReportFvLib has split into PEI and SMM instances. Default versions are already included via CorePeiLib.dsc and CoreDxeLib.dsc Cc: Sai Chaganty Cc: Nate DeSimone Cc: Heng Luo Signed-off-by: Isaac Oram Reviewed-by: Nate DeSimone Reviewed-by: Sai Chaganty --- Platform/Intel/TigerlakeOpenBoardPkg/TigerlakeURvp/OpenBoardPkg.dsc | 1 - 1 file changed, 1 deletion(-) diff --git a/Platform/Intel/TigerlakeOpenBoardPkg/TigerlakeURvp/OpenBoardPk= g.dsc b/Platform/Intel/TigerlakeOpenBoardPkg/TigerlakeURvp/OpenBoardPkg.dsc index 1adf634034..7d6ea20986 100644 --- a/Platform/Intel/TigerlakeOpenBoardPkg/TigerlakeURvp/OpenBoardPkg.dsc +++ b/Platform/Intel/TigerlakeOpenBoardPkg/TigerlakeURvp/OpenBoardPkg.dsc @@ -67,7 +67,6 @@ [LibraryClasses.common] =20 PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf - ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiR= eportFvLib.inf =20 PciHostBridgeLib|$(PLATFORM_PACKAGE)/Pci/Library/PciHostBridgeLibSimple/= PciHostBridgeLibSimple.inf PciSegmentInfoLib|$(PLATFORM_PACKAGE)/Pci/Library/PciSegmentInfoLibSimpl= e/PciSegmentInfoLibSimple.inf --=20 2.27.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#82161): https://edk2.groups.io/g/devel/message/82161 Mute This Topic: https://groups.io/mt/86360113/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sat May 4 19:24:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+82160+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+82160+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1634333147; cv=none; d=zohomail.com; s=zohoarc; b=PymJ9/7/rBAMDk5tXSgXK/hpTAk7ZCDitT5S6W7qz+JRlo2j+c/bd4EwC6NnvGKq7p3ZHHRTfHWJUuJjzJUIPn5lAijJvlKsRUhjU7iwueuLom89og2tYsTPRvdHw/GkjQQ9ssIid49iogC/jsYDyR8SpNIGSobMRb2ca5FEQs4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634333147; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=6DUCRTIUX6NpXSB2O79fKlU98TUIsuyDvQeZ3bxaPk8=; b=KebWdRF9SALOme+MrnrTsBF13NoPmREbivmCPQVklEL3og9IVQZA9W2FnFlPJtjLLzjPP+ljO7qOIvGW8P74RcHVhM4b9246822+Vd9mdOcSQjx9tkzLcVw9T91xEf+mvRFD1kyRYYpP0pAEW0BqIbGURIznYelHnw2sBKnh2tc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+82160+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1634333147176532.9284313049177; Fri, 15 Oct 2021 14:25:47 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 2uI5YY1788612xcCsiBU3MTw; Fri, 15 Oct 2021 14:25:46 -0700 X-Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web10.3237.1634333142518073531 for ; Fri, 15 Oct 2021 14:25:45 -0700 X-IronPort-AV: E=McAfee;i="6200,9189,10138"; a="288852229" X-IronPort-AV: E=Sophos;i="5.85,376,1624345200"; d="scan'208";a="288852229" X-Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2021 14:25:44 -0700 X-IronPort-AV: E=Sophos;i="5.85,376,1624345200"; d="scan'208";a="492709795" X-Received: from iworam-desk.amr.corp.intel.com ([10.7.150.79]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2021 14:25:44 -0700 From: "Oram, Isaac W" To: devel@edk2.groups.io Cc: Chasel Chiu , Nate DeSimone Subject: [edk2-devel][edk2-platforms][PATCH V1 05/11] WhiskeyLakeOpenBoardPkg/ReportFvLib: Switch to new library instances. Date: Fri, 15 Oct 2021 14:25:28 -0700 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,isaac.w.oram@intel.com X-Gm-Message-State: qXtDyAEatdbUsNHfJUKkzkhlx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1634333146; bh=7gEXmCAYeJyV0hBE2hSOiGF434wFZqhs5EKsPIkVa3s=; h=Cc:Date:From:Reply-To:Subject:To; b=ALM/wIUbqzw+NcLebjpgnxMPtdhWUQNac1dMhAQeTplNUK02MS1n56i2ytUQtS6uD04 4QQLWlUEHr3hEQLxc4ZCQSDukEGrMPe2+21n5a5l9CAUvnOjDhsg92YZmO0DYTf1OM5J5 HMquQ/K9ZdTDmA6hGwUWPAX/8rb69nHQPwk= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1634334049961100002 Content-Type: text/plain; charset="utf-8" MinPlatformPkg shared ReportFvLib has split into PEI and SMM instances. Default versions are already included via CorePeiLib.dsc and CoreDxeLib.dsc Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Isaac Oram Reviewed-by: Nate DeSimone --- Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc | = 1 - Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc | = 1 - 2 files changed, 2 deletions(-) diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.d= sc b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc index ee2aedd978..af5e0b2116 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc @@ -121,7 +121,6 @@ PciSegmentInfoLib|$(PLATFORM_PACKAGE)/Pci/Library/PciSegmentInfoLibSimpl= e/PciSegmentInfoLibSimple.inf PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootMa= nagerLib/DxePlatformBootManagerLib.inf - ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiR= eportFvLib.inf TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull= /TestPointCheckLibNull.inf =20 ####################################### diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoa= rdPkg.dsc b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoar= dPkg.dsc index b69cc8deb0..11ecd6b91f 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.d= sc +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.d= sc @@ -121,7 +121,6 @@ PciSegmentInfoLib|$(PLATFORM_PACKAGE)/Pci/Library/PciSegmentInfoLibSimpl= e/PciSegmentInfoLibSimple.inf PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootMa= nagerLib/DxePlatformBootManagerLib.inf - ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiR= eportFvLib.inf TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull= /TestPointCheckLibNull.inf =20 ####################################### --=20 2.27.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#82160): https://edk2.groups.io/g/devel/message/82160 Mute This Topic: https://groups.io/mt/86360112/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sat May 4 19:24:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+82162+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+82162+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1634333147; cv=none; d=zohomail.com; s=zohoarc; b=EYdanStc89F8iCqgFvFqTlroMxmHZZWNUqKGHltaTDcMEDplms+Cbd6xACBk4H4AIXtB8uVANI9HbTR5HcAnjwIVUVPWRMg17hJRv2tPe9L654Hl7yCWJNYOvXO6Io1bIR+QW9Ez/aGPgiLVQ/OMNLFKUwsGuodAfYc9MK0b4hg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634333147; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=ZSBedRON83aFf2kFOyYJMb/brbwhtqsuQxYKW3B9eRY=; b=Gk4Vpt4VZjygsgbhX89hxjhojTGw6YbiC5u9qroXmzNBBQ+1xFegp5IN677NWE4Jn5zAJfetLfuFxUc3Do0TIQWvhHW7ELdYv9pXsHutLnE2VESBJwJhOC1vGmC3Qb021GemiiI3664KFFRth8ONLvifmriKlHkieDKTlbb9JE8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+82162+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1634333147934119.47148846316054; Fri, 15 Oct 2021 14:25:47 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id hqSrYY1788612xPBvE2ytLN9; Fri, 15 Oct 2021 14:25:47 -0700 X-Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web11.3341.1634333146761283299 for ; Fri, 15 Oct 2021 14:25:46 -0700 X-IronPort-AV: E=McAfee;i="6200,9189,10138"; a="314187520" X-IronPort-AV: E=Sophos;i="5.85,376,1624345200"; d="scan'208";a="314187520" X-Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2021 14:25:45 -0700 X-IronPort-AV: E=Sophos;i="5.85,376,1624345200"; d="scan'208";a="492709798" X-Received: from iworam-desk.amr.corp.intel.com ([10.7.150.79]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2021 14:25:44 -0700 From: "Oram, Isaac W" To: devel@edk2.groups.io Cc: Nate DeSimone , Chasel Chiu Subject: [edk2-devel][edk2-platforms][PATCH V1 06/11] WhitleyOpenBoardPkg/ReportFvLib: Add board support for custom MM FV Date: Fri, 15 Oct 2021 14:25:29 -0700 Message-Id: <7ce8f0000930c73af87aaf34af21dc798f2f670a.1634331939.git.isaac.w.oram@intel.com> In-Reply-To: References: MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,isaac.w.oram@intel.com X-Gm-Message-State: ZMKRocKhf5PwWtzTuhWFe2PLx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1634333147; bh=JgcD58XdXOFljDeYJ8iErereZ4Ty4t88+dq+Nt0h/Ck=; h=Cc:Date:From:Reply-To:Subject:To; b=KQcJ6RDllZ7mYtkuJHdwiRW7JbQLCJvxITPo5Y5m9Mon2Y1DcHWujT90mtKF21RhOSN ez1xVsFzKVWc44UvpC1afwq+v5KZh2eNVtsbeGhg+b88IUwP7COh9McHvWq2fOOWB2j0R Iu0tKX7npYKu9xtJlz9DUOOI7qU2SJxdp3Q= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1634333148525100021 Content-Type: text/plain; charset="utf-8" ReportFvLib added a new fuction for boards to communicate MM required FV The custom instance allows Whitley boards to publish an FV for WHEA use. Also fixed duplicate GUID library name. Cc: Nate DeSimone Cc: Chasel Chiu Signed-off-by: Isaac Oram Reviewed-by: Nate DeSimone --- Platform/Intel/WhitleyOpenBoardPkg/Library/ReportFvLib/ReportFvLibMm.c = | 61 ++++++++++++++++++++ Platform/Intel/WhitleyOpenBoardPkg/Library/ReportFvLib/ReportFvLibMm.inf = | 36 ++++++++++++ Platform/Intel/WhitleyOpenBoardPkg/Library/{PeiReportFvLib/PeiReportFvLib.= c =3D> ReportFvLib/ReportFvLibPei.c} | 4 +- Platform/Intel/WhitleyOpenBoardPkg/Library/{PeiReportFvLib/PeiReportFvLib.= inf =3D> ReportFvLib/ReportFvLibPei.inf} | 12 ++-- Platform/Intel/WhitleyOpenBoardPkg/PlatformPkg.dsc = | 4 +- 5 files changed, 110 insertions(+), 7 deletions(-) diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Library/ReportFvLib/ReportF= vLibMm.c b/Platform/Intel/WhitleyOpenBoardPkg/Library/ReportFvLib/ReportFvL= ibMm.c new file mode 100644 index 0000000000..0cae9a7b25 --- /dev/null +++ b/Platform/Intel/WhitleyOpenBoardPkg/Library/ReportFvLib/ReportFvLibMm.c @@ -0,0 +1,61 @@ +/** @file ReportFvLib.c + Source code file for Report Firmware Volume (FV) library management mode= functionality + + ReportPreMemFv (); is not supported by this libary instance + ReportPostMemFv (); is not supported by this libary instance + + Copyright (c) 2021, Intel Corporation. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#include +#include +#include +#include +#include + +// +// This platform driver knows there are multiple FVs on FD. +// Variable region and MicroCode region are required. +// WHEA region is optional. If size is zero this will not be published. +// +FV_INFO mBoardFvInfoTable[] =3D { + {0, 0}, // {PcdGet32 (PcdFlashNvStorageVariableBase), PcdGet32 (PcdFlash= NvStorageVariableSize)}, + {0, 0}, // {PcdGet32 (PcdFlashFvMicrocodeBase), PcdGet32 (PcdFlashFvMicr= ocodeSize)}, + {0, 0}, // {PcdGet32 (PcdFlashFvWheaBase), PcdGet32 (PcdFlashFvWheaSize)= }, + {0, 0} +}; + +/* + Return the firmware volumes that are needed for MM functionality. + NV storage and microcode FV are required. + WHEA FV is optional and only added if Base and Size are non-zero. + + @param FvInfoTable Pointer to table of FV to be published + + @return VOID +*/ +VOID +ReportMmFv ( + FV_INFO **FvInfoTable + ) +{ + mBoardFvInfoTable[0].FvBase =3D PcdGet32 (PcdFlashNvStorageVariableBase); + mBoardFvInfoTable[0].FvSize =3D PcdGet32 (PcdFlashNvStorageVariableSize); + mBoardFvInfoTable[1].FvBase =3D PcdGet32 (PcdFlashFvMicrocodeBase); + mBoardFvInfoTable[1].FvSize =3D PcdGet32 (PcdFlashFvMicrocodeSize); + + if ((PcdGet32 (PcdFlashFvWheaBase) !=3D 0) && (PcdGet32 (PcdFlashFvWheaS= ize) !=3D 0)) { + mBoardFvInfoTable[2].FvBase =3D PcdGet32 (PcdFlashFvWheaBase); + mBoardFvInfoTable[2].FvSize =3D PcdGet32 (PcdFlashFvWheaSize); + } + + DEBUG ((DEBUG_INFO, "MM FvInfo Table:\nNvStorageVariableBase 0x%X\nMicro= codeBase 0x%X\nWheaBase 0x%X\n", mBoardFvInfoTable[0].FvBase, mBoardFvInfoT= able[1].FvBase, mBoardFvInfoTable[2].FvBase)); + ASSERT (mBoardFvInfoTable[0].FvBase !=3D 0); + ASSERT (mBoardFvInfoTable[0].FvSize !=3D 0); + ASSERT (mBoardFvInfoTable[1].FvBase !=3D 0); + ASSERT (mBoardFvInfoTable[1].FvSize !=3D 0); + + *FvInfoTable =3D &mBoardFvInfoTable[0]; +} diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Library/ReportFvLib/ReportF= vLibMm.inf b/Platform/Intel/WhitleyOpenBoardPkg/Library/ReportFvLib/ReportF= vLibMm.inf new file mode 100644 index 0000000000..b37da2ab4b --- /dev/null +++ b/Platform/Intel/WhitleyOpenBoardPkg/Library/ReportFvLib/ReportFvLibMm.= inf @@ -0,0 +1,36 @@ +### @file +# Component information file for the Report Firmware Volume (FV) library. +# +# Copyright (c) 2018 - 2021, Intel Corporation. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +### + +[Defines] + INF_VERSION =3D 0x00010017 + BASE_NAME =3D ReportFvLibMm + FILE_GUID =3D 0fcf4819-09e4-43fb-b597-4db80df14d88 + VERSION_STRING =3D 1.0 + MODULE_TYPE =3D BASE + LIBRARY_CLASS =3D ReportFvLib | DXE_SMM_DRIVER MM_STAND= ALONE + +[LibraryClasses] + DebugLib + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + MinPlatformPkg/MinPlatformPkg.dec + WhitleyOpenBoardPkg/PlatformPkg.dec + +[Sources] + ReportFvLibMm.c + +[Pcd] + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase ## CONSU= MES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize ## CONSU= MES + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvMicrocodeBase ## CONSU= MES + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvMicrocodeSize ## CONSU= MES + gCpPlatFlashTokenSpaceGuid.PcdFlashFvWheaBase ## CONSU= MES + gCpPlatFlashTokenSpaceGuid.PcdFlashFvWheaSize ## CONSU= MES diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Library/PeiReportFvLib/PeiR= eportFvLib.c b/Platform/Intel/WhitleyOpenBoardPkg/Library/ReportFvLib/Repor= tFvLibPei.c similarity index 96% rename from Platform/Intel/WhitleyOpenBoardPkg/Library/PeiReportFvLib/PeiRe= portFvLib.c rename to Platform/Intel/WhitleyOpenBoardPkg/Library/ReportFvLib/ReportFvLi= bPei.c index f0230642d2..f916b352e5 100644 --- a/Platform/Intel/WhitleyOpenBoardPkg/Library/PeiReportFvLib/PeiReportFv= Lib.c +++ b/Platform/Intel/WhitleyOpenBoardPkg/Library/ReportFvLib/ReportFvLibPei= .c @@ -1,6 +1,8 @@ -/** @file PeiReportFvLib.c +/** @file ReportFvLib.c Source code file for Report Firmware Volume (FV) library =20 + ReportMmFv (); is not supported in this library instance + Copyright (c) 2018 - 2021, Intel Corporation. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Library/PeiReportFvLib/PeiR= eportFvLib.inf b/Platform/Intel/WhitleyOpenBoardPkg/Library/ReportFvLib/Rep= ortFvLibPei.inf similarity index 87% rename from Platform/Intel/WhitleyOpenBoardPkg/Library/PeiReportFvLib/PeiRe= portFvLib.inf rename to Platform/Intel/WhitleyOpenBoardPkg/Library/ReportFvLib/ReportFvLi= bPei.inf index b02fac49cf..ae77606a54 100644 --- a/Platform/Intel/WhitleyOpenBoardPkg/Library/PeiReportFvLib/PeiReportFv= Lib.inf +++ b/Platform/Intel/WhitleyOpenBoardPkg/Library/ReportFvLib/ReportFvLibPei= .inf @@ -9,11 +9,11 @@ =20 [Defines] INF_VERSION =3D 0x00010017 - BASE_NAME =3D PeiReportFvLib - FILE_GUID =3D 44328FA5-E4DD-4A15-ABDF-C6584AC363D9 + BASE_NAME =3D ReportFvLibPei + FILE_GUID =3D 8b176722-93a6-4b0a-a297-3d3b6c3c7034 VERSION_STRING =3D 1.0 MODULE_TYPE =3D PEIM - LIBRARY_CLASS =3D ReportFvLib + LIBRARY_CLASS =3D ReportFvLib | PEIM =20 [LibraryClasses] BaseMemoryLib @@ -28,7 +28,7 @@ WhitleyOpenBoardPkg/PlatformPkg.dec =20 [Sources] - PeiReportFvLib.c + ReportFvLibPei.c =20 [Pcd] gMinPlatformPkgTokenSpaceGuid.PcdBootStage ## CONSU= MES @@ -62,4 +62,6 @@ gMinPlatformPkgTokenSpaceGuid.PcdFlashFvBspPreMemoryOffset ## CONSU= MES gMinPlatformPkgTokenSpaceGuid.PcdFlashFvBspSize ## CONSU= MES gMinPlatformPkgTokenSpaceGuid.PcdFlashFvBspBase ## CONSU= MES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvBspOffset ## CONSU= MES \ No newline at end of file + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvBspOffset ## CONSU= MES + gCpPlatFlashTokenSpaceGuid.PcdFlashFvWheaBase ## CONSU= MES + gCpPlatFlashTokenSpaceGuid.PcdFlashFvWheaSize ## CONSU= MES diff --git a/Platform/Intel/WhitleyOpenBoardPkg/PlatformPkg.dsc b/Platform/= Intel/WhitleyOpenBoardPkg/PlatformPkg.dsc index b3e96ecf3f..7d5f9e6883 100644 --- a/Platform/Intel/WhitleyOpenBoardPkg/PlatformPkg.dsc +++ b/Platform/Intel/WhitleyOpenBoardPkg/PlatformPkg.dsc @@ -596,7 +596,7 @@ TestPointCheckLib|MinPlatformPkg/Test/Library/TestPointCheckLib/PeiTestP= ointCheckLib.inf TestPointLib|MinPlatformPkg/Test/Library/TestPointLib/PeiTestPointLib.inf =20 - ReportFvLib|$(RP_PKG)/Library/PeiReportFvLib/PeiReportFvLib.inf + ReportFvLib|$(RP_PKG)/Library/ReportFvLib/ReportFvLibPei.inf =20 [LibraryClasses.Common.PEIM] # @@ -632,6 +632,8 @@ TestPointLib|MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointLib.inf MmServicesTableLib|MdePkg/Library/MmServicesTableLib/MmServicesTableLib.= inf =20 + ReportFvLib|$(RP_PKG)/Library/ReportFvLib/ReportFvLibMm.inf + [LibraryClasses.Common.SMM_CORE] S3BootScriptLib|MdePkg/Library/BaseS3BootScriptLibNull/BaseS3BootScriptL= ibNull.inf =20 --=20 2.27.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#82162): https://edk2.groups.io/g/devel/message/82162 Mute This Topic: https://groups.io/mt/86360114/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sat May 4 19:24:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+82163+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+82163+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1634333148; cv=none; d=zohomail.com; s=zohoarc; b=LH8nZw7hoHVUIWstYNEKxR640HK2iR0mj1sYMq1UWmGvQMw7fY/xcgQPcwJhHF1N7BciNHBsPdzIoUkPQ24Z1K41Px18sMXOPcrbuRFDlPsntZYtFcz4d9mFOcQLzsQsBMbxs0kr1/sx5x+cUhqvUeh6SrVqx1sTX3n/TKkH4KA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634333148; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=HsSy1NKP4S2f1Sc5VvWYqeWhI7O4e/UNr4szxcwIImw=; b=Qmu4gQm56OaUzLOrdKBNfU/ee9h+oPCWoKNu9Ykkw/HWKKskfZZgv3QBAPuhvXynh7jD3fvfb20HeAxIsp30ddNo1STTcs/O8LOOBVgJUoX5SqDWy3t1ECtrD+P2Ck56Uz6unP59vDmuKdtFd/4vdGu0hXLC89KqL+fkauSmO34= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+82163+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1634333148455210.2084012628137; Fri, 15 Oct 2021 14:25:48 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id VnT7YY1788612xsdHuqY8lTm; Fri, 15 Oct 2021 14:25:48 -0700 X-Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web11.3341.1634333146761283299 for ; Fri, 15 Oct 2021 14:25:47 -0700 X-IronPort-AV: E=McAfee;i="6200,9189,10138"; a="314187521" X-IronPort-AV: E=Sophos;i="5.85,376,1624345200"; d="scan'208";a="314187521" X-Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2021 14:25:45 -0700 X-IronPort-AV: E=Sophos;i="5.85,376,1624345200"; d="scan'208";a="492709801" X-Received: from iworam-desk.amr.corp.intel.com ([10.7.150.79]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2021 14:25:44 -0700 From: "Oram, Isaac W" To: devel@edk2.groups.io Cc: Chasel Chiu , Nate DeSimone Subject: [edk2-devel][edk2-platforms][PATCH V1 07/11] PurleyOpenBoardPkg/ReportFvLib: Update ReportFvLib Date: Fri, 15 Oct 2021 14:25:30 -0700 Message-Id: <40ba147026c4f81af8865bae966c3908ff187154.1634331939.git.isaac.w.oram@intel.com> In-Reply-To: References: MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,isaac.w.oram@intel.com X-Gm-Message-State: 4HTjxwNtcmJzA0pMLWKOdi2cx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1634333148; bh=ihNgk6OXRf4v4dXMQrZ8OPyW9thpJQv05Jv0FLZjA4A=; h=Cc:Date:From:Reply-To:Subject:To; b=KPaaCUP74wsq03h20mLS24z5V3sFLM6u8OMmZAB/ewRZI7w7y55CuZI9Dcwdj4XYY6Y 1qPm7lT6iNBb7IaaR11GpGaNXeg/EkhnZ29ins/+v5tDnkQcMY277avbDp1z5ACm/hMBy nYSbG778q2xpKRbH1IWTVSwza4piPWHyET0= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1634333150502100030 Content-Type: text/plain; charset="utf-8" Update custom ReportFvLib to match other board implementations. Also fix duplicate GUID for libary name. Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Isaac Oram Reviewed-by: Nate DeSimone --- Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/OpenBoardPkg.dsc = | 1 - Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/Library/{PeiReportFvLib/P= eiReportFvLib.c =3D> ReportFvLib/ReportFvLibPei.c} | 10 +++++++--- Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/Library/{PeiReportFvLib/P= eiReportFvLib.inf =3D> ReportFvLib/ReportFvLibPei.inf} | 13 +++++++------ Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/OpenBoardPkg.dsc = | 8 ++++---- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/OpenBoardPkg.= dsc b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/OpenBoardPkg.dsc index 98e02f35e7..ca747737e4 100644 --- a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/OpenBoardPkg.dsc +++ b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/OpenBoardPkg.dsc @@ -105,7 +105,6 @@ PlatformBootManagerLib|$(PLATFORM_BOARD_PACKAGE)/Override/Platform/Intel= /MinPlatformPkg/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManage= rLib.inf !endif =20 - ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiR= eportFvLib.inf TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull= /TestPointCheckLibNull.inf =20 CompressLib|$(PLATFORM_PACKAGE)/Library/CompressLib/CompressLib.inf diff --git a/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/Library/PeiRe= portFvLib/PeiReportFvLib.c b/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPa= ss/Library/ReportFvLib/ReportFvLibPei.c similarity index 90% rename from Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/Library/PeiRep= ortFvLib/PeiReportFvLib.c rename to Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/Library/ReportFv= Lib/ReportFvLibPei.c index ee4fce0b5c..706bcb02ff 100644 --- a/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/Library/PeiReportFvL= ib/PeiReportFvLib.c +++ b/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/Library/ReportFvLib/= ReportFvLibPei.c @@ -1,9 +1,13 @@ /** @file + Source code file for Report Firmware Volume (FV) library =20 -Copyright (c) 2018, Intel Corporation. All rights reserved.
-Copyright (c) 2021, American Megatrends International LLC.
-SPDX-License-Identifier: BSD-2-Clause-Patent + ReportMmFv (); is not supported in this library instance =20 + @copyright + Copyright (c) 2018, - 2021 Intel Corporation. All rights reserved.
+ Copyright (c) 2021, American Megatrends International LLC.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent **/ =20 #include diff --git a/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/Library/PeiRe= portFvLib/PeiReportFvLib.inf b/Platform/Intel/PurleyOpenBoardPkg/BoardTioga= Pass/Library/ReportFvLib/ReportFvLibPei.inf similarity index 82% rename from Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/Library/PeiRep= ortFvLib/PeiReportFvLib.inf rename to Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/Library/ReportFv= Lib/ReportFvLibPei.inf index 1aab8ae702..adcf8d8cfd 100644 --- a/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/Library/PeiReportFvL= ib/PeiReportFvLib.inf +++ b/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/Library/ReportFvLib/= ReportFvLibPei.inf @@ -1,19 +1,20 @@ ## @file +# Component information file for the Report Firmware Volume (FV) library. # -# Copyright (c) 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2018 - 2021, Intel Corporation. All rights reserved.
# Copyright (c) 2021, American Megatrends International LLC.
+# # SPDX-License-Identifier: BSD-2-Clause-Patent # ## =20 - [Defines] INF_VERSION =3D 0x00010017 - BASE_NAME =3D PeiReportFvLib - FILE_GUID =3D 44328FA5-E4DD-4A15-ABDF-C6584AC363D9 + BASE_NAME =3D ReportFvLibPei + FILE_GUID =3D b2f52f32-9963-4f66-8cbf-ddb7a02523ac VERSION_STRING =3D 1.0 MODULE_TYPE =3D PEIM - LIBRARY_CLASS =3D ReportFvLib + LIBRARY_CLASS =3D ReportFvLib | PEIM =20 [LibraryClasses] BaseMemoryLib @@ -27,7 +28,7 @@ MinPlatformPkg/MinPlatformPkg.dec =20 [Sources] - PeiReportFvLib.c + ReportFvLibPei.c =20 [Pcd] gMinPlatformPkgTokenSpaceGuid.PcdFspWrapperBootMode ## CONSUMES diff --git a/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/OpenBoardPkg.= dsc b/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/OpenBoardPkg.dsc index f2a028d183..5623cbac41 100644 --- a/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/OpenBoardPkg.dsc +++ b/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/OpenBoardPkg.dsc @@ -1,7 +1,7 @@ ## @file # The main build description file for the TiogaPass board. # -# Copyright (c) 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2018 - 2021, Intel Corporation. All rights reserved.
# Copyright (c) 2021, American Megatrends International LLC.
# SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -89,7 +89,7 @@ [Components.$(DXE_ARCH)] #TiogaPass Override START : Added Board Specific changes in core drivers #!include $(PLATFORM_PACKAGE)/Include/Dsc/CoreDxeInclude.dsc -!include CoreDxeInclude.dsc=20 +!include CoreDxeInclude.dsc #TiogaPass Override END =20 ####################################### @@ -109,7 +109,7 @@ LoadLinuxLib|OvmfPkg/Library/LoadLinuxLib/LoadLinuxLib.inf !else LinuxBootLib|$(PLATFORM_BOARD_PACKAGE)/Features/LinuxBoot/LinuxBootNull.= inf -!endif=20 +!endif =20 !if gPlatformTokenSpaceGuid.PcdFastBoot =3D=3D FALSE PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootMa= nagerLib/DxePlatformBootManagerLib.inf @@ -117,7 +117,7 @@ PlatformBootManagerLib|$(PLATFORM_BOARD_PACKAGE)/Override/Platform/Intel= /MinPlatformPkg/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManage= rLib.inf !endif =20 - ReportFvLib|$(PROJECT)/Library/PeiReportFvLib/PeiReportFvLib.inf + ReportFvLib|$(PROJECT)/Library/ReportFvLib/ReportFvLibPei.inf TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull= /TestPointCheckLibNull.inf =20 CompressLib|$(PLATFORM_PACKAGE)/Library/CompressLib/CompressLib.inf --=20 2.27.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#82163): https://edk2.groups.io/g/devel/message/82163 Mute This Topic: https://groups.io/mt/86360115/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sat May 4 19:24:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+82167+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+82167+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1634333150; cv=none; d=zohomail.com; s=zohoarc; b=fOORVhW2E7jxVS3dKb0pSfc/gLE8ppWbv3rqRGtMpFnLPmYawA11RmIpdQxI3ZE8Watsyb5UlWacElEuye1tbxt7ufc0KUbrnwlBq+BumW0YZ8yKZZwgqYgCA+p9MIEKINovCpZyLGMpjqQZH6ZsJ73Cem0mLOFzZF3f3JsK+3s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634333150; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=9mAsL0uPRry4/NmAqV08pvb13E+a6cQiGvIves1l0jY=; b=aUDV7dPCROC2/+8ddtQH45JMEp7YL40jg99XdrhfkOTCCGvFNsHNA6ja8AqJ9HdErvMh/DRLaiK67FPgP5D316Ev/+VuCajKv0xab4XppASMjcjdZbo5nkJaLLoGUuaYIKtJ3f59ICw+oL8V4ojw92oyqPSUJm+poUm7/yzT3Cs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+82167+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1634333150090836.0586138182408; Fri, 15 Oct 2021 14:25:50 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id SsLuYY1788612xIuCE4nL6hl; Fri, 15 Oct 2021 14:25:49 -0700 X-Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web09.3271.1634333148424429515 for ; Fri, 15 Oct 2021 14:25:48 -0700 X-IronPort-AV: E=McAfee;i="6200,9189,10138"; a="314187527" X-IronPort-AV: E=Sophos;i="5.85,376,1624345200"; d="scan'208";a="314187527" X-Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2021 14:25:46 -0700 X-IronPort-AV: E=Sophos;i="5.85,376,1624345200"; d="scan'208";a="492709803" X-Received: from iworam-desk.amr.corp.intel.com ([10.7.150.79]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2021 14:25:44 -0700 From: "Oram, Isaac W" To: devel@edk2.groups.io Cc: Agyeman Prince Subject: [edk2-devel][edk2-platforms][PATCH V1 08/11] SimicsOpenBoardPkg/ReportFvLib: Update ReportFvLib Date: Fri, 15 Oct 2021 14:25:31 -0700 Message-Id: <1535f904e731343d6dcf6291b83ea02adc41674f.1634331939.git.isaac.w.oram@intel.com> In-Reply-To: References: MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,isaac.w.oram@intel.com X-Gm-Message-State: 7RFq3PHYlgsQI71cmcpyTISsx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1634333149; bh=U9O0XmItlzieEiK1YMUHthynqClbnPb34i3kxJXbEAc=; h=Cc:Date:From:Reply-To:Subject:To; b=jtoRufquqSx6VkmABYj38nnAnEwXLSEjf4MYcrn+zedZG68Leub3gXFb4v7PNUYxUYP P79NhjCf2KeubEwet9V0C0ZKOlT/EYHSPOzToSgrVMiNJwQh5Swe2YRFpALLAYAgjB+U+ 02rDf8jw88zeVxQ4GREryw1osz4VXVpzg5k= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1634333150633100038 Content-Type: text/plain; charset="utf-8" Update file naming to match other ReportFvLib implementations. Also fix duplicate GUID for libary name. Cc: Agyeman Prince Signed-off-by: Isaac Oram --- Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc = | 2 +- Platform/Intel/SimicsOpenBoardPkg/Library/{PeiReportFvLib =3D> ReportFvLib= }/Fv.c | 0 Platform/Intel/SimicsOpenBoardPkg/Library/{PeiReportFvLib/PeiReportFvLib.c= =3D> ReportFvLib/ReportFvLibPei.c} | 0 Platform/Intel/SimicsOpenBoardPkg/Library/{PeiReportFvLib/PeiReportFvLib.i= nf =3D> ReportFvLib/ReportFvLibPei.inf} | 10 +++++----- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.d= sc b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc index 93a7d1df55..bfd0320daf 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc +++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc @@ -117,7 +117,6 @@ DxeLoadLinuxLib|$(BOARD_PKG)/Library/LoadLinuxLib/DxeLoadLinuxLib.inf LogoLib|$(BOARD_PKG)/Library/DxeLogoLib/DxeLogoLib.inf NvVarsFileLib|$(BOARD_PKG)/Library/NvVarsFileLib/NvVarsFileLib.inf - ReportFvLib|$(BOARD_PKG)/Library/PeiReportFvLib/PeiReportFvLib.inf SerializeVariablesLib|$(BOARD_PKG)/Library/SerializeVariablesLib/Seriali= zeVariablesLib.inf SiliconPolicyInitLib|$(BOARD_PKG)/Policy/Library/SiliconPolicyInitLib/Si= liconPolicyInitLib.inf SiliconPolicyUpdateLib|$(BOARD_PKG)/Policy/Library/SiliconPolicyUpdateLi= b/SiliconPolicyUpdateLib.inf @@ -151,6 +150,7 @@ !endif TestPointLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointLib/PeiTestPointL= ib.inf SetCacheMtrrLib|$(PLATFORM_PACKAGE)/Library/SetCacheMtrrLib/SetCacheMtrr= Lib.inf + ReportFvLib|$(BOARD_PKG)/Library/ReportFvLib/ReportFvLibPei.inf =20 [LibraryClasses.common.DXE_DRIVER] =20 diff --git a/Platform/Intel/SimicsOpenBoardPkg/Library/PeiReportFvLib/Fv.c = b/Platform/Intel/SimicsOpenBoardPkg/Library/ReportFvLib/Fv.c similarity index 100% rename from Platform/Intel/SimicsOpenBoardPkg/Library/PeiReportFvLib/Fv.c rename to Platform/Intel/SimicsOpenBoardPkg/Library/ReportFvLib/Fv.c diff --git a/Platform/Intel/SimicsOpenBoardPkg/Library/PeiReportFvLib/PeiRe= portFvLib.c b/Platform/Intel/SimicsOpenBoardPkg/Library/ReportFvLib/ReportF= vLibPei.c similarity index 100% rename from Platform/Intel/SimicsOpenBoardPkg/Library/PeiReportFvLib/PeiRep= ortFvLib.c rename to Platform/Intel/SimicsOpenBoardPkg/Library/ReportFvLib/ReportFvLib= Pei.c diff --git a/Platform/Intel/SimicsOpenBoardPkg/Library/PeiReportFvLib/PeiRe= portFvLib.inf b/Platform/Intel/SimicsOpenBoardPkg/Library/ReportFvLib/Repor= tFvLibPei.inf similarity index 84% rename from Platform/Intel/SimicsOpenBoardPkg/Library/PeiReportFvLib/PeiRep= ortFvLib.inf rename to Platform/Intel/SimicsOpenBoardPkg/Library/ReportFvLib/ReportFvLib= Pei.inf index 5d2e39532c..524ecf2847 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/Library/PeiReportFvLib/PeiReportFvL= ib.inf +++ b/Platform/Intel/SimicsOpenBoardPkg/Library/ReportFvLib/ReportFvLibPei.= inf @@ -1,7 +1,7 @@ ### @file # Component information file for the Report Firmware Volume (FV) library. # -# Copyright (c) 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2019 - 2021, Intel Corporation. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -9,11 +9,11 @@ =20 [Defines] INF_VERSION =3D 0x00010017 - BASE_NAME =3D PeiReportFvLib - FILE_GUID =3D 44328FA5-E4DD-4A15-ABDF-C6584AC363D9 + BASE_NAME =3D ReportFvLibPei + FILE_GUID =3D 409fc85f-aec0-4a8f-8126-9c36d201b5c4 VERSION_STRING =3D 1.0 MODULE_TYPE =3D PEIM - LIBRARY_CLASS =3D ReportFvLib + LIBRARY_CLASS =3D ReportFvLib | PEIM =20 [LibraryClasses] BaseMemoryLib @@ -32,7 +32,7 @@ SimicsIch10Pkg/Ich10Pkg.dec =20 [Sources] - PeiReportFvLib.c + ReportFvLibPei.c Fv.c =20 [Pcd] --=20 2.27.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#82167): https://edk2.groups.io/g/devel/message/82167 Mute This Topic: https://groups.io/mt/86360120/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sat May 4 19:24:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+82164+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+82164+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1634333148; cv=none; d=zohomail.com; s=zohoarc; b=AAd66sWMO3zetVQrCgrE8Cmap8sfUuNS6AF8QHMm6xpkgP4rTr7CncmF3ZOQp80OUG06cYOf5mx042D1bvymNXcobVg/dF+UEWvndnwD/g5gNw4x1kgj8C72hoKHlXlKB9wXM+jpah50TQy0J4PvfMbGg/q253mU20wdvMelQZM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634333148; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=DHCko7eg0iyMU0IOHY0aI4PxC0eS8BHStW+iJc3Cr1U=; b=Cw0Bn1aDrsEPaqfNkHGzGr/1s2PRmdz7+rBALj502JIn53zb/8iLy6+F96WkleYfDrhEjFIfu7XLl50h50HMI8hCDsQ4piCZowbZNUEsjGIZ285VniCqcAVxKKv05fIp3kRY3Llm56aTn9Tm3ad5hCivHWHRt3iBYZJkZkwih3E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+82164+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1634333148914975.7429308024177; Fri, 15 Oct 2021 14:25:48 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id E97tYY1788612xaTgazy7dng; Fri, 15 Oct 2021 14:25:48 -0700 X-Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web11.3341.1634333146761283299 for ; Fri, 15 Oct 2021 14:25:47 -0700 X-IronPort-AV: E=McAfee;i="6200,9189,10138"; a="314187536" X-IronPort-AV: E=Sophos;i="5.85,376,1624345200"; d="scan'208";a="314187536" X-Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2021 14:25:47 -0700 X-IronPort-AV: E=Sophos;i="5.85,376,1624345200"; d="scan'208";a="492709807" X-Received: from iworam-desk.amr.corp.intel.com ([10.7.150.79]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2021 14:25:44 -0700 From: "Oram, Isaac W" To: devel@edk2.groups.io Cc: Chasel Chiu , Nate DeSimone , Liming Gao , Eric Dong Subject: [edk2-devel][edk2-platforms][PATCH V1 09/11] MinPlatformPkg/SpifvbService: Publish FV based on board request Date: Fri, 15 Oct 2021 14:25:32 -0700 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,isaac.w.oram@intel.com X-Gm-Message-State: KBPFTjebEmr9Lwr0Q5XZ40yfx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1634333148; bh=I4Wqym8ELzcJM5vMl8A228v7F8/fZF7Inw2u/e8pOdc=; h=Cc:Date:From:Reply-To:Subject:To; b=W65za2+jnZvT29rSG/AmVcQicsVoeKjEOvSgtMCRPD8AB+WC8lxIZ6USVt7wjOulTL3 FMoakt96JAMz973E3Mb98Uw+c+91HTgbT7BVF6k5mqfZa6soKKXBtIssAsyNVl9agC2m4 mMlJScAqvhOQ+DnDWr1mpoLNDJODG49cBpU= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1634333150587100034 Content-Type: text/plain; charset="utf-8" Change MM reporting to use ReportFvLib API ReportMmFv (); This removed the hardcoded table of FV to publish. Also removed the unused "default" table. Cc: Chasel Chiu Cc: Nate DeSimone Cc: Liming Gao Cc: Eric Dong Signed-off-by: Isaac Oram --- Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceCommon.c = | 16 -------- Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceCommon.h = | 7 ---- Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceMm.c = | 41 ++++++++++++-------- Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceSmm.inf = | 1 + Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandaloneM= m.inf | 1 + 5 files changed, 27 insertions(+), 39 deletions(-) diff --git a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServic= eCommon.c b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbService= Common.c index 113c749d04..b8a255dbf4 100644 --- a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceCommon= .c +++ b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceCommon= .c @@ -15,22 +15,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // FVB_GLOBAL mFvbModuleGlobal; =20 -// -// This platform driver knows there are multiple FVs on FD. -// Now we only provide FVs on Variable region and MicorCode region for per= formance issue. -// -FV_INFO mPlatformFvBaseAddress[] =3D { - {0, 0}, // {FixedPcdGet32(PcdFlashNvStorageVariableBase), FixedPcdGet32(= PcdFlashNvStorageVariableSize)}, - {0, 0}, // {FixedPcdGet32(PcdFlashFvMicrocodeBase), FixedPcdGet32(PcdFla= shFvMicrocodeSize)}, - {0, 0} -}; - -FV_INFO mPlatformDefaultBaseAddress[] =3D { - {0, 0}, // {FixedPcdGet32(PcdFlashNvStorageVariableBase), FixedPcdGet32(= PcdFlashNvStorageVariableSize)}, - {0, 0}, // {FixedPcdGet32(PcdFlashFvMicrocodeBase), FixedPcdGet32(PcdFla= shFvMicrocodeSize)}, - {0, 0} -}; - FV_MEMMAP_DEVICE_PATH mFvMemmapDevicePathTemplate =3D { { { diff --git a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServic= eCommon.h b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbService= Common.h index e9d69e9858..d1d61b124f 100644 --- a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceCommon= .h +++ b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceCommon= .h @@ -71,11 +71,6 @@ typedef struct { EFI_DEVICE_PATH_PROTOCOL EndDevPath; } FV_MEMMAP_DEVICE_PATH; =20 -typedef struct { - UINT32 FvBase; - UINT32 FvSize; -} FV_INFO; - // // Protocol APIs // @@ -152,7 +147,5 @@ extern FVB_GLOBAL mFvbModuleGlo= bal; extern FV_MEMMAP_DEVICE_PATH mFvMemmapDevicePathTemplate; extern FV_PIWG_DEVICE_PATH mFvPIWGDevicePathTemplate; extern EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL mFvbProtocolTemplate; -extern FV_INFO mPlatformFvBaseAddress[]; -extern FV_INFO mPlatformDefaultBaseAddress[]; =20 #endif diff --git a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServic= eMm.c b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceMm.c index 016f19587c..1d8d55b8f2 100644 --- a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceMm.c +++ b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceMm.c @@ -11,6 +11,7 @@ #include "SpiFvbServiceCommon.h" #include #include +#include #include =20 /** @@ -97,8 +98,12 @@ InstallFvbProtocol ( The function does the necessary initialization work for Firmware Volume Block Driver. =20 + @param VOID + + @retval EFI_SUCCESS The driver initialized successfully. + @retval EFI_UNSUPPORTED The driver failed to initialize properly. **/ -VOID +EFI_STATUS FvbInitialize ( VOID ) @@ -113,15 +118,17 @@ FvbInitialize ( UINT32 MaxLbaSize; UINT32 BytesWritten; UINTN BytesErased; + FV_INFO *BoardFvInfoTablePtr; =20 - mPlatformFvBaseAddress[0].FvBase =3D PcdGet32(PcdFlashNvStorageVariableB= ase); - mPlatformFvBaseAddress[0].FvSize =3D PcdGet32(PcdFlashNvStorageVariableS= ize); - mPlatformFvBaseAddress[1].FvBase =3D PcdGet32(PcdFlashFvMicrocodeBase); - mPlatformFvBaseAddress[1].FvSize =3D PcdGet32(PcdFlashFvMicrocodeSize); - mPlatformDefaultBaseAddress[0].FvBase =3D PcdGet32(PcdFlashNvStorageVari= ableBase); - mPlatformDefaultBaseAddress[0].FvSize =3D PcdGet32(PcdFlashNvStorageVari= ableSize); - mPlatformDefaultBaseAddress[1].FvBase =3D PcdGet32(PcdFlashFvMicrocodeBa= se); - mPlatformDefaultBaseAddress[1].FvSize =3D PcdGet32(PcdFlashFvMicrocodeSi= ze); + // + // Retrieve the FV Info from the board library + // + BoardFvInfoTablePtr =3D NULL; + ReportMmFv (&BoardFvInfoTablePtr); + if (!BoardFvInfoTablePtr) { + ASSERT (BoardFvInfoTablePtr !=3D NULL); + return EFI_UNSUPPORTED; + } =20 // // We will only continue with FVB installation if the @@ -132,11 +139,11 @@ FvbInitialize ( // Make sure all FVB are valid and/or fix if possible // for (Idx =3D 0;; Idx++) { - if (mPlatformFvBaseAddress[Idx].FvSize =3D=3D 0 && mPlatformFvBaseAd= dress[Idx].FvBase =3D=3D 0) { + if (BoardFvInfoTablePtr[Idx].FvSize =3D=3D 0 && BoardFvInfoTablePtr[= Idx].FvBase =3D=3D 0) { break; } =20 - BaseAddress =3D mPlatformFvBaseAddress[Idx].FvBase; + BaseAddress =3D BoardFvInfoTablePtr[Idx].FvBase; FvHeader =3D (EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) BaseAddress; =20 if (!IsFvHeaderValid (BaseAddress, FvHeader)) { @@ -192,10 +199,10 @@ FvbInitialize ( // BufferSize =3D 0; for (Idx =3D 0; ; Idx++) { - if (mPlatformFvBaseAddress[Idx].FvSize =3D=3D 0 && mPlatformFvBaseAd= dress[Idx].FvBase =3D=3D 0) { + if (BoardFvInfoTablePtr[Idx].FvSize =3D=3D 0 && BoardFvInfoTablePtr[= Idx].FvBase =3D=3D 0) { break; } - BaseAddress =3D mPlatformFvBaseAddress[Idx].FvBase; + BaseAddress =3D BoardFvInfoTablePtr[Idx].FvBase; FvHeader =3D (EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) BaseAddress; =20 if (!IsFvHeaderValid (BaseAddress, FvHeader)) { @@ -212,7 +219,7 @@ FvbInitialize ( mFvbModuleGlobal.FvbInstance =3D (EFI_FVB_INSTANCE *) AllocateRuntime= ZeroPool (BufferSize); if (mFvbModuleGlobal.FvbInstance =3D=3D NULL) { ASSERT (FALSE); - return; + return EFI_SUCCESS; } =20 MaxLbaSize =3D 0; @@ -220,10 +227,10 @@ FvbInitialize ( mFvbModuleGlobal.NumFv =3D 0; =20 for (Idx =3D 0; ; Idx++) { - if (mPlatformFvBaseAddress[Idx].FvSize =3D=3D 0 && mPlatformFvBaseAd= dress[Idx].FvBase =3D=3D 0) { + if (BoardFvInfoTablePtr[Idx].FvSize =3D=3D 0 && BoardFvInfoTablePtr[= Idx].FvBase =3D=3D 0) { break; } - BaseAddress =3D mPlatformFvBaseAddress[Idx].FvBase; + BaseAddress =3D BoardFvInfoTablePtr[Idx].FvBase; FvHeader =3D (EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) BaseAddress; =20 if (!IsFvHeaderValid (BaseAddress, FvHeader)) { @@ -268,4 +275,6 @@ FvbInitialize ( =20 } } + + return EFI_SUCCESS; } diff --git a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServic= eSmm.inf b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceS= mm.inf index 10e51e1175..7b69bedcdc 100644 --- a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceSmm.inf +++ b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceSmm.inf @@ -34,6 +34,7 @@ UefiDriverEntryPoint SpiFlashCommonLib MmServicesTableLib + ReportFvLib =20 [Packages] MdePkg/MdePkg.dec diff --git a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServic= eStandaloneMm.inf b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFv= bServiceStandaloneMm.inf index 9f08d3673f..1dfb2520e7 100644 --- a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStanda= loneMm.inf +++ b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStanda= loneMm.inf @@ -33,6 +33,7 @@ MmServicesTableLib SpiFlashCommonLib StandaloneMmDriverEntryPoint + ReportFvLib =20 [Packages] MdePkg/MdePkg.dec --=20 2.27.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#82164): https://edk2.groups.io/g/devel/message/82164 Mute This Topic: https://groups.io/mt/86360116/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sat May 4 19:24:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+82165+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+82165+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1634333149; cv=none; d=zohomail.com; s=zohoarc; b=KObaPDGuul8CLtB4QAOWmGbAke30Z9iskscbAYmYyE2szr9HwpzLrTY45XvnTYVI7+da5CvTVHYAzWafhKn6/rXRCrlfS8MOKYHX1oOAAkxtHixUddQkLJ1LHHzccWKaqW1F5IXIsdbIYLPYl27CEVgcubDeBjH0/K5Z2A/SlqI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634333149; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=s3IUeXPYxohduJGdTcnibuWsFeIYzKGZ1Ypaylb96rM=; b=KUIaIpQf5bwopwQIPNTjPcA9wv4H7NIBIZue6VwUri1eyME7XvDIX3RrLpXp4H4XhqaIU5+J/+bkMzm5rCvOSpnXfhB8Q/Q765fnym/drR/k649d9ROB7BNzmziMIFWmJPmeirABCvm0SaEMU3KDsMRN+t0aMQxcbiUVxnyHGxM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+82165+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1634333149386725.4147527788333; Fri, 15 Oct 2021 14:25:49 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id DyjVYY1788612x7IO1g9iaQn; Fri, 15 Oct 2021 14:25:49 -0700 X-Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web11.3341.1634333146761283299 for ; Fri, 15 Oct 2021 14:25:48 -0700 X-IronPort-AV: E=McAfee;i="6200,9189,10138"; a="314187538" X-IronPort-AV: E=Sophos;i="5.85,376,1624345200"; d="scan'208";a="314187538" X-Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2021 14:25:47 -0700 X-IronPort-AV: E=Sophos;i="5.85,376,1624345200"; d="scan'208";a="492709810" X-Received: from iworam-desk.amr.corp.intel.com ([10.7.150.79]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2021 14:25:44 -0700 From: "Oram, Isaac W" To: devel@edk2.groups.io Cc: Chasel Chiu , Nate DeSimone , Liming Gao , Eric Dong Subject: [edk2-devel][edk2-platforms][PATCH V1 10/11] MinPlatformPkg/SpiFvbService: Reduce duplicate code Date: Fri, 15 Oct 2021 14:25:33 -0700 Message-Id: <9db0b794a840f862b848c99167b83f2633200ed8.1634331939.git.isaac.w.oram@intel.com> In-Reply-To: References: MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,isaac.w.oram@intel.com X-Gm-Message-State: V6YdMOqvequE5uzIWJY4OT2fx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1634333149; bh=jFgiHFs+vVxQ/JMJ3PIK7ldhboY66RNjBkSD22Rkdls=; h=Cc:Date:From:Reply-To:Subject:To; b=lpeoEZFhTsKuEJdgJ+zr9kTJymFUd2lkiySGUJcQWeRN6o1kxjioyCOuGqjIQvxbPpO 4QTyZ8dr25cfuBCWezGMPyWEwm3/BiusiXUCGHhvjySE+nUnOjkxgUcep8CEh9EJbG0WL LL/OfTbS6nNxCUuxad6v8XOwzEFwd/rRWBo= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1634333150593100035 Content-Type: text/plain; charset="utf-8" Consolidate all the entry point functions into SpiFvbServiceMm.c This reduces the number of files and makes the code easier to understand. Cc: Chasel Chiu Cc: Nate DeSimone Cc: Liming Gao Cc: Eric Dong Signed-off-by: Isaac Oram --- Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceMm.c = | 42 ++++++++++++++++++++ Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceSmm.inf = | 1 - Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandaloneM= m.c | 32 --------------- Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandaloneM= m.inf | 1 - Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceTraditional= Mm.c | 32 --------------- 5 files changed, 42 insertions(+), 66 deletions(-) diff --git a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServic= eMm.c b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceMm.c index 1d8d55b8f2..cc9310023e 100644 --- a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceMm.c +++ b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceMm.c @@ -278,3 +278,45 @@ FvbInitialize ( =20 return EFI_SUCCESS; } + +/** + The driver Traditional MM entry point. + + @param[in] ImageHandle Image handle of this driver. + @param[in] SystemTable A pointer to the EFI system table. + + @retval EFI_SUCCESS This function always returns EFI_SUCCESS. + +**/ +EFI_STATUS +EFIAPI +SpiFvbTraditionalMmInitialize ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + FvbInitialize (); + + return EFI_SUCCESS; +} + +/** + The driver Standalone MM entry point. + + @param[in] ImageHandle Image handle of this driver. + @param[in] MmSystemTable A pointer to the MM system table. + + @retval EFI_SUCCESS This function always returns EFI_SUCCESS. + +**/ +EFI_STATUS +EFIAPI +SpiFvbStandaloneMmInitialize ( + IN EFI_HANDLE ImageHandle, + IN EFI_MM_SYSTEM_TABLE *MmSystemTable + ) +{ + FvbInitialize (); + + return EFI_SUCCESS; +} diff --git a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServic= eSmm.inf b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceS= mm.inf index 7b69bedcdc..600ad32d9f 100644 --- a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceSmm.inf +++ b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceSmm.inf @@ -55,7 +55,6 @@ SpiFvbServiceCommon.c SpiFvbServiceMm.h SpiFvbServiceMm.c - SpiFvbServiceTraditionalMm.c =20 [Protocols] gEfiDevicePathProtocolGuid ## PRODUCES diff --git a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServic= eStandaloneMm.c b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbS= erviceStandaloneMm.c deleted file mode 100644 index 252c818d65..0000000000 --- a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStanda= loneMm.c +++ /dev/null @@ -1,32 +0,0 @@ -/** @file - MM driver source for several Serial Flash devices - which are compliant with the Intel(R) Serial Flash Interface Compatibili= ty Specification. - - Copyright (c) Microsoft Corporation.
- SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#include "SpiFvbServiceCommon.h" -#include "SpiFvbServiceMm.h" - -/** - The driver Standalone MM entry point. - - @param[in] ImageHandle Image handle of this driver. - @param[in] MmSystemTable A pointer to the MM system table. - - @retval EFI_SUCCESS This function always returns EFI_SUCCESS. - -**/ -EFI_STATUS -EFIAPI -SpiFvbStandaloneMmInitialize ( - IN EFI_HANDLE ImageHandle, - IN EFI_MM_SYSTEM_TABLE *MmSystemTable - ) -{ - FvbInitialize (); - - return EFI_SUCCESS; -} diff --git a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServic= eStandaloneMm.inf b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFv= bServiceStandaloneMm.inf index 1dfb2520e7..4e056466a1 100644 --- a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStanda= loneMm.inf +++ b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStanda= loneMm.inf @@ -54,7 +54,6 @@ SpiFvbServiceCommon.c SpiFvbServiceMm.h SpiFvbServiceMm.c - SpiFvbServiceStandaloneMm.c =20 [Protocols] gEfiDevicePathProtocolGuid ## PRODUCES diff --git a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServic= eTraditionalMm.c b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvb= ServiceTraditionalMm.c deleted file mode 100644 index 1c2dac70e3..0000000000 --- a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceTradit= ionalMm.c +++ /dev/null @@ -1,32 +0,0 @@ -/** @file - MM driver source for several Serial Flash devices - which are compliant with the Intel(R) Serial Flash Interface Compatibili= ty Specification. - - Copyright (c) Microsoft Corporation.
- SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#include "SpiFvbServiceCommon.h" -#include "SpiFvbServiceMm.h" - -/** - The driver Traditional MM entry point. - - @param[in] ImageHandle Image handle of this driver. - @param[in] SystemTable A pointer to the EFI system table. - - @retval EFI_SUCCESS This function always returns EFI_SUCCESS. - -**/ -EFI_STATUS -EFIAPI -SpiFvbTraditionalMmInitialize ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable - ) -{ - FvbInitialize (); - - return EFI_SUCCESS; -} --=20 2.27.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#82165): https://edk2.groups.io/g/devel/message/82165 Mute This Topic: https://groups.io/mt/86360117/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sat May 4 19:24:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+82166+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+82166+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1634333149; cv=none; d=zohomail.com; s=zohoarc; b=RkcWEg76ltLFR0IBpdpjAcW0YMBgdFX+AAKHLlM4GhrMFTOm6KNNBCTjPW/tle9W0DYUDwGpxBkC8N2A/6jNxjfpFursoceK8Evmj3mpLCMhxR9qM4kQXJbrmPhM1JcF+G5ThUqTZNWP55mY0rtGkNBdoKEj1ufWx3KUZYfuVCY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634333149; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=dqQQNWEgMceqRB0mZgdILYmfOxUnz9FNkjJ4aRXS7KY=; b=gGrIz3lo6sRcB6RrFdPYIuj8yeAdJkzKP+aDNcuWQL1hX+DYaOJ4phhVpe8ua3sj0dW3NY4YUO7M2+m2dAX22amvc9dh9cZIhOpqSotJD98y9T4I3SQmAONqLSnfxxmoEIjwx5uoqu2AnWtxih37SRejpNUIR6x0XwK3Ux8qqq0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+82166+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1634333149525410.97503119341263; Fri, 15 Oct 2021 14:25:49 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id I6jRYY1788612xL10NycvjrO; Fri, 15 Oct 2021 14:25:49 -0700 X-Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web11.3341.1634333146761283299 for ; Fri, 15 Oct 2021 14:25:48 -0700 X-IronPort-AV: E=McAfee;i="6200,9189,10138"; a="314187540" X-IronPort-AV: E=Sophos;i="5.85,376,1624345200"; d="scan'208";a="314187540" X-Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2021 14:25:47 -0700 X-IronPort-AV: E=Sophos;i="5.85,376,1624345200"; d="scan'208";a="492709812" X-Received: from iworam-desk.amr.corp.intel.com ([10.7.150.79]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2021 14:25:44 -0700 From: "Oram, Isaac W" To: devel@edk2.groups.io Cc: Chasel Chiu , Nate DeSimone , Liming Gao , Eric Dong Subject: [edk2-devel][edk2-platforms][PATCH V1 11/11] MinPlatformPkg/ReportFvLib: Remove obsolete PeiReportFvLib instance Date: Fri, 15 Oct 2021 14:25:34 -0700 Message-Id: <2a1dffbb6cb2d460bfa0421426a880faeb03148d.1634331939.git.isaac.w.oram@intel.com> In-Reply-To: References: MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,isaac.w.oram@intel.com X-Gm-Message-State: WSvKQl2xAxuS2S6BaqJNJMT5x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1634333149; bh=/6gwRBXldTBQKWmhWyVIHu+vTKJItoaPGi/84An8fGE=; h=Cc:Date:From:Reply-To:Subject:To; b=DcINepKSC3dAPQ/vdjVAY6pFixFaNJlxtpHcSZRwCCCgMhCDc7tR4w9IFCZGZRwmS5D ERIB6pug5oRaMuEfWpkcqh95WyIB7yvF0fUl24yKTwL8X1b39tj1k4cNE65a4b0FUTDfo 5UJRqVj5Zgr0uUX+KPdjEFVykXb2xL4LQ84= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1634333150615100037 Content-Type: text/plain; charset="utf-8" All boards have been updated to use the new libraries or custom instances. Cc: Chasel Chiu Cc: Nate DeSimone Cc: Liming Gao Cc: Eric Dong Signed-off-by: Isaac Oram Reviewed-by: Nate DeSimone --- Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc = | 1 - Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiRepor= tFvLib.c | 143 -------------------- Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiRepor= tFvLib.inf | 50 ------- 3 files changed, 194 deletions(-) diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc b/Platform/In= tel/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/PeiFspWrapperPla= tformLib/PeiFspWrapperPlatformLib.inf - ReportFvLib|MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReport= FvLib.inf ReportCpuHobLib|IntelSiliconPkg/Library/ReportCpuHobLib/ReportCpuHobLib.= inf TestPointCheckLib|MinPlatformPkg/Test/Library/TestPointCheckLib/PeiTestP= ointCheckLib.inf TestPointLib|MinPlatformPkg/Test/Library/TestPointLib/PeiTestPointLib.inf diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFv= Lib/PeiReportFvLib.c b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/P= eiReportFvLib/PeiReportFvLib.c deleted file mode 100644 index 833a77c702..0000000000 --- a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/Pei= ReportFvLib.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.
-SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#include -#include -#include -#include -#include -#include -#include -#include - -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 (Pc= dFlashFvFspTBase), PcdGet32 (PcdFlashFvFspTSize))); - PeiServicesInstallFvInfo2Ppi ( - &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvFspTBa= se))->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 (PcdFlashFvSecurity= Base))->FileSystemGuid), - (VOID *) (UINTN) PcdGet32 (PcdFlashFvSecurityBase), - PcdGet32 (PcdFlashFvSecuritySize), - NULL, - NULL, - 0 - ); - if (PcdGet8 (PcdBootStage) >=3D 6) { - DEBUG (( - DEBUG_INFO, - "Install FlashFvAdvancedPreMemory - 0x%x, 0x%x\n", - PcdGet32 (PcdFlashFvAdvancedPreMemoryBase), - PcdGet32 (PcdFlashFvAdvancedPreMemorySize) - )); - PeiServicesInstallFvInfo2Ppi ( - &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvAdvanc= edPreMemoryBase))->FileSystemGuid), - (VOID *) (UINTN) PcdGet32 (PcdFlashFvAdvancedPreMemoryBase), - PcdGet32 (PcdFlashFvAdvancedPreMemorySize), - NULL, - NULL, - 0 - ); - } -} - -VOID -ReportPostMemFv ( - VOID - ) -{ - EFI_STATUS Status; - EFI_BOOT_MODE BootMode; - - Status =3D 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 =3D=3D BOOT_IN_RECOVERY_MODE) { - /// - /// Prepare the recovery service - /// - } else { - DEBUG ((DEBUG_INFO, "Install FlashFvPostMemory - 0x%x, 0x%x\n", PcdGet= 32 (PcdFlashFvPostMemoryBase), PcdGet32 (PcdFlashFvPostMemorySize))); - PeiServicesInstallFvInfo2Ppi ( - &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvPostMe= moryBase))->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 (PcdFlashFvUefiBo= otBase))->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 (PcdFlashFvOsBoot= Base))->FileSystemGuid), - (VOID *) (UINTN) PcdGet32 (PcdFlashFvOsBootBase), - PcdGet32 (PcdFlashFvOsBootSize), - NULL, - NULL, - 0 - ); - if (PcdGet8 (PcdBootStage) >=3D 6) { - DEBUG ((DEBUG_INFO, "Install FlashFvAdvanced - 0x%x, 0x%x\n", PcdGet= 32 (PcdFlashFvAdvancedBase), PcdGet32 (PcdFlashFvAdvancedSize))); - PeiServicesInstallFvInfo2Ppi ( - &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvAdva= ncedBase))->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/PeiReportFv= Lib/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/Pei= ReportFvLib.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.
-# -# SPDX-License-Identifier: BSD-2-Clause-Patent -# -### - -[Defines] - INF_VERSION =3D 0x00010017 - BASE_NAME =3D PeiReportFvLib - FILE_GUID =3D 44328FA5-E4DD-4A15-ABDF-C6584AC363D9 - VERSION_STRING =3D 1.0 - MODULE_TYPE =3D PEIM - LIBRARY_CLASS =3D ReportFvLib - -[LibraryClasses] - BaseMemoryLib - DebugLib - HobLib - PeiServicesLib - -[Packages] - MdePkg/MdePkg.dec - MdeModulePkg/MdeModulePkg.dec - MinPlatformPkg/MinPlatformPkg.dec - -[Sources] - PeiReportFvLib.c - -[Pcd] - gMinPlatformPkgTokenSpaceGuid.PcdBootStage ## CONSU= MES - gMinPlatformPkgTokenSpaceGuid.PcdFspWrapperBootMode ## CONSU= MES - gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaBaseAddress ## CONSU= MES - gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize ## CONSU= MES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspTBase ## CONSU= MES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspTSize ## CONSU= MES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPostMemoryBase ## CONSU= MES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPostMemorySize ## CONSU= MES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvUefiBootBase ## CONSU= MES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvUefiBootSize ## CONSU= MES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvOsBootBase ## CONSU= MES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvOsBootSize ## CONSU= MES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvSecurityBase ## CONSU= MES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvSecuritySize ## CONSU= MES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvAdvancedPreMemoryBase ## CONSU= MES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvAdvancedPreMemorySize ## CONSU= MES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvAdvancedBase ## CONSU= MES - gMinPlatformPkgTokenSpaceGuid.PcdFlashFvAdvancedSize ## CONSU= MES --=20 2.27.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#82166): https://edk2.groups.io/g/devel/message/82166 Mute This Topic: https://groups.io/mt/86360118/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-