From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.12727.1589206212499670754 for ; Mon, 11 May 2020 07:10:29 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ard.biesheuvel@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2D8C2D6E; Mon, 11 May 2020 07:09:42 -0700 (PDT) Received: from [192.168.1.81] (unknown [10.37.8.255]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 20CFB3F68F; Mon, 11 May 2020 07:09:39 -0700 (PDT) Subject: Re: [edk2-devel] [PATCH resend 0/7] Add support for MM communicate2 protocol (PI 1.7a) To: "Gao, Liming" , "devel@edk2.groups.io" Cc: "Kinney, Michael D" , "Wang, Jian J" , "Wu, Hao A" , Leif Lindholm , Sami Mujawar , "Yao, Jiewen" References: <20200506172734.2475-1-ard.biesheuvel@arm.com> From: "Ard Biesheuvel" Message-ID: <058bcfe9-7fb8-ef96-410d-1adf7a57d82e@arm.com> Date: Mon, 11 May 2020 16:09:34 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit On 5/11/20 4:08 PM, Gao, Liming wrote: > Ard: > I see this change updates VariableSmmRuntimeDxe to consume mMmCommunication2 with mVariableBufferPhysical and mVariableBuffer for physical and virtual. > But, FaultTolerantWriteSmmDxe consumes mMmCommunication2 with the same SmmCommunicateHeader for physical and virtual. > > Is there any difference between them? > Yes. The FTW code never executes at runtime, so it is guaranteed that physical == virtual. >> -----Original Message----- >> From: devel@edk2.groups.io On Behalf Of Ard Biesheuvel >> Sent: Thursday, May 7, 2020 1:27 AM >> To: devel@edk2.groups.io >> Cc: Ard Biesheuvel ; Kinney, Michael D ; Gao, Liming >> ; Wang, Jian J ; Wu, Hao A ; Leif Lindholm >> ; Sami Mujawar ; Yao, Jiewen >> Subject: [edk2-devel] [PATCH resend 0/7] Add support for MM communicate2 protocol (PI 1.7a) >> >> Now that version 1.7 errata A of the PI spec has finally been released, >> we can take another look at this series, which incorporates the new MM >> communicate2 protocol definition, updates the producers for conventional >> SMM and standalone MM, and updates the variable store components to consume >> the new version of the protocol. This solves a long standing compatibility >> issue which made standalone MM fundamentally incompatible with a virtually >> remapped address space as installed by SetVirtualAddressMap(). >> >> Cc: Michael D Kinney >> Cc: Liming Gao >> Cc: Jian J Wang >> Cc: Hao A Wu >> Cc: Leif Lindholm >> Cc: Sami Mujawar >> Cc: Jiewen Yao >> >> Ard Biesheuvel (7): >> MdePkg: introduce MM communicate 2 protocol >> MdeModulePkg/SmmIpl: expose MM communicate 2 protocol >> ArmPkg/MmCommunicationDxe: expose MM Communicate 2 protocol >> MdeModulePkg/VariableInfo: switch to MM communicate 2 protocol >> MdeModulePkg/FaultTolerantWriteSmmDxe: switch to MM communicate 2 >> MdeModulePkg/VariableSmmRuntimeDxe: switch to MM communicate 2 >> StandaloneMmPkg: switch to MM communicate 2 protocol >> >> .../MmCommunicationDxe/MmCommunication.c | 81 +++++++++---------- >> .../MmCommunicationDxe/MmCommunication.inf | 6 +- >> .../Application/VariableInfo/VariableInfo.c | 19 +++-- >> .../Application/VariableInfo/VariableInfo.inf | 2 +- >> MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c | 80 ++++++++++++++++++ >> MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf | 1 + >> MdeModulePkg/Include/Guid/SmmVariableCommon.h | 6 +- >> .../FaultTolerantWriteSmmCommon.h | 2 +- >> .../FaultTolerantWriteSmmDxe.c | 25 +++--- >> .../FaultTolerantWriteSmmDxe.h | 2 +- >> .../FaultTolerantWriteSmmDxe.inf | 4 +- >> .../RuntimeDxe/VariableSmmRuntimeDxe.c | 39 ++++----- >> .../RuntimeDxe/VariableSmmRuntimeDxe.inf | 4 +- >> MdePkg/Include/Protocol/MmCommunication2.h | 69 ++++++++++++++++ >> MdePkg/MdePkg.dec | 7 ++ >> StandaloneMmPkg/Core/StandaloneMmCore.h | 2 +- >> .../StandaloneMmCpu/AArch64/StandaloneMmCpu.h | 2 +- >> 17 files changed, 256 insertions(+), 95 deletions(-) >> create mode 100644 MdePkg/Include/Protocol/MmCommunication2.h >> >> -- >> 2.17.1 >> >> >> >