[prev in list] [next in list] [prev in thread] [next in thread]
List: netbsd-port-i386
Subject: Re: Surely cpumodel isn't cumulative?
From: Stephen Borrill <netbsd () precedence ! co ! uk>
Date: 2009-11-30 16:02:04
Message-ID: Pine.NEB.4.64.0911301601140.4694 () ugly ! internal ! precedence ! co ! uk
[Download RAW message or body]
On Mon, 30 Nov 2009, Christoph Egger wrote:
>> On Mon, 30 Nov 2009, Stephen Borrill wrote:
>>>> From i386/coretemp.c:
>>>
>>> cpumodel = CPUID2MODEL(ci->ci_signature);
>>> /* extended model */
>>> cpumodel += CPUID2EXTMODEL(ci->ci_signature);
>>>
>>> But EXTMODEL is extra detail within a given model, they
>>> can't be added together.
>>>
>>> i.e. model 0xe with ext model 0x1 is not the same as 0xf.
>>>
>>> Any unforeseen issues with just removing the second cpumodel
>>> line (or altering it to cpuextmodel)?
>>
>> This patch works for me on Xeon X3430:
>>
>> --- coretemp.c 25 Mar 2009 22:53:51 -0000 1.12
>> +++ coretemp.c 30 Nov 2009 15:28:40 -0000
>> @@ -67,7 +67,7 @@
>> struct coretemp_softc *sc;
>> uint32_t regs[4];
>> uint64_t msr;
>> - int cpumodel, cpumask;
>> + int cpumodel, cpuextmodel, cpumask;
>>
>> /*
>> * CPUID 0x06 returns 1 if the processor has on-die thermal
>> @@ -85,7 +85,7 @@
>> (int)device_unit(ci->ci_dev));
>> cpumodel = CPUID2MODEL(ci->ci_signature);
>> /* extended model */
>> - cpumodel += CPUID2EXTMODEL(ci->ci_signature);
>> + cpuextmodel = CPUID2EXTMODEL(ci->ci_signature);
>> cpumask = ci->ci_signature & 15;
>
> On AMD you would write here:
>
> if (cpumodel == 0xf)
> cpumodel += cpuextmodel;
>
> and the hunk below would work unchanged.
> Check the Intel docs if you can do that on Intel, too.
No, you can't:
See page 16:
http://www.intel.com/Assets/en_US/PDF/specupdate/322373.pdf
--
Stephen
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic