From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.120; helo=mga04.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 4716621184ADC for ; Mon, 7 Jan 2019 04:44:33 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Jan 2019 04:44:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,451,1539673200"; d="scan'208";a="114763021" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga008.fm.intel.com with ESMTP; 07 Jan 2019 04:44:33 -0800 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 7 Jan 2019 04:44:33 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 7 Jan 2019 04:44:32 -0800 Received: from shsmsx152.ccr.corp.intel.com ([169.254.6.44]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.150]) with mapi id 14.03.0415.000; Mon, 7 Jan 2019 20:44:31 +0800 From: "Gao, Liming" To: Ard Biesheuvel , "edk2-devel@lists.01.org" CC: Laszlo Ersek , Leif Lindholm , "Kinney, Michael D" , "Wang, Jian J" , "Wu, Hao A" , Jagadeesh Ujja , Achin Gupta , Thomas Panakamattam Abraham , Sami Mujawar Thread-Topic: [PATCH 0/6] implement standalone MM versions of the variable runtime drivers Thread-Index: AQHUo5IuycxdS62t7UiJBpaDv7s2bKWjwJhg Date: Mon, 7 Jan 2019 12:44:29 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E3AD13F@SHSMSX152.ccr.corp.intel.com> References: <20190103182825.32231-1-ard.biesheuvel@linaro.org> In-Reply-To: <20190103182825.32231-1-ard.biesheuvel@linaro.org> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZGI3ZDYyM2YtOGVmYy00MzhmLTk4ZGUtMzA2NGEwOWQ2NWU3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoieWt0Y1YzWFNcL05JVVdBMTAxVUFDXC9XRnptSUF5MXZ3bjlhNG44cWxqTDVNdlRyZGxiWXF4NXcxNUdhUGRXRjBLIn0= 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 0/6] 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: Mon, 07 Jan 2019 12:44:34 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Ard: I agree this design is good. But, I need some time to evaluate its impact= on our X86 platform. Could you wait for several days? Thanks Liming > -----Original Message----- > From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org] > Sent: Friday, January 4, 2019 2:28 AM > 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 Gupt= a ; Thomas Panakamattam > Abraham ; Sami Mujawar > Subject: [PATCH 0/6] implement standalone MM versions of the variable run= time drivers >=20 > This series proposed an alternative approach to the series sent out by > Jagadeesh [0]. In particular, it gets rid of the InMm() calls and the > special PCD, as well as some other if() conditionals. >=20 > The primary difference is that this series defines and implements > MmServicesTableLib in such a way that the traditional SMM drivers > can use it as well. This is appropriate, considering that the PI > spec has rebranded traditional SMM as one implementation of the generic > MM framework. >=20 > Patch #1 is based on Jagadeesh's patch, and introduces the MmServicesTabl= eLib > library class, but for all SMM flavours, not only for standalone MM. >=20 > Patch #2 implements MmServicesTableLib for traditional SMM implementation= s. >=20 > Patch #3 refactors FaultTolerantWriteDxe so that the parts of the SMM > driver that invoke boot services are separated from the core SMM pieces. >=20 > Patch #4 implements FaultTolerantWriteSmm for the standalone MM environme= nt. >=20 > Patches #5 and #6 do the same, respectively, for the variable runtime dri= ver. >=20 > This approach minimizes the delta, and thus the maintenance burden, betwe= en > the traditional SMM and standalone MM drivers, while not resorting to run= time > checks or other conditionals in the code to implement logic that should b= e > decided at build time. >=20 > Note that this series only covers part of the work contributed by Jagadee= sh. > This series focuses on the MdePkg and MdeModulePkg changes that affect sh= ared > code. >=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 >=20 > Ard Biesheuvel (5): > MdePkg: implement MmServicesTableLib based on traditional SMM > 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 >=20 > Jagadeesh Ujja (1): > MdePkg/Include: add MmServicesTableLib header file >=20 > MdeModulePkg/MdeModulePkg.dsc | 1 + > .../FaultTolerantWrite.h | 22 ++- > .../FaultTolerantWriteDxe.c | 31 ++++ > .../FaultTolerantWriteSmm.c | 54 +++---- > .../FaultTolerantWriteSmm.inf | 5 +- > .../FaultTolerantWriteSmmCommon.h | 31 ++++ > .../FaultTolerantWriteSmmDxe.c | 1 + > .../FaultTolerantWriteStandaloneMm.c | 70 +++++++++ > .../FaultTolerantWriteStandaloneMm.inf | 90 ++++++++++++ > .../FaultTolerantWriteTraditionalMm.c | 94 ++++++++++++ > .../UpdateWorkingBlock.c | 10 +- > .../Variable/RuntimeDxe/TcgMorLockSmm.c | 18 +-- > .../Universal/Variable/RuntimeDxe/Variable.h | 50 +++++++ > .../Variable/RuntimeDxe/VariableSmm.c | 59 +++----- > .../Variable/RuntimeDxe/VariableSmm.inf | 5 +- > .../RuntimeDxe/VariableStandaloneMm.c | 69 +++++++++ > .../RuntimeDxe/VariableStandaloneMm.inf | 135 ++++++++++++++++++ > .../RuntimeDxe/VariableTraditionalMm.c | 114 +++++++++++++++ > MdePkg/Include/Library/MmServicesTableLib.h | 25 ++++ > .../MmServicesTableLib/MmServicesTableLib.c | 63 ++++++++ > .../MmServicesTableLib/MmServicesTableLib.inf | 45 ++++++ > .../MmServicesTableLib/MmServicesTableLib.uni | 22 +++ > MdePkg/MdePkg.dec | 4 + > MdePkg/MdePkg.dsc | 1 + > 24 files changed, 916 insertions(+), 103 deletions(-) > create mode 100644 MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTol= erantWriteStandaloneMm.c > create mode 100644 MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTol= erantWriteStandaloneMm.inf > create mode 100644 MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTol= erantWriteTraditionalMm.c > create mode 100644 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSt= andaloneMm.c > create mode 100644 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSt= andaloneMm.inf > create mode 100644 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableTr= aditionalMm.c > create mode 100644 MdePkg/Include/Library/MmServicesTableLib.h > create mode 100644 MdePkg/Library/MmServicesTableLib/MmServicesTableLib.= c > create mode 100644 MdePkg/Library/MmServicesTableLib/MmServicesTableLib.= inf > create mode 100644 MdePkg/Library/MmServicesTableLib/MmServicesTableLib.= uni >=20 > -- > 2.17.1