public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v2 00/17] implement standalone MM versions of the variable runtime drivers
@ 2019-01-14 13:27 Ard Biesheuvel
  2019-01-14 13:27 ` [PATCH v2 01/17] MdeModulePkg/MdeModulePkg.dsc: add MmServicesTableLib resolution Ard Biesheuvel
                   ` (17 more replies)
  0 siblings, 18 replies; 41+ messages in thread
From: Ard Biesheuvel @ 2019-01-14 13:27 UTC (permalink / raw)
  To: edk2-devel
  Cc: Ard Biesheuvel, Laszlo Ersek, Leif Lindholm, Michael D Kinney,
	Liming Gao, Jian J Wang, Hao Wu, Jagadeesh Ujja, Achin Gupta,
	Thomas Panakamattam Abraham, Sami Mujawar, Star Zeng

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



^ permalink raw reply	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2019-01-17  5:20 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-14 13:27 [PATCH v2 00/17] implement standalone MM versions of the variable runtime drivers Ard Biesheuvel
2019-01-14 13:27 ` [PATCH v2 01/17] MdeModulePkg/MdeModulePkg.dsc: add MmServicesTableLib resolution Ard Biesheuvel
2019-01-16  5:02   ` Zeng, Star
2019-01-14 13:27 ` [PATCH v2 02/17] OvmfPkg: " Ard Biesheuvel
2019-01-14 16:40   ` Laszlo Ersek
2019-01-14 17:05     ` Ard Biesheuvel
2019-01-14 13:27 ` [PATCH v2 03/17] QuarkPlatformPkg: " Ard Biesheuvel
2019-01-16 15:14   ` Gao, Liming
2019-01-14 13:27 ` [PATCH v2 04/17] Vlv2TbltDevicePkg: " Ard Biesheuvel
2019-01-16 15:14   ` Gao, Liming
2019-01-16 17:44     ` Ard Biesheuvel
2019-01-16 19:00       ` Kinney, Michael D
2019-01-17  5:20       ` Qian, Yi
2019-01-14 13:27 ` [PATCH v2 05/17] MdeModulePkg/FaultTolerantWriteDxe: factor out boot service accesses Ard Biesheuvel
2019-01-16  3:29   ` Zeng, Star
2019-01-14 13:27 ` [PATCH v2 06/17] MdeModulePkg/FaultTolerantWriteDxe: implement standalone MM version Ard Biesheuvel
2019-01-16  3:32   ` Zeng, Star
2019-01-14 13:27 ` [PATCH v2 07/17] MdeModulePkg/VariableRuntimeDxe: factor out boot service accesses Ard Biesheuvel
2019-01-16  4:57   ` Zeng, Star
2019-01-14 13:27 ` [PATCH v2 08/17] MdeModulePkg/VariableRuntimeDxe: implement standalone MM version Ard Biesheuvel
2019-01-16  5:00   ` Zeng, Star
2019-01-14 13:27 ` [PATCH v2 09/17] MdePkg: introduce standalone MM entry point library class Ard Biesheuvel
2019-01-16  6:32   ` Zeng, Star
2019-01-16 14:56     ` Gao, Liming
2019-01-16 14:57       ` Ard Biesheuvel
2019-01-14 13:27 ` [PATCH v2 10/17] MdePkg: introduce standalone MM entry point library implementation Ard Biesheuvel
2019-01-14 13:27 ` [PATCH v2 11/17] MdePkg: add MM_STANDALONE implementation of MmServicesTableLib Ard Biesheuvel
2019-01-14 13:27 ` [PATCH v2 12/17] MdeModulePkg: implement NULL instance of HobLib library class Ard Biesheuvel
2019-01-16  5:10   ` Zeng, Star
2019-01-14 13:27 ` [PATCH v2 13/17] MdeModulePkg: implement NULL instance of MemoryAllocationLib " Ard Biesheuvel
2019-01-16  5:09   ` Zeng, Star
2019-01-14 13:27 ` [PATCH v2 14/17] MdeModulePkg/MdeModulePkg/dsc: move DxeDebugSupportDxe to x86 only section Ard Biesheuvel
2019-01-16  5:27   ` Zeng, Star
2019-01-14 13:27 ` [PATCH v2 15/17] MdeModulePkg/AuthVariableLibNull: add MM_STANDALONE support Ard Biesheuvel
2019-01-16  5:03   ` Zeng, Star
2019-01-14 13:27 ` [PATCH v2 16/17] MdeModulePkg/VarCheckLib: " Ard Biesheuvel
2019-01-16  5:03   ` Zeng, Star
2019-01-14 13:27 ` [PATCH v2 17/17] MdeModulePkg/MdeModulePkg.dsc: add MM_STANDALONE FTW and variable modules Ard Biesheuvel
2019-01-16  5:04   ` Zeng, Star
2019-01-15  8:25 ` [PATCH v2 00/17] implement standalone MM versions of the variable runtime drivers Wang, Jian J
2019-01-16 19:28   ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox