/* Write unprotect read-only pages if Cr0.Bits.WP is 1. */
VOID SmmWriteUnprotectReadOnlyPage(OUT BOOLEAN *WriteProtect)
/* Write unprotect read-only pages if Cr0.Bits.WP is 1. */
VOID SmmWriteUnprotectReadOnlyPage(OUT BOOLEAN *WriteProtect)
{
  IA32_CR0  Cr0;
  Cr0.UintN     = AsmReadCr0 ();
  *WriteProtect = (Cr0.Bits.WP != 0);
  if (*WriteProtect) {
    Cr0.Bits.WP = 0;
    AsmWriteCr0 (Cr0.UintN);
  }
}