/* This function reads CR2 register when on-demand paging is enabled. */
VOID SaveCr2(OUT UINTN *Cr2)
/* This function reads CR2 register when on-demand paging is enabled. */
VOID SaveCr2(OUT UINTN *Cr2)
{
  if (!mCpuSmmRestrictedMemoryAccess) {
    *Cr2 = AsmReadCr2 ();
  }
}