MdeModulePkg: SmmLockBoxSmmLib: Support StandaloneMm for SmmLockBoxLib

This change added support of StandaloneMm for SmmLockBoxLib. It replaces
gSmst with gMmst to support both traditional MM and standalone MM. The
contructor and desctructor functions are abstracted to support different
function prototype definitions.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Eric Dong <eric.dong@intel.com>

Signed-off-by: Kun Qin <kun.q@outlook.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
This commit is contained in:
Kun Qin
2020-12-17 13:18:51 -08:00
parent 037ccb09a2
commit e35fce8ada
7 changed files with 230 additions and 53 deletions

View File

@ -15,8 +15,8 @@
MODULE_TYPE = DXE_SMM_DRIVER
VERSION_STRING = 1.0
LIBRARY_CLASS = LockBoxLib|DXE_SMM_DRIVER
CONSTRUCTOR = SmmLockBoxSmmConstructor
DESTRUCTOR = SmmLockBoxSmmDestructor
CONSTRUCTOR = SmmLockBoxTraditionalConstructor
DESTRUCTOR = SmmLockBoxTraditionalDestructor
#
# The following information is for reference only and not required by the build tools.
@ -25,7 +25,8 @@
#
[Sources]
SmmLockBoxSmmLib.c
SmmLockBoxTraditionalMmLib.c
SmmLockBoxMmLib.c
SmmLockBoxLibPrivate.h
[Packages]
@ -33,14 +34,14 @@
MdeModulePkg/MdeModulePkg.dec
[LibraryClasses]
SmmServicesTableLib
MmServicesTableLib
BaseLib
DebugLib
[Protocols]
gEfiSmmReadyToLockProtocolGuid ## NOTIFY
gEfiSmmEndOfDxeProtocolGuid ## NOTIFY
gEfiSmmSxDispatch2ProtocolGuid ## NOTIFY
gEfiMmReadyToLockProtocolGuid ## NOTIFY
gEfiMmEndOfDxeProtocolGuid ## NOTIFY
gEfiMmSxDispatchProtocolGuid ## NOTIFY
[Guids]
## SOMETIMES_CONSUMES ## UNDEFINED # SmmSystemTable