[edk2-devel] [PATCH 0/6] PIWG M1993 - implement EFI_MM_COMMUNICATE2_PROTOCOL

Ard Biesheuvel posted 6 patches 4 years, 4 months ago
Failed in applying to current master (apply log)
ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c                        | 83 +++++++++-----------
ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf                      |  6 +-
MdeModulePkg/Application/VariableInfo/VariableInfo.c                       | 19 +++--
MdeModulePkg/Application/VariableInfo/VariableInfo.inf                     |  2 +-
MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c                                     | 79 +++++++++++++++++++
MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf                                   |  1 +
MdeModulePkg/Include/Guid/SmmVariableCommon.h                              |  6 +-
MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmCommon.h |  2 +-
MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxe.c    | 25 +++---
MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxe.h    |  2 +-
MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxe.inf  |  4 +-
MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c         | 39 ++++-----
MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf       |  4 +-
MdePkg/Include/Protocol/MmCommunication2.h                                 | 69 ++++++++++++++++
MdePkg/MdePkg.dec                                                          |  7 ++
15 files changed, 254 insertions(+), 94 deletions(-)
create mode 100644 MdePkg/Include/Protocol/MmCommunication2.h
[edk2-devel] [PATCH 0/6] PIWG M1993 - implement EFI_MM_COMMUNICATE2_PROTOCOL
Posted by Ard Biesheuvel 4 years, 4 months ago
As discussed in the PIWG call on 21 November, I am sending out my
implementation of the MM communicate 2 protocol for review. It is
intended to work around the impedance mismatch between traditional
SMM (which uses physical addresses in the communication between DXE
components) and standalone MM (which uses virtual addresses)

The solution presented here is to introduce a new protocol that takes
both addresses, forcing the clients to pass both, but freeing them
from the responsibility to reason about which kind of address to pass:
this becomes the responsibility of the MM_COMMUNICATE implementation,
which is where it belongs.

Cc: piwg@uefi.org
Cc: kimon.berlin@hp.com 
Cc: eugene@hp.com

Ard Biesheuvel (6):
  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
    protocol
  MdeModulePkg/VariableSmmRuntimeDxe: switch to MM communicate 2
    protocol

 ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c                        | 83 +++++++++-----------
 ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf                      |  6 +-
 MdeModulePkg/Application/VariableInfo/VariableInfo.c                       | 19 +++--
 MdeModulePkg/Application/VariableInfo/VariableInfo.inf                     |  2 +-
 MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c                                     | 79 +++++++++++++++++++
 MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf                                   |  1 +
 MdeModulePkg/Include/Guid/SmmVariableCommon.h                              |  6 +-
 MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmCommon.h |  2 +-
 MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxe.c    | 25 +++---
 MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxe.h    |  2 +-
 MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxe.inf  |  4 +-
 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c         | 39 ++++-----
 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf       |  4 +-
 MdePkg/Include/Protocol/MmCommunication2.h                                 | 69 ++++++++++++++++
 MdePkg/MdePkg.dec                                                          |  7 ++
 15 files changed, 254 insertions(+), 94 deletions(-)
 create mode 100644 MdePkg/Include/Protocol/MmCommunication2.h

-- 
2.20.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#51169): https://edk2.groups.io/g/devel/message/51169
Mute This Topic: https://groups.io/mt/61584089/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH 0/6] PIWG M1993 - implement EFI_MM_COMMUNICATE2_PROTOCOL
Posted by Liming Gao 4 years, 4 months ago
Ard:
  This change is about new protocol in 1.7 errata A of the PI spec. But, PI 1.7 errata A is not published yet. So, this patch set is for edk2-staging first?

  I review the code logic. For SMM part, SmmIpl still installs current SmmCommunication protocol. So, this change is totally compatible. Right?

