MdeModulePkg/VariableRuntimeDxe: factor out boot service accesses

In preparation of providing a standalone MM based variable runtime
driver, move the existing SMM driver to the new MM services table,
and factor out some pieces that are specific to the traditional
driver, mainly related to the use of UEFI boot services, which are
not accessible to standalone MM drivers.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
Ard Biesheuvel
2019-01-03 19:28:24 +01:00
parent d0def00d33
commit a855f63e2f
5 changed files with 222 additions and 56 deletions

View File

@@ -48,6 +48,7 @@
[Sources]
Reclaim.c
Variable.c
VariableTraditionalMm.c
VariableSmm.c
VarCheck.c
Variable.h
@@ -66,7 +67,7 @@
BaseLib
SynchronizationLib
UefiLib
SmmServicesTableLib
MmServicesTableLib
BaseMemoryLib
DebugLib
DxeServicesTableLib
@@ -85,7 +86,7 @@
## PRODUCES
## UNDEFINED # SmiHandlerRegister
gEfiSmmVariableProtocolGuid
gEfiSmmEndOfDxeProtocolGuid ## NOTIFY
gEfiMmEndOfDxeProtocolGuid ## NOTIFY
gEdkiiSmmVarCheckProtocolGuid ## PRODUCES
gEfiTcgProtocolGuid ## SOMETIMES_CONSUMES
gEfiTcg2ProtocolGuid ## SOMETIMES_CONSUMES