/* Check if the memory address will be mapped by 4KB-page. */
BOOLEAN IsAddressSplit(IN EFI_PHYSICAL_ADDRESS Address)
/* Check if the memory address will be mapped by 4KB-page. */
BOOLEAN IsAddressSplit(IN EFI_PHYSICAL_ADDRESS Address)
{
  UINTN  Index;
  if (FeaturePcdGet (PcdCpuSmmProfileEnable)) {
    for (Index = 0; Index < mSplitMemRangeCount; Index++) {
      if ((Address >= mSplitMemRange[Index].Base) && (Address < mSplitMemRange[Index].Top)) {
        return TRUE;
      }
    }
  } else {
    if (Address < mCpuHotPlugData.SmrrBase) {
      if ((mCpuHotPlugData.SmrrBase - Address) < BASE_2MB) {
        return TRUE;
      }
    } else if (Address > (mCpuHotPlugData.SmrrBase + mCpuHotPlugData.SmrrSize - BASE_2MB)) {
      if ((Address - (mCpuHotPlugData.SmrrBase + mCpuHotPlugData.SmrrSize - BASE_2MB)) < BASE_2MB) {
        return TRUE;
      }
    }
  }
  return FALSE;
}