FreeBSD/sys/x86/cpufreq/est.c
/*
 * Probe for supported CPU settings.  First, check our static table of
 * settings.  If no match, try using the ones offered by acpi_perf
 * (i.e., _PSS).  We use ACPI second because some systems (IBM R/T40
 * series) export both legacy SMM IO-based access and direct MSR access
 * but the direct access specifies invalid values for _PSS.
 */
Probe for supported CPU settings.  First, check our static table of
settings.  If no match, try using the ones offered by acpi_perf
.  We use ACPI second because some systems (IBM R/T40
series) export both legacy SMM IO-based access and direct MSR access
but the direct access specifies invalid values for _PSS.
Probe for supported CPU settings . First check our static table of settings . If no match try using the ones offered by acpi_perf . We use ACPI second because some systems ( IBM R / T40 series ) export both legacy SMM IO - based access and direct MSR access but the direct access specifies invalid values for _PSS .
static int
est_get_info(device_t dev)
{
	struct est_softc *sc;
	uint64_t msr;
	int error;
	sc = device_get_softc(dev);
	msr = rdmsr(MSR_PERF_STATUS);
	error = est_table_info(dev, msr, &sc->freq_list);
	if (error)
		error = est_acpi_info(dev, &sc->freq_list);
	if (error)
		error = est_msr_info(dev, msr, &sc->freq_list);
	if (error) {
		printf(
	"est: CPU supports Enhanced Speedstep, but is not recognized.\n"
	"est: cpu_vendor %s, msr %0jx\n", cpu_vendor, msr);
		return (ENXIO);
	}
	return (0);
}
static int est_get_info ( device_t dev ) { struct est_softc * sc ; uint64_t msr ; int error ; sc = device_get_softc ( dev ) ; msr = rdmsr ( MSR_PERF_STATUS ) ; error = est_table_info ( dev , msr , & sc -> freq_list ) ; if ( error ) error = est_acpi_info ( dev , & sc -> freq_list ) ; if ( error ) error = est_msr_info ( dev , msr , & sc -> freq_list ) ; if ( error ) { printf ( " \n " " \n " , cpu_vendor , msr ) ; return ( ENXIO ) ; } return ( 0 ) ; }
Probe for supported CPU settings.
Probe for supported CPU settings .