Chameleon

Chameleon Commit Details

Date:2011-07-23 22:31:17 (12 years 9 months ago)
Author:Azimutz
Commit:1212
Parents: 1211
Message:Sync with trunk (r1203).
Changes:
M/branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/cpu.c
M/branches/azimutz/trunkGraphicsEnablerModules/i386/modules/GraphicsEnabler/AMDGraphicsEnabler/ati.c
M/branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/platform.h
M/branches/azimutz/trunkGraphicsEnablerModules

File differences

branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/cpu.c
451451
452452
453453
454
454
455455
456456
457457
......
463463
464464
465465
466
467
466
467
468
469
470
471
472
468473
469474
470
471
475
476
472477
473478
474
475479
476480
477481
......
487491
488492
489493
490
491
494
495
496
497
498
492499
493500
494501
p->CPU.Features |= CPU_FEATURE_MOBILE;
}
}
else if((p->CPU.Vendor == 0x68747541 /* AMD */) && (p->CPU.Family == 0x0f))
else if((p->CPU.Vendor == CPUID_VENDOR_AMD) && (p->CPU.Family == 0x0f))
{
switch(p->CPU.ExtFamily)
{
case 0x01: /* K10 */
msr = rdmsr64(K10_COFVID_STATUS);
//uint64_t mperf = measure_mperf_frequency();
uint64_t aperf = measure_aperf_frequency();
do_cpuid2(0x00000006, 0, p->CPU.CPUID[CPUID_6]);
if(bitfield(p->CPU.CPUID[CPUID_6][2], 0, 0) == 1) // EffFreq: effective frequency interface
{
//uint64_t mperf = measure_mperf_frequency();
uint64_t aperf = measure_aperf_frequency();
cpuFrequency = aperf;
}
// NOTE: tsc runs at the maccoeff (non turbo)
// *not* at the turbo frequency.
maxcoef = bitfield(msr, 54, 49) / 2 + 4; // VRIFY
currcoef = bitfield(msr, 5, 0) + 0x10; // note: this is * 2
maxcoef = bitfield(msr, 54, 49) / 2 + 4;
currcoef = bitfield(msr, 5, 0) + 0x10;
currdiv = 2 << bitfield(msr, 8, 6);
cpuFrequency = aperf;
break;
case 0x05: /* K14 */
break;
}
if (maxcoef) {
if (currdiv) {
if (maxcoef)
{
if (currdiv)
{
if(!currcoef) currcoef = maxcoef;
if(!cpuFrequency)
fsbFrequency = ((tscFrequency * currdiv) / currcoef);
else
branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/platform.h
2323
2424
2525
26
27
28
29
26
27
28
29
30
3031
3132
3233
#define CPUID_22
#define CPUID_33
#define CPUID_44
#define CPUID_805
#define CPUID_816
#define CPUID_887
#define CPUID_MAX8
#define CPUID_65
#define CPUID_806
#define CPUID_817
#define CPUID_888
#define CPUID_MAX9
#define CPU_MODEL_YONAH0x0E// Sossaman, Yonah
#define CPU_MODEL_MEROM0x0F// Allendale, Conroe, Kentsfield, Woodcrest, Clovertown, Tigerton, Merom
branches/azimutz/trunkGraphicsEnablerModules/i386/modules/GraphicsEnabler/AMDGraphicsEnabler/ati.c
219219
220220
221221
222
222
223223
224224
225225
//Azi: added devices
// temporary placement
// Akbar
{ 0x9480,0x3629103C,CHIP_FAMILY_M96/*RV730*/,"ATI Radeon HD 4650M",kShrike}, // hp OK
{ 0x9480,0x3628103C,CHIP_FAMILY_M96/*RV730*/,"ATI Radeon HD 4650M",kShrike}, // hp OK
// issue #88
{ 0x6741,0x1646103C,CHIP_FAMILY_TURKS,/*??*/"AMD Radeon HD 6750M",kNull}, // - review turks
// issue #121

Archive Download the corresponding diff file

Revision: 1212