[lm-sensors] AMD K10 (Phenom) Sensor Module

Rudolf Marek r.marek at assembler.cz
Wed Apr 16 18:07:02 CEST 2008

Hi Fred,

I think we can CC the list too, so others know that we work on this. I'm CCing 
some people which got interrested too.

> Now I'm down to the specifics peculiar to the k10 family.  I see that 
> the calculation for CurTmp is different for k10,
> but am a bit confused on the core selection code as pertains to the k10 
> and a bit lost in the AMD BKDG.  Seems to
> be a bit of conflict on how many sensors there are (1 vs. 4).  It also 

I think it is just one, It might be undocumented for any other sensors.

> appears that the k10 reports a relative temp rather
> than an absolute (referenced to 49) like the k8's did.

Yes the temperature is just non-physical. So to make the driver sense we need to 
know the MAX value. The thermal guide is still not published, but Jordan is 
hopefully still trying ;) There is some suspicion that it is 70C (TControlMAX 
from older processor family).

I'm trying too, but now I want to get sorted some errata problems - k8temps are 
sometimes wrong. Btw all K10 processors still suffers from errata 319 Inaccurate 
Temperature Measurement

The internal thermal sensor used for CurTmp (F3xA4[31:21]), hardware thermal 
control (HTC), software thermal control (STC), and the sideband temperature 
sensor interface (SB-TSI) may report inconsistent values.

So question is if to go for the driver at all :/

> Eventually, I was thinking that this driver should be called kxtemp, or 
> something similar and support both k8/k10.
> There would need to be a bit more work on CPUID, but that shouldn't be 
> too difficult.  Anyway, as an example, I have:
>    #define TEMP_FROM_REG_K08(val)   (((((val) >> 16) & 0xff) - 49) * 1000)
>    #define TEMP_FROM_REG_K10(val)   (((((val) >> 16) & 0xff) /  8) * 1000)

Hmm the reg is 0xA4 and temp is in bits 31:21 so perhaps >>16 is wrong too?

> Haven't subscribed to lm-sensors since it appears that you are basically 
> the only one working on this.  I need some guidance,
> but am willing to help.  Am an old (rusty) kernel hacker, though have 
> not played with CPU/NB registers before.  Mostly
> peripheral drivers and tcp/ip stack code tuning.

Well never mind I can certainly help.

> Look forward to working with you on this,

Question is if we can go just for one driver, it depends on amount of changes.
I'm attaching some striped down version driver, which MIGHT work. Quick hack, 
but well will see.

Just replace your k8temp.c with one attached and recompile kernel. Run 
sufficiently knew 'sensors' command, maybe it will print something useful ;)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: k8temp.c
Type: application/octet
Size: 4651 bytes
Desc: not available
URL: <http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20080416/c0713f13/attachment.bin>

More information about the lm-sensors mailing list