/* This function save boot script SMM private data to LockBox with BackFromS3 = TRUE at runtime. S3 resume will help restore it to tell the Library the system is back from S3.  */
VOID SaveSmmPriviateDataToLockBoxAtRuntime(VOID)
/* This function save boot script SMM private data to LockBox with BackFromS3 = TRUE at runtime. S3 resume will help restore it to tell the Library the system is back from S3.  */
VOID SaveSmmPriviateDataToLockBoxAtRuntime(VOID)
{
  EFI_STATUS  Status;
  mS3BootScriptTablePtr->BackFromS3 = TRUE;
  Status                            = SaveLockBox (
                                        &mBootScriptSmmPrivateDataGuid,
                                        (VOID *)mS3BootScriptTablePtr,
                                        sizeof (SCRIPT_TABLE_PRIVATE_DATA)
                                        );
  ASSERT_EFI_ERROR (Status);
  Status = SetLockBoxAttributes (&mBootScriptSmmPrivateDataGuid, LOCK_BOX_ATTRIBUTE_RESTORE_IN_PLACE);
  ASSERT_EFI_ERROR (Status);
  mS3BootScriptTablePtr->BackFromS3 = FALSE;
}