mbox series

[edk2,v2,00/17] implement standalone MM versions of the variable runtime drivers

Message ID 20190114132758.24054-1-ard.biesheuvel@linaro.org
Headers show
Series implement standalone MM versions of the variable runtime drivers | expand

Message

Ard Biesheuvel Jan. 14, 2019, 1:27 p.m. UTC
This v2 series is a followup to [0], and updates the SMM implementations of
the fault tolerant write and variable runtime drivers to provide standalone
MM versions that share as much of the existing code as possible with the
traditional SMM implementations.

The meat is in patches #5 - #8, which were part of v1. I updated them according
to the received feedback, and added tags that were given on list.

Patches #1 - #4 add library class resolutions for MmServiceTableLib, which was
introduced in v1 of the series, and has already been merged (at the request of
Liming) so that downstream platforms can add the resolution as well.

The remaining patches #9 - #17 are new, and have been added so that the new
standalone MM drivers can be added to and built from MdeModulePkg.dsc, but
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 to
  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 added 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

NOTE: the drivers added in patches #10 and #11 supersede the ones that reside in
or have been proposed for StandaloneMmPkg

Patches can be found here:
https://github.com/ardbiesheuvel/edk2/tree/variable-ftw-standalone-mm-conversion

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Jagadeesh Ujja <jagadeesh.ujja@arm.com>
Cc: Achin Gupta <Achin.Gupta@arm.com>
Cc: Thomas Panakamattam Abraham <thomas.abraham@arm.com>
Cc: Sami Mujawar <Sami.Mujawar@arm.com>
Cc: Star Zeng <star.zeng@intel.com>

[0] https://lists.01.org/pipermail/edk2-devel/2019-January/034608.html

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

 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 ++
 MdeModulePkg/Library/BaseMemoryAllocationLibNull/BaseMemoryAllocationLibNull.inf                               |  38 ++
 MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf                                                               |   2 +-
 MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf                                         |   5 +-
 MdeModulePkg/Universal/FaultTolerantWriteDxe/{FaultTolerantWriteSmm.inf => FaultTolerantWriteStandaloneMm.inf} |  43 +-
 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf                                                     |   5 +-
 MdeModulePkg/Universal/Variable/RuntimeDxe/{VariableSmm.inf => VariableStandaloneMm.inf}                       |  43 +-
 MdePkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoint.inf                                   |  43 ++
 MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLib.inf                                   |  39 ++
 MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.h                                              |  23 +-
 MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmCommon.h                                     |  34 ++
 MdeModulePkg/Universal/Variable/RuntimeDxe/PrivilegePolymorphic.h                                              |  58 ++
 MdePkg/Include/Library/StandaloneMmDriverEntryPoint.h                                                          | 134 +++++
 MdeModulePkg/Library/BaseHobLibNull/BaseHobLibNull.c                                                           | 542 ++++++++++++++++++
 MdeModulePkg/Library/BaseMemoryAllocationLibNull/BaseMemoryAllocationLibNull.c                                 | 575 ++++++++++++++++++++
 MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.c                                           |  31 ++
 MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.c                                           |  53 +-
 MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteStandaloneMm.c                                  |  88 +++
 MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteTraditionalMm.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 +++++
 MdePkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoint.c                                     |  90 +++
 MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLib.c                                     |  41 ++
 MdeModulePkg/Library/BaseHobLibNull/BaseHobLibNull.uni                                                         |  20 +
 MdeModulePkg/Library/BaseMemoryAllocationLibNull/BaseMemoryAllocationLibNull.uni                               |  20 +
 MdePkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoint.uni                                   |  22 +
 MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLib.uni                                   |  20 +
 42 files changed, 2290 insertions(+), 157 deletions(-)
 create mode 100644 MdeModulePkg/Library/BaseHobLibNull/BaseHobLibNull.inf
 create mode 100644 MdeModulePkg/Library/BaseMemoryAllocationLibNull/BaseMemoryAllocationLibNull.inf
 copy MdeModulePkg/Universal/FaultTolerantWriteDxe/{FaultTolerantWriteSmm.inf => FaultTolerantWriteStandaloneMm.inf} (68%)
 copy MdeModulePkg/Universal/Variable/RuntimeDxe/{VariableSmm.inf => VariableStandaloneMm.inf} (82%)
 create mode 100644 MdePkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoint.inf
 create mode 100644 MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLib.inf
 create mode 100644 MdePkg/Include/Library/StandaloneMmDriverEntryPoint.h
 create mode 100644 MdeModulePkg/Library/BaseHobLibNull/BaseHobLibNull.c
 create mode 100644 MdeModulePkg/Library/BaseMemoryAllocationLibNull/BaseMemoryAllocationLibNull.c
 create mode 100644 MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteStandaloneMm.c
 create mode 100644 MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteTraditionalMm.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/StandaloneMmDriverEntryPoint.c
 create mode 100644 MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLib.c
 create mode 100644 MdeModulePkg/Library/BaseHobLibNull/BaseHobLibNull.uni
 create mode 100644 MdeModulePkg/Library/BaseMemoryAllocationLibNull/BaseMemoryAllocationLibNull.uni
 create mode 100644 MdePkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoint.uni
 create mode 100644 MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLib.uni

