amdtemp(4) issue

From: Norikatsu Shigemura <nork_at_FreeBSD.org>
Date: Wed, 5 May 2010 15:43:12 +0900
Hi jkim.

	I can't get CPU temperature via amdtemp(4).  So I researched, but
	I can't fix this issue, maybe initialization problem.  Please help
	me!

	1st issue in amdtemp_gettemp function:
		now:		offset += (diode_offset - 11) * 10;	is BAD
		should fix:	offset += (11 - diode_offset) * 10;	is OK
	According to AMD's BIOS and Kernel Developer's Guid (BKDG) For
	AMD Family 10th Processors, Rev 3.48 - April 22, 2010 [*],
	P327 - F3xE4 Thermtrip Status Register:

01h to 3Fh: correction = +11C - DiodeOffset, or {01h to 3Fh} = {+10C to -52C}.

	In fact, in my environment, DiodeOffset = 0x18 so 11-0x18=-13C.

11 - 0x01 = +10C
11 - 0x18 = -13C
11 - 0x3f = -52C

[*] http://support.amd.com/us/Processor_TechDocs/31116.pdf


	2nd issue, result of AMDTEMP_REPTMP_CTRL in amdtemp_gettemp function:
	I got following result:

May  5 15:06:53 nadesico kernel: amdtemp0: AMDTEMP_REPTMP_CTRL(temp) = 0xc1880

	So result (CurTmp: current temperature: 31:21) = 0C. (logic is OK)

	I got following thermal related registers in amdtemp_gettemp function:
May  5 15:06:53 nadesico kernel: amdtemp0: F3x64 Hardware Thermal Control(HTC) Register = 0x3a4c0005
May  5 15:06:53 nadesico kernel: amdtemp0: F3x68 Software Thermal Control(STC) Register = 0x10000000
May  5 15:06:53 nadesico kernel: amdtemp0: F3xA4 Reported Temperature Control Register  = 0x000c1880
May  5 15:06:53 nadesico kernel: amdtemp0: F3xE4 Thermtrip Status Register              = 0x1cc01830
May  5 15:06:53 nadesico kernel: amdtemp0: F3xE8 Northbridge Capabilities Register      = 0x0207df19

	But I don't have any idea to fix register's paraemters.  Do you
	have any idea?

-- 
Norikatsu Shigemura <nork_at_FreeBSD.org>
Received on Wed May 05 2010 - 04:43:19 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:03 UTC