From owner-freebsd-acpi@FreeBSD.ORG Sun Dec 6 03:49:59 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DFBDB106566C for ; Sun, 6 Dec 2009 03:49:58 +0000 (UTC) (envelope-from oberman@es.net) Received: from mailgw.es.net (mail3.es.net [IPv6:2001:400:4c01::2]) by mx1.freebsd.org (Postfix) with ESMTP id B2B028FC0C for ; Sun, 6 Dec 2009 03:49:57 +0000 (UTC) Received: from ptavv.es.net (ptavv.es.net [IPv6:2001:400:910::29]) by mailgw.es.net (8.14.3/8.14.3) with ESMTP id nB63nuxv008712 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 5 Dec 2009 19:49:56 -0800 Received: from ptavv.es.net (localhost [127.0.0.1]) by ptavv.es.net (Tachyon Server) with ESMTP id EF3331CC0B; Sat, 5 Dec 2009 19:49:55 -0800 (PST) To: Steven Friedrich In-reply-to: Your message of "Sat, 05 Dec 2009 12:42:42 EST." <200912051242.42894.freebsd@insightbb.com> Date: Sat, 05 Dec 2009 19:49:55 -0800 From: "Kevin Oberman" Message-Id: <20091206034955.EF3331CC0B@ptavv.es.net> X-Proofpoint-Virus-Version: vendor=fsecure engine=1.12.8161:2.4.5, 1.2.40, 4.0.166 definitions=2009-12-05_02:2009-11-30, 2009-12-05, 2009-12-05 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=5.0.0-0908210000 definitions=main-0912050289 Cc: freebsd-acpi@freebsd.org Subject: Re: ACPI temperature X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2009 03:49:59 -0000 > From: Steven Friedrich > Date: Sat, 5 Dec 2009 12:42:42 -0500 > > On Saturday 05 December 2009 12:24:34 am you wrote: > > > From: Steven Friedrich > > > Date: Fri, 4 Dec 2009 23:37:04 -0500 > > > Sender: owner-freebsd-acpi@freebsd.org > > > > > > I sent this to questions last Sunday, but only one person responded. He's > > > running FreeBSD 8 and I think his system is reporting bogus temps too. > > > I think there might be a missing scaling factor. I'm a hardware guy, but > > > I don't currently have temperature measuring equipment and I would want > > > to do it on one of my towers (which are currently in storage), not my > > > laptop anyway. > > > > > > I booted my HP Pavilion zd8215us and I immediately invoked > > > chkCPUTemperature. The first temp reported was 52C, which is 125.6F. This > > > leads me to believe that acpi has an anomaly regarding temperature > > > measurement. The ambient temp was 71F (21.6C). The machine had been off > > > for over eight hours. > > > > > > Here's chkCPUTemperature: > > > > > > #!/bin/sh > > > # $Id:$ > > > # > > > > > > # CPU Temperature Information from ACPI > > > POLLING_RATE=`sysctl hw.acpi.thermal.polling_rate|awk '{print $2}'` > > > while [ 1 ] > > > do > > > sysctl hw.acpi.thermal.tz0.temperature > > > sleep $POLLING_RATE > > > done > > > > > > uname -a > > > FreeBSD laptop2.StevenFriedrich.org 7.2-RELEASE-p4 FreeBSD 7.2-RELEASE-p4 > > > #1: > > > > Why do you not believe the report? The temperature reported is usually > > measured on the die, not the package. (You couldn't measure it externally, > > if you wanted to.) Due to the VERY low thermal mass of the die, it heats > > up very quickly. > > > I've been running FreeBSD on this laptop since 2005 and only in the past month > has it started shutting down when the temp it 81C. So I found the sysctl where > it reports the temp and I wrote chkCPUTemperature, a bourne script to check > the temp every 10 seconds. > > I have placed 1/2 inch spacers, ok, bottle caps from 2 litre bottles, > under the four corners and it's not shutting down now. I'm an old > hardware guy and I understand the die vs package issue, but what's the > temp diff between the two? I was hoping to spark some interest in this > issue with someone who has the ability to verify the actual temp with > the reported temp. I was trying to find a linux user that might be > seeing something different, possibly indicating that FreeBSD's ACPI > port has a bug not in the linux code. I hate to suggest this to an old hardware guy, but have you blown out your heat sink lately? On my laptop I do that about annually. The first time I did it the temperature of the CPU when the system was idle dropped by 12C. The temperature during a buildworld dropped from 91C to 72C. Of course, you may have already done this. While it is possible that your system is tickling a bug, it really seems unlikely. Again, the temperature read is one of the most trivial ACPI operations. It is not uncommon to not get a temperature at all and it is possible that a system is reporting it incorrectly. It's even possible that the thermal sensor on the die is defective, I really have a hard time believing that the ACPI code in FreeBSD is having a problem with this. There is no scaling. Just take the reported temperature and add 273. You can try booting up a Knoppix CD and see if it reports something different, but FreeBSD and Linux share the same ACPI code which is actually written and supported by Intel, though both do adjust it for their systems. I'm betting that Linux will show the same results as FreeBSD, whether it's right on not. -- R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman@es.net Phone: +1 510 486-8634 Key fingerprint:059B 2DDF 031C 9BA3 14A4 EADA 927D EBB3 987B 3751 From owner-freebsd-acpi@FreeBSD.ORG Sun Dec 6 18:05:09 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E78E4106568D for ; Sun, 6 Dec 2009 18:05:09 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.27]) by mx1.freebsd.org (Postfix) with ESMTP id 760BA8FC22 for ; Sun, 6 Dec 2009 18:05:09 +0000 (UTC) Received: by ey-out-2122.google.com with SMTP id 22so974914eye.9 for ; Sun, 06 Dec 2009 10:05:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:cc:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=5G02IMrT/FRkpXOJNkM6+mM+765MF8EQM1zh6G9Rf/0=; b=mM7gJZ+Dm+/4GzvxR9nAdy3StRwfP/64eyS+NZklDYWrd/XE5h67Qu2DoJJTJTbAh6 4CYMj4YJh5FIZO1gTn3waOynMWJNNS0lqYbK1Vh4/Lg9BW5IYAjgw0iGTd7ztnyXRyPl VMbRl32zi8DGEtOjIRqZgTc76RxGMNge++kvs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=nTaqwEdLm1m9kGFSNBp97YOhNaJpBFZTqAzeVM8Nr8/qvi01r+hPa7C6rS4/Cgn9ju ryvpZHFma3QYLa0neRlVdLvt2Mv/82TQUFtJtprYcOxmM6xeyvZM2LR2eobM7GqoFueR t5YwxA87iEO0SeYvRPDq2/ztKoT1G2GBImbDo= Received: by 10.213.2.70 with SMTP id 6mr13372623ebi.25.1260122707099; Sun, 06 Dec 2009 10:05:07 -0800 (PST) Received: from rui-macbook.lan (bl6-157-203.dsl.telepac.pt [82.155.157.203]) by mx.google.com with ESMTPS id 15sm2993850ewy.0.2009.12.06.10.05.05 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 06 Dec 2009 10:05:06 -0800 (PST) Sender: Rui Paulo Message-Id: From: Rui Paulo To: Steven Friedrich In-Reply-To: <200912042337.04403.freebsd@insightbb.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Sun, 6 Dec 2009 18:05:04 +0000 References: <200912042337.04403.freebsd@insightbb.com> X-Mailer: Apple Mail (2.936) Cc: freebsd-acpi@freebsd.org Subject: Re: ACPI temperature X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2009 18:05:10 -0000 On 5 Dec 2009, at 04:37, Steven Friedrich wrote: > I sent this to questions last Sunday, but only one person responded. > He's > running FreeBSD 8 and I think his system is reporting bogus temps too. > I think there might be a missing scaling factor. I'm a hardware guy, > but I > don't currently have temperature measuring equipment and I would > want to do it > on one of my towers (which are currently in storage), not my laptop > anyway. > > I booted my HP Pavilion zd8215us and I immediately invoked > chkCPUTemperature. > The first temp reported was 52C, which is 125.6F. This leads me to > believe > that acpi has an anomaly regarding temperature measurement. The > ambient temp > was 71F (21.6C). The machine had been off for over eight hours. As others have said, 52C is pretty normal. -- Rui Paulo From owner-freebsd-acpi@FreeBSD.ORG Sun Dec 6 21:34:01 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7ED6A10656A3 for ; Sun, 6 Dec 2009 21:34:01 +0000 (UTC) (envelope-from freebsd@insightbb.com) Received: from mxsf03.insightbb.com (mxsf03.insightbb.com [74.128.0.64]) by mx1.freebsd.org (Postfix) with ESMTP id 4A6058FC0C for ; Sun, 6 Dec 2009 21:34:01 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.47,350,1257138000"; d="scan'208";a="767466394" Received: from unknown (HELO asav03.insightbb.com) ([172.31.249.123]) by mxsf03.insightbb.com with ESMTP; 06 Dec 2009 16:33:59 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArgEAJ+xG0vQLicL/2dsb2JhbACBTNNOhDME X-IronPort-AV: E=Sophos;i="4.47,350,1257138000"; d="scan'208";a="116319130" Received: from 208-46-39-11.dia.static.qwest.net (HELO laptop2.stevenfriedrich.org) ([208.46.39.11]) by asavout03.insightbb.com with ESMTP; 06 Dec 2009 16:33:59 -0500 From: Steven Friedrich To: Kevin Oberman Date: Sun, 6 Dec 2009 16:33:53 -0500 User-Agent: KMail/1.12.4 (FreeBSD/7.2-RELEASE-p5; KDE/4.3.4; i386; ; ) References: <20091206034955.EF3331CC0B@ptavv.es.net> In-Reply-To: <20091206034955.EF3331CC0B@ptavv.es.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200912061633.53472.freebsd@insightbb.com> Cc: freebsd-acpi@freebsd.org Subject: Re: ACPI temperature X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2009 21:34:01 -0000 On Saturday 05 December 2009 10:49:55 pm Kevin Oberman wrote: > I hate to suggest this to an old hardware guy, but have you blown out > your heat sink lately? On my laptop I do that about annually. The first > time I did it the temperature of the CPU when the system was idle > dropped by 12C. The temperature during a buildworld dropped from 91C to > 72C. Of course, you may have already done this. No offense taken if none intended 8o) I have thus far avoided cracking the case (it's a euphemism) because of the law of unintended consequences (Murphy's Law tends to bite you when you can least afford to deal with it), but I haven't even yet inspected the fans very closely. I say closely because I did perform a rudimentary check and there was very little dust accumulated on the blades. I'll get a baseline temp and then clean them. I didn't chase that idea already because the system just recently started being temp sensitive and I thought it might be related to recent changes in the ACPI code from Intel. I appreciate your suggestion. > You can try booting up a Knoppix CD and see if it reports something > different, but FreeBSD and Linux share the same ACPI code which is > actually written and supported by Intel, though both do adjust it for > their systems. I'm betting that Linux will show the same results as > FreeBSD, whether it's right on not. > I like the suggestion. I'll try it. From owner-freebsd-acpi@FreeBSD.ORG Sun Dec 6 21:52:35 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB2C2106568B for ; Sun, 6 Dec 2009 21:52:35 +0000 (UTC) (envelope-from f0andrey@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.154]) by mx1.freebsd.org (Postfix) with ESMTP id 6588B8FC13 for ; Sun, 6 Dec 2009 21:52:34 +0000 (UTC) Received: by fg-out-1718.google.com with SMTP id 16so502564fgg.13 for ; Sun, 06 Dec 2009 13:52:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=17r/dX3D9Et9QdCSyzVE+RffiHLYFHT6oY6dfgJqOdw=; b=KeErQARi29ILW4EStx42gIkBufShgUji6465E66QzGaU7WJN9P/GyJk7dw+miTlFaH KkeaUqv+TrCdylRFRcY72yPjyoumn6Z/YVSj60Yx9jG7CaqI4BdiX3Ubi2A/V3fqfnLk 1rhXirbgE0/l7HAzin5yKM4GW8rxAmNJsT5hM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=oR635ay0KYn/KqI6lI5vPjnQyA25bslPGxoIQANVkJ6IWks1x1JGi75rPz+lLX4562 mfBoGfd0Ty5NZ21Axwk54TKzAs8gEwdxS/ujzQIkZVjb/Vb/srN4FFCi5RwFWwCZX7ml tFjh88CmynmaKm+Z/Y8LBnQ4zPD69z5i1RVn8= MIME-Version: 1.0 Received: by 10.239.199.199 with SMTP id i7mr618062hbj.204.1260134461570; Sun, 06 Dec 2009 13:21:01 -0800 (PST) Date: Mon, 7 Dec 2009 00:21:01 +0300 Message-ID: <19e7832a0912061321g87c9f32sf57a7a60000295ad@mail.gmail.com> From: Andrey Fesenko To: freebsd-acpi@freebsd.org Content-Type: text/plain; charset=UTF-8 Subject: Not boot Lenovo SL400, ACPI all version amd64 X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2009 21:52:35 -0000 Hello Laptop Lenovo SL400, all version FreeBSD-amd64 not boot. with ACPI - panic - not dump, without ACPI - many irq not configure, boot frozen. set hw.acpi.osname="Windows 2006" and Linux not work, frozen i386 version boot, install and work - ok From owner-freebsd-acpi@FreeBSD.ORG Mon Dec 7 00:13:07 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DAC06106566B for ; Mon, 7 Dec 2009 00:13:07 +0000 (UTC) (envelope-from oberman@es.net) Received: from mailgw.es.net (mail4.es.net [IPv6:2001:400:6000:6::2]) by mx1.freebsd.org (Postfix) with ESMTP id 8CCB88FC1C for ; Mon, 7 Dec 2009 00:13:06 +0000 (UTC) Received: from ptavv.es.net (ptavv.es.net [IPv6:2001:400:910::29]) by mailgw.es.net (8.14.3/8.14.3) with ESMTP id nB70D47G016772 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 6 Dec 2009 16:13:05 -0800 Received: from ptavv.es.net (localhost [127.0.0.1]) by ptavv.es.net (Tachyon Server) with ESMTP id B32C81CC0B; Sun, 6 Dec 2009 16:13:03 -0800 (PST) To: Steven Friedrich In-reply-to: Your message of "Sun, 06 Dec 2009 16:33:53 EST." <200912061633.53472.freebsd@insightbb.com> Date: Sun, 06 Dec 2009 16:13:03 -0800 From: "Kevin Oberman" Message-Id: <20091207001303.B32C81CC0B@ptavv.es.net> X-Proofpoint-Virus-Version: vendor=fsecure engine=1.12.8161:2.4.5, 1.2.40, 4.0.166 definitions=2009-12-06_01:2009-11-30, 2009-12-06, 2009-12-06 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 phishscore=0 bulkscore=9 adultscore=0 classifier=spam adjust=0 reason=mlx engine=5.0.0-0908210000 definitions=main-0912060229 Cc: freebsd-acpi@freebsd.org Subject: Re: ACPI temperature X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2009 00:13:07 -0000 > From: Steven Friedrich > Date: Sun, 6 Dec 2009 16:33:53 -0500 > > On Saturday 05 December 2009 10:49:55 pm Kevin Oberman wrote: > > I hate to suggest this to an old hardware guy, but have you blown out > > your heat sink lately? On my laptop I do that about annually. The first > > time I did it the temperature of the CPU when the system was idle > > dropped by 12C. The temperature during a buildworld dropped from 91C to > > 72C. Of course, you may have already done this. > > No offense taken if none intended 8o) > > I have thus far avoided cracking the case (it's a euphemism) because of the > law of unintended consequences (Murphy's Law tends to bite you when you can > least afford to deal with it), but I haven't even yet inspected the fans very > closely. I say closely because I did perform a rudimentary check and there was > very little dust accumulated on the blades. I'll get a baseline temp and then > clean them. > > I didn't chase that idea already because the system just recently started > being temp sensitive and I thought it might be related to recent changes in > the ACPI code from Intel. > > I appreciate your suggestion. > > > You can try booting up a Knoppix CD and see if it reports something > > different, but FreeBSD and Linux share the same ACPI code which is > > actually written and supported by Intel, though both do adjust it for > > their systems. I'm betting that Linux will show the same results as > > FreeBSD, whether it's right on not. > > > I like the suggestion. I'll try it. On may laptops you only need to remove the keyboard to do this. I suggest, if you can see the intake side of the heatsink, that you blow into the exhaust. For my ThinkPad, the procedure takes under 10 minutes. I'd also like to mention that FreeBSD does not enable a lot of power management capabilities by default. Some have the potential of causing the system to lock-up on some hardware. You can read up on this at: http://wiki.freebsd.org/TuningPowerConsumption This tuning can save power and reduce temperature. While I can't swear that it's not the ACPI code, the temps on my system are still fairly normal and there is no difference I am aware of on how this works between vendors, though ACPI is flexible enough that it is possible, I suppose. -- R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman@es.net Phone: +1 510 486-8634 Key fingerprint:059B 2DDF 031C 9BA3 14A4 EADA 927D EBB3 987B 3751 From owner-freebsd-acpi@FreeBSD.ORG Mon Dec 7 03:37:30 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA068106566B for ; Mon, 7 Dec 2009 03:37:30 +0000 (UTC) (envelope-from gaijin.k@gmail.com) Received: from mail-vw0-f194.google.com (mail-vw0-f194.google.com [209.85.212.194]) by mx1.freebsd.org (Postfix) with ESMTP id 6CC9E8FC13 for ; Mon, 7 Dec 2009 03:37:30 +0000 (UTC) Received: by vws32 with SMTP id 32so855371vws.8 for ; Sun, 06 Dec 2009 19:37:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=JyzPXzuIRRFnY6aUe3oK+QRkvf+++T8XLw7wRpoKyyI=; b=g+2sFX7QQdiGtv7LMBP9dJx1z0IsO+PwvtAQs5dYWC4T2+9BsOepPJ7gLheuyakxAo e7CBNIalML+x93axkWuZiNWx3BRpsB8pQAvX0CpcfXU8IDF6FcgomWHKXJu8r/55ROHB +khq3CKaEebkBMYmgKaS0CQTJTJxcZuBS82Uc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=TgMpY/BT0hWVbvp9dJNZsqFvuujFEnNoMCMQdBocHL5l+JRroOLDbKJv+WaFDTOi2p O2wqrMT4+Md1QKSjGcQBw6cf+5LrsM0QGxbwSMqcL8RRodiqEgWerOE8Mh/pZTLrVoS7 ykqgrfPwVpe5n4z0FhqglmODzlkrso0ncoTxA= Received: by 10.220.124.226 with SMTP id v34mr7616017vcr.68.1260155155675; Sun, 06 Dec 2009 19:05:55 -0800 (PST) Received: from ?10.0.3.231? (pool-173-70-28-149.nwrknj.fios.verizon.net [173.70.28.149]) by mx.google.com with ESMTPS id 22sm11535407vws.14.2009.12.06.19.05.53 (version=SSLv3 cipher=RC4-MD5); Sun, 06 Dec 2009 19:05:54 -0800 (PST) From: "Alexandre \"Sunny\" Kovalenko" To: Steven Friedrich In-Reply-To: <200912042337.04403.freebsd@insightbb.com> References: <200912042337.04403.freebsd@insightbb.com> Content-Type: text/plain; charset="UTF-8" Date: Sun, 06 Dec 2009 01:21:41 -0500 Message-ID: <1260080501.1745.32.camel@RabbitsDen> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 8bit Cc: freebsd-acpi@freebsd.org Subject: Re: ACPI temperature X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2009 03:37:30 -0000 On Fri, 2009-12-04 at 23:37 -0500, Steven Friedrich wrote: > I sent this to questions last Sunday, but only one person responded. He's > running FreeBSD 8 and I think his system is reporting bogus temps too. > I think there might be a missing scaling factor. I'm a hardware guy, but I > don't currently have temperature measuring equipment and I would want to do it > on one of my towers (which are currently in storage), not my laptop anyway. > > I booted my HP Pavilion zd8215us and I immediately invoked chkCPUTemperature. > The first temp reported was 52C, which is 125.6F. This leads me to believe > that acpi has an anomaly regarding temperature measurement. The ambient temp > was 71F (21.6C). The machine had been off for over eight hours. > > Here's chkCPUTemperature: > > #!/bin/sh > # $Id:$ > # > > # CPU Temperature Information from ACPI > POLLING_RATE=`sysctl hw.acpi.thermal.polling_rate|awk '{print $2}'` > while [ 1 ] > do > sysctl hw.acpi.thermal.tz0.temperature > sleep $POLLING_RATE > done > > uname -a > FreeBSD laptop2.StevenFriedrich.org 7.2-RELEASE-p4 FreeBSD 7.2-RELEASE-p4 #1: > Sat Oct 3 18:47:43 EDT 2009 > root@laptop2.StevenFriedrich.org:/usr/obj/usr/src/sys/LAPTOP i386 > _______________________________________________ > freebsd-acpi@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-acpi > To unsubscribe, send any mail to "freebsd-acpi-unsubscribe@freebsd.org" First, I fully agree with what other people said elsewhere on this thread -- thermal hygiene is important for the laptops. I have not seen anyone mentioning disconnecting the heatsink cleaning it completely and reapplying reasonable amount of thermal paste, with the "reasonable" being a key word -- I have run into few IBM ThinkPads and one Sony Vaio where manufacturing people used teaspoons of the stuff. However, there are few things you can check on the software side: * Does tz0 correspond to the CPU sensor (on my ThinkPad X60 CPU is, actually, tz1)? Full output of sysctl hw.acpi might be of a value here. * Are you using acpi_hp(4)? If yes, full output of sysctl dev.acpi_hp might be useful. * Are you setting Cx states? Output of sysctl dev.cpu will help. * Are you using powerd? With custom flags? Output of grep powerd /etc/rc.conf might be useful. * You can reduce passive cooling threshold by setting something like hw.acpi.thermal.tz1.passive_cooling=1 hw.acpi.thermal.user_override=1 hw.acpi.thermal.tz1._PSV=75C This will make your machine slower, but cooler. Please, note that, in my laptop CPU is in the tz1 -- you will have to put the right one there. * You can dump your ASL into the file (look into Handbook for instruction on how to do that) and look for _TMP method in the appropriate thermal zone. Errors in that method tend to be somewhat obvious, like forgetting to multiply value by 10, but I have also seen _TMP methods that actually drive cooling fans instead. If logic looks complex and things like "If ( ("Windows blah blah"))" are abundant, you might want to tell system to pretend to be "Windows blah blah" (see Handbook) or edit it outright, recompile and override on boot (Handbook, again). If you've gone this far, I would recommend pulling out battery pack and keeping easy access to the power cord while experimenting. I would also recommend reading thermal chapter of ACPI specification -- it is short, relatively self-contained, and fairly well written. -- Alexandre Kovalenko (Олександр Коваленко) From owner-freebsd-acpi@FreeBSD.ORG Mon Dec 7 11:06:48 2009 Return-Path: Delivered-To: freebsd-acpi@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9A46106566C for ; Mon, 7 Dec 2009 11:06:48 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 7F4AA8FC12 for ; Mon, 7 Dec 2009 11:06:48 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id nB7B6mFp068384 for ; Mon, 7 Dec 2009 11:06:48 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id nB7B6lJf068382 for freebsd-acpi@FreeBSD.org; Mon, 7 Dec 2009 11:06:47 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 7 Dec 2009 11:06:47 GMT Message-Id: <200912071106.nB7B6lJf068382@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-acpi@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-acpi@FreeBSD.org X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2009 11:06:48 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/140979 acpi [acpi] [panic] Kernel panic (fatal trap 12: page fault o amd64/140751 acpi [acpi] BIOS resource allocation and FreeBSD ACPI in TO o kern/139088 acpi [acpi] ACPI Exception: AE_AML_INFINITE_LOOP error o amd64/138210 acpi [acpi] acer aspire 5536 ACPI problems (S3, brightness, o bin/137053 acpi [hang] FreeBSD 8.0 BETA2Compaq Mini 700 locks on boot o kern/137042 acpi [acpi] hp laptop's lcd not wakes up after suspend to r o kern/136808 acpi [acpi] panic when switching to s3 o i386/136008 acpi [acpi] Dell Vostro 1310 will not shutdown (Requires us o bin/135349 acpi [patch] teach acpidump(8) to disassemble arbitrary mem o kern/135070 acpi [acpi] [patch] BIOS resource allocation and FreeBSD AC o kern/132602 acpi [acpi] ACPI Problem with Intel SS4200: System does not o kern/130683 acpi [ACPI] shutdown hangs after syncing disks - ACPI race? o i386/129953 acpi [acpi] ACPI timeout (CDROM) with Shuttle X27D o kern/129618 acpi [acpi] Problem with ACPI on HP Pavilion DV2899 laptop o kern/129563 acpi [acpi] sleep broken on IBM/Lenovo T61 in amd64 mode f kern/128639 acpi [patch] [acpi_asus] acpi for ASUS A6F,A3E,A3F,A3N not f kern/128634 acpi [patch] fix acpi_asus(4) in asus a6f laptop o kern/127581 acpi [patch] [acpi_sony] Add support for more Sony features o kern/124744 acpi [acpi] [patch] incorrect _BST result validation for To o kern/124412 acpi [acpi] power off error on Toshiba M40 laptop o kern/123039 acpi [acpi] ACPI AML_BUFFER_LIMIT errors during boot o kern/121504 acpi [patch] Correctly set hw.acpi.osname on certain machin f kern/121454 acpi [pst] Promise SuperTrak SX6000 does not load during bo o amd64/121439 acpi [boot] Installation of FreeBSD 7.0 fails: ACPI problem o kern/121102 acpi [acpi_fujitsu] [patch] update acpi_fujitsu for the P80 o kern/120515 acpi [acpi] [patch] acpi_alloc_wakeup_handler: can't alloc o kern/119356 acpi [acpi]: i386 ACPI wakeup not work due resource exhaust o kern/119200 acpi [acpi] Lid close switch suspends CPU for 1 second on H o kern/118973 acpi [acpi]: Kernel panic with acpi boot o kern/117605 acpi [acpi] [request] add debug.cpufreq.highest o kern/116939 acpi [acpi] PCI-to-PCI misconfigured for bus three and can o i386/114562 acpi [acpi] cardbus is dead after s3 on Thinkpad T43 with a o kern/114165 acpi [acpi] Dell C810 - ACPI problem s kern/112544 acpi [acpi] [patch] Add High Precision Event Timer Driver f o kern/108954 acpi [acpi] 'sleep(1)' sleeps >1 seconds when speedstep (Cx o kern/108695 acpi [acpi]: Fatal trap 9: general protection fault when in o kern/108488 acpi [acpi] ACPI-1304: *** Error: Method execution failed o kern/108017 acpi [acpi]: Acer Aspire 5600 o kern/106924 acpi [acpi] ACPI resume returns g_vfs_done() errors and ker o kern/105537 acpi [acpi] problems in acpi on HP Compaq nc6320 o kern/104625 acpi ACPI on ASUS A8N-32 SLI/ASUS P4P800 does not show ther o kern/102252 acpi acpi thermal does not work on Abit AW8D (intel 975) o kern/97383 acpi Volume buttons on IBM Thinkpad crash system with ACPI s i386/91748 acpi acpi problem on Acer TravelMare 4652LMi (nvidia panic, s kern/91038 acpi [panic] [ata] [acpi] 6.0-RELEASE on Fujitsu Siemens Am s kern/90243 acpi Laptop fan doesn't turn off (ACPI enabled) (Packard Be o i386/83018 acpi [install] Installer will not boot on Asus P4S8X BIOS 1 f kern/81000 acpi [apic] Via 8235 sound card worked great with FreeBSD 5 o i386/79081 acpi ACPI suspend/resume not working on HP nx6110 o kern/76950 acpi ACPI wrongly blacklisted on Micron ClientPro 766Xi sys s kern/73823 acpi [request] acpi / power-on by timer support o i386/72566 acpi ACPI, FreeBSD disables fan on Compaq Armada 1750 o i386/69750 acpi Boot without ACPI failed on ASUS L5 o kern/56024 acpi ACPI suspend drains battery while in S3 o i386/55661 acpi ACPI suspend/resume problem on ARMADA M700 o i386/54756 acpi ACPI suspend/resume problem on CF-W2 laptop 56 problems total. From owner-freebsd-acpi@FreeBSD.ORG Mon Dec 7 19:10:03 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80269106566B for ; Mon, 7 Dec 2009 19:10:03 +0000 (UTC) (envelope-from taku@tackymt.homeip.net) Received: from basalt.tackymt.homeip.net (unknown [IPv6:2001:3e0:577:0:20d:61ff:fecc:2253]) by mx1.freebsd.org (Postfix) with ESMTP id 2386A8FC19 for ; Mon, 7 Dec 2009 19:10:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by basalt.tackymt.homeip.net (Postfix) with ESMTP id 195F61074E for ; Tue, 8 Dec 2009 04:10:02 +0900 (JST) X-Virus-Scanned: amavisd-new at tackymt.homeip.net Received: from localhost ([127.0.0.1]) by localhost (basalt.tackymt.homeip.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xIpd7FSWeLIa for ; Tue, 8 Dec 2009 04:10:00 +0900 (JST) Received: from basalt.tackymt.homeip.net (basalt.tackymt.homeip.net [IPv6:2001:3e0:577:0:20d:61ff:fecc:2253]) by basalt.tackymt.homeip.net (Postfix) with ESMTP for ; Tue, 8 Dec 2009 04:10:00 +0900 (JST) Date: Tue, 8 Dec 2009 04:10:00 +0900 From: Taku YAMAMOTO To: freebsd-acpi@freebsd.org Message-Id: <20091208041000.1d2f75f8.taku@tackymt.homeip.net> In-Reply-To: <200912042337.04403.freebsd@insightbb.com> References: <200912042337.04403.freebsd@insightbb.com> X-Mailer: Sylpheed 2.4.8 (GTK+ 2.16.6; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: ACPI temperature X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2009 19:10:03 -0000 On Fri, 4 Dec 2009 23:37:04 -0500 Steven Friedrich wrote: > I sent this to questions last Sunday, but only one person responded. He's > running FreeBSD 8 and I think his system is reporting bogus temps too. > I think there might be a missing scaling factor. I'm a hardware guy, but I > don't currently have temperature measuring equipment and I would want to do it > on one of my towers (which are currently in storage), not my laptop anyway. > > I booted my HP Pavilion zd8215us and I immediately invoked chkCPUTemperature. > The first temp reported was 52C, which is 125.6F. This leads me to believe > that acpi has an anomaly regarding temperature measurement. The ambient temp > was 71F (21.6C). The machine had been off for over eight hours. I'd suggest to kldload coretemp.ko for another point of view; because it directly retrieves the core temperature from MSR - no ACPI involved. We can read the core temperature via sysctl dev.cpu.0.temperature like this: % sysctl dev.cpu.0.temperature hw.acpi.thermal.tz0.temperature dev.cpu.0.temperature: 58.0C hw.acpi.thermal.tz0.temperature: 46.0C This is obtained from my ThinkPad X60 running in 19C (66.2F) ambient for 15 minutes with the lid closed, powerd running, C2 state enabled. As others stated already, I too think 52C is not so high to worry, though. # I think it is very convenient to have a knob (or better, honors LANG) to # let sysctl show "IK" oids in Fahrenheit. -- -|-__ YAMAMOTO, Taku | __ < - A chicken is an egg's way of producing more eggs. - From owner-freebsd-acpi@FreeBSD.ORG Tue Dec 8 04:06:16 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4027106566B for ; Tue, 8 Dec 2009 04:06:16 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) by mx1.freebsd.org (Postfix) with ESMTP id F39988FC12 for ; Tue, 8 Dec 2009 04:06:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id nB847VSS015818; Tue, 8 Dec 2009 15:07:32 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Tue, 8 Dec 2009 15:07:30 +1100 (EST) From: Ian Smith To: Taku YAMAMOTO In-Reply-To: <20091208041000.1d2f75f8.taku@tackymt.homeip.net> Message-ID: <20091208140829.A12012@sola.nimnet.asn.au> References: <200912042337.04403.freebsd@insightbb.com> <20091208041000.1d2f75f8.taku@tackymt.homeip.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-acpi@freebsd.org Subject: Re: ACPI temperature X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2009 04:06:16 -0000 On Tue, 8 Dec 2009, Taku YAMAMOTO wrote: > On Fri, 4 Dec 2009 23:37:04 -0500 > Steven Friedrich wrote: > > > I sent this to questions last Sunday, but only one person responded. He's > > running FreeBSD 8 and I think his system is reporting bogus temps too. > > I think there might be a missing scaling factor. I'm a hardware guy, but I > > don't currently have temperature measuring equipment and I would want to do it > > on one of my towers (which are currently in storage), not my laptop anyway. > > > > I booted my HP Pavilion zd8215us and I immediately invoked chkCPUTemperature. > > The first temp reported was 52C, which is 125.6F. This leads me to believe > > that acpi has an anomaly regarding temperature measurement. The ambient temp > > was 71F (21.6C). The machine had been off for over eight hours. Another data point .. my Thinkpad T23, on either 7.0-R or 8.0-R, comes up showing between 55-60C immediately after a long sleep, before powerd kicks in to drop it back to 44-49C (99% C2 state) - and that at today's ambient temp of 36C, ~97F (trying not to drip on the keyboard, phew! :) > I'd suggest to kldload coretemp.ko for another point of view; because > it directly retrieves the core temperature from MSR - no ACPI involved. > > We can read the core temperature via sysctl dev.cpu.0.temperature like this: > > % sysctl dev.cpu.0.temperature hw.acpi.thermal.tz0.temperature > dev.cpu.0.temperature: 58.0C > hw.acpi.thermal.tz0.temperature: 46.0C > > This is obtained from my ThinkPad X60 running in 19C (66.2F) ambient for 15 > minutes with the lid closed, powerd running, C2 state enabled. > > As others stated already, I too think 52C is not so high to worry, though. Indeed. FWIW, I can confirm that kldload'ing coretemp on a PIII-M is of course useless - but does no apparent harm. > # I think it is very convenient to have a knob (or better, honors LANG) to > # let sysctl show "IK" oids in Fahrenheit. No problem with a knob, but referring to LANG won't work for Australia at least (using C since the '60s), often installed assuming EN-US, and in the case of both a 5.5-S and 8.0-R machine here, both running KDE 3, LANG isn't set at all (tcsh): % set | grep -i lang % setenv | grep -i lang % cheers, Ian From owner-freebsd-acpi@FreeBSD.ORG Tue Dec 8 06:03:44 2009 Return-Path: Delivered-To: acpi@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 773E0106566B for ; Tue, 8 Dec 2009 06:03:44 +0000 (UTC) (envelope-from infofarmer@FreeBSD.org) Received: from heka.cenkes.org (heka.cenkes.org [IPv6:2002:d056:e3f1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 42E348FC0C for ; Tue, 8 Dec 2009 06:03:44 +0000 (UTC) Received: from amilo.cenkes.org (ppp91-77-109-51.pppoe.mtu-net.ru [91.77.109.51]) (Authenticated sender: sat) by heka.cenkes.org (Postfix) with ESMTPSA id 86C072EF1F for ; Tue, 8 Dec 2009 08:18:35 +0300 (MSK) Date: Tue, 8 Dec 2009 09:03:40 +0300 From: Andrew Pantyukhin To: acpi@FreeBSD.org Message-ID: <20091208060339.GK98273@pollux.cenkes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-OS: FreeBSD 8.0-BETA1 amd64 User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Subject: libi386/biosacpi.c - bad RSDP checksum search X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2009 06:03:44 -0000 Our boot loader stops searching memory at the first occurrence of "RSD PTR" while there are BIOSes (e.g. some IBM System x) that have multiple such strings and the first one does not contain the correct checksum. The acpi-ca code does the right thing and continues the search. Any ACPI experts interested in fixing this? I'll be ready to test. Here are some references: http://www.mail-archive.com/linux-acpi@vger.kernel.org/msg11812.html http://bugzilla.kernel.org/show_bug.cgi?id=9444 From owner-freebsd-acpi@FreeBSD.ORG Tue Dec 8 10:53:22 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A57D10656BC for ; Tue, 8 Dec 2009 10:53:22 +0000 (UTC) (envelope-from freebsd@insightbb.com) Received: from mxsf00.insightbb.com (mxsf00.insightbb.com [74.128.0.70]) by mx1.freebsd.org (Postfix) with ESMTP id 064988FC23 for ; Tue, 8 Dec 2009 10:53:21 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.47,361,1257138000"; d="scan'208";a="722099618" Received: from unknown (HELO mxsf10.insightbb.com) ([172.31.249.60]) by mxsf00.insightbb.com with ESMTP; 08 Dec 2009 05:53:19 -0500 X-IronPort-AV: E=Sophos;i="4.47,361,1257138000"; d="scan'208";a="7990259" Received: from unknown (HELO asav01.insightbb.com) ([172.31.249.123]) by mxsf10.insightbb.com with ESMTP; 08 Dec 2009 05:53:19 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArgEANu+HUvQLicL/2dsb2JhbACBTI53AccKgjCCAgQ X-IronPort-AV: E=Sophos;i="4.47,361,1257138000"; d="scan'208";a="237477875" Received: from 208-46-39-11.dia.static.qwest.net (HELO laptop2.stevenfriedrich.org) ([208.46.39.11]) by asavout01.insightbb.com with ESMTP; 08 Dec 2009 05:53:18 -0500 To: freebsd-acpi@freebsd.org From: Steven Friedrich Date: Tue, 8 Dec 2009 05:53:18 -0500 MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200912080553.18363.freebsd@insightbb.com> Subject: Re: ACPI temperature X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2009 10:53:22 -0000 On Sunday 06 December 2009 01:05:04 pm you wrote: > On 5 Dec 2009, at 04:37, Steven Friedrich wrote: > > I sent this to questions last Sunday, but only one person responded. > > He's > > running FreeBSD 8 and I think his system is reporting bogus temps too. > > I think there might be a missing scaling factor. I'm a hardware guy, > > but I > > don't currently have temperature measuring equipment and I would > > want to do it > > on one of my towers (which are currently in storage), not my laptop > > anyway. > > > > I booted my HP Pavilion zd8215us and I immediately invoked > > chkCPUTemperature. > > The first temp reported was 52C, which is 125.6F. This leads me to > > believe > > that acpi has an anomaly regarding temperature measurement. The > > ambient temp > > was 71F (21.6C). The machine had been off for over eight hours. > > As others have said, 52C is pretty normal. > > -- > Rui Paulo > The 52C was only suspect because it reached it so quickly. It usually runs around 73C, when building ports, etc. In case anyone is interested, here are the scripts and themes I threw together. You may have to modify for your system. here's readCPUTemp, be sure to change ^[ to ESC, i.e., in vi use Control-V ESC #!/bin/sh # $Id:$ # ON_LIMIT_BLINK=78 ON_LIMIT_RED=75 # read CPU Temperature Information from ACPI and display in C and F CPU_TEMP_C=`sysctl hw.acpi.thermal.tz0.temperature|awk '{print substr($2, 1, 4)}'` CPU_TEMP_C_INTEGER=`printf "%d" $CPU_TEMP_C 2>&1 | tail -n 1` [ "`tty`" = "not a tty" ] && (printf "%sC/%sF\n" $CPU_TEMP_C `toFahrenheit $CPU_TEMP_C`;exit) if [ $CPU_TEMP_C_INTEGER -ge $ON_LIMIT_BLINK ]; then printf "%s%sC/%sF\n" "^[[5m^[[31m" $CPU_TEMP_C `toFahrenheit $CPU_TEMP_C` elif [ $CPU_TEMP_C_INTEGER -ge $ON_LIMIT_RED ]; then printf "%s%sC/%sF\n" "^[[25m^[[31m" $CPU_TEMP_C `toFahrenheit $CPU_TEMP_C` else printf "%s%sC/%sF\n" "^[[25m^[[39m" $CPU_TEMP_C `toFahrenheit $CPU_TEMP_C` fi here's chkCPUTemperature, which loops #!/bin/sh # $Id:$ # # CPU Temperature Information from ACPI POLLING_RATE=`sysctl hw.acpi.thermal.polling_rate|awk '{print $2}'` while [ 1 ] do readCPUTemp sleep $POLLING_RATE done Here's a superkaramba theme: # CPU Temperature monitor # General KARAMBA X=600 Y=500 W=445 H=40 BOTTOM=true ontop=true interval=10000 locked=true # grey #defaultfont font="Arial" fontsize=36 color=150,150,150 # black defaultfont font="Arial" fontsize=36 color=0,0,0 # cpu temp from acpi text x=0 y=00 value="acpi tz0" text x=180 y=00 sensor=program program="readCPUTemp" From owner-freebsd-acpi@FreeBSD.ORG Tue Dec 8 13:36:05 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07DB11065672; Tue, 8 Dec 2009 13:36:05 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id CFE4F8FC0A; Tue, 8 Dec 2009 13:36:04 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 7329446B6C; Tue, 8 Dec 2009 08:36:04 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id C90A38A01D; Tue, 8 Dec 2009 08:36:03 -0500 (EST) From: John Baldwin To: freebsd-acpi@freebsd.org Date: Tue, 8 Dec 2009 07:49:55 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20091103; KDE/4.3.1; amd64; ; ) References: <20091208060339.GK98273@pollux.cenkes.org> In-Reply-To: <20091208060339.GK98273@pollux.cenkes.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200912080749.55710.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Tue, 08 Dec 2009 08:36:03 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Andrew Pantyukhin Subject: Re: libi386/biosacpi.c - bad RSDP checksum search X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2009 13:36:05 -0000 On Tuesday 08 December 2009 1:03:40 am Andrew Pantyukhin wrote: > Our boot loader stops searching memory at the first occurrence of > "RSD PTR" while there are BIOSes (e.g. some IBM System x) that > have multiple such strings and the first one does not contain the > correct checksum. > > The acpi-ca code does the right thing and continues the search. > > Any ACPI experts interested in fixing this? I'll be ready to > test. Are you sure? It looks like it keeps going if the checksum fails. Note the 'continue' after the printf() about a bad checksum. /* * Find the RSDP in low memory. See section 5.2.2 of the ACPI spec. */ static ACPI_TABLE_RSDP * biosacpi_find_rsdp(void) { ACPI_TABLE_RSDP *rsdp; uint16_t *addr; /* EBDA is the 1 KB addressed by the 16 bit pointer at 0x40E. */ addr = (uint16_t *)PTOV(0x40E); if ((rsdp = biosacpi_search_rsdp((char *)(*addr << 4), 0x400)) != NULL) return (rsdp); /* Check the upper memory BIOS space, 0xe0000 - 0xfffff. */ if ((rsdp = biosacpi_search_rsdp((char *)0xe0000, 0x20000)) != NULL) return (rsdp); return (NULL); } static ACPI_TABLE_RSDP * biosacpi_search_rsdp(char *base, int length) { ACPI_TABLE_RSDP *rsdp; u_int8_t *cp, sum; int ofs, idx; /* search on 16-byte boundaries */ for (ofs = 0; ofs < length; ofs += 16) { rsdp = (ACPI_TABLE_RSDP *)PTOV(base + ofs); /* compare signature, validate checksum */ if (!strncmp(rsdp->Signature, ACPI_SIG_RSDP, strlen(ACPI_SIG_RSDP))) { cp = (u_int8_t *)rsdp; sum = 0; for (idx = 0; idx < RSDP_CHECKSUM_LENGTH; idx++) sum += *(cp + idx); if (sum != 0) { printf("acpi: bad RSDP checksum (%d)\n", sum); continue; } return(rsdp); } } return(NULL); } -- John Baldwin From owner-freebsd-acpi@FreeBSD.ORG Tue Dec 8 13:49:19 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FE87106566B; Tue, 8 Dec 2009 13:49:19 +0000 (UTC) (envelope-from infofarmer@FreeBSD.org) Received: from heka.cenkes.org (heka.cenkes.org [IPv6:2002:d056:e3f1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 487798FC15; Tue, 8 Dec 2009 13:49:19 +0000 (UTC) Received: from amilo.cenkes.org (ppp91-77-236-58.pppoe.mtu-net.ru [91.77.236.58]) (Authenticated sender: sat) by heka.cenkes.org (Postfix) with ESMTPSA id A0CBD2EF1F; Tue, 8 Dec 2009 16:03:53 +0300 (MSK) Date: Tue, 8 Dec 2009 16:49:14 +0300 From: Andrew Pantyukhin To: John Baldwin Message-ID: <20091208134913.GL98273@pollux.cenkes.org> References: <20091208060339.GK98273@pollux.cenkes.org> <200912080749.55710.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200912080749.55710.jhb@freebsd.org> X-OS: FreeBSD 8.0-BETA1 amd64 User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-acpi@freebsd.org Subject: Re: libi386/biosacpi.c - bad RSDP checksum search X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2009 13:49:19 -0000 On Tue, Dec 08, 2009 at 07:49:55AM -0500, John Baldwin wrote: > Are you sure? It looks like it keeps going if the checksum > fails. Note the 'continue' after the printf() about a bad > checksum. Oops. I obviously made a wrong assumption. I'll try to confirm. I think the warning should be made less final: i.e. either do not print it unless no correct RSDP has been found or print a success message when it has. Sorry for the noise. From owner-freebsd-acpi@FreeBSD.ORG Tue Dec 8 16:25:55 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DD741065676 for ; Tue, 8 Dec 2009 16:25:55 +0000 (UTC) (envelope-from ume@mahoroba.org) Received: from asuka.mahoroba.org (ent.mahoroba.org [IPv6:2001:2f0:104:8010::1]) by mx1.freebsd.org (Postfix) with ESMTP id 70A6F8FC2A for ; Tue, 8 Dec 2009 16:25:54 +0000 (UTC) Received: from yuga.mahoroba.org (ume@yuga.mahoroba.org [IPv6:2001:2f0:104:8010:21b:d3ff:fe38:5381]) (user=ume mech=CRAM-MD5 bits=0) by asuka.mahoroba.org (8.14.3/8.14.3) with ESMTP/inet6 id nB8GPhK9020339 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 9 Dec 2009 01:25:49 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Wed, 09 Dec 2009 01:25:43 +0900 Message-ID: From: Hajimu UMEMOTO To: Taku YAMAMOTO In-Reply-To: <20091208041000.1d2f75f8.taku@tackymt.homeip.net> References: <200912042337.04403.freebsd@insightbb.com> <20091208041000.1d2f75f8.taku@tackymt.homeip.net> User-Agent: xcite1.58> Wanderlust/2.15.7 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-2022-JP-2?B?R29qGyQoRCtXGyhC?=) APEL/10.7 Emacs/23.1 (i386-portbld-freebsd8.0) MULE/6.0 (HANACHIRUSATO) X-Operating-System: FreeBSD 8.0-STABLE X-PGP-Key: http://www.imasy.or.jp/~ume/publickey.asc X-PGP-Fingerprint: 1F00 0B9E 2164 70FC 6DC5 BF5F 04E9 F086 BF90 71FE Organization: Internet Mutual Aid Society, YOKOHAMA MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/mixed; boundary="Multipart_Wed_Dec__9_01:25:43_2009-1" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.3 (asuka.mahoroba.org [IPv6:2001:2f0:104:8010::1]); Wed, 09 Dec 2009 01:25:49 +0900 (JST) X-Virus-Scanned: clamav-milter 0.95.3 at asuka.mahoroba.org X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on asuka.mahoroba.org Cc: freebsd-acpi@freebsd.org Subject: Re: ACPI temperature X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2009 16:25:55 -0000 --Multipart_Wed_Dec__9_01:25:43_2009-1 Content-Type: text/plain; charset=US-ASCII Hi, >>>>> On Tue, 8 Dec 2009 04:10:00 +0900 >>>>> Taku YAMAMOTO said: taku> # I think it is very convenient to have a knob (or better, honors LANG) to taku> # let sysctl show "IK" oids in Fahrenheit. Yup, I thought similar thing before. How about this patch? Sincerely, --Multipart_Wed_Dec__9_01:25:43_2009-1 Content-Type: text/x-patch; type=patch; charset=US-ASCII Content-Disposition: attachment; filename="sysctl.c-fahrenheit.diff" Content-Transfer-Encoding: 7bit Index: sbin/sysctl/sysctl.8 diff -u sbin/sysctl/sysctl.8.orig sbin/sysctl/sysctl.8 --- sbin/sysctl/sysctl.8.orig 2009-08-03 17:13:06.000000000 +0900 +++ sbin/sysctl/sysctl.8 2009-12-09 01:11:18.928540783 +0900 @@ -36,11 +36,11 @@ .Nd get or set kernel state .Sh SYNOPSIS .Nm -.Op Fl bdehNnoqx +.Op Fl bcdefhkNnoqx .Ar name Ns Op = Ns Ar value .Ar ... .Nm -.Op Fl bdehNnoqx +.Op Fl bcdefhkNnoqx .Fl a .Sh DESCRIPTION The @@ -67,6 +67,13 @@ Force the value of the variable(s) to be output in raw, binary format. No names are printed and no terminating newlines are output. This is mostly useful with a single variable. +.It Fl c +Show temperature in Celsius. +This is default when neither +.Fl f +nor +.Fl k +is specified. .It Fl d Print the description of the variable instead of its value. .It Fl e @@ -80,8 +87,13 @@ or .Fl n is specified, or a variable is being set. +.It Fl f +Show temperature in Fahrenheit. .It Fl h Format output for human, rather than machine, readability. +.It Fl k +Show temperature in Kelvin. +The value is decupled. .It Fl N Show only variable names, not their values. This is particularly useful with shells that offer programmable Index: sbin/sysctl/sysctl.c diff -u -p sbin/sysctl/sysctl.c.orig sbin/sysctl/sysctl.c --- sbin/sysctl/sysctl.c.orig 2009-08-03 17:13:06.000000000 +0900 +++ sbin/sysctl/sysctl.c 2009-12-09 00:56:01.513715033 +0900 @@ -58,6 +58,11 @@ static const char rcsid[] = #include #include +#define IK_CELSIUS 0 +#define IK_FAHRENHEIT 1 +#define IK_KELVIN 2 +static int ik_unit = IK_CELSIUS; + static int aflag, bflag, dflag, eflag, hflag, Nflag, nflag, oflag; static int qflag, xflag, warncount; @@ -89,7 +94,7 @@ main(int argc, char **argv) setbuf(stdout,0); setbuf(stderr,0); - while ((ch = getopt(argc, argv, "AabdehNnoqwxX")) != -1) { + while ((ch = getopt(argc, argv, "AabcdefhkNnoqwxX")) != -1) { switch (ch) { case 'A': /* compatibility */ @@ -101,15 +106,24 @@ main(int argc, char **argv) case 'b': bflag = 1; break; + case 'c': + ik_unit = IK_CELSIUS; + break; case 'd': dflag = 1; break; case 'e': eflag = 1; break; + case 'f': + ik_unit = IK_FAHRENHEIT; + break; case 'h': hflag = 1; break; + case 'k': + ik_unit = IK_KELVIN; + break; case 'N': Nflag = 1; break; @@ -650,8 +664,11 @@ show_var(int *oid, int nlen) else if (fmt[1] == 'X') printf("%#0*jx", hexlen, umv); else if (fmt[1] == 'K') { - if (mv < 0) + if (mv < 0 || ik_unit == IK_KELVIN) printf("%jd", mv); + else if (ik_unit == IK_FAHRENHEIT) + printf("%.1fF", + (mv - 2732.0) * 9 / 50 + 32.0); else printf("%.1fC", (mv - 2732.0) / 10); } else --Multipart_Wed_Dec__9_01:25:43_2009-1 Content-Type: text/plain; charset=US-ASCII -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/ --Multipart_Wed_Dec__9_01:25:43_2009-1-- From owner-freebsd-acpi@FreeBSD.ORG Wed Dec 9 01:15:28 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EF7C106566B for ; Wed, 9 Dec 2009 01:15:28 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) by mx1.freebsd.org (Postfix) with ESMTP id 8ED938FC12 for ; Wed, 9 Dec 2009 01:15:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id nB91Gnnn073200; Wed, 9 Dec 2009 12:16:49 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Wed, 9 Dec 2009 12:16:49 +1100 (EST) From: Ian Smith To: Hajimu UMEMOTO In-Reply-To: Message-ID: <20091209120838.C12012@sola.nimnet.asn.au> References: <200912042337.04403.freebsd@insightbb.com> <20091208041000.1d2f75f8.taku@tackymt.homeip.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-acpi@freebsd.org Subject: Re: ACPI temperature X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2009 01:15:28 -0000 On Wed, 9 Dec 2009, Hajimu UMEMOTO wrote: > Hi, > > >>>>> On Tue, 8 Dec 2009 04:10:00 +0900 > >>>>> Taku YAMAMOTO said: > > taku> # I think it is very convenient to have a knob (or better, honors LANG) to > taku> # let sysctl show "IK" oids in Fahrenheit. > > Yup, I thought similar thing before. How about this patch? The maths looks right. But I don't understand what you mean here: +.It Fl k +Show temperature in Kelvin. +The value is decupled. That would be 'decoupled', but, The value is decoupled from what? cheers, Ian From owner-freebsd-acpi@FreeBSD.ORG Wed Dec 9 10:32:53 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C665A1065672; Wed, 9 Dec 2009 10:32:53 +0000 (UTC) (envelope-from infofarmer@FreeBSD.org) Received: from heka.cenkes.org (heka.cenkes.org [IPv6:2002:d056:e3f1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 872268FC13; Wed, 9 Dec 2009 10:32:53 +0000 (UTC) Received: from amilo.cenkes.org (ppp91-77-236-58.pppoe.mtu-net.ru [91.77.236.58]) (Authenticated sender: sat) by heka.cenkes.org (Postfix) with ESMTPSA id 6D1412EE92; Wed, 9 Dec 2009 12:46:39 +0300 (MSK) Date: Wed, 9 Dec 2009 13:32:49 +0300 From: Andrew Pantyukhin To: John Baldwin Message-ID: <20091209103248.GP98273@pollux.cenkes.org> References: <20091208060339.GK98273@pollux.cenkes.org> <200912080749.55710.jhb@freebsd.org> <20091208134913.GL98273@pollux.cenkes.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="B4IIlcmfBL/1gGOG" Content-Disposition: inline In-Reply-To: <20091208134913.GL98273@pollux.cenkes.org> X-OS: FreeBSD 8.0-BETA1 amd64 User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-acpi@freebsd.org Subject: Re: libi386/biosacpi.c - bad RSDP checksum search X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2009 10:32:53 -0000 --B4IIlcmfBL/1gGOG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Dec 08, 2009 at 04:49:13PM +0300, Andrew Pantyukhin wrote: > Oops. I obviously made a wrong assumption. I'll try to confirm. Yep, the good RSDP is found later. So I think either a "bad checksum" should be followed by a "good checksum" or it should only be printed if no good RSDP has been found. Attached are a couple of alternative tiny patches. Otherwise, a FAQ entry should be added to keep the mere mortals like me from wondering about the error message. FWIW, it comes up on many (most?) IBM System x machines. --B4IIlcmfBL/1gGOG Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="biosacpi.c.diff1" Index: biosacpi.c =================================================================== --- biosacpi.c (revision 200054) +++ biosacpi.c (working copy) @@ -129,6 +129,7 @@ printf("acpi: bad RSDP checksum (%d)\n", sum); continue; } + printf("acpi: good RSDP checksum (%d)\n", sum); return(rsdp); } } --B4IIlcmfBL/1gGOG Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="biosacpi.c.diff2" Index: biosacpi.c =================================================================== --- biosacpi.c (revision 200054) +++ biosacpi.c (working copy) @@ -125,12 +125,12 @@ sum = 0; for (idx = 0; idx < RSDP_CHECKSUM_LENGTH; idx++) sum += *(cp + idx); - if (sum != 0) { - printf("acpi: bad RSDP checksum (%d)\n", sum); + if (sum != 0) continue; - } return(rsdp); } } + if (sum != 0) + printf("acpi: no RSDP with good checksum found\n"); return(NULL); } --B4IIlcmfBL/1gGOG-- From owner-freebsd-acpi@FreeBSD.ORG Wed Dec 9 11:37:14 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5F94106568B for ; Wed, 9 Dec 2009 11:37:14 +0000 (UTC) (envelope-from ume@mahoroba.org) Received: from asuka.mahoroba.org (ent.mahoroba.org [IPv6:2001:2f0:104:8010::1]) by mx1.freebsd.org (Postfix) with ESMTP id 9DF058FC1F for ; Wed, 9 Dec 2009 11:37:14 +0000 (UTC) Received: from yuga.mahoroba.org (ume@yuga.mahoroba.org [IPv6:2001:2f0:104:8010:21b:d3ff:fe38:5381]) (user=ume mech=CRAM-MD5 bits=0) by asuka.mahoroba.org (8.14.3/8.14.3) with ESMTP/inet6 id nB9Bb7cK048611 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 9 Dec 2009 20:37:09 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Wed, 09 Dec 2009 20:37:06 +0900 Message-ID: From: Hajimu UMEMOTO To: Ian Smith In-Reply-To: <20091209120838.C12012@sola.nimnet.asn.au> References: <200912042337.04403.freebsd@insightbb.com> <20091208041000.1d2f75f8.taku@tackymt.homeip.net> <20091209120838.C12012@sola.nimnet.asn.au> User-Agent: xcite1.58> Wanderlust/2.15.7 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-2022-JP-2?B?R29qGyQoRCtXGyhC?=) APEL/10.7 Emacs/23.1 (i386-portbld-freebsd8.0) MULE/6.0 (HANACHIRUSATO) X-Operating-System: FreeBSD 8.0-STABLE X-PGP-Key: http://www.imasy.or.jp/~ume/publickey.asc X-PGP-Fingerprint: 1F00 0B9E 2164 70FC 6DC5 BF5F 04E9 F086 BF90 71FE Organization: Internet Mutual Aid Society, YOKOHAMA MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.3 (asuka.mahoroba.org [IPv6:2001:2f0:104:8010::1]); Wed, 09 Dec 2009 20:37:09 +0900 (JST) X-Virus-Scanned: clamav-milter 0.95.3 at asuka.mahoroba.org X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on asuka.mahoroba.org Cc: freebsd-acpi@freebsd.org Subject: Re: ACPI temperature X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2009 11:37:15 -0000 Hi, >>>>> On Wed, 9 Dec 2009 12:16:49 +1100 (EST) >>>>> Ian Smith said: smithi> The maths looks right. But I don't understand what you mean here: smithi> +.It Fl k smithi> +Show temperature in Kelvin. smithi> +The value is decupled. smithi> That would be 'decoupled', but, The value is decoupled from what? Oops, I meant "The value is multiplied by 10". Sincerely, -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/ From owner-freebsd-acpi@FreeBSD.ORG Wed Dec 9 15:16:59 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C48571065670; Wed, 9 Dec 2009 15:16:59 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 959A78FC1A; Wed, 9 Dec 2009 15:16:59 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 4751346B46; Wed, 9 Dec 2009 10:16:59 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 53E358A024; Wed, 9 Dec 2009 10:16:58 -0500 (EST) From: John Baldwin To: Andrew Pantyukhin Date: Wed, 9 Dec 2009 10:02:55 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20091103; KDE/4.3.1; amd64; ; ) References: <20091208060339.GK98273@pollux.cenkes.org> <20091208134913.GL98273@pollux.cenkes.org> <20091209103248.GP98273@pollux.cenkes.org> In-Reply-To: <20091209103248.GP98273@pollux.cenkes.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <200912091002.55490.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 09 Dec 2009 10:16:58 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-acpi@freebsd.org Subject: Re: libi386/biosacpi.c - bad RSDP checksum search X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2009 15:16:59 -0000 On Wednesday 09 December 2009 5:32:49 am Andrew Pantyukhin wrote: > On Tue, Dec 08, 2009 at 04:49:13PM +0300, Andrew Pantyukhin wrote: > > Oops. I obviously made a wrong assumption. I'll try to confirm. > > Yep, the good RSDP is found later. > > So I think either a "bad checksum" should be followed by a "good > checksum" or it should only be printed if no good RSDP has been > found. Attached are a couple of alternative tiny patches. > > Otherwise, a FAQ entry should be added to keep the mere mortals > like me from wondering about the error message. FWIW, it comes up > on many (most?) IBM System x machines. We can probably just drop the message altogether I think. The ACPI stuff the loader does is just advisory. The kernel will give more detailed notes about a bad checksum if needed. -- John Baldwin From owner-freebsd-acpi@FreeBSD.ORG Wed Dec 9 15:19:09 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29D6D106568D; Wed, 9 Dec 2009 15:19:09 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id EECF08FC1A; Wed, 9 Dec 2009 15:19:08 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 9EF8346B03; Wed, 9 Dec 2009 10:19:08 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id EC6818A01F; Wed, 9 Dec 2009 10:19:07 -0500 (EST) From: John Baldwin To: Andrew Pantyukhin Date: Wed, 9 Dec 2009 10:02:55 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20091103; KDE/4.3.1; amd64; ; ) References: <20091208060339.GK98273@pollux.cenkes.org> <20091208134913.GL98273@pollux.cenkes.org> <20091209103248.GP98273@pollux.cenkes.org> In-Reply-To: <20091209103248.GP98273@pollux.cenkes.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <200912091002.55490.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 09 Dec 2009 10:19:07 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-acpi@freebsd.org Subject: Re: libi386/biosacpi.c - bad RSDP checksum search X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2009 15:19:09 -0000 On Wednesday 09 December 2009 5:32:49 am Andrew Pantyukhin wrote: > On Tue, Dec 08, 2009 at 04:49:13PM +0300, Andrew Pantyukhin wrote: > > Oops. I obviously made a wrong assumption. I'll try to confirm. > > Yep, the good RSDP is found later. > > So I think either a "bad checksum" should be followed by a "good > checksum" or it should only be printed if no good RSDP has been > found. Attached are a couple of alternative tiny patches. > > Otherwise, a FAQ entry should be added to keep the mere mortals > like me from wondering about the error message. FWIW, it comes up > on many (most?) IBM System x machines. We can probably just drop the message altogether I think. The ACPI stuff the loader does is just advisory. The kernel will give more detailed notes about a bad checksum if needed. -- John Baldwin From owner-freebsd-acpi@FreeBSD.ORG Wed Dec 9 16:25:54 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 417F2106566B; Wed, 9 Dec 2009 16:25:54 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) by mx1.freebsd.org (Postfix) with ESMTP id B35018FC13; Wed, 9 Dec 2009 16:25:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id nB9GRL4v014542; Thu, 10 Dec 2009 03:27:22 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Thu, 10 Dec 2009 03:27:21 +1100 (EST) From: Ian Smith To: Hajimu UMEMOTO In-Reply-To: Message-ID: <20091210031620.V12012@sola.nimnet.asn.au> References: <200912042337.04403.freebsd@insightbb.com> <20091208041000.1d2f75f8.taku@tackymt.homeip.net> <20091209120838.C12012@sola.nimnet.asn.au> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-acpi@freebsd.org Subject: Re: ACPI temperature X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2009 16:25:54 -0000 On Wed, 9 Dec 2009, Hajimu UMEMOTO wrote: > Hi, > > >>>>> On Wed, 9 Dec 2009 12:16:49 +1100 (EST) > >>>>> Ian Smith said: > > smithi> The maths looks right. But I don't understand what you mean here: > > smithi> +.It Fl k > smithi> +Show temperature in Kelvin. > smithi> +The value is decupled. > > smithi> That would be 'decoupled', but, The value is decoupled from what? > > Oops, I meant "The value is multiplied by 10". + if (mv < 0 || ik_unit == IK_KELVIN) printf("%jd", mv); + else if (ik_unit == IK_FAHRENHEIT) + printf("%.1fF", + (mv - 2732.0) * 9 / 50 + 32.0); else printf("%.1fC", (mv - 2732.0) / 10); Ah, so then units are in tenths of a degree Kelvin? Any special reason to prefer not showing it with printf("%.1fK", mv / 10); like the others? cheers, Ian (possibly jumping in out of my depth :) From owner-freebsd-acpi@FreeBSD.ORG Wed Dec 9 18:43:50 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4428106566B; Wed, 9 Dec 2009 18:43:50 +0000 (UTC) (envelope-from infofarmer@FreeBSD.org) Received: from heka.cenkes.org (heka.cenkes.org [IPv6:2002:d056:e3f1::1]) by mx1.freebsd.org (Postfix) with ESMTP id A93638FC1D; Wed, 9 Dec 2009 18:43:50 +0000 (UTC) Received: from amilo.cenkes.org (ppp91-77-255-129.pppoe.mtu-net.ru [91.77.255.129]) (Authenticated sender: sat) by heka.cenkes.org (Postfix) with ESMTPSA id 4D8CD2EF16; Wed, 9 Dec 2009 20:57:19 +0300 (MSK) Date: Wed, 9 Dec 2009 21:43:45 +0300 From: Andrew Pantyukhin To: John Baldwin Message-ID: <20091209184345.GR98273@pollux.cenkes.org> References: <20091208060339.GK98273@pollux.cenkes.org> <20091208134913.GL98273@pollux.cenkes.org> <20091209103248.GP98273@pollux.cenkes.org> <200912091002.55490.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200912091002.55490.jhb@freebsd.org> X-OS: FreeBSD 8.0-BETA1 amd64 User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-acpi@freebsd.org Subject: Re: libi386/biosacpi.c - bad RSDP checksum search X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2009 18:43:51 -0000 On Wed, Dec 09, 2009 at 10:02:55AM -0500, John Baldwin wrote: > We can probably just drop the message altogether I think. The > ACPI stuff the loader does is just advisory. The kernel will > give more detailed notes about a bad checksum if needed. Agreed, looks like a leftover debug message. Can you commit if there's no objection? From owner-freebsd-acpi@FreeBSD.ORG Wed Dec 9 18:46:39 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7763D106566B for ; Wed, 9 Dec 2009 18:46:39 +0000 (UTC) (envelope-from robert.moore@intel.com) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx1.freebsd.org (Postfix) with ESMTP id 55EFF8FC18 for ; Wed, 9 Dec 2009 18:46:39 +0000 (UTC) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 09 Dec 2009 10:41:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.47,369,1257148800"; d="scan'208";a="754385457" Received: from orsmsx603.amr.corp.intel.com ([10.22.226.49]) by fmsmga001.fm.intel.com with ESMTP; 09 Dec 2009 10:46:36 -0800 Received: from orsmsx503.amr.corp.intel.com ([10.22.226.47]) by orsmsx603.amr.corp.intel.com ([10.22.226.49]) with mapi; Wed, 9 Dec 2009 10:46:38 -0800 From: "Moore, Robert" To: John Baldwin , "freebsd-acpi@freebsd.org" Date: Wed, 9 Dec 2009 10:46:36 -0800 Thread-Topic: libi386/biosacpi.c - bad RSDP checksum search Thread-Index: Acp4C2mPNjX17T/AQKGMw4//Fsy+IgA9GPZQ Message-ID: <4911F71203A09E4D9981D27F9D83085840DA9AC8@orsmsx503.amr.corp.intel.com> References: <20091208060339.GK98273@pollux.cenkes.org> <200912080749.55710.jhb@freebsd.org> In-Reply-To: <200912080749.55710.jhb@freebsd.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: Andrew Pantyukhin Subject: RE: libi386/biosacpi.c - bad RSDP checksum search X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2009 18:46:39 -0000 Might be a dumb question, but why is the bootloader looking around for ACPI= tables in the first place? Thanks, Bob >-----Original Message----- >From: owner-freebsd-acpi@freebsd.org [mailto:owner-freebsd- >acpi@freebsd.org] On Behalf Of John Baldwin >Sent: Tuesday, December 08, 2009 4:50 AM >To: freebsd-acpi@freebsd.org >Cc: Andrew Pantyukhin >Subject: Re: libi386/biosacpi.c - bad RSDP checksum search > >On Tuesday 08 December 2009 1:03:40 am Andrew Pantyukhin wrote: >> Our boot loader stops searching memory at the first occurrence of >> "RSD PTR" while there are BIOSes (e.g. some IBM System x) that >> have multiple such strings and the first one does not contain the >> correct checksum. >> >> The acpi-ca code does the right thing and continues the search. >> >> Any ACPI experts interested in fixing this? I'll be ready to >> test. > >Are you sure? It looks like it keeps going if the checksum fails. Note >the >'continue' after the printf() about a bad checksum. > >/* > * Find the RSDP in low memory. See section 5.2.2 of the ACPI spec. > */ >static ACPI_TABLE_RSDP * >biosacpi_find_rsdp(void) >{ > ACPI_TABLE_RSDP *rsdp; > uint16_t *addr; > > /* EBDA is the 1 KB addressed by the 16 bit pointer at 0x40E. */ > addr =3D (uint16_t *)PTOV(0x40E); > if ((rsdp =3D biosacpi_search_rsdp((char *)(*addr << 4), 0x400)) !=3D = NULL) > return (rsdp); > > /* Check the upper memory BIOS space, 0xe0000 - 0xfffff. */ > if ((rsdp =3D biosacpi_search_rsdp((char *)0xe0000, 0x20000)) !=3D NUL= L) > return (rsdp); > > return (NULL); >} > >static ACPI_TABLE_RSDP * >biosacpi_search_rsdp(char *base, int length) >{ > ACPI_TABLE_RSDP *rsdp; > u_int8_t *cp, sum; > int ofs, idx; > > /* search on 16-byte boundaries */ > for (ofs =3D 0; ofs < length; ofs +=3D 16) { > rsdp =3D (ACPI_TABLE_RSDP *)PTOV(base + ofs); > > /* compare signature, validate checksum */ > if (!strncmp(rsdp->Signature, ACPI_SIG_RSDP, strlen(ACPI_SIG_RSDP))) >{ > cp =3D (u_int8_t *)rsdp; > sum =3D 0; > for (idx =3D 0; idx < RSDP_CHECKSUM_LENGTH; idx++) > sum +=3D *(cp + idx); > if (sum !=3D 0) { > printf("acpi: bad RSDP checksum (%d)\n", sum); > continue; > } > return(rsdp); > } > } > return(NULL); >} > >-- >John Baldwin >_______________________________________________ >freebsd-acpi@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-acpi >To unsubscribe, send any mail to "freebsd-acpi-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Wed Dec 9 19:37:26 2009 Return-Path: Delivered-To: freebsd-acpi@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 0FAF11065672; Wed, 9 Dec 2009 19:37:22 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-acpi@FreeBSD.org Date: Wed, 9 Dec 2009 14:37:08 -0500 User-Agent: KMail/1.6.2 References: <20091208060339.GK98273@pollux.cenkes.org> <200912080749.55710.jhb@freebsd.org> <4911F71203A09E4D9981D27F9D83085840DA9AC8@orsmsx503.amr.corp.intel.com> In-Reply-To: <4911F71203A09E4D9981D27F9D83085840DA9AC8@orsmsx503.amr.corp.intel.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200912091437.09680.jkim@FreeBSD.org> Cc: Andrew Pantyukhin , "Moore, Robert" Subject: Re: libi386/biosacpi.c - bad RSDP checksum search X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2009 19:37:26 -0000 On Wednesday 09 December 2009 01:46 pm, Moore, Robert wrote: > Might be a dumb question, but why is the bootloader looking around > for ACPI tables in the first place? FreeBSD/i386 bootloader loads ACPI kernel module if the root pointer is found and ACPI is not disabled by user. Then, the pointer is passed to kernel as a hint for AcpiOsGetRootPointer() later. FreeBSD/amd64 just happened to share the same bootloader. :-) Jung-uk Kim > Thanks, > Bob > > >-----Original Message----- > >From: owner-freebsd-acpi@freebsd.org [mailto:owner-freebsd- > >acpi@freebsd.org] On Behalf Of John Baldwin > >Sent: Tuesday, December 08, 2009 4:50 AM > >To: freebsd-acpi@freebsd.org > >Cc: Andrew Pantyukhin > >Subject: Re: libi386/biosacpi.c - bad RSDP checksum search > > > >On Tuesday 08 December 2009 1:03:40 am Andrew Pantyukhin wrote: > >> Our boot loader stops searching memory at the first occurrence > >> of "RSD PTR" while there are BIOSes (e.g. some IBM System x) > >> that have multiple such strings and the first one does not > >> contain the correct checksum. > >> > >> The acpi-ca code does the right thing and continues the search. > >> > >> Any ACPI experts interested in fixing this? I'll be ready to > >> test. > > > >Are you sure? It looks like it keeps going if the checksum fails. > > Note the > >'continue' after the printf() about a bad checksum. > > > >/* > > * Find the RSDP in low memory. See section 5.2.2 of the ACPI > > spec. */ > >static ACPI_TABLE_RSDP * > >biosacpi_find_rsdp(void) > >{ > > ACPI_TABLE_RSDP *rsdp; > > uint16_t *addr; > > > > /* EBDA is the 1 KB addressed by the 16 bit pointer at 0x40E. > > */ addr = (uint16_t *)PTOV(0x40E); > > if ((rsdp = biosacpi_search_rsdp((char *)(*addr << 4), 0x400)) > > != NULL) return (rsdp); > > > > /* Check the upper memory BIOS space, 0xe0000 - 0xfffff. */ > > if ((rsdp = biosacpi_search_rsdp((char *)0xe0000, 0x20000)) != > > NULL) return (rsdp); > > > > return (NULL); > >} > > > >static ACPI_TABLE_RSDP * > >biosacpi_search_rsdp(char *base, int length) > >{ > > ACPI_TABLE_RSDP *rsdp; > > u_int8_t *cp, sum; > > int ofs, idx; > > > > /* search on 16-byte boundaries */ > > for (ofs = 0; ofs < length; ofs += 16) { > > rsdp = (ACPI_TABLE_RSDP *)PTOV(base + ofs); > > > > /* compare signature, validate checksum */ > > if (!strncmp(rsdp->Signature, ACPI_SIG_RSDP, > > strlen(ACPI_SIG_RSDP))) { > > cp = (u_int8_t *)rsdp; > > sum = 0; > > for (idx = 0; idx < RSDP_CHECKSUM_LENGTH; idx++) > > sum += *(cp + idx); > > if (sum != 0) { > > printf("acpi: bad RSDP checksum (%d)\n", sum); > > continue; > > } > > return(rsdp); > > } > > } > > return(NULL); > >} > > > >-- > >John Baldwin > >_______________________________________________ > >freebsd-acpi@freebsd.org mailing list > >http://lists.freebsd.org/mailman/listinfo/freebsd-acpi > >To unsubscribe, send any mail to > > "freebsd-acpi-unsubscribe@freebsd.org" > > _______________________________________________ > freebsd-acpi@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-acpi > To unsubscribe, send any mail to > "freebsd-acpi-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Wed Dec 9 19:59:59 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2E5D106568F; Wed, 9 Dec 2009 19:59:59 +0000 (UTC) (envelope-from robert.moore@intel.com) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx1.freebsd.org (Postfix) with ESMTP id A49878FC1C; Wed, 9 Dec 2009 19:59:59 +0000 (UTC) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 09 Dec 2009 11:58:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.47,369,1257148800"; d="scan'208";a="474336941" Received: from orsmsx603.amr.corp.intel.com ([10.22.226.49]) by orsmga002.jf.intel.com with ESMTP; 09 Dec 2009 11:59:50 -0800 Received: from orsmsx503.amr.corp.intel.com ([10.22.226.47]) by orsmsx603.amr.corp.intel.com ([10.22.226.49]) with mapi; Wed, 9 Dec 2009 11:59:58 -0800 From: "Moore, Robert" To: Jung-uk Kim , "freebsd-acpi@FreeBSD.org" Date: Wed, 9 Dec 2009 11:59:56 -0800 Thread-Topic: libi386/biosacpi.c - bad RSDP checksum search Thread-Index: Acp5BwxKq7sxoI44SHOAbeQL3flPJgAAotJw Message-ID: <4911F71203A09E4D9981D27F9D83085840DA9C6B@orsmsx503.amr.corp.intel.com> References: <20091208060339.GK98273@pollux.cenkes.org> <200912080749.55710.jhb@freebsd.org> <4911F71203A09E4D9981D27F9D83085840DA9AC8@orsmsx503.amr.corp.intel.com> <200912091437.09680.jkim@FreeBSD.org> In-Reply-To: <200912091437.09680.jkim@FreeBSD.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: Andrew Pantyukhin Subject: RE: libi386/biosacpi.c - bad RSDP checksum search X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2009 20:00:00 -0000 Part of the reason I asked the question is because the ACPICA Table Manager= (the code that scans and extracts ACPI tables) has been specifically desig= ned to be available at any time, even before virtual memory is available an= d before the rest of the ACPICA subsystem is initialized. I haven't heard of this type of table scan before, but so be it. However, a= s you have seen, you are stuck with finding and fixing bugs that have been = already resolved in the ACPICA code. Bob >-----Original Message----- >From: Jung-uk Kim [mailto:jkim@FreeBSD.org] >Sent: Wednesday, December 09, 2009 11:37 AM >To: freebsd-acpi@FreeBSD.org >Cc: Moore, Robert; Andrew Pantyukhin >Subject: Re: libi386/biosacpi.c - bad RSDP checksum search > >On Wednesday 09 December 2009 01:46 pm, Moore, Robert wrote: >> Might be a dumb question, but why is the bootloader looking around >> for ACPI tables in the first place? > >FreeBSD/i386 bootloader loads ACPI kernel module if the root pointer >is found and ACPI is not disabled by user. Then, the pointer is >passed to kernel as a hint for AcpiOsGetRootPointer() later. >FreeBSD/amd64 just happened to share the same bootloader. :-) > >Jung-uk Kim > >> Thanks, >> Bob >> >> >-----Original Message----- >> >From: owner-freebsd-acpi@freebsd.org [mailto:owner-freebsd- >> >acpi@freebsd.org] On Behalf Of John Baldwin >> >Sent: Tuesday, December 08, 2009 4:50 AM >> >To: freebsd-acpi@freebsd.org >> >Cc: Andrew Pantyukhin >> >Subject: Re: libi386/biosacpi.c - bad RSDP checksum search >> > >> >On Tuesday 08 December 2009 1:03:40 am Andrew Pantyukhin wrote: >> >> Our boot loader stops searching memory at the first occurrence >> >> of "RSD PTR" while there are BIOSes (e.g. some IBM System x) >> >> that have multiple such strings and the first one does not >> >> contain the correct checksum. >> >> >> >> The acpi-ca code does the right thing and continues the search. >> >> >> >> Any ACPI experts interested in fixing this? I'll be ready to >> >> test. >> > >> >Are you sure? It looks like it keeps going if the checksum fails. >> > Note the >> >'continue' after the printf() about a bad checksum. >> > >> >/* >> > * Find the RSDP in low memory. See section 5.2.2 of the ACPI >> > spec. */ >> >static ACPI_TABLE_RSDP * >> >biosacpi_find_rsdp(void) >> >{ >> > ACPI_TABLE_RSDP *rsdp; >> > uint16_t *addr; >> > >> > /* EBDA is the 1 KB addressed by the 16 bit pointer at 0x40E. >> > */ addr =3D (uint16_t *)PTOV(0x40E); >> > if ((rsdp =3D biosacpi_search_rsdp((char *)(*addr << 4), 0x400)) >> > !=3D NULL) return (rsdp); >> > >> > /* Check the upper memory BIOS space, 0xe0000 - 0xfffff. */ >> > if ((rsdp =3D biosacpi_search_rsdp((char *)0xe0000, 0x20000)) !=3D >> > NULL) return (rsdp); >> > >> > return (NULL); >> >} >> > >> >static ACPI_TABLE_RSDP * >> >biosacpi_search_rsdp(char *base, int length) >> >{ >> > ACPI_TABLE_RSDP *rsdp; >> > u_int8_t *cp, sum; >> > int ofs, idx; >> > >> > /* search on 16-byte boundaries */ >> > for (ofs =3D 0; ofs < length; ofs +=3D 16) { >> > rsdp =3D (ACPI_TABLE_RSDP *)PTOV(base + ofs); >> > >> > /* compare signature, validate checksum */ >> > if (!strncmp(rsdp->Signature, ACPI_SIG_RSDP, >> > strlen(ACPI_SIG_RSDP))) { >> > cp =3D (u_int8_t *)rsdp; >> > sum =3D 0; >> > for (idx =3D 0; idx < RSDP_CHECKSUM_LENGTH; idx++) >> > sum +=3D *(cp + idx); >> > if (sum !=3D 0) { >> > printf("acpi: bad RSDP checksum (%d)\n", sum); >> > continue; >> > } >> > return(rsdp); >> > } >> > } >> > return(NULL); >> >} >> > >> >-- >> >John Baldwin >> >_______________________________________________ >> >freebsd-acpi@freebsd.org mailing list >> >http://lists.freebsd.org/mailman/listinfo/freebsd-acpi >> >To unsubscribe, send any mail to >> > "freebsd-acpi-unsubscribe@freebsd.org" >> >> _______________________________________________ >> freebsd-acpi@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-acpi >> To unsubscribe, send any mail to >> "freebsd-acpi-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Wed Dec 9 20:25:41 2009 Return-Path: Delivered-To: freebsd-acpi@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id D40911065676; Wed, 9 Dec 2009 20:25:39 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: "Moore, Robert" Date: Wed, 9 Dec 2009 15:25:27 -0500 User-Agent: KMail/1.6.2 References: <20091208060339.GK98273@pollux.cenkes.org> <200912091437.09680.jkim@FreeBSD.org> <4911F71203A09E4D9981D27F9D83085840DA9C6B@orsmsx503.amr.corp.intel.com> In-Reply-To: <4911F71203A09E4D9981D27F9D83085840DA9C6B@orsmsx503.amr.corp.intel.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200912091525.29882.jkim@FreeBSD.org> Cc: freebsd-acpi@FreeBSD.org, Andrew Pantyukhin Subject: Re: libi386/biosacpi.c - bad RSDP checksum search X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2009 20:25:41 -0000 On Wednesday 09 December 2009 02:59 pm, Moore, Robert wrote: > Part of the reason I asked the question is because the ACPICA Table > Manager (the code that scans and extracts ACPI tables) has been > specifically designed to be available at any time, even before > virtual memory is available and before the rest of the ACPICA > subsystem is initialized. Although I really hate duplicate codes, bootloader is extremely small and stand-alone environment. Thus, we cannot use ACPICA there. :-( > I haven't heard of this type of table scan before, but so be it. > However, as you have seen, you are stuck with finding and fixing > bugs that have been already resolved in the ACPICA code. We are trying to get rid of any duplicate codes when found. However, FreeBSD ACPI was implemented long ago when ACPICA wasn't sophisticated enough for us at the time. Jung-uk Kim > Bob > > >-----Original Message----- > >From: Jung-uk Kim [mailto:jkim@FreeBSD.org] > >Sent: Wednesday, December 09, 2009 11:37 AM > >To: freebsd-acpi@FreeBSD.org > >Cc: Moore, Robert; Andrew Pantyukhin > >Subject: Re: libi386/biosacpi.c - bad RSDP checksum search > > > >On Wednesday 09 December 2009 01:46 pm, Moore, Robert wrote: > >> Might be a dumb question, but why is the bootloader looking > >> around for ACPI tables in the first place? > > > >FreeBSD/i386 bootloader loads ACPI kernel module if the root > > pointer is found and ACPI is not disabled by user. Then, the > > pointer is passed to kernel as a hint for AcpiOsGetRootPointer() > > later. FreeBSD/amd64 just happened to share the same bootloader. > > :-) > > > >Jung-uk Kim > > > >> Thanks, > >> Bob > >> > >> >-----Original Message----- > >> >From: owner-freebsd-acpi@freebsd.org [mailto:owner-freebsd- > >> >acpi@freebsd.org] On Behalf Of John Baldwin > >> >Sent: Tuesday, December 08, 2009 4:50 AM > >> >To: freebsd-acpi@freebsd.org > >> >Cc: Andrew Pantyukhin > >> >Subject: Re: libi386/biosacpi.c - bad RSDP checksum search > >> > > >> >On Tuesday 08 December 2009 1:03:40 am Andrew Pantyukhin wrote: > >> >> Our boot loader stops searching memory at the first > >> >> occurrence of "RSD PTR" while there are BIOSes (e.g. some IBM > >> >> System x) that have multiple such strings and the first one > >> >> does not contain the correct checksum. > >> >> > >> >> The acpi-ca code does the right thing and continues the > >> >> search. > >> >> > >> >> Any ACPI experts interested in fixing this? I'll be ready to > >> >> test. > >> > > >> >Are you sure? It looks like it keeps going if the checksum > >> > fails. Note the > >> >'continue' after the printf() about a bad checksum. > >> > > >> >/* > >> > * Find the RSDP in low memory. See section 5.2.2 of the ACPI > >> > spec. */ > >> >static ACPI_TABLE_RSDP * > >> >biosacpi_find_rsdp(void) > >> >{ > >> > ACPI_TABLE_RSDP *rsdp; > >> > uint16_t *addr; > >> > > >> > /* EBDA is the 1 KB addressed by the 16 bit pointer at > >> > 0x40E. */ addr = (uint16_t *)PTOV(0x40E); > >> > if ((rsdp = biosacpi_search_rsdp((char *)(*addr << 4), > >> > 0x400)) != NULL) return (rsdp); > >> > > >> > /* Check the upper memory BIOS space, 0xe0000 - 0xfffff. */ > >> > if ((rsdp = biosacpi_search_rsdp((char *)0xe0000, 0x20000)) > >> > != NULL) return (rsdp); > >> > > >> > return (NULL); > >> >} > >> > > >> >static ACPI_TABLE_RSDP * > >> >biosacpi_search_rsdp(char *base, int length) > >> >{ > >> > ACPI_TABLE_RSDP *rsdp; > >> > u_int8_t *cp, sum; > >> > int ofs, idx; > >> > > >> > /* search on 16-byte boundaries */ > >> > for (ofs = 0; ofs < length; ofs += 16) { > >> > rsdp = (ACPI_TABLE_RSDP *)PTOV(base + ofs); > >> > > >> > /* compare signature, validate checksum */ > >> > if (!strncmp(rsdp->Signature, ACPI_SIG_RSDP, > >> > strlen(ACPI_SIG_RSDP))) { > >> > cp = (u_int8_t *)rsdp; > >> > sum = 0; > >> > for (idx = 0; idx < RSDP_CHECKSUM_LENGTH; idx++) > >> > sum += *(cp + idx); > >> > if (sum != 0) { > >> > printf("acpi: bad RSDP checksum (%d)\n", sum); > >> > continue; > >> > } > >> > return(rsdp); > >> > } > >> > } > >> > return(NULL); > >> >} > >> > > >> >-- > >> >John Baldwin > >> >_______________________________________________ > >> >freebsd-acpi@freebsd.org mailing list > >> >http://lists.freebsd.org/mailman/listinfo/freebsd-acpi > >> >To unsubscribe, send any mail to > >> > "freebsd-acpi-unsubscribe@freebsd.org" > >> > >> _______________________________________________ > >> freebsd-acpi@freebsd.org mailing list > >> http://lists.freebsd.org/mailman/listinfo/freebsd-acpi > >> To unsubscribe, send any mail to > >> "freebsd-acpi-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Wed Dec 9 20:32:06 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C4571065692; Wed, 9 Dec 2009 20:32:06 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 3CC2F8FC17; Wed, 9 Dec 2009 20:32:06 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id E0F4646B2E; Wed, 9 Dec 2009 15:32:05 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 007C78A024; Wed, 9 Dec 2009 15:32:05 -0500 (EST) From: John Baldwin To: Andrew Pantyukhin Date: Wed, 9 Dec 2009 15:20:21 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20091103; KDE/4.3.1; amd64; ; ) References: <20091208060339.GK98273@pollux.cenkes.org> <200912091002.55490.jhb@freebsd.org> <20091209184345.GR98273@pollux.cenkes.org> In-Reply-To: <20091209184345.GR98273@pollux.cenkes.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200912091520.21583.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 09 Dec 2009 15:32:05 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-acpi@freebsd.org Subject: Re: libi386/biosacpi.c - bad RSDP checksum search X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2009 20:32:06 -0000 On Wednesday 09 December 2009 1:43:45 pm Andrew Pantyukhin wrote: > On Wed, Dec 09, 2009 at 10:02:55AM -0500, John Baldwin wrote: > > We can probably just drop the message altogether I think. The > > ACPI stuff the loader does is just advisory. The kernel will > > give more detailed notes about a bad checksum if needed. > > Agreed, looks like a leftover debug message. Can you commit if > there's no objection? Oh, I was going to let you commit it. If you would rather I do it that is fine as well. -- John Baldwin From owner-freebsd-acpi@FreeBSD.ORG Wed Dec 9 20:32:07 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3ED21106568F; Wed, 9 Dec 2009 20:32:07 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 0DDC08FC08; Wed, 9 Dec 2009 20:32:07 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id B282646B29; Wed, 9 Dec 2009 15:32:06 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 09AA98A025; Wed, 9 Dec 2009 15:32:06 -0500 (EST) From: John Baldwin To: "Moore, Robert" Date: Wed, 9 Dec 2009 15:29:41 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20091103; KDE/4.3.1; amd64; ; ) References: <20091208060339.GK98273@pollux.cenkes.org> <200912080749.55710.jhb@freebsd.org> <4911F71203A09E4D9981D27F9D83085840DA9AC8@orsmsx503.amr.corp.intel.com> In-Reply-To: <4911F71203A09E4D9981D27F9D83085840DA9AC8@orsmsx503.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200912091529.41293.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 09 Dec 2009 15:32:06 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: "freebsd-acpi@freebsd.org" , Andrew Pantyukhin Subject: Re: libi386/biosacpi.c - bad RSDP checksum search X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2009 20:32:07 -0000 On Wednesday 09 December 2009 1:46:36 pm Moore, Robert wrote: > Might be a dumb question, but why is the bootloader looking around for ACPI > tables in the first place? I think it only does so for two different reasons. First, it sets some kernel environment variables with the locations of the RSDP as well as the RSDT or XDST. The FreeBSD version of acpidump will then use these variables if they are set instead of walking memory to find the tables. The bigger reason is that on FreeBSD/i386 ACPI can be compiled as an optional kernel module (and until 8.0 it was provided as a module rather than statically compiled into the main kernel image by default), and that the loader will automatically load the ACPI module when loading a kernel if it detects that ACPI is present. This latter functionality is largely obsolete in FreeBSD 8.0 and later though since ACPI is now compiled into the kernel by default. -- John Baldwin