From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.100; helo=mga07.intel.com; envelope-from=jian.j.wang@intel.com; receiver=edk2-devel@lists.01.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id BE07C211B63F0 for ; Tue, 15 Jan 2019 00:25:45 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Jan 2019 00:25:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,481,1539673200"; d="scan'208";a="310506459" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga006.fm.intel.com with ESMTP; 15 Jan 2019 00:25:44 -0800 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 15 Jan 2019 00:25:44 -0800 Received: from shsmsx107.ccr.corp.intel.com ([169.254.9.239]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.46]) with mapi id 14.03.0415.000; Tue, 15 Jan 2019 16:25:36 +0800 From: "Wang, Jian J" To: Ard Biesheuvel , "edk2-devel@lists.01.org" CC: Laszlo Ersek , Leif Lindholm , "Kinney, Michael D" , "Gao, Liming" , "Wu, Hao A" , Jagadeesh Ujja , Achin Gupta , Thomas Panakamattam Abraham , Sami Mujawar , "Zeng, Star" Thread-Topic: [PATCH v2 00/17] implement standalone MM versions of the variable runtime drivers Thread-Index: AQHUrA0DOci2aEBD10KSpPJpwcM0qqWv/dTg Date: Tue, 15 Jan 2019 08:25:35 +0000 Message-ID: References: <20190114132758.24054-1-ard.biesheuvel@linaro.org> In-Reply-To: <20190114132758.24054-1-ard.biesheuvel@linaro.org> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjlhNGFjM2ItOTA1My00Y2UzLTk3Y2MtZDczNTBjMjZkMDE5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiT0xRQkV4ZEdSeWdvTEV3Nk9QM1pBekdaWVwvXC9Ra2tUOFZJZUtacmpjelJvOWt4WUZxdTFkYVdYU2cxYmpaRXZLIn0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH v2 00/17] implement standalone MM versions of the variable runtime drivers X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 08:25:45 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Ard, For patch 1,5,6,7,8,12,13,14,15,16,17 Reviewed-by: Jian J Wang > -----Original Message----- > From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org] > Sent: Monday, January 14, 2019 9:28 PM > To: edk2-devel@lists.01.org > Cc: Ard Biesheuvel ; Laszlo Ersek > ; Leif Lindholm ; Kinney, > Michael D ; Gao, Liming ; > Wang, Jian J ; Wu, Hao A ; > Jagadeesh Ujja ; Achin Gupta > ; Thomas Panakamattam Abraham > ; Sami Mujawar ; > Zeng, Star > Subject: [PATCH v2 00/17] implement standalone MM versions of the variabl= e > runtime drivers >=20 > This v2 series is a followup to [0], and updates the SMM implementations = of > the fault tolerant write and variable runtime drivers to provide standalo= ne > MM versions that share as much of the existing code as possible with the > traditional SMM implementations. >=20 > The meat is in patches #5 - #8, which were part of v1. I updated them acc= ording > to the received feedback, and added tags that were given on list. >=20 > Patches #1 - #4 add library class resolutions for MmServiceTableLib, whic= h was > introduced in v1 of the series, and has already been merged (at the reque= st of > Liming) so that downstream platforms can add the resolution as well. >=20 > The remaining patches #9 - #17 are new, and have been added so that the n= ew > standalone MM drivers can be added to and built from MdeModulePkg.dsc, bu= t > for coverage only (the resulting binaries won't actually work) > - patches #9 and #10 add a definition and implementation of > StandaloneMmDriverEntryPoint, which is rather straight-forward and has = no > dependencies on the standalone MM core, so it is reasonable to add it t= o > MdePkg directly. Note that this version contains the _gMmVersion check = that > is missing from the one in StandaloneMmPkg > - patch #11 adds a standalone MM implementation of MmServicesTableLib to > MdePkg, > which -again- does not depend on the standalone MM core at all, so adde= d > here > for simplicity > - patches #12 and #13 add NULL implementations of MemoryAllocationLib and > HobLib > so that the FTW and variable MM_STANDALONE modules can be built without > depending on StandaloneMmPkg > - patch #14 is an unrelated fix so that MdeModulePkg.dsc can be built for > AARCH64 > - patches #15 and #16 add MM_STANDALONE support to a couple of libraries > that > the new modules depend on > - patch #17 adds the FTW and variable standalone MM drivers to > MdeModulePkg.dsc >=20 > NOTE: the drivers added in patches #10 and #11 supersede the ones that re= side > in > or have been proposed for StandaloneMmPkg >=20 > Patches can be found here: > https://github.com/ardbiesheuvel/edk2/tree/variable-ftw-standalone-mm- > conversion >=20 > Cc: Laszlo Ersek > Cc: Leif Lindholm > Cc: Michael D Kinney > Cc: Liming Gao > Cc: Jian J Wang > Cc: Hao Wu > Cc: Jagadeesh Ujja > Cc: Achin Gupta > Cc: Thomas Panakamattam Abraham > Cc: Sami Mujawar > Cc: Star Zeng >=20 > [0] https://lists.01.org/pipermail/edk2-devel/2019-January/034608.html >=20 > Ard Biesheuvel (17): > MdeModulePkg/MdeModulePkg.dsc: add MmServicesTableLib resolution > OvmfPkg: add MmServicesTableLib resolution > QuarkPlatformPkg: add MmServicesTableLib resolution > Vlv2TbltDevicePkg: add MmServicesTableLib resolution > MdeModulePkg/FaultTolerantWriteDxe: factor out boot service accesses > MdeModulePkg/FaultTolerantWriteDxe: implement standalone MM version > MdeModulePkg/VariableRuntimeDxe: factor out boot service accesses > MdeModulePkg/VariableRuntimeDxe: implement standalone MM version > MdePkg: introduce standalone MM entry point library class > MdePkg: introduce standalone MM entry point library implementation > MdePkg: add MM_STANDALONE implementation of MmServicesTableLib > MdeModulePkg: implement NULL instance of HobLib library class > MdeModulePkg: implement NULL instance of MemoryAllocationLib library > class > MdeModulePkg/MdeModulePkg/dsc: move DxeDebugSupportDxe to x86 only > section > MdeModulePkg/AuthVariableLibNull: add MM_STANDALONE support > MdeModulePkg/VarCheckLib: add MM_STANDALONE support > MdeModulePkg/MdeModulePkg.dsc: add MM_STANDALONE FTW and variable > modules >=20 > MdePkg/MdePkg.dec = | 3 + > MdeModulePkg/MdeModulePkg.dsc > | 12 +- > MdePkg/MdePkg.dsc = | 3 + > OvmfPkg/OvmfPkgIa32.dsc = | 1 > + > OvmfPkg/OvmfPkgIa32X64.dsc = | > 1 + > OvmfPkg/OvmfPkgX64.dsc = | 1 > + > QuarkPlatformPkg/Quark.dsc = | 1 > + > QuarkPlatformPkg/QuarkMin.dsc = | > 1 + > Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc > | 1 + > Vlv2TbltDevicePkg/PlatformPkgIA32.dsc > | 1 + > Vlv2TbltDevicePkg/PlatformPkgX64.dsc > | 1 + > MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf > | 2 +- > MdeModulePkg/Library/BaseHobLibNull/BaseHobLibNull.inf > | 38 ++ >=20 > MdeModulePkg/Library/BaseMemoryAllocationLibNull/BaseMemoryAllocationL > ibNull.inf | 38 ++ > MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf > | 2 +- > MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf > | 5 +- > MdeModulePkg/Universal/FaultTolerantWriteDxe/{FaultTolerantWriteSmm.inf > =3D> FaultTolerantWriteStandaloneMm.inf} | 43 +- > MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf > | 5 +- > MdeModulePkg/Universal/Variable/RuntimeDxe/{VariableSmm.inf =3D> > VariableStandaloneMm.inf} | 43 +- >=20 > MdePkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoin > t.inf | 43 ++ >=20 > MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLi > b.inf | 39 ++ > MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.h > | 23 +- >=20 > MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmCom > mon.h | 34 ++ > MdeModulePkg/Universal/Variable/RuntimeDxe/PrivilegePolymorphic.h > | 58 ++ > MdePkg/Include/Library/StandaloneMmDriverEntryPoint.h > | 134 +++++ > MdeModulePkg/Library/BaseHobLibNull/BaseHobLibNull.c > | 542 ++++++++++++++++++ >=20 > MdeModulePkg/Library/BaseMemoryAllocationLibNull/BaseMemoryAllocationL > ibNull.c | 575 ++++++++++++++++++++ > MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.c > | 31 ++ > MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.c > | 53 +- >=20 > MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteStandalon > eMm.c | 88 +++ >=20 > MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteTraditiona > lMm.c | 106 ++++ > MdeModulePkg/Universal/FaultTolerantWriteDxe/UpdateWorkingBlock.c > | 10 +- > MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockSmm.c > | 18 +- > MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.c > | 59 +- > MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.c > | 89 +++ > MdeModulePkg/Universal/Variable/RuntimeDxe/VariableTraditionalMm.c > | 130 +++++ >=20 > MdePkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoin > t.c | 90 +++ >=20 > MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLi > b.c | 41 ++ > MdeModulePkg/Library/BaseHobLibNull/BaseHobLibNull.uni > | 20 + >=20 > MdeModulePkg/Library/BaseMemoryAllocationLibNull/BaseMemoryAllocationL > ibNull.uni | 20 + >=20 > MdePkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoin > t.uni | 22 + >=20 > MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLi > b.uni | 20 + > 42 files changed, 2290 insertions(+), 157 deletions(-) > create mode 100644 > MdeModulePkg/Library/BaseHobLibNull/BaseHobLibNull.inf > create mode 100644 > MdeModulePkg/Library/BaseMemoryAllocationLibNull/BaseMemoryAllocationL > ibNull.inf > copy > MdeModulePkg/Universal/FaultTolerantWriteDxe/{FaultTolerantWriteSmm.inf > =3D> FaultTolerantWriteStandaloneMm.inf} (68%) > copy MdeModulePkg/Universal/Variable/RuntimeDxe/{VariableSmm.inf =3D> > VariableStandaloneMm.inf} (82%) > create mode 100644 > MdePkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoin > t.inf > create mode 100644 > MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLi > b.inf > create mode 100644 MdePkg/Include/Library/StandaloneMmDriverEntryPoint.h > create mode 100644 MdeModulePkg/Library/BaseHobLibNull/BaseHobLibNull.c > create mode 100644 > MdeModulePkg/Library/BaseMemoryAllocationLibNull/BaseMemoryAllocationL > ibNull.c > create mode 100644 > MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteStandalon > eMm.c > create mode 100644 > MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteTraditiona > lMm.c > create mode 100644 > MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.c > create mode 100644 > MdeModulePkg/Universal/Variable/RuntimeDxe/VariableTraditionalMm.c > create mode 100644 > MdePkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoin > t.c > create mode 100644 > MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLi > b.c > create mode 100644 > MdeModulePkg/Library/BaseHobLibNull/BaseHobLibNull.uni > create mode 100644 > MdeModulePkg/Library/BaseMemoryAllocationLibNull/BaseMemoryAllocationL > ibNull.uni > create mode 100644 > MdePkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoin > t.uni > create mode 100644 > MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLi > b.uni >=20 > -- > 2.20.1