Chameleon

Chameleon Commit Details

Date:2010-11-06 10:53:18 (13 years 5 months ago)
Author:mozo
Commit:630
Parents: 629
Message:Dirty fix for Core i7 p-states generation :) The important thing is the maximum multiplier value, so this method is dirty only for part retrieving minimum multiplier.
Changes:
M/trunk/i386/libsaio/acpi_patcher.c

File differences

trunk/i386/libsaio/acpi_patcher.c
495495
496496
497497
498
498
499499
500
500
501
502
503
504
505
506
507
508
501509
502
503
510
511
512
513
514
515
516
517
504518
519
520
505521
506522
507523
case CPU_MODEL_WESTMERE:
case CPU_MODEL_WESTMERE_EX:
{
uint8_t i;
maximum.Control = rdmsr64(MSR_IA32_PERF_STATUS) & 0xff; // Seems it always contains maximum multiplier value (with turbo, that's we need)...
maximum.Control = rdmsr64(MSR_IA32_PERF_STATUS) & 0xff; // Is it allways the maximum multiplier?
/*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);
}*/
// fix me: dirty method to get lowest multiplier... Hardcoded value!
minimum.Control = 0x09;
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
if (maximum.Control < minimum.Control)
{

Archive Download the corresponding diff file

Revision: 630