-- 
2.20.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Comments

Wang, Jian J Jan. 15, 2019, 8:25 a.m. UTC | #1
Ard,

For patch 1,5,6,7,8,12,13,14,15,16,17

Reviewed-by: Jian J Wang <jian.j.wang@intel.com>



> -----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 <ard.biesheuvel@linaro.org>; Laszlo Ersek

> <lersek@redhat.com>; Leif Lindholm <leif.lindholm@linaro.org>; Kinney,

> Michael D <michael.d.kinney@intel.com>; Gao, Liming <liming.gao@intel.com>;

> Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>;

> Jagadeesh Ujja <jagadeesh.ujja@arm.com>; Achin Gupta

> <Achin.Gupta@arm.com>; Thomas Panakamattam Abraham

> <thomas.abraham@arm.com>; Sami Mujawar <Sami.Mujawar@arm.com>;

> Zeng, Star <star.zeng@intel.com>

> Subject: [PATCH v2 00/17] implement standalone MM versions of the variable

> runtime drivers

> 

> This v2 series is a followup to [0], and updates the SMM implementations of

> the fault tolerant write and variable runtime drivers to provide standalone

> MM versions that share as much of the existing code as possible with the

> traditional SMM implementations.

> 

> The meat is in patches #5 - #8, which were part of v1. I updated them according

> to the received feedback, and added tags that were given on list.

> 

> Patches #1 - #4 add library class resolutions for MmServiceTableLib, which was

> introduced in v1 of the series, and has already been merged (at the request of

> Liming) so that downstream platforms can add the resolution as well.

> 

> The remaining patches #9 - #17 are new, and have been added so that the new

> standalone MM drivers can be added to and built from MdeModulePkg.dsc, but

> 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 to

>   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 added

> 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

> 

> NOTE: the drivers added in patches #10 and #11 supersede the ones that reside

> in

> or have been proposed for StandaloneMmPkg

> 

> Patches can be found here:

> https://github.com/ardbiesheuvel/edk2/tree/variable-ftw-standalone-mm-

> conversion

> 

> Cc: Laszlo Ersek <lersek@redhat.com>

> Cc: Leif Lindholm <leif.lindholm@linaro.org>

> Cc: Michael D Kinney <michael.d.kinney@intel.com>

> Cc: Liming Gao <liming.gao@intel.com>

> Cc: Jian J Wang <jian.j.wang@intel.com>

> Cc: Hao Wu <hao.a.wu@intel.com>

> Cc: Jagadeesh Ujja <jagadeesh.ujja@arm.com>

> Cc: Achin Gupta <Achin.Gupta@arm.com>

> Cc: Thomas Panakamattam Abraham <thomas.abraham@arm.com>

> Cc: Sami Mujawar <Sami.Mujawar@arm.com>

> Cc: Star Zeng <star.zeng@intel.com>

> 

> [0] https://lists.01.org/pipermail/edk2-devel/2019-January/034608.html

> 

> 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

> 

>  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 ++

> 

> MdeModulePkg/Library/BaseMemoryAllocationLibNull/BaseMemoryAllocationL

> ibNull.inf                               |  38 ++

>  MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf

> |   2 +-

>  MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf

> |   5 +-

>  MdeModulePkg/Universal/FaultTolerantWriteDxe/{FaultTolerantWriteSmm.inf

> => FaultTolerantWriteStandaloneMm.inf} |  43 +-

>  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf

> |   5 +-

>  MdeModulePkg/Universal/Variable/RuntimeDxe/{VariableSmm.inf =>

> VariableStandaloneMm.inf}                       |  43 +-

> 

> MdePkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoin

> t.inf                                   |  43 ++

> 

> MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLi

> b.inf                                   |  39 ++

>  MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.h

> |  23 +-

> 

> 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 ++++++++++++++++++

> 

> MdeModulePkg/Library/BaseMemoryAllocationLibNull/BaseMemoryAllocationL

> ibNull.c                                 | 575 ++++++++++++++++++++

>  MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.c

> |  31 ++

>  MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.c

> |  53 +-

> 

> MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteStandalon

> eMm.c                                  |  88 +++

> 

> 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 +++++

> 

> MdePkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoin

> t.c                                     |  90 +++

> 

> MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLi

> b.c                                     |  41 ++

>  MdeModulePkg/Library/BaseHobLibNull/BaseHobLibNull.uni

> |  20 +

> 

> MdeModulePkg/Library/BaseMemoryAllocationLibNull/BaseMemoryAllocationL

> ibNull.uni                               |  20 +

> 

> MdePkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoin

> t.uni                                   |  22 +

> 

> 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

> => FaultTolerantWriteStandaloneMm.inf} (68%)