Thanks
Liming
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Ard Biesheuvel
> Sent: Friday, November 22, 2019 4:32 PM
> To: devel@edk2.groups.io
> Cc: leif.lindholm@linaro.org; Ard Biesheuvel <ard.biesheuvel@linaro.org>; piwg@uefi.org; kimon.berlin@hp.com; eugene@hp.com
> Subject: [edk2-devel] [PATCH 0/6] PIWG M1993 - implement EFI_MM_COMMUNICATE2_PROTOCOL
> 
> As discussed in the PIWG call on 21 November, I am sending out my
> implementation of the MM communicate 2 protocol for review. It is
> intended to work around the impedance mismatch between traditional
> SMM (which uses physical addresses in the communication between DXE
> components) and standalone MM (which uses virtual addresses)
> 
> The solution presented here is to introduce a new protocol that takes
> both addresses, forcing the clients to pass both, but freeing them
> from the responsibility to reason about which kind of address to pass:
> this becomes the responsibility of the MM_COMMUNICATE implementation,
> which is where it belongs.
> 
> Cc: piwg@uefi.org
> Cc: kimon.berlin@hp.com
> Cc: eugene@hp.com
> 
> Ard Biesheuvel (6):
>   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
>     protocol
>   MdeModulePkg/VariableSmmRuntimeDxe: switch to MM communicate 2
>     protocol
> 
>  ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c                        | 83 +++++++++-----------
>  ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf                      |  6 +-
>  MdeModulePkg/Application/VariableInfo/VariableInfo.c                       | 19 +++--
>  MdeModulePkg/Application/VariableInfo/VariableInfo.inf                     |  2 +-
>  MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c                                     | 79 +++++++++++++++++++
>  MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf                                   |  1 +
>  MdeModulePkg/Include/Guid/SmmVariableCommon.h                              |  6 +-
>  MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmCommon.h |  2 +-
>  MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxe.c    | 25 +++---
>  MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxe.h    |  2 +-
>  MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxe.inf  |  4 +-
>  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c         | 39 ++++-----
>  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf       |  4 +-
>  MdePkg/Include/Protocol/MmCommunication2.h                                 | 69 ++++++++++++++++
>  MdePkg/MdePkg.dec                                                          |  7 ++
>  15 files changed, 254 insertions(+), 94 deletions(-)
>  create mode 100644 MdePkg/Include/Protocol/MmCommunication2.h
> 
> --
> 2.20.1
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#51243): https://edk2.groups.io/g/devel/message/51243
Mute This Topic: https://groups.io/mt/61584089/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH 0/6] PIWG M1993 - implement EFI_MM_COMMUNICATE2_PROTOCOL
Posted by Ard Biesheuvel 4 years, 4 months ago
On Mon, 25 Nov 2019 at 15:21, Gao, Liming <liming.gao@intel.com> wrote:
>
> Ard:
>   This change is about new protocol in 1.7 errata A of the PI spec. But, PI 1.7 errata A is not published yet. So, this patch set is for edk2-staging first?
>

Not sure if it needs to go to staging. The patches are on the list,
and once we are ready to merge them, I will repost them with the
appropriate maintainers on cc. This posting was mostly for discussion
purpo

>   I review the code logic. For SMM part, SmmIpl still installs current SmmCommunication protocol. So, this change is totally compatible. Right?
>

Yes. SmmIpl will expose both the old and the new protocol, and some
clients of this protocol are getting updated so they can be shared
with standalone MM implementations. When we are ready to consider
these changes for merging, I will include some test reports on both
types of implementations.



> > -----Original Message-----
> > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Ard Biesheuvel
> > Sent: Friday, November 22, 2019 4:32 PM
> > To: devel@edk2.groups.io
> > Cc: leif.lindholm@linaro.org; Ard Biesheuvel <ard.biesheuvel@linaro.org>; piwg@uefi.org; kimon.berlin@hp.com; eugene@hp.com
> > Subject: [edk2-devel] [PATCH 0/6] PIWG M1993 - implement EFI_MM_COMMUNICATE2_PROTOCOL
> >
> > As discussed in the PIWG call on 21 November, I am sending out my
> > implementation of the MM communicate 2 protocol for review. It is
> > intended to work around the impedance mismatch between traditional
> > SMM (which uses physical addresses in the communication between DXE
> > components) and standalone MM (which uses virtual addresses)
> >
> > The solution presented here is to introduce a new protocol that takes
> > both addresses, forcing the clients to pass both, but freeing them
> > from the responsibility to reason about which kind of address to pass:
> > this becomes the responsibility of the MM_COMMUNICATE implementation,
> > which is where it belongs.
> >
> > Cc: piwg@uefi.org
> > Cc: kimon.berlin@hp.com
> > Cc: eugene@hp.com
> >
> > Ard Biesheuvel (6):
> >   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
> >     protocol
> >   MdeModulePkg/VariableSmmRuntimeDxe: switch to MM communicate 2
> >     protocol
> >
> >  ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c                        | 83 +++++++++-----------
> >  ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf                      |  6 +-
> >  MdeModulePkg/Application/VariableInfo/VariableInfo.c                       | 19 +++--
> >  MdeModulePkg/Application/VariableInfo/VariableInfo.inf                     |  2 +-
> >  MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c                                     | 79 +++++++++++++++++++
> >  MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf                                   |  1 +
> >  MdeModulePkg/Include/Guid/SmmVariableCommon.h                              |  6 +-
> >  MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmCommon.h |  2 +-
> >  MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxe.c    | 25 +++---
> >  MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxe.h    |  2 +-
> >  MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxe.inf  |  4 +-
> >  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c         | 39 ++++-----
> >  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf       |  4 +-
> >  MdePkg/Include/Protocol/MmCommunication2.h                                 | 69 ++++++++++++++++
> >  MdePkg/MdePkg.dec                                                          |  7 ++
> >  15 files changed, 254 insertions(+), 94 deletions(-)
> >  create mode 100644 MdePkg/Include/Protocol/MmCommunication2.h
> >
> > --
> > 2.20.1
> >
> >
> > 
>

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#51246): https://edk2.groups.io/g/devel/message/51246
Mute This Topic: https://groups.io/mt/61584089/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-