/* Check the WP status in CR0 register. This bit is used to lock or unlock write access to pages marked as read-only. */
BOOLEAN IsReadOnlyPageWriteProtected(VOID)
/* Check the WP status in CR0 register. This bit is used to lock or unlock write access to pages marked as read-only. */
BOOLEAN IsReadOnlyPageWriteProtected(VOID)
{
  IA32_CR0  Cr0;
  if (!IsInSmm ()) {
    Cr0.UintN = AsmReadCr0 ();
    return (BOOLEAN)(Cr0.Bits.WP != 0);
  }
  return FALSE;
}