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