MdeModulePkg PiDxeS3BootScriptLib: Use a specific name for mSmst

When a driver also uses a same name, there will be a link error:
one or more multiply defined symbols found.
Use a specific name for mSmst to avoid the link error.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
Star Zeng 2016-06-24 12:34:59 +08:00
parent fb5848c588
commit a7636346cb
1 changed files with 40 additions and 40 deletions

View File

@ -130,7 +130,7 @@ VOID *mRegistrationSmmLegacyBoot = NULL;
VOID *mRegistrationSmmReadyToLock = NULL;
BOOLEAN mS3BootScriptTableAllocated = FALSE;
BOOLEAN mS3BootScriptTableSmmAllocated = FALSE;
EFI_SMM_SYSTEM_TABLE2 *mSmst = NULL;
EFI_SMM_SYSTEM_TABLE2 *mBootScriptSmst = NULL;
/**
This is an internal function to add a terminate node the entry, recalculate the table
@ -493,7 +493,7 @@ S3BootScriptLibInitialize (
//
// Good, we are in SMM
//
Status = SmmBase2->GetSmstLocation (SmmBase2, &mSmst);
Status = SmmBase2->GetSmstLocation (SmmBase2, &mBootScriptSmst);
if (EFI_ERROR (Status)) {
return RETURN_SUCCESS;
}
@ -503,7 +503,7 @@ S3BootScriptLibInitialize (
// The Boot script private data in SMM is not be initialized. create it
//
if (S3TableSmmPtr == 0) {
Status = mSmst->SmmAllocatePool (
Status = mBootScriptSmst->SmmAllocatePool (
EfiRuntimeServicesData,
sizeof(SCRIPT_TABLE_PRIVATE_DATA),
(VOID **) &S3TableSmmPtr
@ -518,14 +518,14 @@ S3BootScriptLibInitialize (
//
// Register SmmExitBootServices and SmmLegacyBoot notification.
//
Status = mSmst->SmmRegisterProtocolNotify (
Status = mBootScriptSmst->SmmRegisterProtocolNotify (
&gEdkiiSmmExitBootServicesProtocolGuid,
S3BootScriptSmmAtRuntimeCallBack,
&mRegistrationSmmExitBootServices
);
ASSERT_EFI_ERROR (Status);
Status = mSmst->SmmRegisterProtocolNotify (
Status = mBootScriptSmst->SmmRegisterProtocolNotify (
&gEdkiiSmmLegacyBootProtocolGuid,
S3BootScriptSmmAtRuntimeCallBack,
&mRegistrationSmmLegacyBoot
@ -537,7 +537,7 @@ S3BootScriptLibInitialize (
//
// Register SmmReadyToLock notification.
//
Status = mSmst->SmmRegisterProtocolNotify (
Status = mBootScriptSmst->SmmRegisterProtocolNotify (
&gEfiSmmReadyToLockProtocolGuid,
S3BootScriptSmmEventCallBack,
&mRegistrationSmmReadyToLock
@ -579,12 +579,12 @@ S3BootScriptLibDeinitialize (
ASSERT_EFI_ERROR (Status);
}
if (mSmst != NULL) {
if (mBootScriptSmst != NULL) {
if (mRegistrationSmmExitBootServices != NULL) {
//
// Unregister SmmExitBootServices notification.
//
Status = mSmst->SmmRegisterProtocolNotify (
Status = mBootScriptSmst->SmmRegisterProtocolNotify (
&gEdkiiSmmExitBootServicesProtocolGuid,
NULL,
&mRegistrationSmmExitBootServices
@ -595,7 +595,7 @@ S3BootScriptLibDeinitialize (
//
// Unregister SmmLegacyBoot notification.
//
Status = mSmst->SmmRegisterProtocolNotify (
Status = mBootScriptSmst->SmmRegisterProtocolNotify (
&gEdkiiSmmLegacyBootProtocolGuid,
NULL,
&mRegistrationSmmLegacyBoot
@ -606,7 +606,7 @@ S3BootScriptLibDeinitialize (
//
// Unregister SmmReadyToLock notification.
//
Status = mSmst->SmmRegisterProtocolNotify (
Status = mBootScriptSmst->SmmRegisterProtocolNotify (
&gEfiSmmReadyToLockProtocolGuid,
NULL,
&mRegistrationSmmReadyToLock
@ -624,8 +624,8 @@ S3BootScriptLibDeinitialize (
Status = PcdSet64S (PcdS3BootScriptTablePrivateDataPtr, 0);
ASSERT_EFI_ERROR (Status);
}
if ((mSmst != NULL) && mS3BootScriptTableSmmAllocated) {
Status = mSmst->SmmFreePool (mS3BootScriptTableSmmPtr);
if ((mBootScriptSmst != NULL) && mS3BootScriptTableSmmAllocated) {
Status = mBootScriptSmst->SmmFreePool (mS3BootScriptTableSmmPtr);
ASSERT_EFI_ERROR (Status);
Status = PcdSet64S (PcdS3BootScriptTablePrivateSmmDataPtr, 0);
ASSERT_EFI_ERROR (Status);