All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] reading on-die temperature sensor of AMD A10 5700 processor
Date: Thu, 15 Aug 2013 05:30:47 +0000	[thread overview]
Message-ID: <520C6787.3010903@roeck-us.net> (raw)
In-Reply-To: <CAFSPGzQyxOOhjawcQj=wH+k1b=OC1gGf6CKWoU89TWVTykNcOQ@mail.gmail.com>

On 08/14/2013 09:32 PM, Dev, Kapil wrote:
>
>
> On Thu, Aug 15, 2013 at 12:29 AM, Guenter Roeck <linux@roeck-us.net <mailto:linux@roeck-us.net>> wrote:
>
>     On 08/14/2013 09:16 PM, Dev, Kapil wrote:
>
>         Hi,
>
>         Sorry for the verbose email. I am trying to read the temperature value as accurately as possible, that's why.
>
>         It is evident that there are some computations happening internally before these values are reported. Here is what I have to say about the 4.5C reported value.
>
>         I am using A10 5700 APU amd processor. It has bulldozer architecure (http://www.cpu-world.com/__CPUs/Bulldozer/TYPE-A10-__Series.html <http://www.cpu-world.com/CPUs/Bulldozer/TYPE-A10-Series.html>). Bulldozer architecture corresponds to 15h micro-architecture family  (http://en.wikipedia.org/wiki/__List_of_AMD_CPU___microarchitectures <http://en.wikipedia.org/wiki/List_of_AMD_CPU_microarchitectures>). So, I looked at the official manual of 15h family http://support.amd.com/us/__Processor_TechDocs/42301_15h___Mod_00h-0Fh_BKDG.pdf <http://support.amd.com/us/Processor_TechDocs/42301_15h_Mod_00h-0Fh_BKDG.pdf>). And, I found the following:
>
>         Page 219 and 393 (figure-14) of the document mention that bits 31:21 (11 bits) of the register D18F3xA4 denote the current temperature of the die as reported by temperature calculation circuit (TCC). The maximum value that could be represented by 11 bits is 2048 (2047, but ignore this for now) and they want to translate that to 256. So, I think the magic number 125 is obtained by computing 256/2048*1000. Line number 66-68 in k10temp.c (as downloaded from the drivers' link) use 125 as the factor to compute the value to be reported. I guess the factor of 1000 would be taken care somewhere else inside the kernel.
>
>     The kernel reports the temperature to userland in milli-degrees Celsius.
>
>
>         It also means that the lowest resolution of reading the temperature is 0.125C, which might mean that we could get a sub-degree resolution in temperature reading?
>
>     ... which also answers this question.
>
>
> Thanks! Does it mean that I can change the k10temp.c to read milli-degree C. I have always seen integer readings.
>
No. The value in the sysfs attribute file is already reported in milli-degrees C;
this is what the driver prints. The sensors command converts it into degrees C.
If the sensors command reports 4.5 degrees C, the sysfs attribute value is 4500.

Guenter


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

  parent reply	other threads:[~2013-08-15  5:30 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-13 19:05 [lm-sensors] reading on-die temperature sensor of AMD A10 5700 processor Dev, Kapil
2013-08-13 20:27 ` Guenter Roeck
2013-08-13 21:11 ` Dev, Kapil
2013-08-13 21:51 ` Guenter Roeck
2013-08-14  2:41 ` Dev, Kapil
2013-08-14  3:02 ` Guenter Roeck
2013-08-14  3:09 ` Dev, Kapil
2013-08-14  4:56 ` Guenter Roeck
2013-08-14  5:17 ` Kapil Dev
2013-08-14  5:30 ` Guenter Roeck
2013-08-14  5:32 ` Phil Pokorny
2013-08-14 17:20 ` Dev, Kapil
2013-08-14 18:29 ` Guenter Roeck
2013-08-14 18:33 ` Guenter Roeck
2013-08-14 19:06 ` Dev, Kapil
2013-08-14 20:03 ` Guenter Roeck
2013-08-14 20:45 ` Dev, Kapil
2013-08-14 22:39 ` Guenter Roeck
2013-08-15  4:16 ` Dev, Kapil
2013-08-15  4:29 ` Guenter Roeck
2013-08-15  4:32 ` Dev, Kapil
2013-08-15  5:30 ` Guenter Roeck [this message]
2013-08-15  7:55 ` Clemens Ladisch
2013-08-16  3:48 ` Dev, Kapil
2013-08-16  7:03 ` Clemens Ladisch
2013-08-16  8:57 ` Kapil Dev
2013-08-16  9:27 ` Clemens Ladisch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=520C6787.3010903@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=lm-sensors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.