/* This function is to arbitrate the real attribute of the memory when there are 2 MTRRs covers the same memory range. For further details, please refer the IA32 Software Developer's Manual, Volume 3, Section "MTRR Precedences". */
MTRR_MEMORY_CACHE_TYPE MtrrLibPrecedence(IN MTRR_MEMORY_CACHE_TYPE MtrrType1, IN MTRR_MEMORY_CACHE_TYPE MtrrType2)
/* This function is to arbitrate the real attribute of the memory when there are 2 MTRRs covers the same memory range. For further details, please refer the IA32 Software Developer's Manual, Volume 3, Section "MTRR Precedences". */
MTRR_MEMORY_CACHE_TYPE MtrrLibPrecedence(IN MTRR_MEMORY_CACHE_TYPE MtrrType1, IN MTRR_MEMORY_CACHE_TYPE MtrrType2)
{
  if (MtrrType1 == MtrrType2) {
    return MtrrType1;
  }
  ASSERT (
    MtrrLibTypeLeftPrecedeRight (MtrrType1, MtrrType2) ||
    MtrrLibTypeLeftPrecedeRight (MtrrType2, MtrrType1)
    );
  if (MtrrLibTypeLeftPrecedeRight (MtrrType1, MtrrType2)) {
    return MtrrType1;
  } else {
    return MtrrType2;
  }
}