/* Detects if Clock Modulation feature supported on current processor. */
BOOLEAN EFIAPI ClockModulationSupport(IN UINTN ProcessorNumber, IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo, IN VOID *ConfigData OPTIONAL)
/* Detects if Clock Modulation feature supported on current processor. */
BOOLEAN EFIAPI ClockModulationSupport(IN UINTN ProcessorNumber, IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo, IN VOID *ConfigData OPTIONAL)
{
  CLOCK_MODULATION_CONFIG_DATA  *CmConfigData;
  if (CpuInfo->CpuIdVersionInfoEdx.Bits.ACPI == 1) {
    CmConfigData = (CLOCK_MODULATION_CONFIG_DATA *)ConfigData;
    ASSERT (CmConfigData != NULL);
    AsmCpuid (
      CPUID_THERMAL_POWER_MANAGEMENT,
      &CmConfigData[ProcessorNumber].ThermalPowerManagementEax.Uint32,
      NULL,
      NULL,
      NULL
      );
    CmConfigData[ProcessorNumber].ClockModulation.Uint64 = AsmReadMsr64 (MSR_IA32_CLOCK_MODULATION);
    return TRUE;
  }
  return FALSE;
}