Chameleon

Chameleon Commit Details

Date:2011-08-05 10:00:16 (8 years 18 days ago)
Author:Sergey Slice
Commit:1280
Parents: 1279
Message:cpu debugging 2
Changes:
M/branches/slice/trunkM/revision
M/branches/slice/trunkM/i386/libsaio/cpu.c

File differences

branches/slice/trunkM/i386/libsaio/cpu.c
1212
1313
1414
15
15
1616
1717
1818
......
346346
347347
348348
349
349
350
351
350352
351
353
354
352355
353356
354357
......
358361
359362
360363
361
364
365
362366
363367
364368
......
399403
400404
401405
402
406
403407
404
408
405409
406410
407411
......
493497
494498
495499
496
500
497501
498502
499503
......
567571
568572
569573
570
574
571575
572576
573577
#include "boot.h"
#ifndef DEBUG_CPU
#define DEBUG_CPU 0
#define DEBUG_CPU 1
#endif
#if DEBUG_CPU
fsbFrequency = 0;
cpuFrequency = 0;
if ((p->CPU.Vendor == CPUID_VENDOR_INTEL) && ((p->CPU.Family == 0x06) || (p->CPU.Family == 0x0f))) {
if ((p->CPU.Vendor == CPUID_VENDOR_INTEL) && ((p->CPU.Family == 0x06)
|| (p->CPU.Family == 0x0f)))
{
//int intelCPU = p->CPU.Model;
if ((p->CPU.Family == 0x06 && p->CPU.Model >= 0x0c) || (p->CPU.Family == 0x0f && p->CPU.Model >= 0x03)) {
if ((p->CPU.Family == 0x06 && p->CPU.Model >= 0x0c) || (p->CPU.Family == 0x0f && p->CPU.Model >= 0x03))
{
/* Nehalem CPU model */
if (p->CPU.Family == 0x06 && (p->CPU.Model == CPU_MODEL_NEHALEM ||
p->CPU.Model == CPU_MODEL_FIELDS ||
p->CPU.Model == CPU_MODEL_NEHALEM_EX ||
p->CPU.Model == CPU_MODEL_WESTMERE_EX ||
p->CPU.Model == CPU_MODEL_SANDY ||
p->CPU.Model == CPU_MODEL_SANDY_XEON)) {
p->CPU.Model == CPU_MODEL_SANDY_XEON))
{
msr = rdmsr64(MSR_PLATFORM_INFO);
DBG("msr(0x%04x): platform_info %08x-%08x\n", MSR_PLATFORM_INFO,
(msr >> 32) & 0xffffffff, msr & 0xffffffff);
cpuFrequency = bus_ratio_max * fsbFrequency;
max_ratio = bus_ratio_max * 10;
} else */
{
//{
cpuFrequency = tscFrequency;
}
//}
if ((getValueForKey(kbusratio, &newratio, &len, &bootInfo->chameleonConfig)) && (len <= 4)) {
max_ratio = atoi(newratio);
max_ratio = (max_ratio * 10);
}
}
DBG("CPU is %s\n", p->CPU.Mobile?"Mobile":"Desktop");
#endif
}
else if((p->CPU.Vendor == CPUID_VENDOR_AMD) && (p->CPU.Family == 0x0f))
{
}
if(!cpuFrequency) cpuFrequency = tscFrequency;
}
#endif
p->CPU.MaxCoef = maxcoef;
p->CPU.MaxDiv = maxdiv;
p->CPU.CurrCoef = currcoef;
branches/slice/trunkM/revision
1
1
1227:1230
1278:1279

Archive Download the corresponding diff file

Revision: 1280