Re: Wrong temperature with AMD and amdtemp.ko

From: Don Lewis <truckman_at_FreeBSD.org>
Date: Fri, 2 Oct 2015 14:32:28 -0700 (PDT)
On  2 Oct, Willem Jan Withagen wrote:
> 
> Hi
> 
> 10.2-STABLE FreeBSD 10.2-STABLE #0 r287102: Mon Aug 24
> 
> Processor: Opteron 6812, in Supermicro H8SGL
> 
> dev.cpu.7.temperature: 11.1C
> dev.cpu.6.temperature: 11.1C
> dev.cpu.5.temperature: 11.1C
> dev.cpu.4.temperature: 11.1C
> dev.cpu.3.temperature: 11.1C
> dev.cpu.2.temperature: 11.1C
> dev.cpu.1.temperature: 11.1C
> dev.cpu.0.temperature: 11.1C
> 
> But I'm pretty sure it is not 11.1C in the datacenter....
> 
> Or should I not use amdtemp.ko for this?

The definition of the value that can be read from the temperature
register is pretty strange.  For AMD Family 15h processors, the BIOS and
Kernel Developer's Guide (BKDG) says this:

  Tctl is a processor temperature control value used for processor
  thermal management. Tctl is accessible through D18F3xA4[CurTmp].
  Tctl is a temperature on its own scale aligned to the processors
  cooling requirements. Therefore Tctl does not represent a temperature
  which could be measured on the die or the case of the processor.
  Instead, it specifies the processor temperature relative to the
  maximum operating temperature, Tctl,max. Tctl,max is specified in the
  power and thermal data sheet. Tctl is defined as follows for all
  parts:

  A: For Tctl = Tctl_max to 255.875: the temperature of the part is
  [Tctl - Tctl_max] over the maximum operat- ing temperature.  The
  processor may take corrective actions that affects performance, such
  as HTC, to support the return to Tctl range A.

  B: For Tctl = 0 to Tctl_max - 0.125: the temperature of the part is
  [Tctl_max - Tctl] under the maximum operating temperature.

It would be nice to report Tctl_max so that we could at least know how
far the temperature is from the limit, but I don't know if that is
available.  It might be the value in the HtcTmpLmt register, but the
BKDG is unclear about that.  If not, we would have to build a table of
values from the datasheet.
Received on Fri Oct 02 2015 - 19:32:41 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:00 UTC