/* Check if a CPUID leaf/function is indexed via ECX sub-leaf/sub-function */
STATIC BOOLEAN IsFunctionIndexed(IN UINT32 EaxIn)
/* Check if a CPUID leaf/function is indexed via ECX sub-leaf/sub-function */
STATIC BOOLEAN IsFunctionIndexed(IN UINT32 EaxIn)
{
  switch (EaxIn) {
    case CPUID_CACHE_PARAMS:
    case CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS:
    case CPUID_EXTENDED_TOPOLOGY:
    case CPUID_EXTENDED_STATE:
    case CPUID_INTEL_RDT_MONITORING:
    case CPUID_INTEL_RDT_ALLOCATION:
    case CPUID_INTEL_SGX:
    case CPUID_INTEL_PROCESSOR_TRACE:
    case CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS:
    case CPUID_V2_EXTENDED_TOPOLOGY:
    case 0x8000001D:
      return TRUE;
  }
  return FALSE;
}