From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web10.990.1634949063075324849 for ; Fri, 22 Oct 2021 17:31:03 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=FNV4UYON; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: nathaniel.l.desimone@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10145"; a="209518063" X-IronPort-AV: E=Sophos;i="5.87,173,1631602800"; d="scan'208";a="209518063" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Oct 2021 17:31:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,173,1631602800"; d="scan'208";a="663374294" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga005.jf.intel.com with ESMTP; 22 Oct 2021 17:31:01 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Fri, 22 Oct 2021 17:31:00 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Fri, 22 Oct 2021 17:31:00 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Fri, 22 Oct 2021 17:31:00 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.174) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Fri, 22 Oct 2021 17:30:59 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FNNwxzmO2wPbejWmcqu6O7/h7+gU0dUlSdyqxFCfgu873FQiNusLt8RPV5b9sM0eAiwX8foOpNAuvGBz5Dkd8an0Q9TN8XNB6ta+vt8jWfyNHQA/+WR+mQhLn+PS8p7GH82L35lTg9aLocrkY8S2J1VoSCAHx1Y7TeRt+VSYvuAjHPH5YFv0A9AGuFCWgQmenAXKpw8hQfcUBiEhnl5puZCFXRvWR0yR616SYHgFz4grMCbBKsHYHzF2v1NKg8ESL5y5XA3A+ZfazclVhpVaWwSZsDZGRIR0QMalER6ArABIB/bx+ITax0/n+KwZ19iVJGbSwmqH6k8qz6vhTYgrCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=osa8Aus3samKZSP3an5RBRORoir/TGQzqc85PjQoCgw=; b=ePc6eHXpIsGwnkXI7vJFvPzeuy1Yfd/8hwjq6XE8KYm5wMbdxO4OgyKaLHwSy9lfwM4E+RDxloRAs4yPAYiyzwHdtrGgPBHhmKWgYMvn4nhwBsTPT4xYUfXQN2leFSV+qE6kvp9VPjDzf3waXta/Cm3RwCY8j7sGR9RJtJKa9Dg/F8t1M/hQ6eVOKUgigeA/iWP6S0Fzgz/DpV9aVAyrq/AONXUsxLU0oYAYvqZaCMP/LVQ4iRIuSdYWAQZMMDA+DByuZbD2PXfSeNmH4higZlh1JmSZzqbuZCwrQnLXtMUUZXZv0B0FfmHO2+xFv6lhx7uF+LlJ4H2qb+JBsFL6tA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=osa8Aus3samKZSP3an5RBRORoir/TGQzqc85PjQoCgw=; b=FNV4UYONCeIPgrmUdckhmnodjp7vWIsJACqJ8IulxegN8BnwHZ+T+xuoxfN2BjuFb1QB9I/d4BSE/KHoaQwklU566pNtednIXLafY/b0QWiVi2wq6dhFNAeCJp/jNlRNvlCemOw8kYOTCxqJIGWaJ/MuESHMQaAixhCV+O3vYw8= Received: from MW4PR11MB5821.namprd11.prod.outlook.com (2603:10b6:303:184::5) by MWHPR11MB1502.namprd11.prod.outlook.com (2603:10b6:301:10::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.18; Sat, 23 Oct 2021 00:30:58 +0000 Received: from MW4PR11MB5821.namprd11.prod.outlook.com ([fe80::6140:8298:9d5a:df46]) by MW4PR11MB5821.namprd11.prod.outlook.com ([fe80::6140:8298:9d5a:df46%9]) with mapi id 15.20.4628.018; Sat, 23 Oct 2021 00:30:58 +0000 From: "Nate DeSimone" To: "Oram, Isaac W" , "devel@edk2.groups.io" CC: "Chiu, Chasel" , Liming Gao , "Dong, Eric" Subject: Re: [edk2-devel][edk2-platforms][PATCH V1 01/11] MinPlatformPkg/ReportFvLib: Add ReportMmFv to API Thread-Topic: [edk2-devel][edk2-platforms][PATCH V1 01/11] MinPlatformPkg/ReportFvLib: Add ReportMmFv to API Thread-Index: AQHXwgs/Ois8D3eBik+C2v6+dNNNA6vfwyFQ Date: Sat, 23 Oct 2021 00:30:58 +0000 Message-ID: References: <56e26f25e6f8df6c5d4bf6a4a6f0361dc915fad1.1634331939.git.isaac.w.oram@intel.com> In-Reply-To: <56e26f25e6f8df6c5d4bf6a4a6f0361dc915fad1.1634331939.git.isaac.w.oram@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.6.200.16 dlp-product: dlpe-windows authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: cc82af00-f341-4186-745e-08d995bc6217 x-ms-traffictypediagnostic: MWHPR11MB1502: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: e11KhCTCA07qrlzvVVcSUwURZhBRfE97+UF6HUbuuSNOdadikGA4HmB322LNEjovjEJ2Y4Q5vD3kCO/5YiibSVKJ2U7Pf5Wpho4mGe1mBQNj8K8fqhjq0Hl/FP+GA37gmJzSFzQdpvJivGPfvpp8TvvDzsjhoWYv4Fkl294nZp0RESPM9RC3zg4J8j0MWTng9ab3xin+XpWBl0s9ecLMBVPr4MApd3WhaS3vtdPiHl8X0jYa1a1zJov/IVBXBI7eZH3VS4/5qk/1wimHySJB6LpSAkscS/uMbQKP5EIV70X/TNWYvhfduGgnoDeCu9shLJ6u/HuQ3sFaBmycC0g08Lk2DMBpNtZTO6xcQvJN5N7ou9eSzBp7sU4+ZbvWHKEqn1KgSn7QKWdQvFTdbSLxIhXKQRV0TzVub072nq4MtlQl3DFGk9f9/yq2ELVVKbMLFPMQgdMJ1sdddMB/KqXjnBTBtw7wj+6/DjAcPmZKr/3m06yftzplfm8xOa1D5h6qePMnbEnyvkKEkt1fMr+H5TuZT5iOnGpzSSC98nH+FJIK31Bbvg/CCYUNz7tG8ILDrH7qwNAFWTxlLKmPIDkJqeNYHkxEIpYLLDCYiOT9z+IyX2KvDHkEWOVKm3VFc2qtIVLEZUmtilt1/RvzBt7LWT1nkHfS6vnmY8OLG+lyWJqn24D8r4fzmaPW5tGJB6901/d+KJmScCrIICBmMbwb8g== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR11MB5821.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(6029001)(366004)(316002)(71200400001)(38070700005)(186003)(8676002)(54906003)(110136005)(86362001)(8936002)(19627235002)(7696005)(2906002)(52536014)(4326008)(508600001)(9686003)(5660300002)(83380400001)(66946007)(82960400001)(38100700002)(122000001)(66476007)(64756008)(66446008)(66556008)(107886003)(55016002)(53546011)(26005)(6506007)(30864003)(33656002)(76116006)(579004);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?zGuYDzACfCJoRlaJSgTVy6/Uo3Fz5FHE0NnCsyzcV5Rrqo9VIOj8pu4UBFYK?= =?us-ascii?Q?L4jER4Sh8TlqgFyLaTgykuhlTh07xr8XO8GuatlGjRUn52dEdDpVajaB8npP?= =?us-ascii?Q?2bP/sCH+7zYloEQf+RdyTskJ6eorE8qpdsFGXfZKjbkH5I4/tjDnZWqmeBAh?= =?us-ascii?Q?zcpycPGIziXflx2ZPGwEY5y2daJxC21x4KZR63v9eVVfNPPmmytJzAqn08VJ?= =?us-ascii?Q?9AU6OUS7lbKubXMnrUcY4rZosTXmrTyUPxtrHltgiytDqRuBotU7P3bhJsyP?= =?us-ascii?Q?ztK4gUw17D+EvI+UI9W4lahTAWoJflsxw7b4prYtNDovtpAfSBaF95M/8FSF?= =?us-ascii?Q?hloQpuZxh+pu1DuLw/6GaghULhFmvM/SRlegasiOm0lpHiHiZ8oHn85TBKjZ?= =?us-ascii?Q?isfiSr5iMZifIk3wk+jXn6gDbvr+cyhW+tsYduFjPzzF86l7ueoQ3ZydfkOT?= =?us-ascii?Q?wg9b/KWHNdRBnhvOWW8Ezokovd7fmH9Nlo/XX34hS6CFL3cGhdn2m5to/KCO?= =?us-ascii?Q?3DXHWPQV4I9ZnN8JrFrsT+2MzSkjmppesAXHZQlR1XzBAgOwJk6HynOLInir?= =?us-ascii?Q?iO9JI/fDpvF78i7dTkQ40MCsn6WZ0E8onsBKDlVXiu0AqcE/BOQ8hZM25Jp3?= =?us-ascii?Q?h/rPjMcib9gVDaH3NDY7Fz3EfOtehGASv/eb27ClD3ChnHg7Eje3WlvQr7sz?= =?us-ascii?Q?snhM7lVFjVEmkJbcXjdlgh+VRSkKRF3+Vz6DQnUpu4+76Gn2xyGMhs2hqjJ4?= =?us-ascii?Q?3kZC2uuLJefPn7XJK2/B7PhJn34cW+DPwYU68i8h4OfG/pjGYQc7hcbU5hH9?= =?us-ascii?Q?GHZHshyJfcFxmgm/ZXJVuhopzOL6yizzOgxGsHrxq361bF6E1Sj6FfWEa2sU?= =?us-ascii?Q?A5bfqcwgJwbBq0VkugoUmUteNcBbMK8oQK/mdP697OeQV8kCUT9AnOPG6m6T?= =?us-ascii?Q?XaOXZ4vyG/KngNT1GVNtVkEka76f0xotGOchmiitczXs7YUTDbsZYjRQFomW?= =?us-ascii?Q?+nDPWBppDQPeSrs9B2EQg9pnbSmnuYk8ENcQmWazKKnML8bPXjgYMR5ODjSJ?= =?us-ascii?Q?A8UsvAuRvE45RpJK9rvDXGwjxBTzX3m9I/7IZM0pdbigo9gJFGxL3jhfpAWh?= =?us-ascii?Q?1KnGRl6AEpZcUM1QOlUsKN8usv86/8iwVXniA86+kcPIlvKDfcvu11olj7Uc?= =?us-ascii?Q?6PB53UXlwVx6tvXLpNpe/KEQ4p/wKs0nz6S9AHzG9jiFAQzF6CU0alTyKLNL?= =?us-ascii?Q?6amH8gXbkY+XY09B5r/TlX6aqRDZikuPOC0Spm265EgtGM8FMbzAUIwb3ukC?= =?us-ascii?Q?4CTjOxw9ZZ3vmIkwSuxgNCgucjx7yWy1/3gckmhVt7i+dU/tNxIqteXoUp3d?= =?us-ascii?Q?0C1xwKxPQHbATiFUz3SUsAF06lZs4dOJbLUq0NY2JxknQPDtY+wjlUWk30r8?= =?us-ascii?Q?W/RZXcQR6mCnNFVedQXmjBH08cQwRcv9gem53R0aoN/2f8zRZsE0QaZW2JFN?= =?us-ascii?Q?zQKcFigKTsWs0KItYlL0DfjQrpWecQ9xEFWuaMSrnThXYxAZfvmGAngqv5g6?= =?us-ascii?Q?n+qjYKy4O5v+m1QO5UwEth/uAS3e+efQ/4vOjlsdtV3Qj8+/g4pWX/vSVsch?= =?us-ascii?Q?+f0kylt6JO8LYc4ypG+LDUqQ6LvtN0ggFkzhqmqUufq9h/bVGgm+zAWq5Jjc?= =?us-ascii?Q?PtTvIQ=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5821.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: cc82af00-f341-4186-745e-08d995bc6217 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Oct 2021 00:30:58.0426 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 8OwJWyoaM8c2flwOhtTB2mdXv1aFVDjxg9ceaAa89HmEdrRiauaVbxceP01E8IqCy/isPwSFGOFrz6Kx9Mtdw25YZ7LrtGKnGy4IbqY/o5I= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1502 Return-Path: nathaniel.l.desimone@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Isaac, Please see feedback inline. Thanks, Nate > -----Original Message----- > From: Oram, Isaac W > Sent: Friday, October 15, 2021 2:25 PM > To: devel@edk2.groups.io > Cc: Chiu, Chasel ; Desimone, Nathaniel L > ; Liming Gao > ; Dong, Eric > Subject: [edk2-devel][edk2-platforms][PATCH V1 01/11] > MinPlatformPkg/ReportFvLib: Add ReportMmFv to API >=20 > 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. >=20 > 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 +- >=20 > Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportFvLib/ReportFvLi > bMm.c | 53 +++++++ >=20 > Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportFvLib/ReportFvLi > bMm.inf | 33 +++++ >=20 > Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportFvLib/ReportFvLi > bPei.c | 146 ++++++++++++++++++++ >=20 > Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportFvLib/ReportFvLi > bPei.inf | 50 +++++++ > 8 files changed, 307 insertions(+), 5 deletions(-) >=20 > diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc > b/Platform/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 >=20 > VariableReadLib|MinPlatformPkg/Library/SmmVariableReadLib/TraditionalM > mVariableReadLib.inf >=20 > VariableWriteLib|MinPlatformPkg/Library/SmmVariableWriteLib/Traditional > MmVariableWriteLib.inf > + > + ReportFvLib|MinPlatformPkg/PlatformInit/Library/ReportFvLib/ReportFvLi > + bMm.inf > + >=20 > [LibraryClasses.common.SMM_CORE] > PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf > diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc > b/Platform/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 @@ >=20 > PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanc > eLib.inf > !endif >=20 > VariableReadLib|MinPlatformPkg/Library/PeiVariableReadLib/PeiVariableRe > adLib.inf > + > + ReportFvLib|MinPlatformPkg/PlatformInit/Library/ReportFvLib/ReportFvLi > + bPei.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 > use. > +// The end of the table is indicated by base and size both equal to zero= . > +// > +typedef struct { > + UINT32 FvBase; Please make FvBase a EFI_PHYSICAL_ADDRESS instead of a UINT32. > + UINT32 FvSize; Please make FvSize a UINT64 instead of a UINT32. > +} FV_INFO; > + > VOID > ReportPreMemFv ( > VOID > @@ -25,4 +34,9 @@ ReportPostMemFv ( > VOID > ); >=20 > -#endif > \ No newline at end of file The purpose of this function is a bit different than the purpose of the oth= er functions. The other functions in this LibraryClass are used to install = FV_INFO_PPIs to inform the core of the existence of root firmware volumes. = This function is used to inform the MinPlatform FVB driver of which firmwar= e volumes should have a firmware volume block I/O instance installed. This = is quite different since the main purpose of installed FVB instances is to = enable a firmware volume to be written to. In light of this, please rename this function to GetFvToFvbMap(). In addition, please document the new function. Something like this would be= sufficient: /** List the Firmware Volumes which the FVB driver should create SMM FVB prot= ocol instances for. @param[in] FvInfoTable The FV Base and Size that should have Firmware = Volume Block I/O enabled for **/ > +VOID > +ReportMmFv ( > + FV_INFO **FvInfoTable > + ); > + > +#endif > diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc > b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc > index a09f8db3ab..1dfca06a10 100644 > --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc > +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc > @@ -107,8 +107,10 @@ >=20 > TestPointCheckLib|MinPlatformPkg/Test/Library/TestPointCheckLib/DxeTes > tPointCheckLib.inf >=20 > TestPointLib|MinPlatformPkg/Test/Library/TestPointLib/DxeTestPointLib.inf >=20 > +[LibraryClasses.common.DXE_SMM_DRIVER, > +LibraryClasses.common.MM_STANDALONE] > + > +SpiFlashCommonLib|MinPlatformPkg/Flash/Library/SpiFlashCommonLibNul > l/Sp > +iFlashCommonLibNull.inf > + > [LibraryClasses.common.DXE_SMM_DRIVER] > - > SpiFlashCommonLib|MinPlatformPkg/Flash/Library/SpiFlashCommonLibNull/ > SpiFlashCommonLibNull.inf >=20 > TestPointCheckLib|MinPlatformPkg/Test/Library/TestPointCheckLib/SmmTe > stPointCheckLib.inf >=20 > TestPointLib|MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointLib.in > f >=20 > @@ -117,7 +119,6 @@ >=20 > MemoryAllocationLib|StandaloneMmPkg/Library/StandaloneMmMemoryAll > ocationLib/StandaloneMmMemoryAllocationLib.inf >=20 > MmServicesTableLib|MdePkg/Library/StandaloneMmServicesTableLib/Stan > daloneMmServicesTableLib.inf > PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf > - > SpiFlashCommonLib|MinPlatformPkg/Flash/Library/SpiFlashCommonLibNull/ > SpiFlashCommonLibNull.inf >=20 > StandaloneMmDriverEntryPoint|MdePkg/Library/StandaloneMmDriverEntry > Point/StandaloneMmDriverEntryPoint.inf >=20 > VariableReadLib|MinPlatformPkg/Library/SmmVariableReadLib/Standalone > MmVariableReadLib.inf >=20 > VariableWriteLib|MinPlatformPkg/Library/SmmVariableWriteLib/Standalone > MmVariableWriteLib.inf > @@ -189,7 +190,9 @@ > MinPlatformPkg/PlatformInit/Library/BoardInitLibNull/BoardInitLibNull.= inf >=20 > MinPlatformPkg/PlatformInit/Library/MultiBoardInitSupportLib/PeiMultiBoar > dInitSupportLib.inf >=20 > 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 > + >=20 > MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.in > f > MinPlatformPkg/PlatformInit/SiliconPolicyPei/SiliconPolicyPeiPreMem.in= f > MinPlatformPkg/PlatformInit/SiliconPolicyPei/SiliconPolicyPeiPostMem.i= nf > diff --git > a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportFvLib/ReportF > vLibMm.c > b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportFvLib/ReportF > vLibMm.c > new file mode 100644 > index 0000000000..a6339d130d > --- /dev/null > +++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportFvLib/Rep > +++ ortFvLibMm.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 > +(PcdFlashNvStorageVariableSize)}, > + {0, 0}, // {PcdGet32 (PcdFlashFvMicrocodeBase), PcdGet32 > +(PcdFlashFvMicrocodeSize)}, > + {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\nMicrocodeBase 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/ReportF > vLibMm.inf > b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportFvLib/ReportF > vLibMm.inf > new file mode 100644 > index 0000000000..41268f179e > --- /dev/null > +++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportFvLib/Rep > +++ ortFvLibMm.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-bb6e3fd14df= 4 > + VERSION_STRING =3D 1.0 > + MODULE_TYPE =3D BASE > + LIBRARY_CLASS =3D ReportFvLib | DXE_SMM_DRIVER > MM_STANDALONE > + > +[LibraryClasses] > + DebugLib > + > +[Packages] > + MdePkg/MdePkg.dec > + MdeModulePkg/MdeModulePkg.dec > + MinPlatformPkg/MinPlatformPkg.dec > + > +[Sources] > + ReportFvLibMm.c > + > +[Pcd] > + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase ## > CONSUMES > + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize ## > CONSUMES > + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvMicrocodeBase ## > CONSUMES > + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvMicrocodeSize ## > CONSUMES > diff --git > a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportFvLib/ReportF > vLibPei.c > b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportFvLib/ReportF > vLibPei.c > new file mode 100644 > index 0000000000..7fb755266d > --- /dev/null > +++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportFvLib/Rep > +++ ortFvLibPei.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 IntelFsp2WrapperPk= g in > Dispatch mode. > + /// > + if (PcdGetBool(PcdFspWrapperBootMode)) { > + DEBUG ((DEBUG_INFO, "Install FlashFvFspT - 0x%x, 0x%x\n", PcdGet32 > (PcdFlashFvFspTBase), PcdGet32 (PcdFlashFvFspTSize))); > + PeiServicesInstallFvInfo2Ppi ( > + &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 > (PcdFlashFvFspTBase))->FileSystemGuid), > + (VOID *) (UINTN) PcdGet32 (PcdFlashFvFspTBase), > + PcdGet32 (PcdFlashFvFspTSize), > + NULL, > + NULL, > + 0 > + ); > + } > + DEBUG ((DEBUG_INFO, "Install FlashFvSecurity - 0x%x, 0x%x\n", > +PcdGet32 (PcdFlashFvSecurityBase), PcdGet32 (PcdFlashFvSecuritySize))); > + PeiServicesInstallFvInfo2Ppi ( > + &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 > (PcdFlashFvSecurityBase))->FileSystemGuid), > + (VOID *) (UINTN) PcdGet32 (PcdFlashFvSecurityBase), > + PcdGet32 (PcdFlashFvSecuritySize), > + NULL, > + NULL, > + 0 > + ); > + if (PcdGet8 (PcdBootStage) >=3D 6) { > + DEBUG (( > + DEBUG_INFO, > + "Install FlashFvAdvancedPreMemory - 0x%x, 0x%x\n", > + PcdGet32 (PcdFlashFvAdvancedPreMemoryBase), > + PcdGet32 (PcdFlashFvAdvancedPreMemorySize) > + )); > + PeiServicesInstallFvInfo2Ppi ( > + &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 > (PcdFlashFvAdvancedPreMemoryBase))->FileSystemGuid), > + (VOID *) (UINTN) PcdGet32 (PcdFlashFvAdvancedPreMemoryBase), > + PcdGet32 (PcdFlashFvAdvancedPreMemorySize), > + NULL, > + NULL, > + 0 > + ); > + } > +} > + > +VOID > +ReportPostMemFv ( > + VOID > + ) > +{ > + EFI_STATUS Status; > + EFI_BOOT_MODE BootMode; > + > + Status =3D PeiServicesGetBootMode (&BootMode); ASSERT_EFI_ERROR > + (Status); > + > + /// > + /// Note : FSP FVs except FSP-T FV are installed in IntelFsp2WrapperPk= g 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", > PcdGet32 (PcdFlashFvPostMemoryBase), PcdGet32 > (PcdFlashFvPostMemorySize))); > + PeiServicesInstallFvInfo2Ppi ( > + &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 > (PcdFlashFvPostMemoryBase))->FileSystemGuid), > + (VOID *) (UINTN) PcdGet32 (PcdFlashFvPostMemoryBase), > + PcdGet32 (PcdFlashFvPostMemorySize), > + NULL, > + NULL, > + 0 > + ); > + DEBUG ((DEBUG_INFO, "Install FlashFvUefiBoot - 0x%x, 0x%x\n", > PcdGet32 (PcdFlashFvUefiBootBase), PcdGet32 (PcdFlashFvUefiBootSize))); > + PeiServicesInstallFvInfo2Ppi ( > + &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 > (PcdFlashFvUefiBootBase))->FileSystemGuid), > + (VOID *) (UINTN) PcdGet32 (PcdFlashFvUefiBootBase), > + PcdGet32 (PcdFlashFvUefiBootSize), > + NULL, > + NULL, > + 0 > + ); > + DEBUG ((DEBUG_INFO, "Install FlashFvOsBoot - 0x%x, 0x%x\n", PcdGet32 > (PcdFlashFvOsBootBase), PcdGet32 (PcdFlashFvOsBootSize))); > + PeiServicesInstallFvInfo2Ppi ( > + &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 > (PcdFlashFvOsBootBase))->FileSystemGuid), > + (VOID *) (UINTN) PcdGet32 (PcdFlashFvOsBootBase), > + PcdGet32 (PcdFlashFvOsBootSize), > + NULL, > + NULL, > + 0 > + ); > + if (PcdGet8 (PcdBootStage) >=3D 6) { > + DEBUG ((DEBUG_INFO, "Install FlashFvAdvanced - 0x%x, 0x%x\n", > PcdGet32 (PcdFlashFvAdvancedBase), PcdGet32 > (PcdFlashFvAdvancedSize))); > + PeiServicesInstallFvInfo2Ppi ( > + &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 > (PcdFlashFvAdvancedBase))->FileSystemGuid), > + (VOID *) (UINTN) PcdGet32 (PcdFlashFvAdvancedBase), > + PcdGet32 (PcdFlashFvAdvancedSize), > + NULL, > + NULL, > + 0 > + ); > + } > + } > + > + // > + // Report resource HOB for flash FV > + // > + BuildResourceDescriptorHob ( > + EFI_RESOURCE_MEMORY_MAPPED_IO, > + (EFI_RESOURCE_ATTRIBUTE_PRESENT | > + EFI_RESOURCE_ATTRIBUTE_INITIALIZED | > + EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE), > + (UINTN) PcdGet32 (PcdFlashAreaBaseAddress), > + (UINTN) PcdGet32 (PcdFlashAreaSize) > + ); > + BuildMemoryAllocationHob ( > + (UINTN) PcdGet32 (PcdFlashAreaBaseAddress), > + (UINTN) PcdGet32 (PcdFlashAreaSize), > + EfiMemoryMappedIO > + ); > +} > diff --git > a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportFvLib/ReportF > vLibPei.inf > b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportFvLib/ReportF > vLibPei.inf > new file mode 100644 > index 0000000000..fdb61347c4 > --- /dev/null > +++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportFvLib/Rep > +++ ortFvLibPei.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-C6584AC363D= 9 > + 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 ## CON= SUMES > + gMinPlatformPkgTokenSpaceGuid.PcdFspWrapperBootMode ## > CONSUMES > + gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaBaseAddress ## > CONSUMES > + gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize ## > CONSUMES > + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspTBase ## > CONSUMES > + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspTSize ## > CONSUMES > + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPostMemoryBase ## > CONSUMES > + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPostMemorySize ## > CONSUMES > + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvUefiBootBase ## > CONSUMES > + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvUefiBootSize ## > CONSUMES > + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvOsBootBase ## > CONSUMES > + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvOsBootSize ## > CONSUMES > + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvSecurityBase ## > CONSUMES > + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvSecuritySize ## > CONSUMES > + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvAdvancedPreMemoryBase > ## CONSUMES > + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvAdvancedPreMemorySize > ## CONSUMES > + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvAdvancedBase ## > CONSUMES > + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvAdvancedSize ## > CONSUMES > -- > 2.27.0.windows.1