>  copy MdeModulePkg/Universal/Variable/RuntimeDxe/{VariableSmm.inf =>

> 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

> 

> --

> 2.20.1


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Ard Biesheuvel Jan. 16, 2019, 7:28 p.m. UTC | #2
On Tue, 15 Jan 2019 at 09:25, Wang, Jian J <jian.j.wang@intel.com> wrote:
>

> Ard,

>

> For patch 1,5,6,7,8,12,13,14,15,16,17

>

> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>

>



Series pushed as 2f4a5a9f4c17..5072c47411b8

Thanks all.


>

> > -----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 <ard.biesheuvel@linaro.org>; Laszlo Ersek

> > <lersek@redhat.com>; Leif Lindholm <leif.lindholm@linaro.org>; Kinney,

> > Michael D <michael.d.kinney@intel.com>; Gao, Liming <liming.gao@intel.com>;

> > Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>;

> > Jagadeesh Ujja <jagadeesh.ujja@arm.com>; Achin Gupta

> > <Achin.Gupta@arm.com>; Thomas Panakamattam Abraham

> > <thomas.abraham@arm.com>; Sami Mujawar <Sami.Mujawar@arm.com>;

> > Zeng, Star <star.zeng@intel.com>

> > Subject: [PATCH v2 00/17] implement standalone MM versions of the variable

> > runtime drivers

> >

> > This v2 series is a followup to [0], and updates the SMM implementations of

> > the fault tolerant write and variable runtime drivers to provide standalone

> > MM versions that share as much of the existing code as possible with the

> > traditional SMM implementations.

> >

> > The meat is in patches #5 - #8, which were part of v1. I updated them according

> > to the received feedback, and added tags that were given on list.

> >

> > Patches #1 - #4 add library class resolutions for MmServiceTableLib, which was

> > introduced in v1 of the series, and has already been merged (at the request of

> > Liming) so that downstream platforms can add the resolution as well.

> >

> > The remaining patches #9 - #17 are new, and have been added so that the new

> > standalone MM drivers can be added to and built from MdeModulePkg.dsc, but

> > 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 to

> >   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 added

> > 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

> >

> > NOTE: the drivers added in patches #10 and #11 supersede the ones that reside

> > in

> > or have been proposed for StandaloneMmPkg

> >

> > Patches can be found here:

> > https://github.com/ardbiesheuvel/edk2/tree/variable-ftw-standalone-mm-

> > conversion

> >

> > Cc: Laszlo Ersek <lersek@redhat.com>

> > Cc: Leif Lindholm <leif.lindholm@linaro.org>

> > Cc: Michael D Kinney <michael.d.kinney@intel.com>

> > Cc: Liming Gao <liming.gao@intel.com>

> > Cc: Jian J Wang <jian.j.wang@intel.com>

> > Cc: Hao Wu <hao.a.wu@intel.com>

> > Cc: Jagadeesh Ujja <jagadeesh.ujja@arm.com>

> > Cc: Achin Gupta <Achin.Gupta@arm.com>

> > Cc: Thomas Panakamattam Abraham <thomas.abraham@arm.com>

> > Cc: Sami Mujawar <Sami.Mujawar@arm.com>

> > Cc: Star Zeng <star.zeng@intel.com>

> >

> > [0] https://lists.01.org/pipermail/edk2-devel/2019-January/034608.html

> >

> > 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

> >

> >  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 ++

> >

> > MdeModulePkg/Library/BaseMemoryAllocationLibNull/BaseMemoryAllocationL

> > ibNull.inf                               |  38 ++

> >  MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf

> > |   2 +-

> >  MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf

> > |   5 +-

> >  MdeModulePkg/Universal/FaultTolerantWriteDxe/{FaultTolerantWriteSmm.inf

> > => FaultTolerantWriteStandaloneMm.inf} |  43 +-

> >  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf

> > |   5 +-

> >  MdeModulePkg/Universal/Variable/RuntimeDxe/{VariableSmm.inf =>

> > VariableStandaloneMm.inf}                       |  43 +-

> >

> > MdePkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoin

> > t.inf                                   |  43 ++

> >

> > MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLi

> > b.inf                                   |  39 ++

> >  MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.h

> > |  23 +-

> >

> > 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 ++++++++++++++++++

> >

> > MdeModulePkg/Library/BaseMemoryAllocationLibNull/BaseMemoryAllocationL

> > ibNull.c                                 | 575 ++++++++++++++++++++

> >  MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.c

> > |  31 ++

> >  MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.c

> > |  53 +-

> >

> > MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteStandalon

> > eMm.c                                  |  88 +++

> >

> > 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 +++++

> >

> > MdePkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoin

> > t.c                                     |  90 +++

> >

> > MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLi

> > b.c                                     |  41 ++

> >  MdeModulePkg/Library/BaseHobLibNull/BaseHobLibNull.uni

> > |  20 +

> >

> > MdeModulePkg/Library/BaseMemoryAllocationLibNull/BaseMemoryAllocationL

> > ibNull.uni                               |  20 +

> >

> > MdePkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoin

> > t.uni                                   |  22 +

> >

> > 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

> > => FaultTolerantWriteStandaloneMm.inf} (68%)

> >  copy MdeModulePkg/Universal/Variable/RuntimeDxe/{VariableSmm.inf =>

> > 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

> >

> > --

> > 2.20.1

>

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel