Chameleon

Chameleon Commit Details

Date:2010-12-12 05:14:55 (8 years 8 months ago)
Author:mozo
Commit:654
Parents: 653
Message:P-States generator now read min multiplier from MSR. Thanks to Slice for investigation!
Changes:
M/trunk/i386/libsaio/acpi_patcher.c

File differences

trunk/i386/libsaio/acpi_patcher.c
496496
497497
498498
499
499500
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519501
520502
521503
case CPU_MODEL_WESTMERE_EX:
{
maximum.Control = rdmsr64(MSR_IA32_PERF_STATUS) & 0xff; // Seems it always contains maximum multiplier value (with turbo, that's we need)...
minimum.Control = (rdmsr64(MSR_PLATFORM_INFO) >> 40) & 0xff;
/*uint8_t i;
// Probe for lowest fid
for (i = maximum.Control; i >= 0x7; i--)
{
wrmsr64(MSR_IA32_PERF_CONTROL, i);
delay(1);
minimum.Control = rdmsr64(MSR_IA32_PERF_STATUS);
delay(1);
}*/
if (!minimum.Control)
{
// fix me: dirty method to get lowest multiplier... Hardcoded value!
if (strstr(Platform.CPU.BrandString, "Core(TM) i7"))
minimum.Control = 0x07;
else
minimum.Control = 0x09;
}
verbose("P-States: min 0x%x, max 0x%x\n", minimum.Control, maximum.Control);
// Sanity check

Archive Download the corresponding diff file

Revision: 654