NetBSD Problem Report #53410

From hf@spg.tu-darmstadt.de  Thu Jun 28 14:58:04 2018
Return-Path: <hf@spg.tu-darmstadt.de>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id B3FD27A1A1
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 28 Jun 2018 14:58:04 +0000 (UTC)
Message-Id: <201806281456.w5SEuI2r000876@Gstoder.nt.e-technik.tu-darmstadt.de>
Date: Thu, 28 Jun 2018 16:56:18 +0200 (CEST)
From: Hauke Fath <hf@spg.tu-darmstadt.de>
Reply-To: Hauke Fath <hf@spg.tu-darmstadt.de>
To: gnats-bugs@NetBSD.org
Cc: Hauke Fath <hf@spg.tu-darmstadt.de>
Subject: AMD Phenom II shows zero amdtemp0
X-Send-Pr-Version: 3.95

>Number:         53410
>Category:       kern
>Synopsis:       AMD Phenom II shows zero amdtemp0
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          analyzed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 28 15:00:00 +0000 2018
>Closed-Date:    
>Last-Modified:  Thu Jun 25 15:05:01 +0000 2020
>Originator:     Hauke Fath
>Release:        NetBSD 8.0_RC1
>Organization:
Technische Universitaet Darmstadt
>Environment:


System: NetBSD Gstoder 8.0_RC1 NetBSD 8.0_RC1 (GA-MA770-UD3-$Revision$) #0: Mon Jun 18 17:00:10 CEST 2018 hf@Hochstuhl:/var/obj/netbsd-builds/8/amd64/sys/arch/amd64/compile/GA-MA770-UD3 amd64
Architecture: x86_64
Machine: amd64
>Description:

	On an AMD Phenom II machine (board is GA-MA770-UD3)

cpu0 at mainbus0 apid 0
cpu0: AMD Phenom(tm) II X4 B50 Processor, id 0x100f42
cpu0: package 0, core 0, smt 0
cpu1 at mainbus0 apid 1
cpu1: AMD Phenom(tm) II X4 B50 Processor, id 0x100f42
cpu1: package 0, core 1, smt 0
cpu2 at mainbus0 apid 2
cpu2: AMD Phenom(tm) II X4 B50 Processor, id 0x100f42
cpu2: package 0, core 3, smt 0
cpu3 at mainbus0 apid 3
cpu3: AMD Phenom(tm) II X4 B50 Processor, id 0x100f42
cpu3: package 0, core 2, smt 0

	the amdtemp(4) sensor attached as

amdnb_misc0 at pci0 dev 24 function 3: AMD NB Misc Configuration
amdtemp0 at amdnb_misc0: AMD CPU Temperature Sensors (Family10h)

	shows a constant zero

% envstat -d amdtemp0
                    Current  CritMax  WarnMax  WarnMin  CritMin  Unit
cpu0 temperature:     0.000                                      degC
% 


>How-To-Repeat:

	Find your AMD Phenom II equipped machine powers off as
	overheated. While the bios confirms 80 C, NetBSD sensor
	readings are less than helpful.

	(Nor are the board's itesio0 readings:

[itesio0]
          CPU Temp:    42.000                                      degC
       System Temp:    49.000                                      degC
          Aux Temp:    80.000                                      degC

       [...] )


>Fix:
	Yes, please.



>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->analyzed
State-Changed-By: maxv@NetBSD.org
State-Changed-When: Thu, 27 Sep 2018 14:40:26 +0000
State-Changed-Why:
This is a hardware problem, given your CPU ID you seem to have had a 550
on which you unlocked cores and got a B50. Unlocking cores breaks the
thermal sensor, see on google, it's a known problem.

I too have an unlocked AMD Phenom II, and I too see the issue.

Try to lock back the cores, you will see envstat works.

If anything, we could explicitly not enable amdtemp0 if the CPU has the
thermal sensor off, but there doesn't seem to be any way to detect that.


From: "Jukka Ruohonen" <jruoho@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/53410 CVS commit: src
Date: Thu, 25 Jun 2020 15:01:36 +0000

 Module Name:	src
 Committed By:	jruoho
 Date:		Thu Jun 25 15:01:36 UTC 2020

 Modified Files:
 	src/distrib/sets/lists/tests: mi
 	src/etc/mtree: NetBSD.dist.tests
 	src/tests/sbin: Makefile
 Added Files:
 	src/tests/sbin/envstat: Makefile t_envstat.sh

 Log Message:
 Add a test case for PR kern/53410.


 To generate a diff of this commit:
 cvs rdiff -u -r1.849 -r1.850 src/distrib/sets/lists/tests/mi
 cvs rdiff -u -r1.166 -r1.167 src/etc/mtree/NetBSD.dist.tests
 cvs rdiff -u -r1.7 -r1.8 src/tests/sbin/Makefile
 cvs rdiff -u -r0 -r1.1 src/tests/sbin/envstat/Makefile \
     src/tests/sbin/envstat/t_envstat.sh

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.