/* This function gets GCD Mem Space type from MTRR Type. */
UINT64 GetMemorySpaceAttributeFromMtrrType(IN MTRR_MEMORY_CACHE_TYPE Type)
/* This function gets GCD Mem Space type from MTRR Type. */
UINT64 GetMemorySpaceAttributeFromMtrrType(IN MTRR_MEMORY_CACHE_TYPE Type)
{
  switch (Type) {
    case CacheUncacheable:
      return EFI_MEMORY_UC;
    case CacheWriteCombining:
      return EFI_MEMORY_WC;
    case CacheWriteThrough:
      return EFI_MEMORY_WT;
    case CacheWriteProtected:
      return EFI_MEMORY_WP;
    case CacheWriteBack:
      return EFI_MEMORY_WB;
    default:
      return 0;
  }
}