From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::d42; helo=mail-io1-xd42.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D08C6211A2DBC for ; Wed, 9 Jan 2019 07:30:06 -0800 (PST) Received: by mail-io1-xd42.google.com with SMTP id c2so6284847iom.12 for ; Wed, 09 Jan 2019 07:30:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SB7jfuqrFQarg3BFR3xTxn8ZXsw9rr3rA1e37aDYzl8=; b=MdZ6I96xDCgwn4NL/OyQwp144E2q/BGuw9goHvGPhitZ+tM7Ut9iLJEa8VBNhK5x3n zLoCbkeXXDZ93bQK4tiBDWWOSjukm4S/8l3ss4X1XLBNGz3LqHo+RqcUvkmEP8DfxcFv EXSGZBP55iQsbgKkwZ92bVjKlyDO0MJLSPA50= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SB7jfuqrFQarg3BFR3xTxn8ZXsw9rr3rA1e37aDYzl8=; b=pC4Mu+Ka+0MvXFpFKWCBOIDUs1/G7w0LkeMkaVU6aYa0GxcJoyPADvAYUvkCPjAHMe +OBLtIleuBqoa3S5Liw6OiKK/shWnoFX6/Sph48b03TdRULwSLs4BfjEHfifAstGz6T0 UA5ehNvVejr9ImP3g+oNm2vZfdbCfCM05VeMuDa9mKU6mw4hBnccfIdsRlZCwUkNZlrX eidaAChL6Zukzmuw9wUB+fxhfTRwWrTNYopI+jLPQnnhbOuvgzdDvBZf5YenhHS9jykk EeajfoXHHqv4ABbTR9pfpZvkQuN6zuNuDuuCofeLmdqyW2Xw8swtrtW2WknxGf0x7cKE VlIQ== X-Gm-Message-State: AJcUukcxomvYscT+a9hjmBikAJzBygKLNsYX/Qz19IFvoFC0ob2r4jwo s8efAU9mpdeqkBernslXFu8vPyASH1l5OGNjhx1F6A== X-Google-Smtp-Source: ALg8bN7CLYm2Wze9qIzLKMmFV1OPYVHuEcIy20hXwWWANpFtOrSN/SwEp8ZV9ABLYWT/RkgqWonqIepLsxsSsP4zbr4= X-Received: by 2002:a6b:5d01:: with SMTP id r1mr3938361iob.170.1547047805935; Wed, 09 Jan 2019 07:30:05 -0800 (PST) MIME-Version: 1.0 References: <20190103182825.32231-1-ard.biesheuvel@linaro.org> <4A89E2EF3DFEDB4C8BFDE51014F606A14E3AD13F@SHSMSX152.ccr.corp.intel.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E3AE768@SHSMSX152.ccr.corp.intel.com> In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E3AE768@SHSMSX152.ccr.corp.intel.com> From: Ard Biesheuvel Date: Wed, 9 Jan 2019 16:29:54 +0100 Message-ID: To: "Gao, Liming" Cc: "edk2-devel@lists.01.org" , Laszlo Ersek , Leif Lindholm , "Kinney, Michael D" , "Wang, Jian J" , "Wu, Hao A" , Jagadeesh Ujja , Achin Gupta , Thomas Panakamattam Abraham , Sami Mujawar 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: Wed, 09 Jan 2019 15:30:07 -0000 Content-Type: text/plain; charset="UTF-8" On Wed, 9 Jan 2019 at 14:56, Gao, Liming wrote: > > Ard: > Now, the impact is to update platform DSC to include MmServicesTableLib library instance. This change is acceptable for me. I suggest your create one BZ for this patch set. https://bugzilla.tianocore.org/show_bug.cgi?id=1442 > Besides, I can't apply for these patches in my machine. Could you share git branch to me? Then, I can further verify its functionality on SMM mode. > https://github.com/ardbiesheuvel/edk2/tree/variable-ftw-standalone-mm-conversion Note that I included the changes to add the MmServicesTableLib resolution to consumers of the FTW and variable drivers. Thanks, Ard. > Thanks > Liming > > -----Original Message----- > > From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org] > > Sent: Monday, January 7, 2019 9:06 PM > > To: Gao, Liming > > Cc: edk2-devel@lists.01.org; Laszlo Ersek ; Leif Lindholm ; Kinney, Michael D > > ; Wang, Jian J ; Wu, Hao A ; Jagadeesh Ujja > > ; Achin Gupta ; Thomas Panakamattam Abraham ; > > Sami Mujawar > > Subject: Re: [PATCH 0/6] implement standalone MM versions of the variable runtime drivers > > > > On Mon, 7 Jan 2019 at 13:44, Gao, Liming wrote: > > > > > > 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? > > > > > > > Of course. > > > > Thanks, > > > > > > -----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 Gupta ; Thomas Panakamattam > > > > Abraham ; Sami Mujawar > > > > Subject: [PATCH 0/6] implement standalone MM versions of the variable runtime drivers > > > > > > > > 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. > > > > > > > > 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. > > > > > > > > Patch #1 is based on Jagadeesh's patch, and introduces the MmServicesTableLib > > > > library class, but for all SMM flavours, not only for standalone MM. > > > > > > > > Patch #2 implements MmServicesTableLib for traditional SMM implementations. > > > > > > > > Patch #3 refactors FaultTolerantWriteDxe so that the parts of the SMM > > > > driver that invoke boot services are separated from the core SMM pieces. > > > > > > > > Patch #4 implements FaultTolerantWriteSmm for the standalone MM environment. > > > > > > > > Patches #5 and #6 do the same, respectively, for the variable runtime driver. > > > > > > > > This approach minimizes the delta, and thus the maintenance burden, between > > > > the traditional SMM and standalone MM drivers, while not resorting to runtime > > > > checks or other conditionals in the code to implement logic that should be > > > > decided at build time. > > > > > > > > Note that this series only covers part of the work contributed by Jagadeesh. > > > > This series focuses on the MdePkg and MdeModulePkg changes that affect shared > > > > code. > > > > > > > > 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 > > > > > > > > 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 > > > > > > > > Jagadeesh Ujja (1): > > > > MdePkg/Include: add MmServicesTableLib header file > > > > > > > > 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/FaultTolerantWriteStandaloneMm.c > > > > create mode 100644 MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteStandaloneMm.inf > > > > create mode 100644 MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteTraditionalMm.c > > > > create mode 100644 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.c > > > > create mode 100644 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf > > > > create mode 100644 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableTraditionalMm.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 > > > > > > > > -- > > > > 2.17.1 > > >