MdeModulePkg: SmmSmiHandlerProfileLib: Support StandaloneMm Instance

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3185

This change added support of SMI handler profile library router under
StandaloneMm. This change replaces gSmst with gMmst. It also abstracts
standalone and traditional MM driver entrypoints into separate files to
allow maximal common implementations.

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>
Cc: Ray Ni <ray.ni@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
2021-01-25 23:10:21 -08:00
parent b1e97194a0
commit 1f0fa9187b
7 changed files with 211 additions and 84 deletions

View File

@@ -0,0 +1,31 @@
/** @file
Standalone MM driver instance of SmiHandlerProfile Library.
Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
Copyright (c) Microsoft Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#include <PiMm.h>
#include "MmSmiHandlerProfileLib.h"
/**
The constructor function for standalone MM SMI handler profile.
@param ImageHandle The firmware allocated handle for the EFI image.
@param SystemTable A pointer to the EFI System Table.
@retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
**/
EFI_STATUS
EFIAPI
StandaloneMmSmiHandlerProfileLibConstructor (
IN EFI_HANDLE ImageHandle,
IN EFI_MM_SYSTEM_TABLE *SystemTable
)
{
return MmSmiHandlerProfileLibInitialization ();
}