/* Check and set SMM feature lock bit and code check enable bit in S3 path.  */
VOID SmmFeatureLockOnS3(VOID)
/* Check and set SMM feature lock bit and code check enable bit in S3 path.  */
VOID SmmFeatureLockOnS3(VOID)
{
  if (mSmmFeatureControl != 0) {
    return;
  }
  mSmmFeatureControl = AsmReadMsr64 (MSR_SMM_FEATURE_CONTROL);
  if ((mSmmFeatureControl & 0x5) != 0x5) {
    AsmWriteMsr64 (MSR_SMM_FEATURE_CONTROL, mSmmFeatureControl | 0x5);
  }
  mSmmFeatureControl = AsmReadMsr64 (MSR_SMM_FEATURE_CONTROL);
}