From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:08:02 2005 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 68EE616A41C; Sun, 3 Jul 2005 00:08:02 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id B554943DB5; Sun, 3 Jul 2005 00:07:21 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 011105D6B8; Sat, 2 Jul 2005 17:06:39 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id 3648A5C865 for ; Tue, 15 Jun 2004 10:31:57 -0700 (PDT) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 9EE0656326; Tue, 15 Jun 2004 17:31:18 +0000 (GMT) (envelope-from owner-freebsd-arch@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 529DB16A4D5; Tue, 15 Jun 2004 17:31:18 +0000 (GMT) Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0CCAB16A4CE for ; Tue, 15 Jun 2004 17:31:15 +0000 (GMT) Received: from root.org (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id D1D2843D60 for ; Tue, 15 Jun 2004 17:31:14 +0000 (GMT) (envelope-from nate@root.org) Received: (qmail 27833 invoked by uid 1000); 15 Jun 2004 17:30:44 -0000 From: Nate Lawson To: arch@freebsd.org, acpi@freebsd.org Message-ID: <20040615102506.F27810@root.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-arch@freebsd.org Errors-To: owner-freebsd-arch@freebsd.org X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on elvis.mu.org X-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.63 X-Spam-Level: Cc: Subject: ACPI mpsafe patch X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:08:02 -0000 X-Original-Date: Tue, 15 Jun 2004 10:30:44 -0700 (PDT) X-List-Received-Date: Sun, 03 Jul 2005 00:08:02 -0000 I've gone through this carefully and have tested it a lot and it appears ready for mainstream testing. I'm especially interested in SMP testing, with and without WITNESS. Run the following script on your system to test it (start 2 or 3 of these): #!/bin/sh sysctl hw.acpi.thermal.polling_rate=1 sysctl hw.acpi.battery.info_expire=1 while [ 1 ]; do apm sysctl hw.acpi done While that's going, use the system normally, suspend/resume, etc. The few parts that aren't done are acpi_video, acpi_asus, and acpi_toshiba. Once I finish these and a couple nits, I'll provide a final patch for testing as well as fix any problems found. http://www.root.org/~nate/freebsd/acpi_mpsafe.diff.gz Thanks, -Nate _______________________________________________ freebsd-arch@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-arch To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:25:10 2005 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EA5DB16A41C; Sun, 3 Jul 2005 00:25:09 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5971243FD9; Sun, 3 Jul 2005 00:16:49 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id F08B761260; Sat, 2 Jul 2005 17:16:48 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id 45CB65C9BC for ; Wed, 29 Dec 2004 09:24:26 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id DEBB1565BB; Wed, 29 Dec 2004 17:24:15 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 8CEF416A4CF; Wed, 29 Dec 2004 17:24:15 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B604716A4CE; Wed, 29 Dec 2004 17:24:10 +0000 (GMT) Received: from smtp10.wanadoo.fr (smtp10.wanadoo.fr [193.252.22.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3DC4043D54; Wed, 29 Dec 2004 17:24:10 +0000 (GMT) (envelope-from aurelien.nephtali@wanadoo.fr) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf1004.wanadoo.fr (SMTP Server) with SMTP id 916352400162; Wed, 29 Dec 2004 18:24:08 +0100 (CET) Received: from [192.168.2.30] (ca-sqy-4-49.w80-8.abo.wanadoo.fr [80.8.57.49]) by mwinf1004.wanadoo.fr (SMTP Server) with ESMTP id A30432400173; Wed, 29 Dec 2004 18:24:07 +0100 (CET) Message-ID: <41D2E837.8030105@wanadoo.fr> From: Aurelien Nephtali User-Agent: Mozilla Thunderbird 1.0 (X11/20041219) X-Accept-Language: en-us, en MIME-Version: 1.0 To: current@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on elvis.mu.org X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.1 X-Spam-Level: Cc: acpi@freebsd.org Subject: exclusive sleep mutex acpica subsystem lock r = 0 (0xc14d5300)locked @ /usr/src,/sys/modules/acpi/acpi/../../../dev/acpica/Osd/OsdSynch.c:360 X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:25:10 -0000 X-Original-Date: Wed, 29 Dec 2004 18:24:07 +0100 X-List-Received-Date: Sun, 03 Jul 2005 00:25:10 -0000 Hi, I got this at boot with a fresh -CURRENT : Sleeping on "acsem" with the following non-sleepable locks held: exclusive sleep mutex acpica subsystem lock r = 0 (0xc14d5300) locked @ /usr/src /sys/modules/acpi/acpi/../../../dev/acpica/Osd/OsdSynch.c:360 KDB: stack backtrace: witness_warn(5,c14d5480,c082b6fb,c0a765dd,c9b7fbe8) at witness_warn+0x1a8 msleep(c14d5480,c14d5480,100,c0a765dd,0) at msleep+0x37 AcpiOsWaitSemaphore(c14d5480,1,ffff,c14dee00,1) at AcpiOsWaitSemaphore+0x140 AcpiUtAcquireMutex(7,c14dee00,18,c9b7fc9c,c0a6a962) at AcpiUtAcquireMutex+0x55 AcpiDisableGpe(0,18,1,c13ee520,c9b7fcb0) at AcpiDisableGpe+0x17 EcGpeHandler(c14dee00,0,c14ee100,c9b7fce4,c0a4acb1) at EcGpeHandler+0x1a AcpiEvGpeDispatch(c13ee520,18,51,3,1000000) at AcpiEvGpeDispatch+0x81 AcpiEvGpeDetect(c14f3650,c14f4c80,c9b7fd1c,c05ffb36,c14f3650) at AcpiEvGpeDetect +0xd1 AcpiEvSciXruptHandler(c14f3650,0,0,c1423000,0) at AcpiEvSciXruptHandler+0x13 ithread_loop(c141c900,c9b7fd48,c141c900,c05ff998,0) at ithread_loop+0x19e fork_exit(c05ff998,c141c900,c9b7fd48) at fork_exit+0x7e fork_trampoline() at fork_trampoline+0x8 --- trap 0x1, eip = 0, esp = 0xc9b7fd7c, ebp = 0 --- naboo# uname -a FreeBSD naboo 6.0-CURRENT FreeBSD 6.0-CURRENT #0: Wed Dec 29 10:00:40 CET 2004 dak@naboo:/usr/obj/usr/src/sys/GENERIC i386 -- NEPHTALI 'dak' Aurelien TEK2 - Promo 2008 06.19.84.90.10 _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:36:43 2005 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 23CA716A41F; Sun, 3 Jul 2005 00:36:42 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE1994407C; Sun, 3 Jul 2005 00:20:08 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id A5CC5623D5; Sat, 2 Jul 2005 17:19:55 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id CB1AA5C9D7 for ; Wed, 23 Feb 2005 11:26:28 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 9FDD05705E; Wed, 23 Feb 2005 19:26:21 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 7769E16A4D0; Wed, 23 Feb 2005 19:26:19 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 28AAC16A4CF; Wed, 23 Feb 2005 19:26:13 +0000 (GMT) Received: from www.cryptography.com (li-22.members.linode.com [64.5.53.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D04A43D3F; Wed, 23 Feb 2005 19:26:12 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.0.0.34] (adsl-67-119-74-222.dsl.sntc01.pacbell.net [67.119.74.222]) by www.cryptography.com (8.12.8/8.12.8) with ESMTP id j1NJQ1Zj032059 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 23 Feb 2005 11:26:01 -0800 Message-ID: <421CD8C0.2040805@root.org> From: Nate Lawson User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kevin Oberman References: <20050219053023.025DF5D07@ptavv.es.net> In-Reply-To: <20050219053023.025DF5D07@ptavv.es.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, J_CHICKENPOX_13 autolearn=no version=3.0.2 X-Spam-Level: Cc: acpi@freebsd.org, current@freebsd.org Subject: Re: patch: p4tcc and speedstep cpufreq drivers X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:36:43 -0000 X-Original-Date: Wed, 23 Feb 2005 11:25:52 -0800 X-List-Received-Date: Sun, 03 Jul 2005 00:36:43 -0000 Kevin Oberman wrote: > > Well, it all seems working, but the performance is not proportional to > the "frequency". I am attaching the results of testing. The fist column > is value of freq and the second is the transfer rate from dd to md5. > > FWIW, when I did have TCC working I had 31 freq_levels, but if I set the > freq below about 200, my system freezes and requires a hard power > cycle. I am running ULE but no PREEMPTION. The exact point at which it > locks up is not consistent. Please cvsup and test. I imported a bugfixed version of p4tcc. I've run an R32 at 50 Mhz, no problems. -- Nate _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:36:54 2005 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 01A5716A41F; Sun, 3 Jul 2005 00:36:54 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3D34A4407D; Sun, 3 Jul 2005 00:20:07 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 835E0623A6; Sat, 2 Jul 2005 17:19:55 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id 7A2485C9C1; Wed, 23 Feb 2005 17:19:39 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 38BF257002; Thu, 24 Feb 2005 01:19:34 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id E243416A4FE; Thu, 24 Feb 2005 01:19:31 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5200216A4CE; Thu, 24 Feb 2005 01:19:26 +0000 (GMT) Received: from postal3.es.net (postal3.es.net [198.128.3.207]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0559C43D2D; Thu, 24 Feb 2005 01:19:26 +0000 (GMT) (envelope-from oberman@es.net) Received: from ptavv.es.net ([198.128.4.29]) by postal3.es.net (Postal Node 3) with ESMTP (SSL) id IBA74465; Wed, 23 Feb 2005 17:19:25 -0800 Received: from ptavv (localhost [127.0.0.1]) by ptavv.es.net (Tachyon Server) with ESMTP id 992A65D07; Wed, 23 Feb 2005 17:19:24 -0800 (PST) X-Mailer: exmh version 2.7.0 06/18/2004 with nmh-1.0.4 To: Nate Lawson In-reply-to: Your message of "Wed, 23 Feb 2005 11:25:52 PST." <421CD8C0.2040805@root.org> Mime-Version: 1.0 Content-Type: multipart/mixed ; boundary="==_Exmh_-5528591840" From: "Kevin Oberman" Message-Id: <20050224011924.992A65D07@ptavv.es.net> X-Content-Filtered-By: Mailman/MimeDel 2.1.1 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-0.6 required=5.0 tests=AWL, BAYES_00, J_CHICKENPOX_13, SARE_HEAD_SUBJ_RAND,SARE_XMAIL_SUSP2 autolearn=no version=3.0.2 X-Spam-Level: Cc: acpi@freebsd.org, current@freebsd.org Subject: Re: patch: p4tcc and speedstep cpufreq drivers X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:36:54 -0000 X-Original-Date: Wed, 23 Feb 2005 17:19:24 -0800 X-List-Received-Date: Sun, 03 Jul 2005 00:36:54 -0000 This is a multipart MIME message. --==_Exmh_-5528591840 Content-Type: text/plain; charset=us-ascii > Date: Wed, 23 Feb 2005 11:25:52 -0800 > From: Nate Lawson > > Kevin Oberman wrote: > > > > Well, it all seems working, but the performance is not proportional to > > the "frequency". I am attaching the results of testing. The fisrt column > > is value of freq and the second is the transfer rate from dd to md5. > > > > FWIW, when I did have TCC working I had 31 freq_levels, but if I set the > > freq below about 200, my system freezes and requires a hard power > > cycle. I am running ULE but no PREEMPTION. The exact point at which it > > locks up is not consistent. > > Please cvsup and test. I imported a bugfixed version of p4tcc. I've > run an R32 at 50 Mhz, no problems. No joy. I set it to 262 and it was fine. The next step killed the system again. I'm also concerned that taking TCC out of automatic mode might not be a great idea, at least until things like _PSV are supported. When I do a buildkernel, buildworld or any big compile job, I need to slow down the CPU to keep the CPU form frying. It quickly jumps to 185 F. or higher if I don't. If I understand automatic TCC, it should throttle the CPU all by itself to prevent this. Between throttling and frequency adjustment I can get about 16 performance levels and I don' see a good reason for another 15. Also, the change is frequency is so non-linear that small changes often don't make sense. The first three step are fairly straight, but then things get bumpy. It looks to me like all frequency settings are not created equal. I should read the code, but what is the presidence between throttling the CPU and TCC? The increase in performance when freq is dropped from 1378 to 1350, 984 to 900, 703 to 675, 506 to 450, and 337 to 300 is clearly not what I would expect. I am attaching a spreadsheet (Excel format, but generated by Gnumeric) showing 4 runs made in single-user mode. If the graph is not showing properly, I can send it in gnumeric format. I will also attach the trivial Perl script I run to do generate the raw data. -- 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 --==_Exmh_-5528591840 Content-Type: text/plain ; name="test-speed"; charset=us-ascii Content-Description: test-speed Content-Disposition: attachment; filename="test-speed" #!/usr/bin/perl $min_speed = 250; ($freq) = `sysctl dev.cpu.0.freq_levels`; @freq = split ' ', $freq; @freq = grep /\d+\/-?\d+/, @freq; foreach (@freq) {s/^(\d+).+$/$1/;} foreach (@freq) { if ($_ < $min_speed) {next;} `sysctl dev.cpu.0.freq=$_`; `dd if=/dev/zero bs=1m count=100 2>/tmp/testresult | md5`; @result = `cat /tmp/testresult`; $result = $result[2]; $result =~ /secs \((\d+) bytes\/sec/; printf "%4d %s\n", $_, $1; } # Now do it backwards (speed up) for ($i=$#freq; $i>=0; $i--) { if ($freq[$i] < $min_speed) {next;} `sysctl dev.cpu.0.freq=$freq[$i]`; `dd if=/dev/zero bs=1m count=100 2>/tmp/testresult | md5`; @result = `cat /tmp/testresult`; $result = $result[2]; $result =~ /secs \((\d+) bytes\/sec/; printf "%4d %s\n", $freq[$i], $1; } `sysctl dev.cpu.0.freq=1800`; unlink "/tmp/testresult"; exit; --==_Exmh_-5528591840 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" --==_Exmh_-5528591840-- From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:36:54 2005 Return-Path: X-Original-To: acpi@FreeBSD.ORG Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1CBC216A421; Sun, 3 Jul 2005 00:36:54 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B4C343E3B; Sun, 3 Jul 2005 00:20:02 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 63CFD62399; Sat, 2 Jul 2005 17:19:55 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id 9F8585C862 for ; Thu, 24 Feb 2005 01:39:39 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 541FC5735A; Thu, 24 Feb 2005 09:39:21 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 3FD7016A4D7; Thu, 24 Feb 2005 09:39:20 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 539E916A4CE; Thu, 24 Feb 2005 09:39:14 +0000 (GMT) Received: from www.portaone.com (support.portaone.com [195.70.151.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 51C1C43D5C; Thu, 24 Feb 2005 09:39:13 +0000 (GMT) (envelope-from sobomax@portaone.com) Received: from [192.168.0.128] ([192.168.2.2]) (authenticated bits=0) by www.portaone.com (8.12.11/8.12.11) with ESMTP id j1O9d4V2075186 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 24 Feb 2005 10:39:05 +0100 (CET) (envelope-from sobomax@portaone.com) Message-ID: <421DA0B5.4060705@portaone.com> From: Maxim Sobolev Organization: Porta Software Ltd User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kevin Oberman References: <20050224011924.992A65D07@ptavv.es.net> In-Reply-To: <20050224011924.992A65D07@ptavv.es.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV 0.80/685/Wed Jan 26 10:08:24 2005 clamav-milter version 0.80j on www.portaone.com X-Virus-Status: Clean X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, J_CHICKENPOX_13 autolearn=no version=3.0.2 X-Spam-Level: Cc: acpi@FreeBSD.ORG, current@FreeBSD.ORG Subject: Re: patch: p4tcc and speedstep cpufreq drivers X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:36:54 -0000 X-Original-Date: Thu, 24 Feb 2005 11:39:01 +0200 X-List-Received-Date: Sun, 03 Jul 2005 00:36:54 -0000 Kevin Oberman wrote: >>Date: Wed, 23 Feb 2005 11:25:52 -0800 >>From: Nate Lawson >> >>Kevin Oberman wrote: >> >>>Well, it all seems working, but the performance is not proportional to >>>the "frequency". I am attaching the results of testing. The fisrt column >>>is value of freq and the second is the transfer rate from dd to md5. >>> >>>FWIW, when I did have TCC working I had 31 freq_levels, but if I set the >>>freq below about 200, my system freezes and requires a hard power >>>cycle. I am running ULE but no PREEMPTION. The exact point at which it >>>locks up is not consistent. >> >>Please cvsup and test. I imported a bugfixed version of p4tcc. I've >>run an R32 at 50 Mhz, no problems. > > > No joy. I set it to 262 and it was fine. The next step killed the system > again. > > I'm also concerned that taking TCC out of automatic mode might not be a > great idea, at least until things like _PSV are supported. When I do a > buildkernel, buildworld or any big compile job, I need to slow down the > CPU to keep the CPU form frying. It quickly jumps to 185 F. or higher if > I don't. If I understand automatic TCC, it should throttle the CPU all > by itself to prevent this. Taking TCC out of automatic mode doesn't disable thermal controlling circuitry completely, so that if the processor overheats it will shut down the machine anyway: --- Regardless of enabling of the automatic or On-Demand modes, in the event of a catastrophic cooling failure, the processor will automatically shut down when the silicon has reached a temperature of approximately 135 °C. At this point the system bus signal THERMTRIP# will go active and stay active until RESET# has been initiated. THERMTRIP# activation is independent of processor activity and does not generate any bus cycles. If THERMTRIP# is asserted, processor core voltage (Vcc) must be removed within the timeframe defined in Table 16. --- > Between throttling and frequency adjustment I can get about 16 > performance levels and I don' see a good reason for another 15. Also, > the change is frequency is so non-linear that small changes often don't > make sense. The first three step are fairly straight, but then things > get bumpy. It looks to me like all frequency settings are not created > equal. I wonder this too. I think in the presence of several independent regulators we need some form of calibration to get more or less precise results. BTW, looks like you have forgotten to attach the spreadsheet. -Maxim > I should read the code, but what is the presidence between throttling > the CPU and TCC? The increase in performance when freq is dropped from > 1378 to 1350, 984 to 900, 703 to 675, 506 to 450, and 337 to 300 is > clearly not what I would expect. > > I am attaching a spreadsheet (Excel format, but generated by Gnumeric) > showing 4 runs made in single-user mode. If the graph is not showing > properly, I can send it in gnumeric format. I will also attach the > trivial Perl script I run to do generate the raw data. > > > ------------------------------------------------------------------------ > > #!/usr/bin/perl > $min_speed = 250; > ($freq) = `sysctl dev.cpu.0.freq_levels`; > @freq = split ' ', $freq; > @freq = grep /\d+\/-?\d+/, @freq; > foreach (@freq) {s/^(\d+).+$/$1/;} > foreach (@freq) { > if ($_ < $min_speed) {next;} > `sysctl dev.cpu.0.freq=$_`; > `dd if=/dev/zero bs=1m count=100 2>/tmp/testresult | md5`; > @result = `cat /tmp/testresult`; > $result = $result[2]; > $result =~ /secs \((\d+) bytes\/sec/; > printf "%4d %s\n", $_, $1; > } > # Now do it backwards (speed up) > for ($i=$#freq; $i>=0; $i--) { > if ($freq[$i] < $min_speed) {next;} > `sysctl dev.cpu.0.freq=$freq[$i]`; > `dd if=/dev/zero bs=1m count=100 2>/tmp/testresult | md5`; > @result = `cat /tmp/testresult`; > $result = $result[2]; > $result =~ /secs \((\d+) bytes\/sec/; > printf "%4d %s\n", $freq[$i], $1; > } > `sysctl dev.cpu.0.freq=1800`; > unlink "/tmp/testresult"; > exit; > > > ------------------------------------------------------------------------ > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:36:54 2005 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B612316A420; Sun, 3 Jul 2005 00:36:54 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 785F743D1F; Sun, 3 Jul 2005 00:20:09 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id B3CED623D7; Sat, 2 Jul 2005 17:19:55 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id 46BB25C9B2; Wed, 23 Feb 2005 11:26:07 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 0754B57156; Wed, 23 Feb 2005 19:25:27 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id A95FB16A542; Wed, 23 Feb 2005 19:25:01 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6F43216A4D2; Wed, 23 Feb 2005 19:24:56 +0000 (GMT) Received: from www.cryptography.com (li-22.members.linode.com [64.5.53.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2CA7C43D45; Wed, 23 Feb 2005 19:24:56 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.0.0.34] (adsl-67-119-74-222.dsl.sntc01.pacbell.net [67.119.74.222]) by www.cryptography.com (8.12.8/8.12.8) with ESMTP id j1NJOsZj032021 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 23 Feb 2005 11:24:55 -0800 Message-ID: <421CD87C.70803@root.org> From: Nate Lawson User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Morten Rodal References: <42068A5C.1030300@root.org> <200502191911.36228.morten@rodal.no> In-Reply-To: <200502191911.36228.morten@rodal.no> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Level: Cc: acpi@freebsd.org, current@freebsd.org Subject: Re: HEADSUP: cpufreq import complete, acpi_throttling changed X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:36:55 -0000 X-Original-Date: Wed, 23 Feb 2005 11:24:44 -0800 X-List-Received-Date: Sun, 03 Jul 2005 00:36:55 -0000 Morten Rodal wrote: > On Sunday 06 February 2005 22:21, Nate Lawson wrote: > >>If you have throttling, please test the new configuration to be sure it >>still works as before. Final upcoming work will be manpage support and >>bugfixing as necessary. >> > > > Throttling used to work on my Dell Inspiron 8200, but with the new > cpufreq/acpi_perf I only get errors when trying to set a new cpu > frequency, like this: > > # sysctl dev.cpu.0.freq=1200 > acpi_perf0: Px transition to 1200 failed > acpi_perf0: set freq failed, err 6 > > Regardless of what value I use, it either says 'Px transition to 1200 > failed' or 'Px transition to 1700 failed.' These should be fixed now. Please cvsup and test. -- Nate _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:36:58 2005 Return-Path: X-Original-To: acpi@FreeBSD.ORG Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 099D316A429; Sun, 3 Jul 2005 00:36:58 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9463F44098; Sun, 3 Jul 2005 00:20:15 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id B9309623F1; Sat, 2 Jul 2005 17:19:56 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id 3F9F15C955; Thu, 24 Feb 2005 15:09:37 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id DAE9356104; Thu, 24 Feb 2005 23:09:20 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id E71CC16A53E; Thu, 24 Feb 2005 23:09:12 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E7B8416A4CE; Thu, 24 Feb 2005 23:08:55 +0000 (GMT) Received: from pi.codefab.com (pi.codefab.com [199.103.21.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9AEE243D31; Thu, 24 Feb 2005 23:08:55 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from localhost (localhost [127.0.0.1]) by pi.codefab.com (Postfix) with ESMTP id 085CB5D61; Thu, 24 Feb 2005 18:08:55 -0500 (EST) Received: from pi.codefab.com ([127.0.0.1]) by localhost (pi.codefab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 53528-06; Thu, 24 Feb 2005 18:08:54 -0500 (EST) Received: from [192.168.1.3] (pool-68-161-75-250.ny325.east.verizon.net [68.161.75.250]) by pi.codefab.com (Postfix) with ESMTP id AD4075D39; Thu, 24 Feb 2005 18:08:53 -0500 (EST) Message-ID: <421E5E7B.5040104@mac.com> From: Chuck Swiger Organization: The Courts of Chaos User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041217 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Maxim Sobolev References: <20050224011924.992A65D07@ptavv.es.net> <421DA0B5.4060705@portaone.com> <421E42F2.6010105@root.org> <421E49D9.60803@portaone.com> In-Reply-To: <421E49D9.60803@portaone.com> X-Enigmail-Version: 0.90.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at codefab.com X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, J_CHICKENPOX_13, RCVD_IN_SORBS autolearn=no version=3.0.2 X-Spam-Level: Cc: acpi@FreeBSD.ORG, current@FreeBSD.ORG Subject: Re: patch: p4tcc and speedstep cpufreq drivers X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:36:58 -0000 X-Original-Date: Thu, 24 Feb 2005 18:08:43 -0500 X-List-Received-Date: Sun, 03 Jul 2005 00:36:58 -0000 Maxim Sobolev wrote: > Nate Lawson wrote: [ ... ] >> "On-Demand mode may be used at the same time Automatic mode is >> enabled, however, if the system (tries to enable the TCC via On-Demand >> mode[1]) at the same time (automatic mode is enabled[2]) AND (a high temperature >> condition exists [3]), the duty cycle of the automatic mode will override >> the duty cycle selected by the On-Demand mode." >> >> Since automatic mode is set by the BIOS before we even boot, things >> should be fine. > > Well, this is quite tricky part of the spec. My reading is that the > paragraph above applies only to situation if you are (trying to set > on-demand mode [1]) when both (automatic mode is in effect [2]) *and* (high > temperature condition already exists [3]), in that case automatic mode will > win and override any manual settings. I suspect you'd read your paragraph with [1] and [2] joined together, but they can be read seperately just as the spec can. :-) > However, in the case when you have on-demand mode already on and high > temperature condition emerges it will have no effect on duty cycle until > THERMTRIP# kicks in. > > That's in my view explains why there is big AND in the text above. I think the spec is advising developers who try to control TCC that if PROCHOT gets asserted, the CPU may override the programmed settings in favor of the automatic ones. I don't think the spec is asserting that the CPU is forbidden from reducing power usage if PROCHOT condition is detected, regardless of what automatic mode is set to. A reasonable processor would drop to a known minimal power usage state-- hopefully one low enough to keep the CPU from completely overheating even if a fan has failed-- if PROCHOT is seen. [ It may also be the case that a CPU does not do so, in which case the ACPI driver code ought to try to pay attention to PROCHOT and reduce power consumption regardless and not just depend on CPU failsafes to work. If that is your position, well, I would agree with this. :-) ] -- -Chuck _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:36:58 2005 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C7D4316A432; Sun, 3 Jul 2005 00:36:58 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 638FD43E56; Sun, 3 Jul 2005 00:20:22 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 2EFDB61BB7; Sat, 2 Jul 2005 17:19:57 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id 0B74F5C971 for ; Thu, 24 Feb 2005 13:01:34 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 1460B5706D; Thu, 24 Feb 2005 20:59:52 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 3F04D16A4DA; Thu, 24 Feb 2005 20:59:50 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D434216A4CE; Thu, 24 Feb 2005 20:59:44 +0000 (GMT) Received: from www.cryptography.com (li-22.members.linode.com [64.5.53.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 904C443D58; Thu, 24 Feb 2005 20:59:44 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.0.0.34] (adsl-67-119-74-222.dsl.sntc01.pacbell.net [67.119.74.222]) by www.cryptography.com (8.12.8/8.12.8) with ESMTP id j1OKxgZj016713 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 24 Feb 2005 12:59:43 -0800 Message-ID: <421E403E.7040804@root.org> From: Nate Lawson User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Morten Rodal References: <42068A5C.1030300@root.org> <200502191911.36228.morten@rodal.no> <421CD87C.70803@root.org> <200502241710.44321.morten@rodal.no> In-Reply-To: <200502241710.44321.morten@rodal.no> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Level: Cc: acpi@freebsd.org, current@freebsd.org Subject: Re: HEADSUP: cpufreq import complete, acpi_throttling changed X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:36:59 -0000 X-Original-Date: Thu, 24 Feb 2005 12:59:42 -0800 X-List-Received-Date: Sun, 03 Jul 2005 00:36:59 -0000 Morten Rodal wrote: > On Wednesday 23 February 2005 20:24, Nate Lawson wrote: > The issue is partly fixed. I now see the following frequency levels if, > and only if, I booted the laptop on battery power: > > # sysctl dev.cpu.0.freq_levels > dev.cpu.0.freq_levels: 1200/0 1050/0 900/0 787/0 750/0 656/0 600/0 562/0 > 525/0 450/0 393/0 337/0 300/0 262/0 225/0 187/0 150/0 112/0 75/0 37/0 > > Note that the native processor speed (1700 MHz) is not listed, and setting > the speed below 150 hard-hangs/freezes the laptop. Not sure we can fix this one. It appears some very low clock rates hang some systems. Can you test with SCHED_4BSD? > When booting with AC-power the laptop does not report any freq{,_levels}. > It does not matter if I remove the AC-power once the computer is up and > running, I always get this: > > # sysctl dev.cpu.0.freq > dev.cpu.0.freq: -1 I just committed a fix for this. -- Nate _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:36:59 2005 Return-Path: X-Original-To: acpi@FreeBSD.ORG Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4375B16A436; Sun, 3 Jul 2005 00:36:59 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 079AD43E36; Sun, 3 Jul 2005 00:20:20 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 1A80E61473; Sat, 2 Jul 2005 17:19:57 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id 925FA5C9CE; Thu, 24 Feb 2005 13:11:51 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 07A1755EFB; Thu, 24 Feb 2005 21:11:34 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 875C616A4D6; Thu, 24 Feb 2005 21:11:30 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2C52D16A4CE; Thu, 24 Feb 2005 21:11:26 +0000 (GMT) Received: from www.cryptography.com (li-22.members.linode.com [64.5.53.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id D4A1143D55; Thu, 24 Feb 2005 21:11:25 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.0.0.34] (adsl-67-119-74-222.dsl.sntc01.pacbell.net [67.119.74.222]) by www.cryptography.com (8.12.8/8.12.8) with ESMTP id j1OLBEZj016818 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 24 Feb 2005 13:11:15 -0800 Message-ID: <421E42F2.6010105@root.org> From: Nate Lawson User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Maxim Sobolev References: <20050224011924.992A65D07@ptavv.es.net> <421DA0B5.4060705@portaone.com> In-Reply-To: <421DA0B5.4060705@portaone.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, J_CHICKENPOX_13 autolearn=no version=3.0.2 X-Spam-Level: Cc: acpi@FreeBSD.ORG, current@FreeBSD.ORG Subject: Re: patch: p4tcc and speedstep cpufreq drivers X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:36:59 -0000 X-Original-Date: Thu, 24 Feb 2005 13:11:14 -0800 X-List-Received-Date: Sun, 03 Jul 2005 00:36:59 -0000 Maxim Sobolev wrote: > Kevin Oberman wrote: >> No joy. I set it to 262 and it was fine. The next step killed the system >> again. >> >> I'm also concerned that taking TCC out of automatic mode might not be a >> great idea, at least until things like _PSV are supported. When I do a >> buildkernel, buildworld or any big compile job, I need to slow down the >> CPU to keep the CPU form frying. It quickly jumps to 185 F. or higher if >> I don't. If I understand automatic TCC, it should throttle the CPU all >> by itself to prevent this. > > > Taking TCC out of automatic mode doesn't disable thermal controlling > circuitry completely, so that if the processor overheats it will shut > down the machine anyway: > > --- > Regardless of enabling of the automatic > or On-Demand modes, in the event of a catastrophic cooling failure, the > processor will > automatically shut down when the silicon has reached a temperature of > approximately > 135 °C. At this point the system bus signal THERMTRIP# will go active > and stay active > until RESET# has been initiated. > --- Correct. Even more so, automatic mode continues to override On-Demand mode if there is a more moderate thermal condition than THERMTRIP#: "On-Demand mode may be used at the same time Automatic mode is enabled, however, if the system tries to enable the TCC via On-Demand mode at the same time automatic mode is enabled AND a high temperature condition exists, the duty cycle of the automatic mode will override the duty cycle selected by the On-Demand mode." Since automatic mode is set by the BIOS before we even boot, things should be fine. >> Between throttling and frequency adjustment I can get about 16 >> performance levels and I don' see a good reason for another 15. Also, >> the change is frequency is so non-linear that small changes often don't >> make sense. The first three step are fairly straight, but then things >> get bumpy. It looks to me like all frequency settings are not created >> equal. > > I wonder this too. I think in the presence of several independent > regulators we need some form of calibration to get more or less precise > results. You can manually test this kind of stuff by doing: hint.p4tcc.0.disabled="1" -- Nate _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:36:59 2005 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4804216A43B; Sun, 3 Jul 2005 00:36:59 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0CAFA443D6; Sun, 3 Jul 2005 00:20:21 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 2388861AA3; Sat, 2 Jul 2005 17:19:57 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id C331C5C862 for ; Thu, 24 Feb 2005 13:02:46 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id A6F3F5547B; Thu, 24 Feb 2005 21:02:41 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id A952516A503; Thu, 24 Feb 2005 21:02:37 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9F94F16A4CE; Thu, 24 Feb 2005 21:02:32 +0000 (GMT) Received: from www.cryptography.com (li-22.members.linode.com [64.5.53.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 492A043D2D; Thu, 24 Feb 2005 21:02:32 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.0.0.34] (adsl-67-119-74-222.dsl.sntc01.pacbell.net [67.119.74.222]) by www.cryptography.com (8.12.8/8.12.8) with ESMTP id j1OL2UZj016741 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 24 Feb 2005 13:02:30 -0800 Message-ID: <421E40E6.9010804@root.org> From: Nate Lawson User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tobias Grosser References: <4213F066.2050708@root.org> <4214119B.2010909@telia.com> <421537E9.8050203@root.org> <1108749117.981.1.camel@tobias.home.web-wahnsinn.de> In-Reply-To: <1108749117.981.1.camel@tobias.home.web-wahnsinn.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, J_CHICKENPOX_13 autolearn=no version=3.0.2 X-Spam-Level: Cc: acpi@freebsd.org, current@freebsd.org Subject: Re: patch: p4tcc and speedstep cpufreq drivers X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:36:59 -0000 X-Original-Date: Thu, 24 Feb 2005 13:02:30 -0800 X-List-Received-Date: Sun, 03 Jul 2005 00:36:59 -0000 Tobias Grosser wrote: > with patch: "sysctl dev.cpu" > -------------------------------------------------------------------- > dev.cpu.0.%desc: ACPI CPU (3 Cx states) > dev.cpu.0.%driver: cpu > dev.cpu.0.%location: handle=\_PR_.CPU_ > dev.cpu.0.%pnpinfo: _HID=none _UID=0 > dev.cpu.0.%parent: acpi0 > dev.cpu.0.freq: -1 > -------------------------------------------------------------------- This should be fixed now in -current. > without patch: "sysctl dev.cpu" > -------------------------------------------------------------------- > dev.cpu.0.%desc: ACPI CPU (3 Cx states) > dev.cpu.0.%driver: cpu > dev.cpu.0.%location: handle=\_PR_.CPU_ > dev.cpu.0.%pnpinfo: _HID=none _UID=0 > dev.cpu.0.%parent: acpi0 > dev.cpu.0.freq: 1700 > dev.cpu.0.freq_levels: 1700/24500 1487/21437 1400/19500 1275/18375 > 1225/17062 12 00/16000 1062/15312 1000/13000 900/12000 875/12187 > 850/12250 800/9500 750/10000 700/9750 637/9187 600/6000 525/7312 > 500/6500 450/6000 425/6125 400/4750 375/4875 350/4875 300/4000 250/3250 > 212/3062 175/2437 150/2000 125/1625 100/1187 75/750 > -------------------------------------------------------------------- > > 3. Since always my CPU gets different numbers of Cx states, if connected > to power during boot or not. 3 states with power 4 without. The number > of the states doesn't change, if I plug or unplug the power connection. That is a function of the BIOS. It decides what states you get at various times. The acpi_perf driver should successfully adjust when things change at runtime. The other drivers have no way of knowing. > 4. One question. Under Windows my battery should reach about 4.7 hrs > under FBSD i reached about 3 hrs with est. Will your new patches change > the BSD values? I don't know but things should be getting better. -- Nate _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:36:59 2005 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A23E516A436; Sun, 3 Jul 2005 00:36:59 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 91F6E443D9; Sun, 3 Jul 2005 00:20:23 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id BCAB661DE8; Sat, 2 Jul 2005 17:19:57 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id A8F2F5C999; Thu, 24 Feb 2005 08:11:50 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 253DC5780F; Thu, 24 Feb 2005 16:10:58 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 9E95616A4D8; Thu, 24 Feb 2005 16:10:53 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 990D816A4CE; Thu, 24 Feb 2005 16:10:48 +0000 (GMT) Received: from bgo1smout1.broadpark.no (bgo1smout1.broadpark.no [217.13.4.94]) by mx1.FreeBSD.org (Postfix) with ESMTP id 74FD443D3F; Thu, 24 Feb 2005 16:10:47 +0000 (GMT) (envelope-from morten@rodal.no) Received: from bgo1sminn1.broadpark.no ([217.13.4.93]) by bgo1smout1.broadpark.no (Sun Java System Messaging Server 6.1 HotFix 0.05 (built Oct 21 2004)) with ESMTP id <0ICF00AWKBD1MP40@bgo1smout1.broadpark.no>; Thu, 24 Feb 2005 17:05:25 +0100 (CET) Received: from slimy.rodal.no ([80.202.56.120]) by bgo1sminn1.broadpark.no (Sun Java System Messaging Server 6.1 HotFix 0.05 (built Oct 21 2004)) with ESMTP id <0ICF00DXJBPJ4UA0@bgo1sminn1.broadpark.no>; Thu, 24 Feb 2005 17:12:56 +0100 (CET) Received: from burton.rodal.no (burton.rodal.no [192.168.20.70]) by slimy.rodal.no (8.12.11/8.12.11) with ESMTP id j1OGAiNO084931; Thu, 24 Feb 2005 17:10:44 +0100 (CET envelope-from morten@rodal.no) Received: from localhost (localhost [[UNIX: localhost]]) by burton.rodal.no (8.13.3/8.13.1/Submit) id j1OGAiH8021758; Thu, 24 Feb 2005 17:10:44 +0100 (CET envelope-from morten@rodal.no) From: Morten Rodal In-reply-to: <421CD87C.70803@root.org> To: Nate Lawson Message-id: <200502241710.44321.morten@rodal.no> MIME-version: 1.0 Content-type: multipart/signed; boundary=nextPart5540262.HPSfxG5xcZ; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-transfer-encoding: 7bit X-Virus-Scanned: by amavisd-new References: <42068A5C.1030300@root.org> <200502191911.36228.morten@rodal.no> <421CD87C.70803@root.org> X-Authentication-warning: burton.rodal.no: morten set sender to morten@rodal.no using -f User-Agent: KMail/1.7.2 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_SORBS autolearn=no version=3.0.2 X-Spam-Level: Cc: acpi@freebsd.org, current@freebsd.org Subject: Re: HEADSUP: cpufreq import complete, acpi_throttling changed X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:36:59 -0000 X-Original-Date: Thu, 24 Feb 2005 17:10:38 +0100 X-List-Received-Date: Sun, 03 Jul 2005 00:36:59 -0000 --nextPart5540262.HPSfxG5xcZ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Wednesday 23 February 2005 20:24, Nate Lawson wrote: > Morten Rodal wrote: > > On Sunday 06 February 2005 22:21, Nate Lawson wrote: > >>If you have throttling, please test the new configuration to be sure > >> it still works as before. Final upcoming work will be manpage > >> support and bugfixing as necessary. > > > > Throttling used to work on my Dell Inspiron 8200, but with the new > > cpufreq/acpi_perf I only get errors when trying to set a new cpu > > frequency, like this: > > > > # sysctl dev.cpu.0.freq=3D1200 > > acpi_perf0: Px transition to 1200 failed > > acpi_perf0: set freq failed, err 6 > > > > Regardless of what value I use, it either says 'Px transition to 1200 > > failed' or 'Px transition to 1700 failed.' > > These should be fixed now. Please cvsup and test. The issue is partly fixed. I now see the following frequency levels if,=20 and only if, I booted the laptop on battery power: # sysctl dev.cpu.0.freq_levels dev.cpu.0.freq_levels: 1200/0 1050/0 900/0 787/0 750/0 656/0 600/0 562/0=20 525/0 450/0 393/0 337/0 300/0 262/0 225/0 187/0 150/0 112/0 75/0 37/0 Note that the native processor speed (1700 MHz) is not listed, and setting= =20 the speed below 150 hard-hangs/freezes the laptop. When booting with AC-power the laptop does not report any freq{,_levels}. = =20 It does not matter if I remove the AC-power once the computer is up and=20 running, I always get this: # sysctl dev.cpu.0.freq dev.cpu.0.freq: -1 =2D-=20 Morten Rodal "A supercomputer is a device for turning compute-bound problems into I/O bound problems." -- Ken Batcher (Goodyear Aerospace) --nextPart5540262.HPSfxG5xcZ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQBCHfyEbWe1Cy11WVsRAnBJAJ9FVda9M+8ADSkQPL5U0QPARlYRKgCcC3kG kSZQDkipL6W0cQJd41tJbuY= =fbx0 -----END PGP SIGNATURE----- --nextPart5540262.HPSfxG5xcZ-- From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:37:04 2005 Return-Path: X-Original-To: acpi@FreeBSD.ORG Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8184F16A423; Sun, 3 Jul 2005 00:37:04 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id E1DF643E66; Sun, 3 Jul 2005 00:20:17 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id E3568623FB; Sat, 2 Jul 2005 17:19:56 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id A65285C862; Thu, 24 Feb 2005 13:41:16 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id E6007575F2; Thu, 24 Feb 2005 21:41:14 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 36AD816A4F8; Thu, 24 Feb 2005 21:41:11 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BE69816A4CE; Thu, 24 Feb 2005 21:41:06 +0000 (GMT) Received: from www.portaone.com (web.portaone.com [195.70.151.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id E4D6B43D46; Thu, 24 Feb 2005 21:41:05 +0000 (GMT) (envelope-from sobomax@portaone.com) Received: from [192.168.0.128] ([192.168.2.2]) (authenticated bits=0) by www.portaone.com (8.12.11/8.12.11) with ESMTP id j1OLenEc084803 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 24 Feb 2005 22:40:50 +0100 (CET) (envelope-from sobomax@portaone.com) Message-ID: <421E49D9.60803@portaone.com> From: Maxim Sobolev Organization: Porta Software Ltd User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Nate Lawson References: <20050224011924.992A65D07@ptavv.es.net> <421DA0B5.4060705@portaone.com> <421E42F2.6010105@root.org> In-Reply-To: <421E42F2.6010105@root.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV 0.80/685/Wed Jan 26 10:08:24 2005 clamav-milter version 0.80j on www.portaone.com X-Virus-Status: Clean X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, J_CHICKENPOX_13 autolearn=no version=3.0.2 X-Spam-Level: Cc: acpi@FreeBSD.ORG, current@FreeBSD.ORG Subject: Re: patch: p4tcc and speedstep cpufreq drivers X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:37:04 -0000 X-Original-Date: Thu, 24 Feb 2005 23:40:41 +0200 X-List-Received-Date: Sun, 03 Jul 2005 00:37:04 -0000 Nate Lawson wrote: > Maxim Sobolev wrote: > >> Kevin Oberman wrote: >> >>> No joy. I set it to 262 and it was fine. The next step killed the system >>> again. >>> >>> I'm also concerned that taking TCC out of automatic mode might not be a >>> great idea, at least until things like _PSV are supported. When I do a >>> buildkernel, buildworld or any big compile job, I need to slow down the >>> CPU to keep the CPU form frying. It quickly jumps to 185 F. or higher if >>> I don't. If I understand automatic TCC, it should throttle the CPU all >>> by itself to prevent this. >> >> >> >> Taking TCC out of automatic mode doesn't disable thermal controlling >> circuitry completely, so that if the processor overheats it will shut >> down the machine anyway: >> >> --- >> Regardless of enabling of the automatic >> or On-Demand modes, in the event of a catastrophic cooling failure, >> the processor will >> automatically shut down when the silicon has reached a temperature of >> approximately >> 135 °C. At this point the system bus signal THERMTRIP# will go active >> and stay active >> until RESET# has been initiated. --- > > > Correct. Even more so, automatic mode continues to override On-Demand > mode if there is a more moderate thermal condition than THERMTRIP#: > > "On-Demand mode may be used at the same time Automatic mode is enabled, > however, if the system tries to enable the TCC via On-Demand mode at the > same time automatic mode is enabled AND a high temperature condition > exists, the duty cycle of the automatic mode will override the duty > cycle selected by the On-Demand mode." > > Since automatic mode is set by the BIOS before we even boot, things > should be fine. Well, this is quite tricky part of the spec. My reading is that the paragraph above applies only to situation if you are trying to set on-demand mode when both automatic mode is in effect *and* high temperature condition already exists, in that case automatic mode will win and override any manual settings. However, in the case when you have on-demand mode already on and high temperature condition emerges it will have no effect on duty cycle until THERMTRIP# kicks in. That's in my view explains why there is big AND in the text above. -Maxim _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:37:13 2005 Return-Path: X-Original-To: acpi@FreeBSD.ORG Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9E33C16A448; Sun, 3 Jul 2005 00:37:12 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F516443E5; Sun, 3 Jul 2005 00:20:29 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 57A3E623E0; Sat, 2 Jul 2005 17:19:58 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id D71605C87A; Fri, 25 Feb 2005 01:00:52 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 762E95644F; Fri, 25 Feb 2005 09:00:00 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 0B7C216A4F5; Fri, 25 Feb 2005 08:59:59 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1305716A4CE; Fri, 25 Feb 2005 08:59:55 +0000 (GMT) Received: from www.portaone.com (web.portaone.com [195.70.151.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A40C43D48; Fri, 25 Feb 2005 08:59:54 +0000 (GMT) (envelope-from sobomax@portaone.com) Received: from [192.168.0.128] ([192.168.2.2]) (authenticated bits=0) by www.portaone.com (8.12.11/8.12.11) with ESMTP id j1P8u1Fx078798 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 25 Feb 2005 09:56:02 +0100 (CET) (envelope-from sobomax@portaone.com) Message-ID: <421EE81C.3040204@portaone.com> From: Maxim Sobolev Organization: Porta Software Ltd User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Chuck Swiger References: <20050224011924.992A65D07@ptavv.es.net> <421DA0B5.4060705@portaone.com> <421E42F2.6010105@root.org> <421E49D9.60803@portaone.com> <421E5E7B.5040104@mac.com> In-Reply-To: <421E5E7B.5040104@mac.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV 0.80/685/Wed Jan 26 10:08:24 2005 clamav-milter version 0.80j on www.portaone.com X-Virus-Status: Clean X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, J_CHICKENPOX_13 autolearn=no version=3.0.2 X-Spam-Level: Cc: acpi@FreeBSD.ORG, current@FreeBSD.ORG Subject: Re: patch: p4tcc and speedstep cpufreq drivers X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:37:14 -0000 X-Original-Date: Fri, 25 Feb 2005 10:55:56 +0200 X-List-Received-Date: Sun, 03 Jul 2005 00:37:14 -0000 Chuck Swiger wrote: > Maxim Sobolev wrote: > >> Nate Lawson wrote: > > [ ... ] > >>> "On-Demand mode may be used at the same time Automatic mode is >>> enabled, however, if the system (tries to enable the TCC via >>> On-Demand mode[1]) at the same time (automatic mode is enabled[2]) >>> AND (a high temperature condition exists [3]), the duty cycle of the >>> automatic mode will override the duty cycle selected by the On-Demand >>> mode." >>> >>> Since automatic mode is set by the BIOS before we even boot, things >>> should be fine. >> >> >> Well, this is quite tricky part of the spec. My reading is that the >> paragraph above applies only to situation if you are (trying to set >> on-demand mode [1]) when both (automatic mode is in effect [2]) *and* >> (high temperature condition already exists [3]), in that case >> automatic mode will win and override any manual settings. > > > I suspect you'd read your paragraph with [1] and [2] joined together, > but they can be read seperately just as the spec can. :-) > >> However, in the case when you have on-demand mode already on and high >> temperature condition emerges it will have no effect on duty cycle >> until THERMTRIP# kicks in. >> >> That's in my view explains why there is big AND in the text above. > > > I think the spec is advising developers who try to control TCC that if > PROCHOT gets asserted, the CPU may override the programmed settings in > favor of the automatic ones. I don't think the spec is asserting that > the CPU is forbidden from reducing power usage if PROCHOT condition is > detected, regardless of what automatic mode is set to. > > A reasonable processor would drop to a known minimal power usage state-- > hopefully one low enough to keep the CPU from completely overheating > even if a fan has failed-- if PROCHOT is seen. > > [ It may also be the case that a CPU does not do so, in which case the > ACPI driver code ought to try to pay attention to PROCHOT and reduce > power consumption regardless and not just depend on CPU failsafes to > work. If that is your position, well, I would agree with this. :-) ] Check the original spec, there is a note at the end of the respective paragraph (particularly the first sentence): If automatic mode is disabled the processor will be operating out of specification and cannot be guaranteed to provide reliable results. Regardless of enabling of the automatic or On-Demand modes, in the event of a catastrophic cooling failure, the processor will automatically shut down when the silicon has reached a temperature of approximately 135 °C. At this point the system bus signal THERMTRIP# will go active and stay active until RESET# has been initiated. THERMTRIP# activation is independent of processor activity and does not generate any bus cycles. If THERMTRIP# is asserted, processor core voltage (Vcc) must be removed within the timeframe defined in Table 16. -Maxim _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:37:24 2005 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 01B8116A436; Sun, 3 Jul 2005 00:37:24 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 611D544418; Sun, 3 Jul 2005 00:20:45 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id EAFAE62432; Sat, 2 Jul 2005 17:19:59 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id A70055C862; Fri, 25 Feb 2005 12:55:40 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id CA78555D17; Fri, 25 Feb 2005 20:55:29 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 933B416A4F6; Fri, 25 Feb 2005 20:55:27 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B487E16A4CE; Fri, 25 Feb 2005 20:55:22 +0000 (GMT) Received: from bgo1smout1.broadpark.no (bgo1smout1.broadpark.no [217.13.4.94]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE62D43D45; Fri, 25 Feb 2005 20:55:21 +0000 (GMT) (envelope-from morten@rodal.no) Received: from bgo1sminn1.broadpark.no ([217.13.4.93]) by bgo1smout1.broadpark.no (Sun Java System Messaging Server 6.1 HotFix 0.05 (built Oct 21 2004)) with ESMTP id <0ICH00CUEJ7BJ930@bgo1smout1.broadpark.no>; Fri, 25 Feb 2005 21:49:59 +0100 (CET) Received: from slimy.rodal.no ([80.202.56.120]) by bgo1sminn1.broadpark.no (Sun Java System Messaging Server 6.1 HotFix 0.05 (built Oct 21 2004)) with ESMTP id <0ICH00J35JJSEG70@bgo1sminn1.broadpark.no>; Fri, 25 Feb 2005 21:57:29 +0100 (CET) Received: from burton.rodal.no (burton.rodal.no [192.168.20.70]) by slimy.rodal.no (8.12.11/8.12.11) with ESMTP id j1PKtJOh088306; Fri, 25 Feb 2005 21:55:19 +0100 (CET envelope-from morten@rodal.no) Received: from localhost (localhost [[UNIX: localhost]]) by burton.rodal.no (8.13.3/8.13.1/Submit) id j1PKtHrp028842; Fri, 25 Feb 2005 21:55:17 +0100 (CET envelope-from morten@rodal.no) From: Morten Rodal In-reply-to: <421E403E.7040804@root.org> To: Nate Lawson Message-id: <200502252155.17111.morten@rodal.no> MIME-version: 1.0 Content-type: multipart/signed; boundary=nextPart25241362.XJvuVZW8iM; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-transfer-encoding: 7bit X-Virus-Scanned: by amavisd-new References: <42068A5C.1030300@root.org> <200502241710.44321.morten@rodal.no> <421E403E.7040804@root.org> X-Authentication-warning: burton.rodal.no: morten set sender to morten@rodal.no using -f User-Agent: KMail/1.7.2 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_SORBS autolearn=no version=3.0.2 X-Spam-Level: Cc: acpi@freebsd.org, current@freebsd.org Subject: Re: HEADSUP: cpufreq import complete, acpi_throttling changed X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:37:24 -0000 X-Original-Date: Fri, 25 Feb 2005 21:55:10 +0100 X-List-Received-Date: Sun, 03 Jul 2005 00:37:24 -0000 --nextPart25241362.XJvuVZW8iM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thursday 24 February 2005 21:59, Nate Lawson wrote: > Morten Rodal wrote: > > On Wednesday 23 February 2005 20:24, Nate Lawson wrote: > > The issue is partly fixed. I now see the following frequency levels > > if, and only if, I booted the laptop on battery power: > > > > # sysctl dev.cpu.0.freq_levels > > dev.cpu.0.freq_levels: 1200/0 1050/0 900/0 787/0 750/0 656/0 600/0 > > 562/0 525/0 450/0 393/0 337/0 300/0 262/0 225/0 187/0 150/0 112/0 > > 75/0 37/0 > > > > Note that the native processor speed (1700 MHz) is not listed, and > > setting the speed below 150 hard-hangs/freezes the laptop. > > Not sure we can fix this one. It appears some very low clock rates > hang some systems. Can you test with SCHED_4BSD? > This is with SCHED_4BSD. I have been using that since it became the=20 default again in -CURRENT. > > When booting with AC-power the laptop does not report any > > freq{,_levels}. It does not matter if I remove the AC-power once the > > computer is up and running, I always get this: > > > > # sysctl dev.cpu.0.freq > > dev.cpu.0.freq: -1 > > I just committed a fix for this. With sources from 18:56 CET I get this list: # sysctl dev.cpu.0.freq_levels dev.cpu.0.freq_levels: 1700/0 1487/0 1301/0 1275/0 1200/0 1115/0 1062/0=20 956/0 920/0 900/0 850/0 796/0 750/0 663/0 637/0 600/0 557/0 531/0 478/0=20 450/0 425/0 398/0 371/0 337/0 300/0 265/0 238/0 212/0 185/0 150/0 112/0=20 79/0 53/0 26/0 If I boot the computer using battery power I get the same frequencies as=20 posted earlier. I did however remember one thing about the ACPI support=20 on this Dell Inspiron (or maybe a bad hardware design), and that was=20 people complained that the CPU was stuck at a maximum of 1200 MHz if it=20 was started using battery power and then later have the power connected=20 again. So that might explain why I do not see 1700 MHz as a choice=20 unless I start it with the AC-power connected. Rebooting the computer=20 does solve the problem, so it might just be a minor problem with the=20 frequency levels only being read once (at boot). =2D-=20 Morten Rodal "A supercomputer is a device for turning compute-bound problems into I/O bound problems." -- Ken Batcher (Goodyear Aerospace) --nextPart25241362.XJvuVZW8iM Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQBCH5C1bWe1Cy11WVsRAsHlAKDP4JXNaXD5wXPUVdIqlzw/esL1qQCg3ztU GBkZMb3lfiaDS6q59flIpTs= =jmgK -----END PGP SIGNATURE----- --nextPart25241362.XJvuVZW8iM-- From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:37:26 2005 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2B7A016A44B; Sun, 3 Jul 2005 00:37:26 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id B79AC4444A; Sun, 3 Jul 2005 00:21:02 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 24CCF6239F; Sat, 2 Jul 2005 17:20:02 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id AD57D5C97C; Sat, 26 Feb 2005 11:34:27 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id CEF9F56BB0; Sat, 26 Feb 2005 19:34:00 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id BC1B316A500; Sat, 26 Feb 2005 19:33:56 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3010616A4D5; Sat, 26 Feb 2005 19:33:51 +0000 (GMT) Received: from ylpvm01.prodigy.net (ylpvm01-ext.prodigy.net [207.115.57.32]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5ADE043D5D; Sat, 26 Feb 2005 19:33:50 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.0.0.115] (adsl-64-171-186-189.dsl.snfc21.pacbell.net [64.171.186.189])j1QJXmvE014991; Sat, 26 Feb 2005 14:33:49 -0500 Message-ID: <4220CF1A.7070309@root.org> From: Nate Lawson User-Agent: Mozilla Thunderbird 1.0RC1 (X11/20041205) X-Accept-Language: en-us, en MIME-Version: 1.0 To: stable@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, J_CHICKENPOX_42, J_CHICKENPOX_72 autolearn=no version=3.0.2 X-Spam-Level: Cc: acpi@freebsd.org, current@freebsd.org Subject: HEADSUP: cpufreq merged, acpi_throttle changed X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:37:26 -0000 X-Original-Date: Sat, 26 Feb 2005 11:33:46 -0800 X-List-Received-Date: Sun, 03 Jul 2005 00:37:26 -0000 To those running 5.x, I wanted to let you know about a change in behavior for acpi throttling. It is now accessible through the sysctl dev.cpu.0.freq and dev.cpu.0.freq_levels. Also, you can now run -current cpufreq.ko or acpi.ko to get more drivers. Those won't be in 5.4-R but will be MFCd after the release. Please let me know if you have any new problems, especially with throttling. Thanks, -- Nate _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:38:02 2005 Return-Path: X-Original-To: freebsd-acpi@FreeBSD.org Delivered-To: freebsd-acpi@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C589316A584; Sun, 3 Jul 2005 00:37:45 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 01BB344534; Sun, 3 Jul 2005 00:22:13 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 3FD786252F; Sat, 2 Jul 2005 17:20:13 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id 71E265C98E; Tue, 1 Mar 2005 15:24:15 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id C38EF57F10; Tue, 1 Mar 2005 23:24:07 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id EA40016A4F1; Tue, 1 Mar 2005 23:24:05 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 652A916A4CE; Tue, 1 Mar 2005 23:24:00 +0000 (GMT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 163CD43D2F; Tue, 1 Mar 2005 23:23:59 +0000 (GMT) (envelope-from iedowse@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 1 Mar 2005 23:23:58 +0000 (GMT) To: John Baldwin In-Reply-To: Your message of "Tue, 01 Mar 2005 17:03:50 EST." <200503011703.50828.jhb@FreeBSD.org> From: Ian Dowse Message-ID: <200503012323.ab80767@salmon.maths.tcd.ie> X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-4.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Level: Cc: freebsd-acpi@FreeBSD.org, freebsd-current@FreeBSD.org Subject: Re: Panic on suspend X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:38:02 -0000 X-Original-Date: Tue, 01 Mar 2005 23:23:57 +0000 X-List-Received-Date: Sun, 03 Jul 2005 00:38:02 -0000 In message <200503011703.50828.jhb@FreeBSD.org>, John Baldwin writes: >On Tuesday 01 March 2005 03:30 pm, Filippo Forti wrote: >> Hi, >> I got a fully reproduceable panic while trying to suspend (to S3) on my >> laptop. FreeBSD is -CURRENT from Monday. >> >> I'm using a modified DSDT which used to work before I updated on Monday. >> dmesg from after reboot is attacched. Sorry, this my fault - I thought I was correctly mapping an 8k region in vm86 space, but got it very wrong. I've set the save state limit back to 4k now, which should fix the panic but will mean that the new VESA save/restore feature will be disabled for now on systems that require more than 4k of storage. You can either update to version 1.49 of sys/i386/isa/vesa.c, or else disable VESA support as a workaround. Ian _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:38:03 2005 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CB3DE16A5A6; Sun, 3 Jul 2005 00:37:46 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id A965A44531; Sun, 3 Jul 2005 00:22:13 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 6814D6253D; Sat, 2 Jul 2005 17:20:13 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id C37F15C981; Tue, 1 Mar 2005 15:20:05 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 1A1FF5559E; Tue, 1 Mar 2005 23:20:02 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 9DEC116A4D2; Tue, 1 Mar 2005 23:20:00 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 875FB16A4CE; Tue, 1 Mar 2005 23:19:55 +0000 (GMT) Received: from www.cryptography.com (li-22.members.linode.com [64.5.53.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4210043D1F; Tue, 1 Mar 2005 23:19:55 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.0.0.34] (adsl-67-119-74-222.dsl.sntc01.pacbell.net [67.119.74.222]) by www.cryptography.com (8.12.8/8.12.8) with ESMTP id j21NJnZj029953 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 1 Mar 2005 15:19:52 -0800 Message-ID: <4224F88E.8080205@root.org> From: Nate Lawson User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: filippo.forti@fastwebnet.it References: <20050301203005.GA684@portatile.fastwebnet.it> <20050301203732.GB684@portatile.fastwebnet.it> In-Reply-To: <20050301203732.GB684@portatile.fastwebnet.it> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Level: Cc: freebsd-acpi@freebsd.org, freebsd-current@freebsd.org Subject: Re: Panic on suspend X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:38:03 -0000 X-Original-Date: Tue, 01 Mar 2005 15:19:42 -0800 X-List-Received-Date: Sun, 03 Jul 2005 00:38:03 -0000 Filippo Forti wrote: > I got a fully reproduceable panic while trying to suspend (to S3) on my laptop. > FreeBSD is -CURRENT from Monday. > > I'm using a modified DSDT which used to work before I updated on Monday. > dmesg from after reboot is attacched. > > Here comes gbd output > > Fatal trap 12: page fault while in vm86 mode > fault virtual address = 0x2000 > fault code = user write, page not present > instruction pointer = 0xc000:0x5195 ^^^^^^^ That is in the VGA BIOS. Try setting this sysctl before suspending: hw.acpi.reset_video=0 > stack pointer = 0x0:0xfe4 > frame pointer = 0x0:0x0 > code segment = base 0x600005, limit 0x2, type 0x11 > = DPL 1, pres 0, def32 0, gran 0 > processor eflag = interrupt enabled, resume, mv86, IOPL = 0 > current process = 1046 (acpiconf) > [thread pid 1046 tid 100084] > Stopped at 0x5159: *** error reading from address 5159 *** Ian committed code to restore the VESA state so we shouldn't reset video redundantly. I'm thinking of changing the default to 0 in -current. -- Nate _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:38:04 2005 Return-Path: X-Original-To: acpi@FreeBSD.ORG Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3EC3116A5AA; Sun, 3 Jul 2005 00:37:47 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id B8B4444536; Sun, 3 Jul 2005 00:22:18 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 9F4A36256A; Sat, 2 Jul 2005 17:20:13 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id F3D865C98B for ; Tue, 1 Mar 2005 13:56:58 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 4590A57B22; Tue, 1 Mar 2005 21:56:00 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id CE80A16A50F; Tue, 1 Mar 2005 21:55:55 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6471416A4D1; Tue, 1 Mar 2005 21:55:50 +0000 (GMT) Received: from postal1.es.net (postal1.es.net [198.128.3.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2CA7643D1D; Tue, 1 Mar 2005 21:55:50 +0000 (GMT) (envelope-from oberman@es.net) Received: from ptavv.es.net ([198.128.4.29]) by postal1.es.net (Postal Node 1) with ESMTP (SSL) id IBA74465; Tue, 01 Mar 2005 13:55:49 -0800 Received: from ptavv (localhost [127.0.0.1]) by ptavv.es.net (Tachyon Server) with ESMTP id 7A2E25D07; Tue, 1 Mar 2005 13:55:49 -0800 (PST) To: Nate Lawson In-reply-to: Your message of "Thu, 24 Feb 2005 13:11:14 PST." <421E42F2.6010105@root.org> From: "Kevin Oberman" Message-Id: <20050301215549.7A2E25D07@ptavv.es.net> X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, J_CHICKENPOX_13 autolearn=no version=3.0.2 X-Spam-Level: Cc: acpi@FreeBSD.ORG, Maxim Sobolev , current@FreeBSD.ORG Subject: Re: patch: p4tcc and speedstep cpufreq drivers X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:38:04 -0000 X-Original-Date: Tue, 01 Mar 2005 13:55:49 -0800 X-List-Received-Date: Sun, 03 Jul 2005 00:38:04 -0000 > Date: Thu, 24 Feb 2005 13:11:14 -0800 > From: Nate Lawson > > Maxim Sobolev wrote: > > Kevin Oberman wrote: > >> No joy. I set it to 262 and it was fine. The next step killed the system > >> again. > >> > >> I'm also concerned that taking TCC out of automatic mode might not be a > >> great idea, at least until things like _PSV are supported. When I do a > >> buildkernel, buildworld or any big compile job, I need to slow down the > >> CPU to keep the CPU form frying. It quickly jumps to 185 F. or higher if > >> I don't. If I understand automatic TCC, it should throttle the CPU all > >> by itself to prevent this. > > > > > > Taking TCC out of automatic mode doesn't disable thermal controlling > > circuitry completely, so that if the processor overheats it will shut > > down the machine anyway: > > > > --- > > Regardless of enabling of the automatic > > or On-Demand modes, in the event of a catastrophic cooling failure, the > > processor will > > automatically shut down when the silicon has reached a temperature of > > approximately > > 135 °C. At this point the system bus signal THERMTRIP# will go active > > and stay active > > until RESET# has been initiated. > > --- > > Correct. Even more so, automatic mode continues to override On-Demand > mode if there is a more moderate thermal condition than THERMTRIP#: > > "On-Demand mode may be used at the same time Automatic mode is enabled, > however, if the system tries to enable the TCC via On-Demand mode at the > same time automatic mode is enabled AND a high temperature condition > exists, the duty cycle of the automatic mode will override the duty > cycle selected by the On-Demand mode." > > Since automatic mode is set by the BIOS before we even boot, things > should be fine. > > >> Between throttling and frequency adjustment I can get about 16 > >> performance levels and I don' see a good reason for another 15. Also, > >> the change is frequency is so non-linear that small changes often don't > >> make sense. The first three step are fairly straight, but then things > >> get bumpy. It looks to me like all frequency settings are not created > >> equal. > > > > I wonder this too. I think in the presence of several independent > > regulators we need some form of calibration to get more or less precise > > results. > > You can manually test this kind of stuff by doing: > hint.p4tcc.0.disabled="1" Thanks! With this set I am down to "only" 14 frequencies, but they are now proportional to CPU speed and I still have a fully functional TCC, should I need it. Also, at no added charge, the system no longer locks up at low speed. I can to all the way down to 150 MHz just fine! No more hangs. I really think that if would be a good idea to have hint.p4tcc.0.disabled set by default, especially based on sobomax's recent message where the spec says that normal operation can't be assured if the TCC is not in automatic mode. -- 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 _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:38:04 2005 Return-Path: X-Original-To: freebsd-acpi@FreeBSD.org Delivered-To: freebsd-acpi@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 51BB516A4C7; Sun, 3 Jul 2005 00:37:49 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6EE4C4452C; Sun, 3 Jul 2005 00:22:17 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 9110162568; Sat, 2 Jul 2005 17:20:13 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id 7DA6B5C991; Tue, 1 Mar 2005 14:58:03 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 4BF1857396; Tue, 1 Mar 2005 22:57:31 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 4E0FB16A503; Tue, 1 Mar 2005 22:57:24 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5F29A16A4CF for ; Tue, 1 Mar 2005 22:57:19 +0000 (GMT) Received: from mail28.sea5.speakeasy.net (mail28.sea5.speakeasy.net [69.17.117.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id F2FE743D49 for ; Tue, 1 Mar 2005 22:57:18 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 18792 invoked from network); 1 Mar 2005 22:57:18 -0000 Received: from server.baldwin.cx ([216.27.160.63]) (envelope-sender )AES256-SHA encrypted SMTP for ; 1 Mar 2005 22:57:18 -0000 Received: from [10.50.40.202] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.13.1/8.13.1) with ESMTP id j21MuexO075581; Tue, 1 Mar 2005 17:57:12 -0500 (EST) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-acpi@FreeBSD.org, filippo.forti@fastwebnet.it User-Agent: KMail/1.6.2 References: <20050301203005.GA684@portatile.fastwebnet.it> In-Reply-To: <20050301203005.GA684@portatile.fastwebnet.it> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200503011703.50828.jhb@FreeBSD.org> X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-5.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Level: Cc: freebsd-current@FreeBSD.org Subject: Re: Panic on suspend X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:38:04 -0000 X-Original-Date: Tue, 1 Mar 2005 17:03:50 -0500 X-List-Received-Date: Sun, 03 Jul 2005 00:38:04 -0000 On Tuesday 01 March 2005 03:30 pm, Filippo Forti wrote: > Hi, > I got a fully reproduceable panic while trying to suspend (to S3) on my > laptop. FreeBSD is -CURRENT from Monday. > > I'm using a modified DSDT which used to work before I updated on Monday. > dmesg from after reboot is attacched. > > Here comes gbd output > > > Fatal trap 12: page fault while in vm86 mode > fault virtual address = 0x2000 > fault code = user write, page not present > instruction pointer = 0xc000:0x5195 > stack pointer = 0x0:0xfe4 > frame pointer = 0x0:0x0 > code segment = base 0x600005, limit 0x2, type 0x11 > = DPL 1, pres 0, def32 0, gran 0 > processor eflag = interrupt enabled, resume, mv86, IOPL = 0 > current process = 1046 (acpiconf) > [thread pid 1046 tid 100084] > Stopped at 0x5159: *** error reading from address 5159 *** > > db> tr > Tracing pid 1046 tid 100084 td 0xc27645c0 > (null)(ff000e2c3,f000ff53,f000ff54,f00092da) at 0x5195 > _end(ccce4fab,b638f354,3a6c5da3,ec956de5,fe6dff6c) at 0xf000ff53 > > db> where > Tracing pid 1046 tid 100084 td 0xc27645c0 > kdb_enter(c08d00f2,c08e69ce,c08cbfd1,c08ee7f9,2b8) at kdb_enter+0x31 > witness_checkorder(c2cc2a54,9,c08ee7f9,2b8,0) at witness_checkorder+0xc9 > _mtx_lock_flags(c2cc2a54,0,c08ee7f9,2b8,0) at _mtx_lock_flags+0x85 > trap_pfault(c0c21fa8,0,2000,c0c21fa8,2000) at trap_pfault+0xa1 > trap (0,0,0,1000,0) at trap+0x34b > calltrap() at calltrap+0x5 > ---trap 0xc, eip = 0x5195, esp = 0xc0c21fe8, ebp = 0 --- > > db> next > panic: blockable sleep lock (sleep mutex) process lock @ > /usr/src/sys/i386/i386/trap.c:696 > KDB: enter: panic > After 2 instructions (0 loads, 0 stores), > [thread 1046 tid 1000084] > stopped at kdb_enter+0x31: ret > > Thanks for your help > Filippo Can you try this patch to get rid of the bogus witness warning: Index: trap.c =================================================================== RCS file: /usr/cvs/src/sys/i386/i386/trap.c,v retrieving revision 1.270 diff -u -r1.270 trap.c --- trap.c 16 Nov 2004 20:42:31 -0000 1.270 +++ trap.c 18 Feb 2005 15:31:37 -0000 @@ -238,7 +238,7 @@ * to the debugger. */ eva = rcr2(); - if (td->td_critnest == 0) + if (td->td_critnest == 0 && td->td_sleeplocks == NULL) enable_intr(); else trap_fatal(&frame, eva); -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:38:04 2005 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8973516A5C0; Sun, 3 Jul 2005 00:37:47 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8CD704452E; Sun, 3 Jul 2005 00:22:13 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 4AC3662535; Sat, 2 Jul 2005 17:20:13 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id C489E5C981 for ; Tue, 1 Mar 2005 15:21:06 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 5591E5781D; Tue, 1 Mar 2005 23:20:59 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 6043616A4FF; Tue, 1 Mar 2005 23:20:57 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3768F16A4CE; Tue, 1 Mar 2005 23:20:53 +0000 (GMT) Received: from www.cryptography.com (li-22.members.linode.com [64.5.53.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id D53B843D39; Tue, 1 Mar 2005 23:20:52 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.0.0.34] (adsl-67-119-74-222.dsl.sntc01.pacbell.net [67.119.74.222]) by www.cryptography.com (8.12.8/8.12.8) with ESMTP id j21NKoZj029977 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 1 Mar 2005 15:20:51 -0800 Message-ID: <4224F8CB.60305@root.org> From: Nate Lawson User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Eric Kjeldergaard References: <42068A5C.1030300@root.org> <421A8F90.3080907@root.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, J_CHICKENPOX_13, J_CHICKENPOX_72 autolearn=no version=3.0.2 X-Spam-Level: Cc: acpi@freebsd.org, current@freebsd.org Subject: Re: HEADSUP: cpufreq import complete, acpi_throttling changed X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:38:05 -0000 X-Original-Date: Tue, 01 Mar 2005 15:20:43 -0800 X-List-Received-Date: Sun, 03 Jul 2005 00:38:05 -0000 Eric Kjeldergaard wrote: > On Tue, 1 Mar 2005 15:34:24 -0600, Eric Kjeldergaard wrote: > Oh, just one more thing... > Perhaps I'm misunderstanding, but I never see ichss load. It's > supposed to load automagically if I have an ICH, no? ichss, est, and p4tcc are all contained within cpufreq.ko -- Nate _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:38:05 2005 Return-Path: X-Original-To: freebsd-acpi@FreeBSD.org Delivered-To: freebsd-acpi@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B636316A5D4; Sun, 3 Jul 2005 00:37:50 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8BF6A4454B; Sun, 3 Jul 2005 00:22:25 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 9E61B6257E; Sat, 2 Jul 2005 17:20:14 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id 848A05C990; Wed, 2 Mar 2005 10:14:42 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 7027457733; Wed, 2 Mar 2005 18:14:33 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id ABA0116A4F6; Wed, 2 Mar 2005 18:14:31 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CBF4F16A4CE for ; Wed, 2 Mar 2005 18:14:26 +0000 (GMT) Received: from mail23.sea5.speakeasy.net (mail23.sea5.speakeasy.net [69.17.117.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4EA4943D48 for ; Wed, 2 Mar 2005 18:14:26 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 30879 invoked from network); 2 Mar 2005 18:14:26 -0000 Received: from server.baldwin.cx ([216.27.160.63]) (envelope-sender )AES256-SHA encrypted SMTP for ; 2 Mar 2005 18:14:25 -0000 Received: from [10.50.40.202] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.13.1/8.13.1) with ESMTP id j22IEJOA082705; Wed, 2 Mar 2005 13:14:20 -0500 (EST) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: filippo.forti@fastwebnet.it User-Agent: KMail/1.6.2 References: <20050301203005.GA684@portatile.fastwebnet.it> <200503011703.50828.jhb@FreeBSD.org> <20050302165304.GA674@portatile.fastwebnet.it> In-Reply-To: <20050302165304.GA674@portatile.fastwebnet.it> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200503021217.30157.jhb@FreeBSD.org> X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-5.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Level: Cc: freebsd-acpi@FreeBSD.org, freebsd-current@FreeBSD.org Subject: Re: Panic on suspend X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:38:05 -0000 X-Original-Date: Wed, 2 Mar 2005 12:17:30 -0500 X-List-Received-Date: Sun, 03 Jul 2005 00:38:05 -0000 On Wednesday 02 March 2005 11:53 am, Filippo Forti wrote: > On Tue, Mar 01, 2005 at 05:03:50PM -0500, John Baldwin wrote: > > On Tuesday 01 March 2005 03:30 pm, Filippo Forti wrote: > > > Hi, > > > I got a fully reproduceable panic while trying to suspend (to S3) on my > > > laptop. FreeBSD is -CURRENT from Monday. > > > > > > I'm using a modified DSDT which used to work before I updated on > > > Monday. dmesg from after reboot is attacched. > > > > > > Here comes gbd output > > > > > > > > > Fatal trap 12: page fault while in vm86 mode > > > fault virtual address = 0x2000 > > > fault code = user write, page not present > > > instruction pointer = 0xc000:0x5195 > > > stack pointer = 0x0:0xfe4 > > > frame pointer = 0x0:0x0 > > > code segment = base 0x600005, limit 0x2, type 0x11 > > > = DPL 1, pres 0, def32 0, gran 0 > > > processor eflag = interrupt enabled, resume, mv86, IOPL = 0 > > > current process = 1046 (acpiconf) > > > [thread pid 1046 tid 100084] > > > Stopped at 0x5159: *** error reading from address 5159 *** > > > > > > db> tr > > > Tracing pid 1046 tid 100084 td 0xc27645c0 > > > (null)(ff000e2c3,f000ff53,f000ff54,f00092da) at 0x5195 > > > _end(ccce4fab,b638f354,3a6c5da3,ec956de5,fe6dff6c) at 0xf000ff53 > > > > > > db> where > > > Tracing pid 1046 tid 100084 td 0xc27645c0 > > > kdb_enter(c08d00f2,c08e69ce,c08cbfd1,c08ee7f9,2b8) at kdb_enter+0x31 > > > witness_checkorder(c2cc2a54,9,c08ee7f9,2b8,0) at > > > witness_checkorder+0xc9 _mtx_lock_flags(c2cc2a54,0,c08ee7f9,2b8,0) at > > > _mtx_lock_flags+0x85 trap_pfault(c0c21fa8,0,2000,c0c21fa8,2000) at > > > trap_pfault+0xa1 trap (0,0,0,1000,0) at trap+0x34b > > > calltrap() at calltrap+0x5 > > > ---trap 0xc, eip = 0x5195, esp = 0xc0c21fe8, ebp = 0 --- > > > > > > db> next > > > panic: blockable sleep lock (sleep mutex) process lock @ > > > /usr/src/sys/i386/i386/trap.c:696 > > > KDB: enter: panic > > > After 2 instructions (0 loads, 0 stores), > > > [thread 1046 tid 1000084] > > > stopped at kdb_enter+0x31: ret > > > > > > Thanks for your help > > > Filippo > > > > Can you try this patch to get rid of the bogus witness warning: > > This patch causes the kernel to panic on boot. Here comes something from > there: > > Fatal trap 12: page fault while in kernel mode > fault address = 0xbfbfffff > fault code = supervisor write, page not present > instruction pointer = 0x8:0xc085055d > stack pointer = 0x10:0xe35a6cb8 > frame pointer = 0x10:0xe35a6d14 > code segment = base 0x0, limit 0xfffff, type 0x1b > = DPL 0, pres 1, def32 1, gran 1 > processor eflags = interrupt enabled, resume, IOPL = 0 > current process = 1 (swapper) > [thread pid 1 tid 100003] > Stopped at subyte+0x25: movb %al,0(%edx) > > db> where > Tracing pid 1 tid 100003 td 0xc227d450 > subyte(0,e35a6d48,c08ca09d,30e,0) at subyte+0x25 > fork_exit)c0634dac,0,e35a6d48) at fork_exit+0xc7 > fork_trampoline() at fork_trampoline+0x8 > --- trap 0x1, eip=0, esp=0xe35a6d7c, epb=0 --- Yes, the patch below is supposed to make it panic more cleanly rather than emitting a bogus witness warning. It won't fix the root panic. > > Index: trap.c > > =================================================================== > > RCS file: /usr/cvs/src/sys/i386/i386/trap.c,v > > retrieving revision 1.270 > > diff -u -r1.270 trap.c > > --- trap.c 16 Nov 2004 20:42:31 -0000 1.270 > > +++ trap.c 18 Feb 2005 15:31:37 -0000 > > @@ -238,7 +238,7 @@ > > * to the debugger. > > */ > > eva = rcr2(); > > - if (td->td_critnest == 0) > > + if (td->td_critnest == 0 && td->td_sleeplocks == NULL) > > enable_intr(); > > else > > trap_fatal(&frame, eva); > > > > > > -- > > John Baldwin <>< http://www.FreeBSD.org/~jhb/ > > "Power Users Use the Power to Serve" = http://www.FreeBSD.org > > P.S.: I worte the other messages in reply to my problem and will notice > you of the results as soon as I can test all of them. > > Thanks for your help > Filippo -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:38:06 2005 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 919AF16A5C2; Sun, 3 Jul 2005 00:37:47 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id F0F9643F48; Sun, 3 Jul 2005 00:22:14 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 7338862545; Sat, 2 Jul 2005 17:20:13 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id 1EC145C990; Tue, 1 Mar 2005 15:02:04 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id E3F9A5662E; Tue, 1 Mar 2005 22:59:46 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id D259B16A500; Tue, 1 Mar 2005 22:59:40 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C8EE216A4CF for ; Tue, 1 Mar 2005 22:59:35 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.198]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0EC9A43D53 for ; Tue, 1 Mar 2005 22:59:35 +0000 (GMT) (envelope-from kjelderg@gmail.com) Received: by rproxy.gmail.com with SMTP id j1so10082rnf for ; Tue, 01 Mar 2005 14:59:34 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=p2QLSZmcYXUMAnnH1/ZXp78MvBjq1g0Z7YNmytWNUFYT2FssPiPLGKOoRqdO167Z+GQdjGCNEwoLmUfBVNjUuiARZWF4SCpfYE5He7FidPR8MESGpJQT6FXQETBJeBRIPyuhO8iYAdGKQZfXJk7nKzSP93VV5nNQwoDafblaQY0= Received: by 10.38.88.19 with SMTP id l19mr43802rnb; Tue, 01 Mar 2005 14:59:34 -0800 (PST) Received: by 10.38.101.19 with HTTP; Tue, 1 Mar 2005 14:59:34 -0800 (PST) Message-ID: From: Eric Kjeldergaard To: Nate Lawson In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <42068A5C.1030300@root.org> <421A8F90.3080907@root.org> X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, J_CHICKENPOX_33, RCVD_BY_IP autolearn=no version=3.0.2 X-Spam-Level: Cc: acpi@freebsd.org, current@freebsd.org Subject: Re: HEADSUP: cpufreq import complete, acpi_throttling changed X-BeenThere: freebsd-acpi@freebsd.org Reply-To: Eric Kjeldergaard List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:38:08 -0000 X-Original-Date: Tue, 1 Mar 2005 16:59:34 -0600 X-List-Received-Date: Sun, 03 Jul 2005 00:38:08 -0000 On Tue, 1 Mar 2005 15:34:24 -0600, Eric Kjeldergaard wrote: > On Mon, 21 Feb 2005 17:49:04 -0800, Nate Lawson wrote: > > Eric Kjeldergaard wrote: > > > On Sun, 06 Feb 2005 13:21:32 -0800, Nate Lawson wrote: > > > > > >>I've finished the major work of importing cpufreq. As part of this, the > > >>sysctls for acpi throttling have been removed. The power_profile script > > >>has been updated, so you can use performance/economy_cpu_freq= in > > >>rc.conf to set AC on/offline cpu frequencies. The acpi throttling > > >>support has been compiled into acpi_perf.ko so load that to get > > >>throttling. Do a sysctl dev.cpu to get an understanding of the cpufreq > > >>sysctls. > > > > > > > > > I have been using cpufreq on and off since this got comitted and just > > > noticed a problem now. I can't really say when it started happening, > > > but I can say that it happens with a current from about 2 hours ago. > > > What happens is when I kldload cpufreq, usb stops working. If I have > > > a device that was already connected, it gets disconnected, I am unable > > > to connect any new devices. It's just completely unresponsive. > > > Whatever the issue is, it does not help to kldunload cpufreq, I am > > > forced to reboot to get USB working again. The system is an IBM > > > Thinkpad R40. I can give you whatever relevant info you need on > > > request. > > > > Hmm. If you boot with cpufreq and usb loaded, does it have this > > problem? Run the below script to send me your debug info: > > > > http://www.root.org/~nate/freebsd/cpufreq_debug > > > > Finally got a chance to test again. It seems to happen regardless of > whether cpufreq is loaded at boot or dynamically during runtime. The > output of your script is attached. > Oh, just one more thing... Perhaps I'm misunderstanding, but I never see ichss load. It's supposed to load automagically if I have an ICH, no? -- If I write a signature, my emails will appear more personalised. _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:38:13 2005 Return-Path: X-Original-To: freebsd-acpi@FreeBSD.org Delivered-To: freebsd-acpi@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2001B16A5E7; Sun, 3 Jul 2005 00:37:51 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 26C5A44557; Sun, 3 Jul 2005 00:22:27 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id F008962588; Sat, 2 Jul 2005 17:20:14 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id 44C245C97C for ; Wed, 2 Mar 2005 08:53:11 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 10999581FF; Wed, 2 Mar 2005 16:53:05 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 8492B16A4F5; Wed, 2 Mar 2005 16:53:03 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D4AEC16A4CE; Wed, 2 Mar 2005 16:52:58 +0000 (GMT) Received: from ms002msg.fastwebnet.it (ms002msg.fastwebnet.it [213.140.2.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 15FEF43D2F; Wed, 2 Mar 2005 16:52:58 +0000 (GMT) (envelope-from filippo@portatile.fastwebnet.it) Received: from portatile (1.255.90.62) by ms002msg.fastwebnet.it (7.2.052.3) id 41FFB3EA0032A743; Wed, 2 Mar 2005 17:52:57 +0100 Received: from portatile.fastwebnet.it (localhost [127.0.0.1]) by portatile (Postfix) with ESMTP id 54663B868; Wed, 2 Mar 2005 17:53:06 +0100 (CET) Received: (from filippo@localhost) by portatile.fastwebnet.it (8.13.1/8.13.1/Submit) id j22Gr5El000722; Wed, 2 Mar 2005 17:53:05 +0100 (CET) (envelope-from filippo) From: Filippo Forti To: John Baldwin Message-ID: <20050302165304.GA674@portatile.fastwebnet.it> Mail-Followup-To: John Baldwin , freebsd-acpi@FreeBSD.org, freebsd-current@FreeBSD.org References: <20050301203005.GA684@portatile.fastwebnet.it> <200503011703.50828.jhb@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200503011703.50828.jhb@FreeBSD.org> User-Agent: Mutt/1.5.6i X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,RCVD_ILLEGAL_IP autolearn=no version=3.0.2 X-Spam-Level: Cc: freebsd-acpi@FreeBSD.org, freebsd-current@FreeBSD.org Subject: Re: Panic on suspend X-BeenThere: freebsd-acpi@freebsd.org Reply-To: filippo.forti@fastwebnet.it List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:38:14 -0000 X-Original-Date: Wed, 2 Mar 2005 17:53:04 +0100 X-List-Received-Date: Sun, 03 Jul 2005 00:38:14 -0000 On Tue, Mar 01, 2005 at 05:03:50PM -0500, John Baldwin wrote: > On Tuesday 01 March 2005 03:30 pm, Filippo Forti wrote: > > Hi, > > I got a fully reproduceable panic while trying to suspend (to S3) on my > > laptop. FreeBSD is -CURRENT from Monday. > > > > I'm using a modified DSDT which used to work before I updated on Monday. > > dmesg from after reboot is attacched. > > > > Here comes gbd output > > > > > > Fatal trap 12: page fault while in vm86 mode > > fault virtual address = 0x2000 > > fault code = user write, page not present > > instruction pointer = 0xc000:0x5195 > > stack pointer = 0x0:0xfe4 > > frame pointer = 0x0:0x0 > > code segment = base 0x600005, limit 0x2, type 0x11 > > = DPL 1, pres 0, def32 0, gran 0 > > processor eflag = interrupt enabled, resume, mv86, IOPL = 0 > > current process = 1046 (acpiconf) > > [thread pid 1046 tid 100084] > > Stopped at 0x5159: *** error reading from address 5159 *** > > > > db> tr > > Tracing pid 1046 tid 100084 td 0xc27645c0 > > (null)(ff000e2c3,f000ff53,f000ff54,f00092da) at 0x5195 > > _end(ccce4fab,b638f354,3a6c5da3,ec956de5,fe6dff6c) at 0xf000ff53 > > > > db> where > > Tracing pid 1046 tid 100084 td 0xc27645c0 > > kdb_enter(c08d00f2,c08e69ce,c08cbfd1,c08ee7f9,2b8) at kdb_enter+0x31 > > witness_checkorder(c2cc2a54,9,c08ee7f9,2b8,0) at witness_checkorder+0xc9 > > _mtx_lock_flags(c2cc2a54,0,c08ee7f9,2b8,0) at _mtx_lock_flags+0x85 > > trap_pfault(c0c21fa8,0,2000,c0c21fa8,2000) at trap_pfault+0xa1 > > trap (0,0,0,1000,0) at trap+0x34b > > calltrap() at calltrap+0x5 > > ---trap 0xc, eip = 0x5195, esp = 0xc0c21fe8, ebp = 0 --- > > > > db> next > > panic: blockable sleep lock (sleep mutex) process lock @ > > /usr/src/sys/i386/i386/trap.c:696 > > KDB: enter: panic > > After 2 instructions (0 loads, 0 stores), > > [thread 1046 tid 1000084] > > stopped at kdb_enter+0x31: ret > > > > Thanks for your help > > Filippo > > Can you try this patch to get rid of the bogus witness warning: > This patch causes the kernel to panic on boot. Here comes something from there: Fatal trap 12: page fault while in kernel mode fault address = 0xbfbfffff fault code = supervisor write, page not present instruction pointer = 0x8:0xc085055d stack pointer = 0x10:0xe35a6cb8 frame pointer = 0x10:0xe35a6d14 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 1 (swapper) [thread pid 1 tid 100003] Stopped at subyte+0x25: movb %al,0(%edx) db> where Tracing pid 1 tid 100003 td 0xc227d450 subyte(0,e35a6d48,c08ca09d,30e,0) at subyte+0x25 fork_exit)c0634dac,0,e35a6d48) at fork_exit+0xc7 fork_trampoline() at fork_trampoline+0x8 --- trap 0x1, eip=0, esp=0xe35a6d7c, epb=0 --- > Index: trap.c > =================================================================== > RCS file: /usr/cvs/src/sys/i386/i386/trap.c,v > retrieving revision 1.270 > diff -u -r1.270 trap.c > --- trap.c 16 Nov 2004 20:42:31 -0000 1.270 > +++ trap.c 18 Feb 2005 15:31:37 -0000 > @@ -238,7 +238,7 @@ > * to the debugger. > */ > eva = rcr2(); > - if (td->td_critnest == 0) > + if (td->td_critnest == 0 && td->td_sleeplocks == NULL) > enable_intr(); > else > trap_fatal(&frame, eva); > > > -- > John Baldwin <>< http://www.FreeBSD.org/~jhb/ > "Power Users Use the Power to Serve" = http://www.FreeBSD.org P.S.: I worte the other messages in reply to my problem and will notice you of the results as soon as I can test all of them. Thanks for your help Filippo _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:38:13 2005 Return-Path: X-Original-To: acpi@FreeBSD.ORG Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DBA4516A5DD; Sun, 3 Jul 2005 00:37:50 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id E7D1B43FA5; Sun, 3 Jul 2005 00:22:24 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 71C606255F; Sat, 2 Jul 2005 17:20:14 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id 402E75C98E for ; Wed, 2 Mar 2005 15:33:39 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 2538D581A7; Wed, 2 Mar 2005 23:33:20 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id EB9C516A4D7; Wed, 2 Mar 2005 23:33:18 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F153616A4CE; Wed, 2 Mar 2005 23:29:13 +0000 (GMT) Received: from ylpvm29.prodigy.net (ylpvm29-ext.prodigy.net [207.115.57.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F31C43D1F; Wed, 2 Mar 2005 23:29:13 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.0.0.34] (adsl-67-119-74-222.dsl.sntc01.pacbell.net [67.119.74.222])j22NSaRs011996; Wed, 2 Mar 2005 18:28:37 -0500 Message-ID: <42264C34.90701@root.org> From: Nate Lawson User-Agent: Mozilla Thunderbird 1.0RC1 (X11/20041205) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kevin Oberman References: <20050301215549.7A2E25D07@ptavv.es.net> In-Reply-To: <20050301215549.7A2E25D07@ptavv.es.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, J_CHICKENPOX_13 autolearn=no version=3.0.2 X-Spam-Level: Cc: acpi@FreeBSD.ORG, Maxim Sobolev , current@FreeBSD.ORG Subject: Re: patch: p4tcc and speedstep cpufreq drivers X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:38:14 -0000 X-Original-Date: Wed, 02 Mar 2005 15:28:52 -0800 X-List-Received-Date: Sun, 03 Jul 2005 00:38:14 -0000 Kevin Oberman wrote: >>Date: Thu, 24 Feb 2005 13:11:14 -0800 >>From: Nate Lawson >> >>Maxim Sobolev wrote: >> >>>Kevin Oberman wrote: >>>> >>>>I'm also concerned that taking TCC out of automatic mode might not be a >>>>great idea, at least until things like _PSV are supported. When I do a >>>>buildkernel, buildworld or any big compile job, I need to slow down the >>>>CPU to keep the CPU form frying. It quickly jumps to 185 F. or higher if >>>>I don't. If I understand automatic TCC, it should throttle the CPU all >>>>by itself to prevent this. >>> >>>Taking TCC out of automatic mode doesn't disable thermal controlling >>>circuitry completely, so that if the processor overheats it will shut >>>down the machine anyway: >>> >>>--- >>>Regardless of enabling of the automatic >>>or On-Demand modes, in the event of a catastrophic cooling failure, the >>>processor will >>>automatically shut down when the silicon has reached a temperature of >>>approximately >>>135 °C. At this point the system bus signal THERMTRIP# will go active >>>and stay active >>>until RESET# has been initiated. >>>--- >> >>Correct. Even more so, automatic mode continues to override On-Demand >>mode if there is a more moderate thermal condition than THERMTRIP#: >> >>"On-Demand mode may be used at the same time Automatic mode is enabled, >>however, if the system tries to enable the TCC via On-Demand mode at the >>same time automatic mode is enabled AND a high temperature condition >>exists, the duty cycle of the automatic mode will override the duty >>cycle selected by the On-Demand mode." >> >>Since automatic mode is set by the BIOS before we even boot, things >>should be fine. > > Thanks! With this set I am down to "only" 14 frequencies, but they are > now proportional to CPU speed and I still have a fully functional TCC, > should I need it. > > Also, at no added charge, the system no longer locks up at low speed. I > can to all the way down to 150 MHz just fine! No more hangs. > > I really think that if would be a good idea to have > hint.p4tcc.0.disabled set by default, especially based on sobomax's > recent message where the spec says that normal operation can't be > assured if the TCC is not in automatic mode. I'm glad it's working for you but I don't think p4tcc should be disabled by default. sobomax's interpretation of the spec is not correct. The text you are referring to is directed at BIOS authors. The (undocumented) Automatic flag must be set during initialization (i.e., by the BIOS) or the system is not operating within specifications. Mobile Intel Pentium 4 Processor-M Datasheet, 6.1.2 --- The thermal monitor uses two modes to activate the TCC: Automatic mode and On-Demand mode. Automatic mode is required for the processor to operate within specifications and must first be enabled via BIOS. --- Again, this text is just saying that if the BIOS never enables the Automatic flag, the system is out of specification. However, this spec is a bit unclear on what happens when On-Demand mode is active and then a thermal condition occurs. It only specifies that if On-Demand mode is selected while a thermal condition is already present, the requested transition will not occur until the thermal condition has passed. If you look elsewhere, the design is stated more clearly and shows the reading that enabling On-Demand disables Automatic mode is incorrect. Intel Software Developer's Manual, Volume 3, 13.15.3: "If on-demand clock modulation and TM1 are both enabled and the thermal status of the processor is hot ..., clock modulation at the duty cycle specified by TM1 takes precedence, regardless of the setting of the on-demand clock modulation duty cycle." Empirical testing shows TM1 kicks in around 75C and THERMTRIP is somewhere near 100C. The separate THERMTRIP feature disables the processor completely if TM1 or 2 fail to stop the temperature from rising. http://www.digit-life.com/articles2/p4-throttling/ -- Nate _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:38:14 2005 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E1D4A16A5DF; Sun, 3 Jul 2005 00:37:50 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6103244537; Sun, 3 Jul 2005 00:22:19 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id B8ABA6256C; Sat, 2 Jul 2005 17:20:13 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id E5E875C98E; Tue, 1 Mar 2005 13:36:47 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 799AC5661D; Tue, 1 Mar 2005 21:35:07 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 5DCA216A4DF; Tue, 1 Mar 2005 21:35:06 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 686AE16A4CF for ; Tue, 1 Mar 2005 21:34:59 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1E4F543D41 for ; Tue, 1 Mar 2005 21:34:58 +0000 (GMT) (envelope-from kjelderg@gmail.com) Received: by rproxy.gmail.com with SMTP id j1so1343977rnf for ; Tue, 01 Mar 2005 13:34:57 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:references; b=H+RNYLOrm13AQbugSJEl0hygzbFml0lIBmpwqozyqIGrdfFTq8EnuQ565IlkP6Q3fLD0wAPItnObrpkiU80fIbo5OZhHEMq18qre4ZaCRAgmKhQ5HQaPQ2HvQEHnASqI1TBStrPpfo4RuGTZ160OBV/joI7CVQVtFIaIAa286zM= Received: by 10.38.15.37 with SMTP id 37mr88009rno; Tue, 01 Mar 2005 13:34:27 -0800 (PST) Received: by 10.38.101.19 with HTTP; Tue, 1 Mar 2005 13:34:24 -0800 (PST) Message-ID: From: Eric Kjeldergaard To: Nate Lawson In-Reply-To: <421A8F90.3080907@root.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1159_9255187.1109712864766" References: <42068A5C.1030300@root.org> <421A8F90.3080907@root.org> X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, J_CHICKENPOX_33, RCVD_BY_IP autolearn=no version=3.0.2 X-Spam-Level: Cc: acpi@freebsd.org, current@freebsd.org Subject: Re: HEADSUP: cpufreq import complete, acpi_throttling changed X-BeenThere: freebsd-acpi@freebsd.org Reply-To: Eric Kjeldergaard List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:38:15 -0000 X-Original-Date: Tue, 1 Mar 2005 15:34:24 -0600 X-List-Received-Date: Sun, 03 Jul 2005 00:38:15 -0000 ------=_Part_1159_9255187.1109712864766 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline On Mon, 21 Feb 2005 17:49:04 -0800, Nate Lawson wrote: > Eric Kjeldergaard wrote: > > On Sun, 06 Feb 2005 13:21:32 -0800, Nate Lawson wrote: > > > >>I've finished the major work of importing cpufreq. As part of this, the > >>sysctls for acpi throttling have been removed. The power_profile script > >>has been updated, so you can use performance/economy_cpu_freq= in > >>rc.conf to set AC on/offline cpu frequencies. The acpi throttling > >>support has been compiled into acpi_perf.ko so load that to get > >>throttling. Do a sysctl dev.cpu to get an understanding of the cpufreq > >>sysctls. > > > > > > I have been using cpufreq on and off since this got comitted and just > > noticed a problem now. I can't really say when it started happening, > > but I can say that it happens with a current from about 2 hours ago. > > What happens is when I kldload cpufreq, usb stops working. If I have > > a device that was already connected, it gets disconnected, I am unable > > to connect any new devices. It's just completely unresponsive. > > Whatever the issue is, it does not help to kldunload cpufreq, I am > > forced to reboot to get USB working again. The system is an IBM > > Thinkpad R40. I can give you whatever relevant info you need on > > request. > > Hmm. If you boot with cpufreq and usb loaded, does it have this > problem? Run the below script to send me your debug info: > > http://www.root.org/~nate/freebsd/cpufreq_debug > Finally got a chance to test again. It seems to happen regardless of whether cpufreq is loaded at boot or dynamically during runtime. The output of your script is attached. -- If I write a signature, my emails will appear more personalised. ------=_Part_1159_9255187.1109712864766 Content-Type: text/plain; name="nateDebugOutput.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="nateDebugOutput.txt" dev.cpu.0.%desc: ACPI CPU (3 Cx states) dev.cpu.0.%driver: cpu dev.cpu.0.%location: handle=3D\_PR_.CPU_ dev.cpu.0.%pnpinfo: _HID=3Dnone _UID=3D0 dev.cpu.0.%parent: acpi0 dev.cpu.0.freq: 2200 dev.cpu.0.freq_levels: 2200/0 1925/0 1650/0 1375/0 1200/0 1100/0 1050/0 900= /0 825/0 750/0 600/0 550/0 450/0 300/0 275/0 150/0 dev.acpi_perf.0.%desc: ACPI CPU Frequency Control dev.acpi_perf.0.%driver: acpi_perf dev.acpi_perf.0.%parent: cpu0 dev.acpi_perf.0.freq_settings: 2200/0 1200/0 dev.cpufreq.0.%driver: cpufreq dev.cpufreq.0.%parent: cpu0 dev.acpi_throttle.0.%desc: ACPI CPU Throttling dev.acpi_throttle.0.%driver: acpi_throttle dev.acpi_throttle.0.%parent: cpu0 dev.acpi_throttle.0.freq_settings: 10000/-1 8750/-1 7500/-1 6250/-1 5000/-1= 3750/-1 2500/-1 1250/-1 ################# Copyright (c) 1992-2005 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 =09The Regents of the University of California. All rights reserved. FreeBSD 6.0-CURRENT #9: Mon Feb 21 18:54:15 CST 2005 root@uninfectable:/usr/obj/usr/src/sys/UNINFECTABLE Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Mobile Intel(R) Pentium(R) 4 - M CPU 2.20GHz (2192.89-MHz 686-class CP= U) Origin =3D "GenuineIntel" Id =3D 0xf29 Stepping =3D 9 Features=3D0xbfebf9ff real memory =3D 804651008 (767 MB) avail memory =3D 782393344 (746 MB) ath_hal: 0.9.14.9 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413) npx0: [FAST] npx0: on motherboard npx0: INT 16 interface acpi0: on motherboard acpi_ec0: port 0x66,0x62 on acpi0 acpi0: Power Button (fixed) Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0 cpu0: on acpi0 pci_link0: irq 11 on acpi0 pci_link1: irq 11 on acpi0 pci_link2: irq 11 on acpi0 pci_link3: irq 11 on acpi0 pci_link4: irq 11 on acpi0 pci_link5: on acpi0 pci_link6: on acpi0 pci_link7: irq 11 on acpi0 acpi_lid0: on acpi0 acpi_button0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 agp0: mem 0xe0000000-0xe3ffffff at device = 0.0 on pci0 pcib1: at device 1.0 on pci0 pci1: on pcib1 pci1: at device 0.0 (no driver attached) uhci0: port 0x1800-0x181f irq 1= 1 at device 29.0 on pci0 uhci0: [GIANT-LOCKED] usb0: on uhci0 usb0: USB revision 1.0 uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered uhci1: port 0x1820-0x183f irq 1= 1 at device 29.1 on pci0 uhci1: [GIANT-LOCKED] usb1: on uhci1 usb1: USB revision 1.0 uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered uhci2: port 0x1840-0x185f irq 1= 1 at device 29.2 on pci0 uhci2: [GIANT-LOCKED] usb2: on uhci2 usb2: USB revision 1.0 uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub2: 2 ports with 2 removable, self powered pci0: at device 29.7 (no driver attached) pcib2: at device 30.0 on pci0 pci2: on pcib2 cbb0: mem 0x50000000-0x50000fff irq 11 at devic= e 0.0 on pci2 cardbus0: on cbb0 pccard0: <16-bit PCCard bus> on cbb0 ath0: mem 0xd0200000-0xd020ffff irq 11 at device 2.0 on pci2 ath0: Ethernet address: 00:05:4e:42:8b:2d ath0: mac 4.2 phy 3.0 5ghz radio 1.7 2ghz radio 2.3 pci2: at device 7.0 (no driver attached) fxp0: port 0x8000-0x803f mem 0xd= 0214000-0xd0214fff irq 11 at device 8.0 on pci2 miibus0: on fxp0 inphy0: on miibus0 inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto fxp0: Ethernet address: 00:06:1b:e0:d1:24 isab0: at device 31.0 on pci0 isa0: on isab0 atapci0: port 0x1860-0x186f,0x376,0x170-0x1= 77,0x3f6,0x1f0-0x1f7 at device 31.1 on pci0 ata0: channel #0 on atapci0 ata1: channel #1 on atapci0 pci0: at device 31.3 (no driver attached) pci0: at device 31.5 (no driver attached) pci0: at device 31.6 (no driver attached) acpi_tz0: on acpi0 atkbdc0: port 0x64,0x60 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] psm0: irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: model Synaptics Touchpad, device ID 0 fdc0: port 0x3f7,0x3f0-0x3f5 irq 6 drq 2 on= acpi0 fdc0: [FAST] acpi_cmbat0: on acpi0 acpi_acad0: on acpi0 pmtimer0 on isa0 orm0: at iomem 0xdc000-0xdffff,0xd2000-0xd2fff,0xd1000-0x= d1fff,0xd0000-0xd0fff on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=3D0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Timecounter "TSC" frequency 2192894084 Hz quality 800 Timecounters tick every 1.000 msec pid 24: corrected slot count (0->1) ad0: 76319MB [155061/16/63] at ata0-master UDMA100 acd0: CDRW at ata1-master UDMA33 Trying to mount root from ufs:/dev/ad0s2a pid 454 (vmware-checkvm), uid 0: exited on signal 10 (core dumped) pid 464 (vmware-checkvm), uid 0: exited on signal 10 (core dumped) pid 466 (vmware-checkvm), uid 0: exited on signal 10 (core dumped) pid 468 (vmware-checkvm), uid 0: exited on signal 10 (core dumped) acpi_perf0: on cpu0 acpi_throttle0: on cpu0 ################# nexus0 legacy0 npx0 acpi0 Interrupt request lines: 0x9 I/O ports: 0x10-0x1f 0x24-0x25 0x28-0x29 0x2c-0x2d 0x2e-0x2f 0x30-0x31 0x34-0x35 0x38-0x39 0x3c-0x3d 0x4e-0x4f 0x50-0x53 0x72-0x77 0x90-0x9f 0xa4-0xa5 0xa8-0xa9 0xac-0xad 0xb0-0xb5 0xb8-0xb9 0xbc-0xbd 0x1000-0x107f 0x1180-0x11bf 0x1600-0x167f I/O memory addresses: 0x0-0x9ffff 0xc0000-0xc3fff 0xc4000-0xc7fff 0xc8000-0xcbfff 0xcc000-0xcffff 0xd0000-0xd3fff 0xdc000-0xdffff 0xe0000-0xe3fff 0xe4000-0xe7fff 0xe8000-0xebfff 0xec000-0xeffff 0xf0000-0xfffff 0x100000-0x2fffffff 0xfec00000-0xffffffff acpi_ec0 pnpinfo _HID=3DPNP0C09 _UID=3D0 at handle=3D\_SB_.PCI0.LPC_.EC= __ I/O ports: 0x62 0x66 cpu0 pnpinfo _HID=3Dnone _UID=3D0 at handle=3D\_PR_.CPU_ I/O ports: 0x1014 0x1015 acpi_perf0 I/O ports: 0xb2 0x1050 cpufreq0 acpi_throttle0 I/O ports: 0x1010-0x1013 pci_link0 pnpinfo _HID=3DPNP0C0F _UID=3D1 at handle=3D\_SB_.LNKA pci_link1 pnpinfo _HID=3DPNP0C0F _UID=3D2 at handle=3D\_SB_.LNKB pci_link2 pnpinfo _HID=3DPNP0C0F _UID=3D3 at handle=3D\_SB_.LNKC pci_link3 pnpinfo _HID=3DPNP0C0F _UID=3D4 at handle=3D\_SB_.LNKD pci_link4 pnpinfo _HID=3DPNP0C0F _UID=3D5 at handle=3D\_SB_.LNKE pci_link5 pnpinfo _HID=3DPNP0C0F _UID=3D6 at handle=3D\_SB_.LNKF pci_link6 pnpinfo _HID=3DPNP0C0F _UID=3D7 at handle=3D\_SB_.LNKG pci_link7 pnpinfo _HID=3DPNP0C0F _UID=3D8 at handle=3D\_SB_.LNKH acpi_sysresource0 pnpinfo _HID=3DPNP0C01 _UID=3D0 at handle=3D\_SB_.MEM= _ acpi_lid0 pnpinfo _HID=3DPNP0C0D _UID=3D0 at handle=3D\_SB_.LID_ acpi_button0 pnpinfo _HID=3DPNP0C0E _UID=3D0 at handle=3D\_SB_.SLPB pcib0 pnpinfo _HID=3DPNP0A03 _UID=3D0 at handle=3D\_SB_.PCI0 pci0 agp0 pnpinfo vendor=3D0x8086 device=3D0x1a30 subvendor=3D0x1014 sub= device=3D0x0507 class=3D0x060000 at slot=3D0 function=3D0 I/O memory addresses: 0xe0000000-0xe3ffffff pcib1 pnpinfo vendor=3D0x8086 device=3D0x1a31 subvendor=3D0x0000 su= bdevice=3D0x0000 class=3D0x060400 at slot=3D1 function=3D0 handle=3D\_SB_.P= CI0.AGP_ pci1 unknown pnpinfo vendor=3D0x1002 device=3D0x4c57 subvendor=3D0x1= 014 subdevice=3D0x0527 class=3D0x030000 at slot=3D0 function=3D0 handle=3D\= _SB_.PCI0.AGP_.VID_ I/O ports: 0x3000-0x30ff I/O memory addresses: 0xd0100000-0xd010ffff 0xe8000000-0xefffffff uhci0 pnpinfo vendor=3D0x8086 device=3D0x24c2 subvendor=3D0x1014 su= bdevice=3D0x052d class=3D0x0c0300 at slot=3D29 function=3D0 handle=3D\_SB_.= PCI0.USB0 Interrupt request lines: 0xb I/O ports: 0x1800-0x181f usb0 uhub0 uhci1 pnpinfo vendor=3D0x8086 device=3D0x24c4 subvendor=3D0x1014 su= bdevice=3D0x052d class=3D0x0c0300 at slot=3D29 function=3D1 handle=3D\_SB_.= PCI0.USB1 I/O ports: 0x1820-0x183f usb1 uhub1 uhci2 pnpinfo vendor=3D0x8086 device=3D0x24c7 subvendor=3D0x1014 su= bdevice=3D0x052d class=3D0x0c0300 at slot=3D29 function=3D2 handle=3D\_SB_.= PCI0.USB2 I/O ports: 0x1840-0x185f usb2 uhub2 unknown pnpinfo vendor=3D0x8086 device=3D0x24cd subvendor=3D0x1014 = subdevice=3D0x052e class=3D0x0c0320 at slot=3D29 function=3D7 handle=3D\_SB= _.PCI0.USB7 I/O memory addresses: 0xd0000000-0xd00003ff pcib2 pnpinfo vendor=3D0x8086 device=3D0x2448 subvendor=3D0x0000 su= bdevice=3D0x0000 class=3D0x060400 at slot=3D30 function=3D0 handle=3D\_SB_.= PCI0.PCI1 pci2 cbb0 pnpinfo vendor=3D0x104c device=3D0xac56 subvendor=3D0x1014= subdevice=3D0x0528 class=3D0x060700 at slot=3D0 function=3D0 handle=3D\_SB= _.PCI0.PCI1.CBS0 I/O memory addresses: 0x50000000-0x50000fff cardbus0 pccard0 ath0 pnpinfo vendor=3D0x168c device=3D0x0012 subvendor=3D0x17ab= subdevice=3D0x8310 class=3D0x020000 at slot=3D2 function=3D0 I/O memory addresses: 0xd0200000-0xd020ffff unknown pnpinfo vendor=3D0x104c device=3D0x8026 subvendor=3D0x1= 014 subdevice=3D0x0515 class=3D0x0c0010 at slot=3D7 function=3D0 I/O memory addresses: 0xd0210000-0xd0213fff 0xd0215000-0xd02157ff fxp0 pnpinfo vendor=3D0x8086 device=3D0x103d subvendor=3D0x1014= subdevice=3D0x0522 class=3D0x020000 at slot=3D8 function=3D0 I/O ports: 0x8000-0x803f I/O memory addresses: 0xd0214000-0xd0214fff miibus0 inphy0 pnpinfo oui=3D0xaa00 model=3D0x33 rev=3D0x0 at phyno= =3D1 isab0 pnpinfo vendor=3D0x8086 device=3D0x24cc subvendor=3D0x0000 su= bdevice=3D0x0000 class=3D0x060100 at slot=3D31 function=3D0 handle=3D\_SB_.= PCI0.LPC_ isa0 adv0 aha0 aic0 bt0 cs0 ed0 fe0 ie0 lnc0 pcic0 pcic1 ppc0 sc0 sio0 sio1 sio2 sio3 sn0 vga0 I/O ports: 0x3c0-0x3df I/O memory addresses: 0xa0000-0xbffff vt0 orm0 I/O memory addresses: 0xd0000-0xd0fff 0xd1000-0xd1fff 0xd2000-0xd2fff 0xdc000-0xdffff pmtimer0 atapci0 pnpinfo vendor=3D0x8086 device=3D0x24ca subvendor=3D0x1014 = subdevice=3D0x052d class=3D0x01018a at slot=3D31 function=3D1 handle=3D\_SB= _.PCI0.IDE0 I/O ports: 0x170-0x177 0x1f0-0x1f7 0x376 0x3f6 0x1860-0x186f ata0 Interrupt request lines: 0xe ata1 Interrupt request lines: 0xf unknown pnpinfo vendor=3D0x8086 device=3D0x24c3 subvendor=3D0x1014 = subdevice=3D0x052d class=3D0x0c0500 at slot=3D31 function=3D3 I/O ports: 0x1880-0x189f unknown pnpinfo vendor=3D0x8086 device=3D0x24c5 subvendor=3D0x1014 = subdevice=3D0x0523 class=3D0x040100 at slot=3D31 function=3D5 I/O ports: 0x18c0-0x18ff 0x1c00-0x1cff I/O memory addresses: 0xd0000800-0xd00008ff 0xd0000c00-0xd0000dff unknown pnpinfo vendor=3D0x8086 device=3D0x24c6 subvendor=3D0x1014 = subdevice=3D0x0524 class=3D0x070300 at slot=3D31 function=3D6 handle=3D\_SB= _.PCI0.AC97 I/O ports: 0x2000-0x207f 0x2400-0x24ff acpi_sysresource1 pnpinfo _HID=3DPNP0C02 _UID=3D0 at handle=3D\_SB_.PCI= 0.LPC_.SIO_ atpic0 pnpinfo _HID=3DPNP0000 _UID=3D0 at handle=3D\_SB_.PCI0.LPC_.PIC_ attimer0 pnpinfo _HID=3DPNP0100 _UID=3D0 at handle=3D\_SB_.PCI0.LPC_.TI= MR atdma0 pnpinfo _HID=3DPNP0200 _UID=3D0 at handle=3D\_SB_.PCI0.LPC_.DMAC unknown pnpinfo _HID=3DPNP0800 _UID=3D0 at handle=3D\_SB_.PCI0.LPC_.SPK= R npxisa0 pnpinfo _HID=3DPNP0C04 _UID=3D0 at handle=3D\_SB_.PCI0.LPC_.FPU= _ attimer1 pnpinfo _HID=3DPNP0B00 _UID=3D0 at handle=3D\_SB_.PCI0.LPC_.RT= C_ atkbdc0 pnpinfo _HID=3DPNP0303 _UID=3D0 at handle=3D\_SB_.PCI0.LPC_.KBD= _ I/O ports: 0x60 0x64 atkbd0 Interrupt request lines: 0x1 psm0 Interrupt request lines: 0xc psmcpnp0 pnpinfo _HID=3DIBM0057 _UID=3D0 at handle=3D\_SB_.PCI0.LPC_.MO= U_ fdc0 pnpinfo _HID=3DPNP0700 _UID=3D0 at handle=3D\_SB_.PCI0.LPC_.FDC_ Interrupt request lines: 0x6 DMA request lines: 2 I/O ports: 0x3f0-0x3f5 0x3f7 unknown pnpinfo _HID=3Dnone _UID=3D0 at handle=3D\_SB_.PCI0.LPC_.FDC_.F= DD0 unknown pnpinfo _HID=3DPNP0501 _UID=3D0 at handle=3D\_SB_.PCI0.LPC_.UAR= T unknown pnpinfo _HID=3DPNP0400 _UID=3D0 at handle=3D\_SB_.PCI0.LPC_.LPT= _ unknown pnpinfo _HID=3DPNP0401 _UID=3D0 at handle=3D\_SB_.PCI0.LPC_.ECP= _ unknown pnpinfo _HID=3DIBM0071 _UID=3D0 at handle=3D\_SB_.PCI0.LPC_.FIR= _ unknown pnpinfo _HID=3DPNP0C09 _UID=3D0 at handle=3D\_SB_.PCI0.LPC_.EC_= _ unknown pnpinfo _HID=3Dnone _UID=3D0 at handle=3D\_SB_.PCI0.LPC_.EC__.P= UBS acpi_cmbat0 pnpinfo _HID=3DPNP0C0A _UID=3D0 at handle=3D\_SB_.PCI0.LPC_= .EC__.BAT0 unknown pnpinfo _HID=3DPNP0C0A _UID=3D1 at handle=3D\_SB_.PCI0.LPC_.EC_= _.BAT1 acpi_acad0 pnpinfo _HID=3DACPI0003 _UID=3D0 at handle=3D\_SB_.PCI0.LPC_= .EC__.AC__ unknown pnpinfo _HID=3DIBM0068 _UID=3D0 at handle=3D\_SB_.PCI0.LPC_.EC_= _.HKEY unknown pnpinfo _HID=3Dnone _UID=3D0 at handle=3D\_SB_.PCI0.AGP_.VID_.L= CD0 unknown pnpinfo _HID=3Dnone _UID=3D0 at handle=3D\_SB_.PCI0.AGP_.VID_.C= RT0 unknown pnpinfo _HID=3Dnone _UID=3D0 at handle=3D\_SB_.PCI0.AGP_.VID_.T= V0_ unknown pnpinfo _HID=3Dnone _UID=3D0 at handle=3D\_SB_.PCI0.AGP_.VID_.D= VI0 unknown pnpinfo _HID=3Dnone _UID=3D0 at handle=3D\_SB_.PCI0.IDE0.PRIM unknown pnpinfo _HID=3Dnone _UID=3D0 at handle=3D\_SB_.PCI0.IDE0.PRIM.M= STR unknown pnpinfo _HID=3Dnone _UID=3D0 at handle=3D\_SB_.PCI0.IDE0.SCND unknown pnpinfo _HID=3Dnone _UID=3D0 at handle=3D\_SB_.PCI0.IDE0.SCND.M= STR unknown pnpinfo _HID=3Dnone _UID=3D0 at handle=3D\_SB_.PCI0.USB0.URTH unknown pnpinfo _HID=3Dnone _UID=3D0 at handle=3D\_SB_.PCI0.USB0.URTH.U= NST unknown pnpinfo _HID=3Dnone _UID=3D0 at handle=3D\_SB_.PCI0.USB7.URTH unknown pnpinfo _HID=3Dnone _UID=3D0 at handle=3D\_SB_.PCI0.USB7.URTH.U= NST unknown pnpinfo _HID=3DIBM006A _UID=3D0 at handle=3D\_SB_.NEST unknown pnpinfo _HID=3DIBM0069 _UID=3D0 at handle=3D\_SB_.SWAP acpi_tz0 pnpinfo _HID=3Dnone _UID=3D0 at handle=3D\_TZ_.THM0 acpi_timer0 pnpinfo unknown at unknown I/O ports: 0x1008-0x100b ------=_Part_1159_9255187.1109712864766 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" ------=_Part_1159_9255187.1109712864766-- From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:38:15 2005 Return-Path: X-Original-To: acpi@FreeBSD.ORG Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4D44916A5F1; Sun, 3 Jul 2005 00:37:51 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4ED7343F57; Sun, 3 Jul 2005 00:22:22 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 55FEE62556; Sat, 2 Jul 2005 17:20:14 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id 09D125C862 for ; Wed, 2 Mar 2005 16:02:12 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id E23EC55557; Wed, 2 Mar 2005 23:59:43 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 69EB716A53E; Wed, 2 Mar 2005 23:59:36 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 56B0B16A4CE; Wed, 2 Mar 2005 23:56:27 +0000 (GMT) Received: from postal1.es.net (postal1.es.net [198.128.3.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id F244343D48; Wed, 2 Mar 2005 23:56:26 +0000 (GMT) (envelope-from oberman@es.net) Received: from ptavv.es.net ([198.128.4.29]) by postal1.es.net (Postal Node 1) with ESMTP (SSL) id IBA74465; Wed, 02 Mar 2005 15:56:24 -0800 Received: from ptavv (localhost [127.0.0.1]) by ptavv.es.net (Tachyon Server) with ESMTP id BA3925D07; Wed, 2 Mar 2005 15:56:23 -0800 (PST) To: Nate Lawson In-reply-to: Your message of "Wed, 02 Mar 2005 15:28:52 PST." <42264C34.90701@root.org> From: "Kevin Oberman" Message-Id: <20050302235623.BA3925D07@ptavv.es.net> X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, J_CHICKENPOX_13 autolearn=no version=3.0.2 X-Spam-Level: Cc: acpi@FreeBSD.ORG, Maxim Sobolev , current@FreeBSD.ORG Subject: Re: patch: p4tcc and speedstep cpufreq drivers X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:38:15 -0000 X-Original-Date: Wed, 02 Mar 2005 15:56:23 -0800 X-List-Received-Date: Sun, 03 Jul 2005 00:38:15 -0000 > Date: Wed, 02 Mar 2005 15:28:52 -0800 > From: Nate Lawson > > Kevin Oberman wrote: > >>Date: Thu, 24 Feb 2005 13:11:14 -0800 > >>From: Nate Lawson > >> > >>Maxim Sobolev wrote: > >> > >>>Kevin Oberman wrote: > >>>> > >>>>I'm also concerned that taking TCC out of automatic mode might not be a > >>>>great idea, at least until things like _PSV are supported. When I do a > >>>>buildkernel, buildworld or any big compile job, I need to slow down the > >>>>CPU to keep the CPU form frying. It quickly jumps to 185 F. or higher if > >>>>I don't. If I understand automatic TCC, it should throttle the CPU all > >>>>by itself to prevent this. > >>> > >>>Taking TCC out of automatic mode doesn't disable thermal controlling > >>>circuitry completely, so that if the processor overheats it will shut > >>>down the machine anyway: > >>> > >>>--- > >>>Regardless of enabling of the automatic > >>>or On-Demand modes, in the event of a catastrophic cooling failure, the > >>>processor will > >>>automatically shut down when the silicon has reached a temperature of > >>>approximately > >>>135 °C. At this point the system bus signal THERMTRIP# will go active > >>>and stay active > >>>until RESET# has been initiated. > >>>--- > >> > >>Correct. Even more so, automatic mode continues to override On-Demand > >>mode if there is a more moderate thermal condition than THERMTRIP#: > >> > >>"On-Demand mode may be used at the same time Automatic mode is enabled, > >>however, if the system tries to enable the TCC via On-Demand mode at the > >>same time automatic mode is enabled AND a high temperature condition > >>exists, the duty cycle of the automatic mode will override the duty > >>cycle selected by the On-Demand mode." > >> > >>Since automatic mode is set by the BIOS before we even boot, things > >>should be fine. > > > > Thanks! With this set I am down to "only" 14 frequencies, but they are > > now proportional to CPU speed and I still have a fully functional TCC, > > should I need it. > > > > Also, at no added charge, the system no longer locks up at low speed. I > > can to all the way down to 150 MHz just fine! No more hangs. > > > > I really think that if would be a good idea to have > > hint.p4tcc.0.disabled set by default, especially based on sobomax's > > recent message where the spec says that normal operation can't be > > assured if the TCC is not in automatic mode. > > I'm glad it's working for you but I don't think p4tcc should be disabled > by default. sobomax's interpretation of the spec is not correct. > > The text you are referring to is directed at BIOS authors. The > (undocumented) Automatic flag must be set during initialization (i.e., > by the BIOS) or the system is not operating within specifications. > > Mobile Intel Pentium 4 Processor-M Datasheet, 6.1.2 > --- > The thermal monitor uses two modes to activate the TCC: Automatic mode > and On-Demand mode. Automatic mode is required for the processor to > operate within specifications and must first be enabled via BIOS. > --- > > Again, this text is just saying that if the BIOS never enables the > Automatic flag, the system is out of specification. However, this spec > is a bit unclear on what happens when On-Demand mode is active and then > a thermal condition occurs. It only specifies that if On-Demand mode is > selected while a thermal condition is already present, the requested > transition will not occur until the thermal condition has passed. > > If you look elsewhere, the design is stated more clearly and shows the > reading that enabling On-Demand disables Automatic mode is incorrect. > > Intel Software Developer's Manual, Volume 3, 13.15.3: > "If on-demand clock modulation and TM1 are both enabled and the thermal > status of the processor is hot ..., clock modulation at the duty cycle > specified by TM1 takes precedence, regardless of the setting of the > on-demand clock modulation duty cycle." > > Empirical testing shows TM1 kicks in around 75C and THERMTRIP is > somewhere near 100C. The separate THERMTRIP feature disables the > processor completely if TM1 or 2 fail to stop the temperature from rising. > > http://www.digit-life.com/articles2/p4-throttling/ OK. This makes me feel a bit better, but I still think I'll leave TCC out of the equation as it makes the various frequency steps vary uneven to the point that lowering dev.cpu.0.freq would increase performance (and the reverse, as well) and it causes my system to hang when throttled back too far. It never hangs with TCC disabled although my lowest "frequency" is now just 150 MHz. By the way, I am still delighted in the cpufreq addition to the system. It gives me excellent control of CPU speed to stretch my battery life. All I really need is a desktop tool (maybe a gnome applet) to let me adjust freq easily. I may just try to write that myself if I get some time before someone else gets to it. -- 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 _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:38:15 2005 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 800C716A5F4; Sun, 3 Jul 2005 00:37:51 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id A0CEF44556; Sun, 3 Jul 2005 00:22:26 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id D12AE62585; Sat, 2 Jul 2005 17:20:14 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id 894005C97C; Wed, 2 Mar 2005 08:55:31 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 70C6355C49; Wed, 2 Mar 2005 16:55:22 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 1E22016A51B; Wed, 2 Mar 2005 16:55:14 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EA0B616A4CE; Wed, 2 Mar 2005 16:55:08 +0000 (GMT) Received: from ms001msg.fastwebnet.it (ms001msg.fastwebnet.it [213.140.2.51]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9312743D1F; Wed, 2 Mar 2005 16:55:08 +0000 (GMT) (envelope-from filippo@portatile.fastwebnet.it) Received: from portatile (1.255.90.62) by ms001msg.fastwebnet.it (7.2.052.3) id 41FFB4A2006FD89F; Wed, 2 Mar 2005 17:55:07 +0100 Received: from portatile.fastwebnet.it (localhost [127.0.0.1]) by portatile (Postfix) with ESMTP id D0695B868; Wed, 2 Mar 2005 17:55:16 +0100 (CET) Received: (from filippo@localhost) by portatile.fastwebnet.it (8.13.1/8.13.1/Submit) id j22GtGOx000759; Wed, 2 Mar 2005 17:55:16 +0100 (CET) (envelope-from filippo) From: Filippo Forti To: Nate Lawson Message-ID: <20050302165516.GB674@portatile.fastwebnet.it> Mail-Followup-To: Nate Lawson , freebsd-current@freebsd.org, freebsd-acpi@freebsd.org References: <20050301203005.GA684@portatile.fastwebnet.it> <20050301203732.GB684@portatile.fastwebnet.it> <4224F88E.8080205@root.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4224F88E.8080205@root.org> User-Agent: Mutt/1.5.6i X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,RCVD_ILLEGAL_IP autolearn=no version=3.0.2 X-Spam-Level: Cc: freebsd-acpi@freebsd.org, freebsd-current@freebsd.org Subject: Re: Panic on suspend X-BeenThere: freebsd-acpi@freebsd.org Reply-To: filippo.forti@fastwebnet.it List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:38:15 -0000 X-Original-Date: Wed, 2 Mar 2005 17:55:16 +0100 X-List-Received-Date: Sun, 03 Jul 2005 00:38:15 -0000 On Tue, Mar 01, 2005 at 03:19:42PM -0800, Nate Lawson wrote: > Filippo Forti wrote: > >I got a fully reproduceable panic while trying to suspend (to S3) on my > >laptop. > >FreeBSD is -CURRENT from Monday. > > > >I'm using a modified DSDT which used to work before I updated on Monday. > >dmesg from after reboot is attacched. > > > >Here comes gbd output > > > >Fatal trap 12: page fault while in vm86 mode > >fault virtual address = 0x2000 > >fault code = user write, page not present > >instruction pointer = 0xc000:0x5195 > ^^^^^^^ > Unfortunately this doesn't make the trick Thanks anyway > That is in the VGA BIOS. Try setting this sysctl before suspending: > > hw.acpi.reset_video=0 > > >stack pointer = 0x0:0xfe4 > >frame pointer = 0x0:0x0 > >code segment = base 0x600005, limit 0x2, type 0x11 > > = DPL 1, pres 0, def32 0, > > gran 0 > >processor eflag = interrupt enabled, resume, mv86, > >IOPL = 0 > >current process = 1046 (acpiconf) > >[thread pid 1046 tid 100084] > >Stopped at 0x5159: *** error reading from address 5159 *** > > Ian committed code to restore the VESA state so we shouldn't reset video > redundantly. I'm thinking of changing the default to 0 in -current. > > -- > Nate Filippo _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:38:15 2005 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A118A16A5FA; Sun, 3 Jul 2005 00:37:51 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id BA8724453A; Sun, 3 Jul 2005 00:22:19 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id D4E646256E; Sat, 2 Jul 2005 17:20:13 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id 7B8BB5C98B; Tue, 1 Mar 2005 12:51:09 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 6D72C57ADB; Tue, 1 Mar 2005 20:51:03 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 5136716A4DD; Tue, 1 Mar 2005 20:51:01 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E8EF516A4CE; Tue, 1 Mar 2005 20:50:54 +0000 (GMT) Received: from ms004msg.fastwebnet.it (ms004msg.fastwebnet.it [213.140.2.58]) by mx1.FreeBSD.org (Postfix) with ESMTP id 13ACE43D41; Tue, 1 Mar 2005 20:50:54 +0000 (GMT) (envelope-from filippo@portatile.fastwebnet.it) Received: from portatile (1.255.90.62) by ms004msg.fastwebnet.it (7.2.052.3) id 41FF9642006C747D; Tue, 1 Mar 2005 21:50:52 +0100 Received: from portatile.fastwebnet.it (localhost [127.0.0.1]) by portatile (Postfix) with ESMTP id 6D3A0B85C; Tue, 1 Mar 2005 21:30:07 +0100 (CET) Received: (from filippo@localhost) by portatile.fastwebnet.it (8.13.1/8.13.1/Submit) id j21KU6B7000779; Tue, 1 Mar 2005 21:30:06 +0100 (CET) (envelope-from filippo) From: Filippo Forti To: freebsd-current@freebsd.org Message-ID: <20050301203005.GA684@portatile.fastwebnet.it> Mail-Followup-To: freebsd-current@freebsd.org, freebsd-acpi@freebsd.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="CE+1k2dSO48ffgeK" Content-Disposition: inline User-Agent: Mutt/1.5.6i X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,RCVD_ILLEGAL_IP autolearn=no version=3.0.2 X-Spam-Level: Cc: freebsd-acpi@freebsd.org Subject: Panic on suspend X-BeenThere: freebsd-acpi@freebsd.org Reply-To: filippo.forti@fastwebnet.it List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:38:16 -0000 X-Original-Date: Tue, 1 Mar 2005 21:30:05 +0100 X-List-Received-Date: Sun, 03 Jul 2005 00:38:16 -0000 --CE+1k2dSO48ffgeK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, I got a fully reproduceable panic while trying to suspend (to S3) on my laptop. FreeBSD is -CURRENT from Monday. I'm using a modified DSDT which used to work before I updated on Monday. dmesg from after reboot is attacched. Here comes gbd output Fatal trap 12: page fault while in vm86 mode fault virtual address = 0x2000 fault code = user write, page not present instruction pointer = 0xc000:0x5195 stack pointer = 0x0:0xfe4 frame pointer = 0x0:0x0 code segment = base 0x600005, limit 0x2, type 0x11 = DPL 1, pres 0, def32 0, gran 0 processor eflag = interrupt enabled, resume, mv86, IOPL = 0 current process = 1046 (acpiconf) [thread pid 1046 tid 100084] Stopped at 0x5159: *** error reading from address 5159 *** db> tr Tracing pid 1046 tid 100084 td 0xc27645c0 (null)(ff000e2c3,f000ff53,f000ff54,f00092da) at 0x5195 _end(ccce4fab,b638f354,3a6c5da3,ec956de5,fe6dff6c) at 0xf000ff53 db> where Tracing pid 1046 tid 100084 td 0xc27645c0 kdb_enter(c08d00f2,c08e69ce,c08cbfd1,c08ee7f9,2b8) at kdb_enter+0x31 witness_checkorder(c2cc2a54,9,c08ee7f9,2b8,0) at witness_checkorder+0xc9 _mtx_lock_flags(c2cc2a54,0,c08ee7f9,2b8,0) at _mtx_lock_flags+0x85 trap_pfault(c0c21fa8,0,2000,c0c21fa8,2000) at trap_pfault+0xa1 trap (0,0,0,1000,0) at trap+0x34b calltrap() at calltrap+0x5 ---trap 0xc, eip = 0x5195, esp = 0xc0c21fe8, ebp = 0 --- db> next panic: blockable sleep lock (sleep mutex) process lock @ /usr/src/sys/i386/i386/trap.c:696 KDB: enter: panic After 2 instructions (0 loads, 0 stores), [thread 1046 tid 1000084] stopped at kdb_enter+0x31: ret Thanks for your help Filippo --CE+1k2dSO48ffgeK Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=dmesg Copyright (c) 1992-2005 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 6.0-CURRENT #0: Tue Mar 1 00:29:12 CET 2005 root@portatile.fastwebnet.it:/usr/obj/usr/src/sys/PORTATILE WARNING: WITNESS option enabled, expect reduced performance. Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Pentium(R) 4 CPU 2.80GHz (2790.72-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0xf27 Stepping = 7 Features=0xbfebf9ff real memory = 1073152000 (1023 MB) avail memory = 1041317888 (993 MB) ath_hal: 0.9.14.9 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413) ACPI: overriding DSDT/SSDT with custom table ACPI-0377: *** Info: Table [DSDT] replaced by host OS npx0: [FAST] npx0: on motherboard npx0: INT 16 interface acpi0: on motherboard acpi0: Power Button (fixed) acpi_ec0: port 0x66,0x62 on acpi0 Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0 cpu0: on acpi0 acpi_throttle0: on cpu0 acpi_button0: on acpi0 acpi_lid0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci_link0: irq 0 on acpi0 pci_link1: irq 10 on acpi0 pci_link2: irq 10 on acpi0 pci_link3: irq 11 on acpi0 pci_link4: irq 10 on acpi0 pci0: on pcib0 agp0: mem 0xe8000000-0xefffffff at device 0.0 on pci0 pcib1: at device 1.0 on pci0 pci1: on pcib1 pci1: at device 0.0 (no driver attached) uhci0: port 0x1cc0-0x1cdf irq 10 at device 29.0 on pci0 uhci0: [GIANT-LOCKED] usb0: on uhci0 usb0: USB revision 1.0 uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered uhci1: port 0x1ce0-0x1cff irq 11 at device 29.1 on pci0 uhci1: [GIANT-LOCKED] usb1: on uhci1 usb1: USB revision 1.0 uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered ehci0: mem 0xe0000000-0xe00003ff irq 10 at device 29.7 on pci0 ehci0: [GIANT-LOCKED] ehci_pci_attach: companion usb0 ehci_pci_attach: companion usb1 usb2: EHCI version 1.0 usb2: companion controllers, 2 ports each: usb0 usb1 usb2: on ehci0 usb2: USB revision 2.0 uhub2: Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 1 uhub2: single transaction translator uhub2: 4 ports with 4 removable, self powered pcib2: at device 30.0 on pci0 pci_link5: irq 0 on acpi0 pci_link6: irq 0 on acpi0 pci_link7: irq 0 on acpi0 pci2: on pcib2 bfe0: mem 0xe0204000-0xe0205fff irq 10 at device 1.0 on pci2 miibus0: on bfe0 bmtphy0: on miibus0 bmtphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto bfe0: Ethernet address: 00:0b:db:18:b5:9c cbb0: irq 10 at device 4.0 on pci2 cardbus0: on cbb0 pccard0: <16-bit PCCard bus> on cbb0 fwohci0: <1394 Open Host Controller Interface> mem 0xe0200000-0xe0203fff,0xe0206000-0xe02067ff irq 10 at device 4.1 on pci2 fwohci0: OHCI version 1.10 (ROM=0) fwohci0: No. of Isochronous channels is 4. fwohci0: EUI64 00:c0:4f:38:02:dc:d4:10 fwohci0: Phy 1394a available S400, 2 ports. fwohci0: Link S400, max_rec 2048 bytes. firewire0: on fwohci0 fwe0: on firewire0 if_fwe0: Fake Ethernet address: 02:c0:4f:dc:d4:10 fwe0: Ethernet address: 02:c0:4f:dc:d4:10 fwe0: if_start running deferred for Giant sbp0: on firewire0 fwohci0: Initiate bus reset fwohci0: node_id=0xc000ffc0, gen=1, CYCLEMASTER mode firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me) firewire0: bus manager 0 (me) isab0: at device 31.0 on pci0 isa0: on isab0 atapci0: port 0x2020-0x202f,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 31.1 on pci0 ata0: channel #0 on atapci0 ata1: channel #1 on atapci0 pci0: at device 31.3 (no driver attached) pcm0: port 0x1c80-0x1cbf,0x1400-0x14ff mem 0xe0000800-0xe00008ff,0xe0000c00-0xe0000dff irq 10 at device 31.5 on pci0 pcm0: [GIANT-LOCKED] pcm0: pci0: at device 31.6 (no driver attached) acpi_tz0: on acpi0 acpi_button1: on acpi0 atkbdc0: port 0x64,0x60 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] psm0: irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: model Synaptics Touchpad, device ID 0 acpi_acad0: on acpi0 acpi_cmbat0: on acpi0 pmtimer0 on isa0 orm0: at iomem 0xe0000-0xe3fff,0xdf800-0xdffff,0xd0000-0xd17ff,0xcf000-0xcffff,0xc0000-0xcefff on isa0 ppc0: parallel port not found. sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> sio0: configured irq 4 not in bitmap of probed irqs 0 sio0: port may not be enabled sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0 sio0: type 8250 or not responding sio1: configured irq 3 not in bitmap of probed irqs 0 sio1: port may not be enabled vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Timecounter "TSC" frequency 2790719580 Hz quality 800 Timecounters tick every 1.000 msec acd0: CDRW at ata0-master UDMA33 ad2: 38154MB [77520/16/63] at ata1-master UDMA100 cd0 at ata0 bus 0 target 0 lun 0 cd0: Removable CD-ROM SCSI-0 device cd0: 33.000MB/s transfers cd0: Attempt to query device size failed: NOT READY, Medium not present Trying to mount root from ufs:/dev/ad2s1a WARNING: / was not properly dismounted WARNING: /usr was not properly dismounted /usr: mount pending error: blocks 16 files 1 WARNING: /var was not properly dismounted WARNING: /var/log was not properly dismounted --CE+1k2dSO48ffgeK Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" --CE+1k2dSO48ffgeK-- From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:38:16 2005 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A273416A5FB; Sun, 3 Jul 2005 00:37:51 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id B19C24453C; Sun, 3 Jul 2005 00:22:20 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id EA41C62570; Sat, 2 Jul 2005 17:20:13 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id 5FA2A5C98B for ; Tue, 1 Mar 2005 12:37:42 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 3F20D56205; Tue, 1 Mar 2005 20:37:36 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 9850316A4D1; Tue, 1 Mar 2005 20:37:32 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8ACBB16A4CE; Tue, 1 Mar 2005 20:37:26 +0000 (GMT) Received: from ms003msg.fastwebnet.it (ms003msg.fastwebnet.it [213.140.2.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6AEFB43D3F; Tue, 1 Mar 2005 20:37:25 +0000 (GMT) (envelope-from filippo@portatile.fastwebnet.it) Received: from portatile (1.255.90.62) by ms003msg.fastwebnet.it (7.2.052.3) id 41FFB1A400731ACB; Tue, 1 Mar 2005 21:37:24 +0100 Received: from portatile.fastwebnet.it (localhost [127.0.0.1]) by portatile (Postfix) with ESMTP id 0FFC7B880; Tue, 1 Mar 2005 21:37:33 +0100 (CET) Received: (from filippo@localhost) by portatile.fastwebnet.it (8.13.1/8.13.1/Submit) id j21KbWOA001012; Tue, 1 Mar 2005 21:37:32 +0100 (CET) (envelope-from filippo) From: Filippo Forti To: freebsd-current@freebsd.org Message-ID: <20050301203732.GB684@portatile.fastwebnet.it> Mail-Followup-To: freebsd-current@freebsd.org, freebsd-acpi@freebsd.org References: <20050301203005.GA684@portatile.fastwebnet.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050301203005.GA684@portatile.fastwebnet.it> User-Agent: Mutt/1.5.6i X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,RCVD_ILLEGAL_IP autolearn=no version=3.0.2 X-Spam-Level: Cc: freebsd-acpi@freebsd.org Subject: Panic on suspend X-BeenThere: freebsd-acpi@freebsd.org Reply-To: filippo.forti@fastwebnet.it List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:38:16 -0000 X-Original-Date: Tue, 1 Mar 2005 21:37:32 +0100 X-List-Received-Date: Sun, 03 Jul 2005 00:38:16 -0000 Hi, I got a fully reproduceable panic while trying to suspend (to S3) on my laptop. FreeBSD is -CURRENT from Monday. I'm using a modified DSDT which used to work before I updated on Monday. dmesg from after reboot is attacched. Here comes gbd output Fatal trap 12: page fault while in vm86 mode fault virtual address = 0x2000 fault code = user write, page not present instruction pointer = 0xc000:0x5195 stack pointer = 0x0:0xfe4 frame pointer = 0x0:0x0 code segment = base 0x600005, limit 0x2, type 0x11 = DPL 1, pres 0, def32 0, gran 0 processor eflag = interrupt enabled, resume, mv86, IOPL = 0 current process = 1046 (acpiconf) [thread pid 1046 tid 100084] Stopped at 0x5159: *** error reading from address 5159 *** db> tr Tracing pid 1046 tid 100084 td 0xc27645c0 (null)(ff000e2c3,f000ff53,f000ff54,f00092da) at 0x5195 _end(ccce4fab,b638f354,3a6c5da3,ec956de5,fe6dff6c) at 0xf000ff53 db> where Tracing pid 1046 tid 100084 td 0xc27645c0 kdb_enter(c08d00f2,c08e69ce,c08cbfd1,c08ee7f9,2b8) at kdb_enter+0x31 witness_checkorder(c2cc2a54,9,c08ee7f9,2b8,0) at witness_checkorder+0xc9 _mtx_lock_flags(c2cc2a54,0,c08ee7f9,2b8,0) at _mtx_lock_flags+0x85 trap_pfault(c0c21fa8,0,2000,c0c21fa8,2000) at trap_pfault+0xa1 trap (0,0,0,1000,0) at trap+0x34b calltrap() at calltrap+0x5 ---trap 0xc, eip = 0x5195, esp = 0xc0c21fe8, ebp = 0 --- db> next panic: blockable sleep lock (sleep mutex) process lock @ /usr/src/sys/i386/i386/trap.c:696 KDB: enter: panic After 2 instructions (0 loads, 0 stores), [thread 1046 tid 1000084] stopped at kdb_enter+0x31: ret Thanks for your help Filippo Copyright (c) 1992-2005 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 6.0-CURRENT #0: Tue Mar 1 00:29:12 CET 2005 root@portatile.fastwebnet.it:/usr/obj/usr/src/sys/PORTATILE WARNING: WITNESS option enabled, expect reduced performance. Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Pentium(R) 4 CPU 2.80GHz (2790.72-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0xf27 Stepping = 7 Features=0xbfebf9ff real memory = 1073152000 (1023 MB) avail memory = 1041317888 (993 MB) ath_hal: 0.9.14.9 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413) ACPI: overriding DSDT/SSDT with custom table ACPI-0377: *** Info: Table [DSDT] replaced by host OS npx0: [FAST] npx0: on motherboard npx0: INT 16 interface acpi0: on motherboard acpi0: Power Button (fixed) acpi_ec0: port 0x66,0x62 on acpi0 Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0 cpu0: on acpi0 acpi_throttle0: on cpu0 acpi_button0: on acpi0 acpi_lid0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci_link0: irq 0 on acpi0 pci_link1: irq 10 on acpi0 pci_link2: irq 10 on acpi0 pci_link3: irq 11 on acpi0 pci_link4: irq 10 on acpi0 pci0: on pcib0 agp0: mem 0xe8000000-0xefffffff at device 0.0 on pci0 pcib1: at device 1.0 on pci0 pci1: on pcib1 pci1: at device 0.0 (no driver attached) uhci0: port 0x1cc0-0x1cdf irq 10 at device 29.0 on pci0 uhci0: [GIANT-LOCKED] usb0: on uhci0 usb0: USB revision 1.0 uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered uhci1: port 0x1ce0-0x1cff irq 11 at device 29.1 on pci0 uhci1: [GIANT-LOCKED] usb1: on uhci1 usb1: USB revision 1.0 uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered ehci0: mem 0xe0000000-0xe00003ff irq 10 at device 29.7 on pci0 ehci0: [GIANT-LOCKED] ehci_pci_attach: companion usb0 ehci_pci_attach: companion usb1 usb2: EHCI version 1.0 usb2: companion controllers, 2 ports each: usb0 usb1 usb2: on ehci0 usb2: USB revision 2.0 uhub2: Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 1 uhub2: single transaction translator uhub2: 4 ports with 4 removable, self powered pcib2: at device 30.0 on pci0 pci_link5: irq 0 on acpi0 pci_link6: irq 0 on acpi0 pci_link7: irq 0 on acpi0 pci2: on pcib2 bfe0: mem 0xe0204000-0xe0205fff irq 10 at device 1.0 on pci2 miibus0: on bfe0 bmtphy0: on miibus0 bmtphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto bfe0: Ethernet address: 00:0b:db:18:b5:9c cbb0: irq 10 at device 4.0 on pci2 cardbus0: on cbb0 pccard0: <16-bit PCCard bus> on cbb0 fwohci0: <1394 Open Host Controller Interface> mem 0xe0200000-0xe0203fff,0xe0206000-0xe02067ff irq 10 at device 4.1 on pci2 fwohci0: OHCI version 1.10 (ROM=0) fwohci0: No. of Isochronous channels is 4. fwohci0: EUI64 00:c0:4f:38:02:dc:d4:10 fwohci0: Phy 1394a available S400, 2 ports. fwohci0: Link S400, max_rec 2048 bytes. firewire0: on fwohci0 fwe0: on firewire0 if_fwe0: Fake Ethernet address: 02:c0:4f:dc:d4:10 fwe0: Ethernet address: 02:c0:4f:dc:d4:10 fwe0: if_start running deferred for Giant sbp0: on firewire0 fwohci0: Initiate bus reset fwohci0: node_id=0xc000ffc0, gen=1, CYCLEMASTER mode firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me) firewire0: bus manager 0 (me) isab0: at device 31.0 on pci0 isa0: on isab0 atapci0: port 0x2020-0x202f,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 31.1 on pci0 ata0: channel #0 on atapci0 ata1: channel #1 on atapci0 pci0: at device 31.3 (no driver attached) pcm0: port 0x1c80-0x1cbf,0x1400-0x14ff mem 0xe0000800-0xe00008ff,0xe0000c00-0xe0000dff irq 10 at device 31.5 on pci0 pcm0: [GIANT-LOCKED] pcm0: pci0: at device 31.6 (no driver attached) acpi_tz0: on acpi0 acpi_button1: on acpi0 atkbdc0: port 0x64,0x60 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] psm0: irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: model Synaptics Touchpad, device ID 0 acpi_acad0: on acpi0 acpi_cmbat0: on acpi0 pmtimer0 on isa0 orm0: at iomem 0xe0000-0xe3fff,0xdf800-0xdffff,0xd0000-0xd17ff,0xcf000-0xcffff,0xc0000-0xcefff on isa0 ppc0: parallel port not found. sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> sio0: configured irq 4 not in bitmap of probed irqs 0 sio0: port may not be enabled sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0 sio0: type 8250 or not responding sio1: configured irq 3 not in bitmap of probed irqs 0 sio1: port may not be enabled vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Timecounter "TSC" frequency 2790719580 Hz quality 800 Timecounters tick every 1.000 msec acd0: CDRW at ata0-master UDMA33 ad2: 38154MB [77520/16/63] at ata1-master UDMA100 cd0 at ata0 bus 0 target 0 lun 0 cd0: Removable CD-ROM SCSI-0 device cd0: 33.000MB/s transfers cd0: Attempt to query device size failed: NOT READY, Medium not present Trying to mount root from ufs:/dev/ad2s1a WARNING: / was not properly dismounted WARNING: /usr was not properly dismounted /usr: mount pending error: blocks 16 files 1 WARNING: /var was not properly dismounted WARNING: /var/log was not properly dismounted _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:38:16 2005 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2E77416A4E1; Sun, 3 Jul 2005 00:37:53 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id DCAE644560; Sun, 3 Jul 2005 00:22:31 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 5CFB16256D; Sat, 2 Jul 2005 17:20:15 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id C80145C9A8 for ; Thu, 3 Mar 2005 09:23:42 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id DCEDE56770; Thu, 3 Mar 2005 17:23:38 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 4556216A4D4; Thu, 3 Mar 2005 17:23:34 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D7E1F16A4CE; Thu, 3 Mar 2005 17:23:29 +0000 (GMT) Received: from ms005msg.fastwebnet.it (ms005msg.fastwebnet.it [213.140.2.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id EF8F143D5A; Thu, 3 Mar 2005 17:23:28 +0000 (GMT) (envelope-from filippo@portatile.fastwebnet.it) Received: from portatile (1.255.90.62) by ms005msg.fastwebnet.it (7.2.052.3) id 41FFB24D006AF2EA; Thu, 3 Mar 2005 18:23:27 +0100 Received: from portatile.fastwebnet.it (localhost [127.0.0.1]) by portatile (Postfix) with ESMTP id A8B74B868; Thu, 3 Mar 2005 18:23:37 +0100 (CET) Received: (from filippo@localhost) by portatile.fastwebnet.it (8.13.1/8.13.1/Submit) id j23HNauM000707; Thu, 3 Mar 2005 18:23:36 +0100 (CET) (envelope-from filippo) From: Filippo Forti To: Ian Dowse Message-ID: <20050303172334.GA674@portatile.fastwebnet.it> Mail-Followup-To: Ian Dowse , Nate Lawson , freebsd-acpi@freebsd.org, freebsd-current@freebsd.org References: <20050302165516.GB674@portatile.fastwebnet.it> <200503030132.aa82163@salmon.maths.tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200503030132.aa82163@salmon.maths.tcd.ie> User-Agent: Mutt/1.5.6i X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,RCVD_ILLEGAL_IP autolearn=no version=3.0.2 X-Spam-Level: Cc: freebsd-acpi@freebsd.org, freebsd-current@freebsd.org Subject: Re: Panic on suspend X-BeenThere: freebsd-acpi@freebsd.org Reply-To: filippo.forti@fastwebnet.it List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:38:16 -0000 X-Original-Date: Thu, 3 Mar 2005 18:23:35 +0100 X-List-Received-Date: Sun, 03 Jul 2005 00:38:16 -0000 On Thu, Mar 03, 2005 at 01:32:29AM +0000, Ian Dowse wrote: > In message <20050302165516.GB674@portatile.fastwebnet.it>, Filippo Forti writes > : > >On Tue, Mar 01, 2005 at 03:19:42PM -0800, Nate Lawson wrote: > >> That is in the VGA BIOS. Try setting this sysctl before suspending: > >> > >> hw.acpi.reset_video=0 > >Unfortunately this doesn't make the trick > >Thanks anyway > > Did updating to the version 1.49 of vesa.c fix the crash for you? > There is a new patch at: > > http://people.freebsd.org/~iedowse/vesa_restore.diff > > This needs to be applied on top of version 1.49, and should hopefully > correct the behaviour when the VESA state requires more than 4k of > space. Would you be able to test that this version does not crash > for you on suspend? > Thanks, it's much better now, even if I still have a problem (the laptop reboots instead of resuming from sleep), but I'll google to find a solution > I don't fully understand why the previous version was faulting at > 0x2000, since that page should have been mapped into the VM86 address > space. However my code was definitely handling the kernel virtual > addresses incorrectly, so maybe that was causing something to be > overwritten. The updated patch allocates a contiguous virtual buffer > and then maps each page into the VM86 address space starting at > 0x1000. > > Ian Filippo _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:38:17 2005 Return-Path: X-Original-To: acpi@FreeBSD.ORG Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 72E5C16A569; Sun, 3 Jul 2005 00:38:08 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA96044587; Sun, 3 Jul 2005 00:22:52 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 289E662543; Sat, 2 Jul 2005 17:20:17 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id C921A5C971 for ; Fri, 4 Mar 2005 08:55:17 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 0E5A556E09; Fri, 4 Mar 2005 16:55:17 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 877B516A501; Fri, 4 Mar 2005 16:55:08 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F126E16A4CE; Fri, 4 Mar 2005 16:55:02 +0000 (GMT) Received: from postal1.es.net (postal1.es.net [198.128.3.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id BBDAD43D46; Fri, 4 Mar 2005 16:55:02 +0000 (GMT) (envelope-from oberman@es.net) Received: from ptavv.es.net ([198.128.4.29]) by postal1.es.net (Postal Node 1) with ESMTP (SSL) id IBA74465; Fri, 04 Mar 2005 08:55:02 -0800 Received: from ptavv (localhost [127.0.0.1]) by ptavv.es.net (Tachyon Server) with ESMTP id 19EED5D07; Fri, 4 Mar 2005 08:55:02 -0800 (PST) To: Nate Lawson In-reply-to: Your message of "Thu, 03 Mar 2005 21:37:05 PST." <4227F401.7000204@root.org> From: "Kevin Oberman" Message-Id: <20050304165502.19EED5D07@ptavv.es.net> X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, J_CHICKENPOX_13 autolearn=no version=3.0.2 X-Spam-Level: Cc: acpi@FreeBSD.ORG, current@FreeBSD.ORG Subject: Re: patch: p4tcc and speedstep cpufreq drivers X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:38:17 -0000 X-Original-Date: Fri, 04 Mar 2005 08:55:02 -0800 X-List-Received-Date: Sun, 03 Jul 2005 00:38:17 -0000 > Date: Thu, 03 Mar 2005 21:37:05 -0800 > From: Nate Lawson > > Kevin Oberman wrote: > > OK. This makes me feel a bit better, but I still think I'll leave TCC > > out of the equation as it makes the various frequency steps vary uneven > > to the point that lowering dev.cpu.0.freq would increase performance > > (and the reverse, as well) and it causes my system to hang when > > throttled back too far. It never hangs with TCC disabled although my > > lowest "frequency" is now just 150 MHz. > > Would you test with hint.acpi_throttle.0.disabled="1" instead of > disabling p4tcc? I think p4tcc is not the problem, it's the combination > of the two. I think there are some problems when both the chipset > (externally) and processor (internally) assert STOPCLOCK. If this works > for you with no hangs, I'll commit code to disable acpi_throttle when > p4tcc is present. p4tcc is more efficient than acpi_throttle since the > latter is done through the chipset, giving more chance for race > conditions, latency, etc. Looks like you are right on the button. p4tcc with throttling disabled yields the best results I have seen. The performance is just a little better than the "normalized" value I would expect where throttling produced performance just a little worse. As long as I don't run both, I don't hang at any speed and I don't get increased performance with decreased speed. I really want to try some tests while actively monitoring current draw some day, but it will require hacking on a power brick and I don't have one I can play with at the moment. That would provide some REAL indication of power savings with reduced performance and make tuning more accurate. I am appending the test results. As usual they are on a system running single-user and are very consistently reproduceable with standard variation of less than .4% and usually under .2%. -- 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 1800 81860338 1575 72045833 1350 62122232 1200 57835625 1125 52478629 1050 50840742 900 43377770 750 37008544 675 32357704 600 30049487 450 20917432 300 14160281 225 12938852 150 8663693 150 8660349 225 12941123 300 14179776 450 20935574 600 30005557 675 32258131 750 36811863 900 43108915 1050 50650194 1125 52591176 1200 57684049 1350 62028300 1575 71823521 1800 81454824 _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:38:18 2005 Return-Path: X-Original-To: acpi@FreeBSD.ORG Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2875716A62F; Sun, 3 Jul 2005 00:38:10 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9EFC744595; Sun, 3 Jul 2005 00:23:03 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 49884625AE; Sat, 2 Jul 2005 17:20:18 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id B0E175C971; Thu, 3 Mar 2005 21:37:35 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 7CD3A57C88; Fri, 4 Mar 2005 05:37:18 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 8261D16A4D5; Fri, 4 Mar 2005 05:37:17 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2083F16A4CE; Fri, 4 Mar 2005 05:37:13 +0000 (GMT) Received: from ylpvm29.prodigy.net (ylpvm29-ext.prodigy.net [207.115.57.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id A3E1743D41; Fri, 4 Mar 2005 05:37:10 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.0.5.51] (adsl-64-171-186-189.dsl.snfc21.pacbell.net [64.171.186.189])j245ajRs025858; Fri, 4 Mar 2005 00:36:45 -0500 Message-ID: <4227F401.7000204@root.org> From: Nate Lawson User-Agent: Mozilla Thunderbird 1.0RC1 (X11/20041205) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kevin Oberman References: <20050302235623.BA3925D07@ptavv.es.net> In-Reply-To: <20050302235623.BA3925D07@ptavv.es.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, J_CHICKENPOX_13 autolearn=no version=3.0.2 X-Spam-Level: Cc: acpi@FreeBSD.ORG, current@FreeBSD.ORG Subject: Re: patch: p4tcc and speedstep cpufreq drivers X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:38:18 -0000 X-Original-Date: Thu, 03 Mar 2005 21:37:05 -0800 X-List-Received-Date: Sun, 03 Jul 2005 00:38:18 -0000 Kevin Oberman wrote: > OK. This makes me feel a bit better, but I still think I'll leave TCC > out of the equation as it makes the various frequency steps vary uneven > to the point that lowering dev.cpu.0.freq would increase performance > (and the reverse, as well) and it causes my system to hang when > throttled back too far. It never hangs with TCC disabled although my > lowest "frequency" is now just 150 MHz. Would you test with hint.acpi_throttle.0.disabled="1" instead of disabling p4tcc? I think p4tcc is not the problem, it's the combination of the two. I think there are some problems when both the chipset (externally) and processor (internally) assert STOPCLOCK. If this works for you with no hangs, I'll commit code to disable acpi_throttle when p4tcc is present. p4tcc is more efficient than acpi_throttle since the latter is done through the chipset, giving more chance for race conditions, latency, etc. -- Nate _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:54:41 2005 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2601416A43D; Sun, 3 Jul 2005 00:54:41 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2862D44397; Sun, 3 Jul 2005 00:34:20 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 2548365774; Sat, 2 Jul 2005 17:29:43 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id 34F3A5C971; Wed, 2 Mar 2005 17:32:42 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 7714C569C4; Thu, 3 Mar 2005 01:32:39 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id D71CF16A4F6; Thu, 3 Mar 2005 01:32:36 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7577316A4CE; Thu, 3 Mar 2005 01:32:32 +0000 (GMT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 3B68243D48; Thu, 3 Mar 2005 01:32:31 +0000 (GMT) (envelope-from iedowse@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 3 Mar 2005 01:32:30 +0000 (GMT) To: filippo.forti@fastwebnet.it In-Reply-To: Your message of "Wed, 02 Mar 2005 17:55:16 +0100." <20050302165516.GB674@portatile.fastwebnet.it> From: Ian Dowse Message-ID: <200503030132.aa82163@salmon.maths.tcd.ie> X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-4.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Level: Cc: freebsd-acpi@freebsd.org, freebsd-current@freebsd.org Subject: Re: Panic on suspend X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:54:41 -0000 X-Original-Date: Thu, 03 Mar 2005 01:32:29 +0000 X-List-Received-Date: Sun, 03 Jul 2005 00:54:41 -0000 In message <20050302165516.GB674@portatile.fastwebnet.it>, Filippo Forti writes : >On Tue, Mar 01, 2005 at 03:19:42PM -0800, Nate Lawson wrote: >> That is in the VGA BIOS. Try setting this sysctl before suspending: >> >> hw.acpi.reset_video=0 >Unfortunately this doesn't make the trick >Thanks anyway Did updating to the version 1.49 of vesa.c fix the crash for you? There is a new patch at: http://people.freebsd.org/~iedowse/vesa_restore.diff This needs to be applied on top of version 1.49, and should hopefully correct the behaviour when the VESA state requires more than 4k of space. Would you be able to test that this version does not crash for you on suspend? I don't fully understand why the previous version was faulting at 0x2000, since that page should have been mapped into the VM86 address space. However my code was definitely handling the kernel virtual addresses incorrectly, so maybe that was causing something to be overwritten. The updated patch allocates a contiguous virtual buffer and then maps each page into the VM86 address space starting at 0x1000. Ian _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:54:41 2005 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2426C16A433; Sun, 3 Jul 2005 00:54:41 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 286E3443A7; Sun, 3 Jul 2005 00:34:20 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 2FFCE6578C; Sat, 2 Jul 2005 17:29:43 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id 535095C9A8; Wed, 2 Mar 2005 16:35:21 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 2F55E58238; Thu, 3 Mar 2005 00:33:49 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 8730116A5C6; Thu, 3 Mar 2005 00:33:32 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 74ABB16A4CE for ; Thu, 3 Mar 2005 00:32:09 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8F44A43D1F for ; Thu, 3 Mar 2005 00:32:08 +0000 (GMT) (envelope-from kjelderg@gmail.com) Received: by rproxy.gmail.com with SMTP id j1so256421rnf for ; Wed, 02 Mar 2005 16:32:08 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=gQvU31RWH7jktW7MW9aFGZ+RrlJhoK+5Lw8U8IoJTvcKyEBBOKWe5nezorbbi20EnEyRjiSkP3U1wzq/h+wd5rPqZwTVaRT0kBVZD35JTxadRl0EOR1EPLpjy78s+U2/bSSP7cCc3njC8GVSCHon6X2uCBLQK5W2bFOwO/sP4Og= Received: by 10.38.97.5 with SMTP id u5mr67084rnb; Wed, 02 Mar 2005 16:31:34 -0800 (PST) Received: by 10.38.101.19 with HTTP; Wed, 2 Mar 2005 16:31:34 -0800 (PST) Message-ID: From: Eric Kjeldergaard To: Nate Lawson In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <42068A5C.1030300@root.org> <421A8F90.3080907@root.org> <4224F8CB.60305@root.org> X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, J_CHICKENPOX_13, J_CHICKENPOX_72,RCVD_BY_IP autolearn=no version=3.0.2 X-Spam-Level: Cc: acpi@freebsd.org, current@freebsd.org Subject: Re: HEADSUP: cpufreq import complete, acpi_throttling changed X-BeenThere: freebsd-acpi@freebsd.org Reply-To: Eric Kjeldergaard List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:54:41 -0000 X-Original-Date: Wed, 2 Mar 2005 18:31:34 -0600 X-List-Received-Date: Sun, 03 Jul 2005 00:54:41 -0000 On Wed, 2 Mar 2005 01:08:47 -0600, Eric Kjeldergaard wrote: > On Tue, 01 Mar 2005 15:20:43 -0800, Nate Lawson wrote: > > Eric Kjeldergaard wrote: > > > On Tue, 1 Mar 2005 15:34:24 -0600, Eric Kjeldergaard wrote: > > > Oh, just one more thing... > > > Perhaps I'm misunderstanding, but I never see ichss load. It's > > > supposed to load automagically if I have an ICH, no? > > > > ichss, est, and p4tcc are all contained within cpufreq.ko > > Okay, that's what I thought I had read. This is a p4m and should > definitely have something showing up for ichss when I load cpufreq > then. It doesn't seem to (this is the same system that has USB > suddenly stop working). > Found even more time to play with this. I got the freshest of sources (mebbe 3 hours old now) and built it. USB works if I load it via /boot/loader.conf now but still does not if I kldload it during runtime. ichss still appears not to load although I'm pretty sure it should be. Any information you'd like? -- If I write a signature, my emails will appear more personalised. _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 00:54:45 2005 Return-Path: X-Original-To: acpi@FreeBSD.ORG Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 167FD16A425; Sun, 3 Jul 2005 00:54:45 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3ED2F44D30; Sun, 3 Jul 2005 00:34:19 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 1970065737; Sat, 2 Jul 2005 17:29:43 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id DFFA15C971 for ; Wed, 2 Mar 2005 17:37:51 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 86B30569A2; Thu, 3 Mar 2005 01:37:25 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id E3A3316A4F9; Thu, 3 Mar 2005 01:37:19 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5530416A4CE; Thu, 3 Mar 2005 01:37:16 +0000 (GMT) Received: from www.cryptography.com (li-22.members.linode.com [64.5.53.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 08AA143D41; Thu, 3 Mar 2005 01:37:16 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.0.0.34] (adsl-67-119-74-222.dsl.sntc01.pacbell.net [67.119.74.222]) by www.cryptography.com (8.12.8/8.12.8) with ESMTP id j231b5Zj015068 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 2 Mar 2005 17:37:06 -0800 Message-ID: <42266A41.2010907@root.org> From: Nate Lawson User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kevin Oberman References: <20050302235623.BA3925D07@ptavv.es.net> In-Reply-To: <20050302235623.BA3925D07@ptavv.es.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, J_CHICKENPOX_13 autolearn=no version=3.0.2 X-Spam-Level: Cc: acpi@FreeBSD.ORG, current@FreeBSD.ORG Subject: Re: patch: p4tcc and speedstep cpufreq drivers X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:54:45 -0000 X-Original-Date: Wed, 02 Mar 2005 17:37:05 -0800 X-List-Received-Date: Sun, 03 Jul 2005 00:54:45 -0000 Kevin Oberman wrote: >>Date: Wed, 02 Mar 2005 15:28:52 -0800 >>From: Nate Lawson >>If you look elsewhere, the design is stated more clearly and shows the >>reading that enabling On-Demand disables Automatic mode is incorrect. >> >>Intel Software Developer's Manual, Volume 3, 13.15.3: >>"If on-demand clock modulation and TM1 are both enabled and the thermal >>status of the processor is hot ..., clock modulation at the duty cycle >>specified by TM1 takes precedence, regardless of the setting of the >>on-demand clock modulation duty cycle." >> >>Empirical testing shows TM1 kicks in around 75C and THERMTRIP is >>somewhere near 100C. The separate THERMTRIP feature disables the >>processor completely if TM1 or 2 fail to stop the temperature from rising. >> >>http://www.digit-life.com/articles2/p4-throttling/ > > > OK. This makes me feel a bit better, but I still think I'll leave TCC > out of the equation as it makes the various frequency steps vary uneven > to the point that lowering dev.cpu.0.freq would increase performance > (and the reverse, as well) and it causes my system to hang when > throttled back too far. It never hangs with TCC disabled although my > lowest "frequency" is now just 150 MHz. > > By the way, I am still delighted in the cpufreq addition to the system. > It gives me excellent control of CPU speed to stretch my battery life. > All I really need is a desktop tool (maybe a gnome applet) to let me > adjust freq easily. I may just try to write that myself if I get some > time before someone else gets to it. I'll try to see if I can find a way to notice bad states and disable them automatically. Perhaps your CPU has some errata. Regarding the gnome applet, too late, marcus@ has done that. :) -- Nate _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 01:02:06 2005 Return-Path: X-Original-To: freebsd-acpi@FreeBSD.org Delivered-To: freebsd-acpi@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D4DE916B428; Sun, 3 Jul 2005 01:01:50 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0CD4044B8A; Sun, 3 Jul 2005 00:51:39 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 7E3B760AC2; Sat, 2 Jul 2005 17:15:34 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id 1BA7B5C9DB for ; Tue, 10 May 2005 06:47:42 -0700 (PDT) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id D1BCE57463; Tue, 10 May 2005 13:47:26 +0000 (GMT) (envelope-from owner-freebsd-bugs@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 13F6916A4E6; Tue, 10 May 2005 13:47:22 +0000 (GMT) Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 10CCA16A4CE; Tue, 10 May 2005 13:47:16 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id DC4E343D79; Tue, 10 May 2005 13:47:15 +0000 (GMT) (envelope-from arved@FreeBSD.org) Received: from freefall.freebsd.org (arved@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j4ADlFmr053526; Tue, 10 May 2005 13:47:15 GMT (envelope-from arved@freefall.freebsd.org) Received: (from arved@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j4ADlFaX053522; Tue, 10 May 2005 13:47:15 GMT (envelope-from arved) From: Tilman Linneweh Message-Id: <200505101347.j4ADlFaX053522@freefall.freebsd.org> To: arved@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-acpi@FreeBSD.org X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-bugs@freebsd.org Errors-To: owner-freebsd-bugs@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Level: Cc: Subject: Re: kern/74030: Unplugging AC causes battery % to stay locked at 98% X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 01:02:06 -0000 X-Original-Date: Tue, 10 May 2005 13:47:15 GMT X-List-Received-Date: Sun, 03 Jul 2005 01:02:06 -0000 Synopsis: Unplugging AC causes battery % to stay locked at 98% Responsible-Changed-From-To: freebsd-bugs->freebsd-acpi Responsible-Changed-By: arved Responsible-Changed-When: Tue May 10 13:46:57 GMT 2005 Responsible-Changed-Why: This sounds acpi related http://www.freebsd.org/cgi/query-pr.cgi?pr=74030 _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 01:02:13 2005 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DA8A716B4BA; Sun, 3 Jul 2005 01:01:59 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0A8754537A; Sun, 3 Jul 2005 00:52:11 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 71EEE61CF2; Sat, 2 Jul 2005 17:18:45 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id 649025C98A; Mon, 7 Feb 2005 01:40:23 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id D187B566D8; Mon, 7 Feb 2005 09:39:48 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 6A61516A4DC; Mon, 7 Feb 2005 09:39:46 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 519AF16A4CF for ; Mon, 7 Feb 2005 09:39:39 +0000 (GMT) Received: from ank-pki.ru (mercury.ank-pki.ru [213.170.76.146]) by mx1.FreeBSD.org (Postfix) with ESMTP id 82AD943D58 for ; Mon, 7 Feb 2005 09:39:37 +0000 (GMT) (envelope-from toxa@cterra.ru) Received: (qmail 83036 invoked by uid 0); 7 Feb 2005 12:39:23 +0300 Received: from toxa@cterra.ru by mercury.ank-pki.ru by uid 0 with qmail-scanner-1.22 (spamassassin: 3.0.2. Clear:RC:0(62.89.204.62):SA:0(?/?):. Processed in 11.293789 secs); 07 Feb 2005 09:39:23 -0000 Received: from unknown (HELO localhost) (toxa@62.89.204.62) by mail.ank-pki.ru with SMTP; 7 Feb 2005 12:39:12 +0300 From: Toxa To: current@freebsd.org, acpi@freebsd.org X-Comment-To: "Anton A. Karpov" Message-ID: <20050207093709.GA2953@laptoxa.toxa.lan> Mail-Followup-To: current@freebsd.org, acpi@freebsd.org References: <42068A5C.1030300@root.org> <20050207000604.GA4385@laptoxa.toxa.lan> <4206BBAE.4060704@root.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <4206BBAE.4060704@root.org> User-Agent: Outluck Express 1.5.6i for MS-DOS 6.22-SMP X-Mailer: See User-Agent above :) X-Operating-System: MS-DOS 6.22-CURRENT on Sony VAIO laptop X-PGP-Public-Key: http://toxahost.ru/gpg/pubkey.asc X-Useless-Header: Do Androids Dream of Electric Sheep? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on elvis.mu.org X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.1 X-Spam-Level: Cc: Subject: Re: HEADSUP: cpufreq import complete, acpi_throttling changed X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 01:02:14 -0000 X-Original-Date: Mon, 7 Feb 2005 12:37:09 +0300 X-List-Received-Date: Sun, 03 Jul 2005 01:02:14 -0000 On Sun, Feb 06, 2005 at 04:51:58PM -0800, Nate Lawson wrote: > The second value is power in milliwatts, the first is frequency in Mhz. > If you have only throttling support, there's no way to know what the > power consumption is so -1 is "unknown". If you have both throttling > and some other driver that knows the power consumption, these values > will be accurate. > > -- > Nate Ok, thanks a lot. By the way, with hw.acpi.cpu.throttling_states I had only 8 states or so, and now I can see 15 freq levels :) But on the other side, my laptop now hangs sometimes (not always) when I plug in/plug out AC adapter. I only configured devd to change freq level according to AC state changes... -- Anton A. Karpov PGP key: http://www.toxahost.ru/pgp/pubkey.asc =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~= "Anyone who quotes me in their sig is an idiot." Rusty Russell =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~= _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 01:02:15 2005 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ADAAB16B31E; Sun, 3 Jul 2005 01:02:00 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4FEFF45380; Sun, 3 Jul 2005 00:52:13 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 7241361DFD; Sat, 2 Jul 2005 17:18:58 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id 63C765C862 for ; Wed, 9 Feb 2005 02:15:41 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 6ECA856176; Wed, 9 Feb 2005 10:15:28 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 324FF16A4F0; Wed, 9 Feb 2005 10:15:26 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 11F6F16A4CE; Wed, 9 Feb 2005 10:15:23 +0000 (GMT) Received: from poup.poupinou.org (poup.poupinou.org [195.101.94.96]) by mx1.FreeBSD.org (Postfix) with ESMTP id C492843D49; Wed, 9 Feb 2005 10:15:22 +0000 (GMT) (envelope-from ducrot@poupinou.org) Received: from ducrot by poup.poupinou.org with local (Exim) id 1Cyorw-0002CX-00; Wed, 09 Feb 2005 11:14:48 +0100 To: Nate Lawson Message-ID: <20050209101447.GC1145@poupinou.org> References: <42068A5C.1030300@root.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <42068A5C.1030300@root.org> User-Agent: Mutt/1.5.6+20040907i From: Bruno Ducrot X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on elvis.mu.org X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.1 X-Spam-Level: Cc: acpi@freebsd.org, current@freebsd.org Subject: Re: HEADSUP: cpufreq import complete, acpi_throttling changed X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 01:02:15 -0000 X-Original-Date: Wed, 9 Feb 2005 11:14:47 +0100 X-List-Received-Date: Sun, 03 Jul 2005 01:02:15 -0000 On Sun, Feb 06, 2005 at 01:21:32PM -0800, Nate Lawson wrote: > I've finished the major work of importing cpufreq. As part of this, the > sysctls for acpi throttling have been removed. The power_profile script > has been updated, so you can use performance/economy_cpu_freq= in > rc.conf to set AC on/offline cpu frequencies. The acpi throttling > support has been compiled into acpi_perf.ko so load that to get > throttling. Do a sysctl dev.cpu to get an understanding of the cpufreq > sysctls. > Just updated powernow_k7. http://www.poupinou.org/cpufreq/powernow_k7_current/powernow_k7-cpufreq.tar.gz or http://www.poupinou.org/cpufreq/powernow_k7_current/powernow_k7/powernow_k7.c Need indeed some more adjustments though. Cheers, -- Bruno Ducrot -- Which is worse: ignorance or apathy? -- Don't know. Don't care. _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 01:02:17 2005 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 67E3416B4E8; Sun, 3 Jul 2005 01:02:02 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id EFCF74538A; Sun, 3 Jul 2005 00:52:16 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 7344362096; Sat, 2 Jul 2005 17:19:20 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id 3E3A15C984; Mon, 14 Feb 2005 10:33:22 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 0FEFF5658A; Mon, 14 Feb 2005 18:33:15 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 09D7516A4FF; Mon, 14 Feb 2005 18:33:13 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CBD2D16A4CE; Mon, 14 Feb 2005 18:33:07 +0000 (GMT) Received: from www.cryptography.com (li-22.members.linode.com [64.5.53.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 82E6243D41; Mon, 14 Feb 2005 18:33:07 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.0.0.34] (adsl-67-119-74-222.dsl.sntc01.pacbell.net [67.119.74.222]) by www.cryptography.com (8.12.8/8.12.8) with ESMTP id j1EIX6Zj013368 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 14 Feb 2005 10:33:06 -0800 Message-ID: <4210EEE1.8090802@root.org> From: Nate Lawson User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jiawei Ye References: <20050213231306.376E05D07@ptavv.es.net> <420FE3C7.6020003@root.org> <20050214152319.bqxon1xk0g008s4k@netchild.homeip.net> <4210D155.6080706@root.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on elvis.mu.org X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.1 X-Spam-Level: Cc: acpi@freebsd.org, current@freebsd.org Subject: Re: HEADSUP: cpufreq import complete, acpi_throttling changed X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 01:02:18 -0000 X-Original-Date: Mon, 14 Feb 2005 10:33:05 -0800 X-List-Received-Date: Sun, 03 Jul 2005 01:02:18 -0000 Jiawei Ye wrote: > On Mon, 14 Feb 2005 08:27:01 -0800, Nate Lawson wrote: > >>Jiawei Ye wrote: >>cpufreq et al don't fully support unloading yet. >> >>-- >>Nate >> > > I've got it working, but the available frequencies seem to drift: > root@chihiro:/home/leafy# sysctl dev.cpu > dev.cpu.0.%desc: ACPI CPU > dev.cpu.0.%driver: cpu > dev.cpu.0.%location: handle=\_PR_.CPU1 > dev.cpu.0.%pnpinfo: _HID=none _UID=0 > dev.cpu.0.%parent: acpi0 > dev.cpu.0.freq: 1819 > dev.cpu.0.freq_levels: 2355/0 2060/0 1766/0 1471/0 1177/0 883/0 588/0 294/0 > root@chihiro:/home/leafy# sysctl dev.cpu > dev.cpu.0.%desc: ACPI CPU > dev.cpu.0.%driver: cpu > dev.cpu.0.%location: handle=\_PR_.CPU1 > dev.cpu.0.%pnpinfo: _HID=none _UID=0 > dev.cpu.0.%parent: acpi0 > dev.cpu.0.freq: 1819 > dev.cpu.0.freq_levels: 1821/0 1593/0 1365/0 1138/0 910/0 682/0 455/0 227/0 Thanks. This is a bug in how we handle relative-only systems (i.e., just acpi_throttle and no other driver). I'll work on a fix. The only effect is that the values look incorrect due to a calibration error. Actually using them should work properly. -- Nate _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 01:02:21 2005 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3203B16B4FC; Sun, 3 Jul 2005 01:02:03 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 911CB45374; Sun, 3 Jul 2005 00:52:09 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 7CF0261BDE; Sat, 2 Jul 2005 17:18:31 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id B784F5C9CB; Wed, 2 Feb 2005 14:33:33 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 8FAA1565C4; Wed, 2 Feb 2005 22:33:07 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 9E02116A4F3; Wed, 2 Feb 2005 22:33:04 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5C7FF16A4CE; Wed, 2 Feb 2005 22:32:55 +0000 (GMT) Received: from postal2.es.net (postal2.es.net [198.128.3.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id BB8C543D45; Wed, 2 Feb 2005 22:32:54 +0000 (GMT) (envelope-from oberman@es.net) Received: from ptavv.es.net ([198.128.4.29]) by postal2.es.net (Postal Node 2) with ESMTP (SSL) id IBA74465; Wed, 02 Feb 2005 14:32:53 -0800 Received: from ptavv (localhost [127.0.0.1]) by ptavv.es.net (Tachyon Server) with ESMTP id 46EF25D08; Wed, 2 Feb 2005 14:32:53 -0800 (PST) X-Mailer: exmh version 2.7.0 06/18/2004 with nmh-1.0.4 To: Nate Lawson In-reply-to: Your message of "Tue, 01 Feb 2005 11:01:49 PST." <41FFD21D.1080906@root.org> Mime-Version: 1.0 Content-Type: multipart/mixed ; boundary="==_Exmh_-302709550" From: "Kevin Oberman" Message-Id: <20050202223253.46EF25D08@ptavv.es.net> X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on elvis.mu.org X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.1 X-Spam-Level: Cc: acpi@freebsd.org, current@freebsd.org Subject: Re: New cpufreq framework and drivers X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 01:02:22 -0000 X-Original-Date: Wed, 02 Feb 2005 14:32:53 -0800 X-List-Received-Date: Sun, 03 Jul 2005 01:02:22 -0000 This is a multipart MIME message. --==_Exmh_-302709550 Content-Type: text/plain; charset=us-ascii > Date: Tue, 01 Feb 2005 11:01:49 -0800 > From: Nate Lawson > Sender: owner-freebsd-acpi@freebsd.org > > Eric Anderson wrote: > > Nate Lawson wrote: > > > >> Nate Lawson wrote: > >> > >>> Below is the first patch of cpufreq for wider testing. It has the > >>> framework, cpu pseudodriver updates, and two hardware drivers -- ACPI > >>> performance states and SpeedStep-ICH. It has had a lot of testing on > >>> supported hardware but needs wider testing before importing. Other > >>> hardware drivers can be quickly ported to this interface, and I'm > >>> happy to assist their maintainers. > >>> > >>> http://www.root.org/~nate/freebsd/cpufreq.diff > >> > >> > >> > >> Sorry, I'm so familiar with the interface that I forgot to mention how > >> to use it. To test, build a new kernel and modules. Load one or both > >> of acpi_perf.ko and cpufreq.ko at boot time. Type "sysctl dev.cpu" to > >> see the new freq and freq_levels output. If you're a driver > >> maintainer, see sys/cpu.h and speedstep_ich.c or acpi_perf.c for an > >> example how to provide the driver interface. > >> > > > > Will this only work on -current, or also 5.3-stable? > > It should work on -stable, modulo any diff fuzz. > > -- > Nate > _______________________________________________ > 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" > A bit more that fuzz, I'm afraid, but nothing that should take more than a little effort, but it's not very difficult. I am attaching diffs against -stable. Since it's your code, I did not feel like I should be sending them to others. I'll leave it up to you as to whether to post them. (And, it's possible that I messed something up, too, although I did test it.) It requires -stable as of 12/8/2005 or newer. -- 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 --==_Exmh_-302709550 Content-Type: text/plain ; name="cpufreq5.diff"; charset=us-ascii Content-Description: cpufreq5.diff Content-Disposition: attachment; filename="cpufreq5.diff" Index: sys/cpu.h =================================================================== RCS file: sys/cpu.h diff -N sys/cpu.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ sys/cpu.h 1 Feb 2005 16:54:24 -0000 @@ -0,0 +1,121 @@ +/*- + * Copyright (c) 2005 Nate Lawson (SDG) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _SYS_CPU_H_ +#define _SYS_CPU_H_ + +/* + * CPU device support. + */ + +#define CPU_IVAR_PCPU 1 + +static __inline struct pcpu *cpu_get_pcpu(device_t dev) +{ + uintptr_t v = 0; + BUS_READ_IVAR(device_get_parent(dev), dev, CPU_IVAR_PCPU, &v); + return ((struct pcpu *)v); +} + +/* + * CPU frequency control interface. + */ + +/* Each driver's CPU frequency setting is exported in this format. */ +struct cf_setting { + int freq; /* Processor clock in Mhz or percent (in 100ths.) */ + int volts; /* Voltage in mV. */ + int power; /* Power consumed in mW. */ + int lat; /* Transition latency in us. */ + device_t dev; /* Driver providing this setting. */ +}; + +/* Maximum number of settings a given driver can have. */ +#define MAX_SETTINGS 24 + +/* A combination of settings is a level. */ +struct cf_level { + struct cf_setting total_set; + struct cf_setting abs_set; + struct cf_setting rel_set[MAX_SETTINGS]; + int rel_count; + TAILQ_ENTRY(cf_level) link; +}; + +TAILQ_HEAD(cf_level_lst, cf_level); + +/* Drivers should set all unknown values to this. */ +#define CPUFREQ_VAL_UNKNOWN (-1) + +/* + * Every driver offers a type of CPU control. Absolute levels are mutually + * exclusive while relative levels modify the current absolute level. There + * may be multiple absolute and relative drivers available on a given + * system. + * + * For example, consider a system with two absolute drivers that provide + * frequency settings of 100, 200 and 300, 400 and a relative driver that + * provides settings of 50%, 100%. The cpufreq core would export frequency + * levels of 50, 100, 150, 200, 300, 400. + */ +#define CPUFREQ_TYPE_RELATIVE (1<<0) +#define CPUFREQ_TYPE_ABSOLUTE (1<<1) + +/* + * When setting a level, the caller indicates the priority of this request. + * Priorities determine, among other things, whether a level can be + * overridden by other callers. For example, if the user sets a level but + * the system thermal driver needs to override it for emergency cooling, + * the driver would use a higher priority. Once the event has passed, the + * driver would call cpufreq to resume any previous level. + */ +#define CPUFREQ_PRIO_HIGHEST 1000000 +#define CPUFREQ_PRIO_KERN 1000 +#define CPUFREQ_PRIO_USER 100 +#define CPUFREQ_PRIO_LOWEST 0 + +/* + * Register and unregister a driver with the cpufreq core. Once a driver + * is registered, it must support calls to its CPUFREQ_GET, CPUFREQ_GET_LEVEL, + * and CPUFREQ_SET methods. It must also unregister before returning from + * its DEVICE_DETACH method. + */ +int cpufreq_register(device_t dev); +int cpufreq_unregister(device_t dev); + +/* Allow values to be +/- a bit since sometimes we have to estimate. */ +#define CPUFREQ_CMP(x, y) (abs((x) - (y)) < 25) + +/* + * Machine-dependent functions. + */ + +/* Estimate the current clock rate for the given CPU id. */ +int cpu_est_clockrate(int cpu_id, uint64_t *rate); + +#endif /* !_SYS_CPU_H_ */ Index: alpha/alpha/machdep.c Index: alpha/alpha/machdep.c =================================================================== RCS file: /home/ncvs/src/sys/alpha/alpha/machdep.c,v --- alpha/alpha/machdep.c.orig Wed Feb 2 11:45:02 2005 +++ alpha/alpha/machdep.c Wed Feb 2 12:40:01 2005 @@ -98,6 +98,7 @@ #include #include +#include #include #include #include @@ -1720,6 +1721,14 @@ void cpu_boot(int howto) { +} + +/* Get current clock frequency for the given cpu id. */ +int +cpu_est_clockrate(int cpu_id, uint64_t *rate) +{ + + return (ENXIO); } /* Index: amd64/amd64/machdep.c =================================================================== RCS file: /home/ncvs/src/sys/amd64/amd64/machdep.c,v --- amd64/amd64/machdep.c.orig Wed Feb 2 11:45:02 2005 +++ amd64/amd64/machdep.c Wed Feb 2 12:40:01 2005 @@ -56,8 +56,12 @@ #include #include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -446,6 +450,44 @@ void cpu_boot(int howto) { +} + +/* Get current clock frequency for the given cpu id. */ +int +cpu_est_clockrate(int cpu_id, uint64_t *rate) +{ + uint64_t tsc1, tsc2; + + if (pcpu_find(cpu_id) == NULL || rate == NULL) + return (EINVAL); + + /* If we're booting, trust the rate calibrated moments ago. */ + if (cold) { + *rate = tsc_freq; + return (0); + } + +#ifdef SMP + /* Schedule ourselves on the indicated cpu. */ + mtx_lock_spin(&sched_lock); + sched_bind(curthread, cpu_id); + mtx_unlock_spin(&sched_lock); +#endif + + /* Calibrate by measuring a short delay. */ + tsc1 = rdtsc(); + DELAY(1000); + tsc2 = rdtsc(); + +#ifdef SMP + mtx_lock_spin(&sched_lock); + sched_unbind(curthread); + mtx_unlock_spin(&sched_lock); +#endif + + tsc_freq = (tsc2 - tsc1) * 1000; + *rate = tsc_freq; + return (0); } /* Index: i386/i386/machdep.c =================================================================== RCS file: /home/ncvs/src/sys/i386/i386/machdep.c,v --- i386/i386/machdep.c.orig Wed Feb 2 11:45:02 2005 +++ i386/i386/machdep.c Wed Feb 2 12:40:01 2005 @@ -56,8 +56,12 @@ #include #include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -66,21 +70,18 @@ #include #include #include +#include #include #include #include -#include -#include #include -#include -#include #include -#include +#include #include +#include +#include #include #include -#include -#include #include #include @@ -105,6 +106,7 @@ #include +#include #include #include #include @@ -1020,6 +1022,46 @@ void cpu_boot(int howto) { +} + +/* Get current clock frequency for the given cpu id. */ +int +cpu_est_clockrate(int cpu_id, uint64_t *rate) +{ + uint64_t tsc1, tsc2; + + if (pcpu_find(cpu_id) == NULL || rate == NULL) + return (EINVAL); + if (!tsc_present) + return (EOPNOTSUPP); + + /* If we're booting, trust the rate calibrated moments ago. */ + if (cold) { + *rate = tsc_freq; + return (0); + } + +#ifdef SMP + /* Schedule ourselves on the indicated cpu. */ + mtx_lock_spin(&sched_lock); + sched_bind(curthread, cpu_id); + mtx_unlock_spin(&sched_lock); +#endif + + /* Calibrate by measuring a short delay. */ + tsc1 = rdtsc(); + DELAY(1000); + tsc2 = rdtsc(); + +#ifdef SMP + mtx_lock_spin(&sched_lock); + sched_unbind(curthread); + mtx_unlock_spin(&sched_lock); +#endif + + tsc_freq = (tsc2 - tsc1) * 1000; + *rate = tsc_freq; + return (0); } /* Index: i386/i386/legacy.c =================================================================== RCS file: /home/ncvs/src/sys/i386/i386/legacy.c,v --- i386/i386/legacy.c.orig Wed Feb 2 12:36:23 2005 +++ i386/i386/legacy.c Wed Feb 2 12:40:02 2005 @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -137,32 +138,25 @@ { device_t child; int i; - struct pcpu *pc; + /* First, attach the CPU pseudo-driver. */ + for (i = 0; i <= mp_maxid; i++) + if (!CPU_ABSENT(i)) { + child = BUS_ADD_CHILD(dev, 0, "cpu", i); + if (child == NULL) + panic("legacy_attach cpu"); + device_probe_and_attach(child); + } + +#ifndef PC98 /* - * First, let our child driver's identify any child devices that + * Second, let our child driver's identify any child devices that * they can find. Once that is done attach any devices that we * found. */ bus_generic_probe(dev); bus_generic_attach(dev); - /* Attach CPU pseudo-driver. */ - if (!devclass_get_device(devclass_find("cpu"), 0)) { - for (i = 0; i <= mp_maxid; i++) - if (!CPU_ABSENT(i)) { - pc = pcpu_find(i); - KASSERT(pc != NULL, ("pcpu_find failed")); - child = BUS_ADD_CHILD(dev, 0, "cpu", i); - if (child == NULL) - panic("legacy_attach cpu"); - device_probe_and_attach(child); - pc->pc_device = child; - device_set_ivars(child, pc); - } - } - -#ifndef PC98 /* * If we didn't see EISA or ISA on a pci bridge, create some * connection points now so they show up "on motherboard". @@ -265,6 +259,14 @@ */ static int cpu_read_ivar(device_t dev, device_t child, int index, uintptr_t *result); +static device_t cpu_add_child(device_t bus, int order, const char *name, + int unit); +static struct resource_list *cpu_get_rlist(device_t dev, device_t child); + +struct cpu_device { + struct resource_list cd_rl; + struct pcpu *cd_pcpu; +}; static device_method_t cpu_methods[] = { /* Device interface */ @@ -276,10 +278,15 @@ DEVMETHOD(device_resume, bus_generic_resume), /* Bus interface */ + DEVMETHOD(bus_add_child, cpu_add_child), DEVMETHOD(bus_read_ivar, cpu_read_ivar), DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource), - DEVMETHOD(bus_release_resource, bus_generic_release_resource), + DEVMETHOD(bus_get_resource_list, cpu_get_rlist), + DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), + DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), + DEVMETHOD(bus_alloc_resource, bus_generic_rl_alloc_resource), + DEVMETHOD(bus_release_resource, bus_generic_rl_release_resource), + DEVMETHOD(bus_driver_added, bus_generic_driver_added), DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), @@ -293,19 +300,50 @@ cpu_methods, 1, /* no softc */ }; -static devclass_t cpu_devclass; +devclass_t cpu_devclass; DRIVER_MODULE(cpu, legacy, cpu_driver, cpu_devclass, 0, 0); +static device_t +cpu_add_child(device_t bus, int order, const char *name, int unit) +{ + struct cpu_device *cd; + device_t child; + struct pcpu *pc; + + if ((cd = malloc(sizeof(*cd), M_DEVBUF, M_NOWAIT | M_ZERO)) == NULL) + return (NULL); + + resource_list_init(&cd->cd_rl); + pc = pcpu_find(unit); + KASSERT(pc != NULL, ("pcpu_find failed")); + cd->cd_pcpu = pc; + + child = device_add_child_ordered(bus, order, name, unit); + if (child != NULL) { + pc->pc_device = child; + device_set_ivars(child, cd); + } else + free(cd, M_DEVBUF); + return (child); +} + +static struct resource_list * +cpu_get_rlist(device_t dev, device_t child) +{ + struct cpu_device *cpdev; + + cpdev = device_get_ivars(child); + return (&cpdev->cd_rl); +} + static int cpu_read_ivar(device_t dev, device_t child, int index, uintptr_t *result) { - struct pcpu *pc; + struct cpu_device *cpdev; - if (index != 0) - return (ENOENT); - pc = device_get_ivars(child); - if (pc == NULL) + if (index != CPU_IVAR_PCPU) return (ENOENT); - *result = (uintptr_t)pc; + cpdev = device_get_ivars(dev); + *result = (uintptr_t)cpdev->cd_pcpu; return (0); } Index: ia64/ia64/machdep.c =================================================================== RCS file: /home/ncvs/src/sys/ia64/ia64/machdep.c,v --- ia64/ia64/machdep.c.orig Wed Feb 2 11:45:03 2005 +++ ia64/ia64/machdep.c Wed Feb 2 12:40:02 2005 @@ -34,6 +34,7 @@ #include #include +#include #include #include #include @@ -283,6 +284,17 @@ { ia64_efi_runtime->ResetSystem(EfiResetWarm, EFI_SUCCESS, 0, 0); +} + +/* Get current clock frequency for the given cpu id. */ +int +cpu_est_clockrate(int cpu_id, uint64_t *rate) +{ + + if (pcpu_find(cpu_id) == NULL || rate == NULL) + return (EINVAL); + *rate = processor_frequency; + return (0); } void Index: sparc64/sparc64/machdep.c =================================================================== RCS file: /home/ncvs/src/sys/sparc64/sparc64/machdep.c,v --- sparc64/sparc64/machdep.c.orig Sat Nov 20 19:47:34 2004 +++ sparc64/sparc64/machdep.c Wed Feb 2 12:40:02 2005 @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -671,6 +672,14 @@ cpu_mp_shutdown(); #endif openfirmware_exit(args); +} + +/* Get current clock frequency for the given cpu id. */ +int +cpu_est_clockrate(int cpu_id, uint64_t *rate) +{ + + return (ENXIO); } /* Index: dev/acpica/acpi_cpu.c =================================================================== RCS file: /home/ncvs/src/sys/dev/acpica/acpi_cpu.c,v --- dev/acpica/acpi_cpu.c.orig Sat Nov 20 19:47:24 2004 +++ dev/acpica/acpi_cpu.c Wed Feb 2 12:40:02 2005 @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2003 Nate Lawson (SDG) + * Copyright (c) 2003-2005 Nate Lawson (SDG) * Copyright (c) 2001 Michael Smith * All rights reserved. * @@ -71,7 +71,8 @@ struct acpi_cpu_softc { device_t cpu_dev; ACPI_HANDLE cpu_handle; - uint32_t acpi_id; /* ACPI processor id */ + struct pcpu *cpu_pcpu; + uint32_t cpu_acpi_id; /* ACPI processor id */ uint32_t cpu_p_blk; /* ACPI P_BLK location */ uint32_t cpu_p_blk_len; /* P_BLK length (must be 6). */ struct resource *cpu_p_cnt; /* Throttling control register */ @@ -80,6 +81,10 @@ int cpu_prev_sleep;/* Last idle sleep duration. */ }; +struct acpi_cpu_device { + struct resource_list ad_rl; +}; + #define CPU_GET_REG(reg, width) \ (bus_space_read_ ## width(rman_get_bustag((reg)), \ rman_get_bushandle((reg)), 0)) @@ -127,6 +132,8 @@ static u_int cpu_cx_stats[MAX_CX_STATES];/* Cx usage history. */ /* Values for sysctl. */ +static struct sysctl_ctx_list acpi_cpu_sysctl_ctx; +static struct sysctl_oid *acpi_cpu_sysctl_tree; static uint32_t cpu_throttle_state; static uint32_t cpu_throttle_max; static int cpu_cx_lowest; @@ -137,13 +144,15 @@ static struct acpi_cpu_softc **cpu_softc; ACPI_SERIAL_DECL(cpu, "ACPI CPU"); -static struct sysctl_ctx_list acpi_cpu_sysctl_ctx; -static struct sysctl_oid *acpi_cpu_sysctl_tree; - static int acpi_cpu_probe(device_t dev); static int acpi_cpu_attach(device_t dev); static int acpi_pcpu_get_id(uint32_t idx, uint32_t *acpi_id, - uint32_t *cpu_id); + uint32_t *cpu_id); +static struct resource_list *acpi_cpu_get_rlist(device_t dev, device_t child); +static device_t acpi_cpu_add_child(device_t dev, int order, const char *name, + int unit); +static int acpi_cpu_read_ivar(device_t dev, device_t child, int index, + uintptr_t *result); static int acpi_cpu_shutdown(device_t dev); static int acpi_cpu_throttle_probe(struct acpi_cpu_softc *sc); static int acpi_cpu_cx_probe(struct acpi_cpu_softc *sc); @@ -163,7 +172,24 @@ /* Device interface */ DEVMETHOD(device_probe, acpi_cpu_probe), DEVMETHOD(device_attach, acpi_cpu_attach), + DEVMETHOD(device_detach, bus_generic_detach), DEVMETHOD(device_shutdown, acpi_cpu_shutdown), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), + + /* Bus interface */ + DEVMETHOD(bus_add_child, acpi_cpu_add_child), + DEVMETHOD(bus_read_ivar, acpi_cpu_read_ivar), + DEVMETHOD(bus_get_resource_list, acpi_cpu_get_rlist), + DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), + DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), + DEVMETHOD(bus_alloc_resource, bus_generic_rl_alloc_resource), + DEVMETHOD(bus_release_resource, bus_generic_rl_release_resource), + DEVMETHOD(bus_driver_added, bus_generic_driver_added), + DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), {0, 0} }; @@ -174,8 +200,8 @@ sizeof(struct acpi_cpu_softc), }; -static devclass_t acpi_cpu_devclass; -DRIVER_MODULE(cpu, acpi, acpi_cpu_driver, acpi_cpu_devclass, 0, 0); +extern devclass_t cpu_devclass; +DRIVER_MODULE(cpu, acpi, acpi_cpu_driver, cpu_devclass, 0, 0); MODULE_DEPEND(cpu, acpi, 1, 1, 1); static int @@ -265,17 +291,22 @@ { ACPI_BUFFER buf; ACPI_OBJECT *obj; + struct pcpu *pcpu_data; struct acpi_cpu_softc *sc; struct acpi_softc *acpi_sc; ACPI_STATUS status; - int thr_ret, cx_ret; + int cx_ret, cpu_id, thr_ret; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); sc = device_get_softc(dev); sc->cpu_dev = dev; sc->cpu_handle = acpi_get_handle(dev); - cpu_softc[acpi_get_magic(dev)] = sc; + cpu_id = acpi_get_magic(dev); + cpu_softc[cpu_id] = sc; + pcpu_data = pcpu_find(cpu_id); + pcpu_data->pc_device = dev; + sc->cpu_pcpu = pcpu_data; buf.Pointer = NULL; buf.Length = ACPI_ALLOCATE_BUFFER; @@ -288,7 +319,7 @@ obj = (ACPI_OBJECT *)buf.Pointer; sc->cpu_p_blk = obj->Processor.PblkAddress; sc->cpu_p_blk_len = obj->Processor.PblkLength; - sc->acpi_id = obj->Processor.ProcId; + sc->cpu_acpi_id = obj->Processor.ProcId; AcpiOsFree(obj); ACPI_DEBUG_PRINT((ACPI_DB_INFO, "acpi_cpu%d: P_BLK at %#x/%d\n", device_get_unit(dev), sc->cpu_p_blk, sc->cpu_p_blk_len)); @@ -296,8 +327,8 @@ acpi_sc = acpi_device_get_parent_softc(dev); sysctl_ctx_init(&acpi_cpu_sysctl_ctx); acpi_cpu_sysctl_tree = SYSCTL_ADD_NODE(&acpi_cpu_sysctl_ctx, - SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree), - OID_AUTO, "cpu", CTLFLAG_RD, 0, ""); + SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree), OID_AUTO, "cpu", + CTLFLAG_RD, 0, ""); /* * Probe for throttling and Cx state support. @@ -314,7 +345,11 @@ sysctl_ctx_free(&acpi_cpu_sysctl_ctx); } - return_VALUE (0); + /* Call identify and then probe/attach for cpu child drivers. */ + bus_generic_probe(dev); + bus_generic_attach(dev); + + return (0); } /* @@ -353,11 +388,61 @@ return (ESRCH); } +static struct resource_list * +acpi_cpu_get_rlist(device_t dev, device_t child) +{ + struct acpi_cpu_device *ad; + + ad = device_get_ivars(child); + if (ad == NULL) + return (NULL); + return (&ad->ad_rl); +} + +static device_t +acpi_cpu_add_child(device_t dev, int order, const char *name, int unit) +{ + struct acpi_cpu_device *ad; + device_t child; + + if ((ad = malloc(sizeof(*ad), M_TEMP, M_NOWAIT | M_ZERO)) == NULL) + return (NULL); + + resource_list_init(&ad->ad_rl); + + child = device_add_child_ordered(dev, order, name, unit); + if (child != NULL) + device_set_ivars(child, ad); + return (child); +} + +static int +acpi_cpu_read_ivar(device_t dev, device_t child, int index, uintptr_t *result) +{ + struct acpi_cpu_softc *sc; + + sc = device_get_softc(dev); + switch (index) { + case ACPI_IVAR_HANDLE: + *result = (uintptr_t)sc->cpu_handle; + break; + case CPU_IVAR_PCPU: + *result = (uintptr_t)sc->cpu_pcpu; + break; + default: + return (ENOENT); + } + return (0); +} + static int acpi_cpu_shutdown(device_t dev) { ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + /* Allow children to shutdown first. */ + bus_generic_shutdown(dev); + /* Disable any entry to the idle function. */ cpu_cx_count = 0; @@ -668,7 +753,7 @@ int count, i; /* Get set of CPU devices */ - devclass_get_devices(acpi_cpu_devclass, &cpu_devices, &cpu_ndevices); + devclass_get_devices(cpu_devclass, &cpu_devices, &cpu_ndevices); /* Check for quirks via the first CPU device. */ sc = device_get_softc(cpu_devices[0]); Index: dev/acpica/acpi_perf.c =================================================================== RCS file: dev/acpica/acpi_perf.c diff -N dev/acpica/acpi_perf.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ dev/acpica/acpi_perf.c 1 Feb 2005 16:32:55 -0000 @@ -0,0 +1,420 @@ +/*- + * Copyright (c) 2003-2005 Nate Lawson (SDG) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_acpi.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "acpi.h" +#include + +#include "cpufreq_if.h" + +/* + * Support for ACPI processor performance states (Px) according to + * section x of the ACPI specification. + */ + +struct acpi_px { + uint32_t core_freq; + uint32_t power; + uint32_t trans_lat; + uint32_t bm_lat; + uint32_t ctrl_val; + uint32_t sts_val; +}; + +#define MAX_PX_STATES 16 + +struct acpi_perf_softc { + device_t dev; + ACPI_HANDLE handle; + struct resource *perf_ctrl; /* Set new performance state. */ + struct resource *perf_status; /* Check that transition succeeded. */ + struct acpi_px *px_states; /* ACPI perf states. */ + uint32_t px_count; /* Total number of perf states. */ + uint32_t px_max_avail; /* Lowest index state available. */ + int px_curr_state; /* Active state index. */ + int px_rid; +}; + +#define PX_GET_REG(reg) \ + (bus_space_read_4(rman_get_bustag((reg)), \ + rman_get_bushandle((reg)), 0)) +#define PX_SET_REG(reg, val) \ + (bus_space_write_4(rman_get_bustag((reg)), \ + rman_get_bushandle((reg)), 0, (val))) + +static void acpi_perf_identify(driver_t *driver, device_t parent); +static int acpi_perf_probe(device_t dev); +static int acpi_perf_attach(device_t dev); +static int acpi_perf_detach(device_t dev); +static int acpi_perf_evaluate(device_t dev); +static int acpi_px_to_set(device_t dev, struct acpi_px *px, + struct cf_setting *set); +static void acpi_px_available(struct acpi_perf_softc *sc); +static void acpi_px_notify(ACPI_HANDLE h, UINT32 notify, void *context); +static int acpi_px_settings(device_t dev, struct cf_setting *sets, + int *count, int *type); +static int acpi_px_set(device_t dev, const struct cf_setting *set); +static int acpi_px_get(device_t dev, struct cf_setting *set); + +static device_method_t acpi_perf_methods[] = { + /* Device interface */ + DEVMETHOD(device_identify, acpi_perf_identify), + DEVMETHOD(device_probe, acpi_perf_probe), + DEVMETHOD(device_attach, acpi_perf_attach), + DEVMETHOD(device_detach, acpi_perf_detach), + + /* cpufreq interface */ + DEVMETHOD(cpufreq_drv_set, acpi_px_set), + DEVMETHOD(cpufreq_drv_get, acpi_px_get), + DEVMETHOD(cpufreq_drv_settings, acpi_px_settings), + {0, 0} +}; + +static driver_t acpi_perf_driver = { + "acpi_perf", + acpi_perf_methods, + sizeof(struct acpi_perf_softc), +}; + +static devclass_t acpi_perf_devclass; +DRIVER_MODULE(acpi_perf, cpu, acpi_perf_driver, acpi_perf_devclass, 0, 0); +MODULE_DEPEND(acpi_perf, acpi, 1, 1, 1); + +MALLOC_DEFINE(M_ACPIPERF, "acpi_perf", "ACPI Performance states"); + +static void +acpi_perf_identify(driver_t *driver, device_t parent) +{ + device_t child; + ACPI_HANDLE handle; + + /* Make sure we're not being doubly invoked. */ + if (device_find_child(parent, "acpi_perf", 0) != NULL) + return; + + /* Get the handle for the Processor object and check for perf states. */ + handle = acpi_get_handle(parent); + if (handle == NULL) + return; + if (ACPI_FAILURE(AcpiEvaluateObject(handle, "_PSS", NULL, NULL))) + return; + if ((child = BUS_ADD_CHILD(parent, 0, "acpi_perf", 0)) == NULL) + device_printf(parent, "acpi_perf: add child failed\n"); +} + +static int +acpi_perf_probe(device_t dev) +{ + + device_set_desc(dev, "ACPI CPU Frequency Control"); + return (-10); +} + +static int +acpi_perf_attach(device_t dev) +{ + struct acpi_perf_softc *sc; + + sc = device_get_softc(dev); + sc->dev = dev; + sc->handle = acpi_get_handle(dev); + sc->px_max_avail = 0; + sc->px_curr_state = CPUFREQ_VAL_UNKNOWN; + if (acpi_perf_evaluate(dev) != 0) + return (ENXIO); + cpufreq_register(dev); + + return (0); +} + +static int +acpi_perf_detach(device_t dev) +{ + /* TODO: teardown registers, remove notify handler. */ + return (ENXIO); +} + +/* Probe and setup any valid performance states (Px). */ +static int +acpi_perf_evaluate(device_t dev) +{ + struct acpi_perf_softc *sc; + ACPI_BUFFER buf; + ACPI_OBJECT *pkg, *res; + ACPI_STATUS status; + int i, j; + uint32_t *p; + + /* Get the control values and parameters for each state. */ + sc = device_get_softc(dev); + buf.Pointer = NULL; + buf.Length = ACPI_ALLOCATE_BUFFER; + status = AcpiEvaluateObject(sc->handle, "_PSS", NULL, &buf); + if (ACPI_FAILURE(status)) + return (ENXIO); + + pkg = (ACPI_OBJECT *)buf.Pointer; + if (!ACPI_PKG_VALID(pkg, 1)) { + device_printf(dev, "invalid top level _PSS package\n"); + return (ENXIO); + } + sc->px_count = pkg->Package.Count; + + sc->px_states = malloc(sc->px_count * sizeof(struct acpi_px), + M_ACPIPERF, M_WAITOK | M_ZERO); + if (sc->px_states == NULL) + return (ENOMEM); + + /* + * Each state is a package of {CoreFreq, Power, TransitionLatency, + * BusMasterLatency, ControlVal, StatusVal}, sorted from highest + * performance to lowest. + */ + for (i = 0; i < sc->px_count; i++) { + res = &pkg->Package.Elements[i]; + if (!ACPI_PKG_VALID(res, 6)) { + device_printf(dev, "invalid _PSS package\n"); + continue; + } + p = &sc->px_states[i].core_freq; + for (j = 0; j < 6; j++, p++) + acpi_PkgInt32(res, j, p); + } + AcpiOsFree(buf.Pointer); + + /* Get the control and status registers (one of each). */ + buf.Pointer = NULL; + buf.Length = ACPI_ALLOCATE_BUFFER; + status = AcpiEvaluateObject(sc->handle, "_PCT", NULL, &buf); + if (ACPI_FAILURE(status)) { + free(sc->px_states, M_ACPIPERF); + return (ENXIO); + } + + /* Check the package of two registers, each a Buffer in GAS format. */ + pkg = (ACPI_OBJECT *)buf.Pointer; + if (!ACPI_PKG_VALID(pkg, 2)) { + device_printf(dev, "invalid perf register package\n"); + return (ENXIO); + } + + acpi_PkgGas(sc->dev, pkg, 0, &sc->px_rid, &sc->perf_ctrl); + if (sc->perf_ctrl == NULL) { + device_printf(dev, "failed to attach PERF_CTL register\n"); + return (ENXIO); + } + sc->px_rid++; + + acpi_PkgGas(sc->dev, pkg, 1, &sc->px_rid, &sc->perf_status); + if (sc->perf_status == NULL) { + device_printf(dev, "failed to attach PERF_STATUS register\n"); + return (ENXIO); + } + sc->px_rid++; + AcpiOsFree(buf.Pointer); + + /* Get our current limit and register for notifies. */ + acpi_px_available(sc); + AcpiInstallNotifyHandler(sc->handle, ACPI_DEVICE_NOTIFY, + acpi_px_notify, sc); + + return (0); +} + +static void +acpi_px_notify(ACPI_HANDLE h, UINT32 notify, void *context) +{ + struct acpi_perf_softc *sc; + + sc = context; + acpi_px_available(sc); + + /* TODO: Implement notification when frequency changes. */ +} + +/* + * Find the highest currently-supported performance state. + * This can be called at runtime (e.g., due to a docking event) at + * the request of a Notify on the processor object. + */ +static void +acpi_px_available(struct acpi_perf_softc *sc) +{ + ACPI_STATUS status; + struct cf_setting set; + + status = acpi_GetInteger(sc->handle, "_PPC", &sc->px_max_avail); + + /* If the old state is too high, set current state to the new max. */ + if (ACPI_SUCCESS(status)) { + if (sc->px_curr_state != CPUFREQ_VAL_UNKNOWN && + sc->px_curr_state > sc->px_max_avail) { + acpi_px_to_set(sc->dev, + &sc->px_states[sc->px_max_avail], &set); + acpi_px_set(sc->dev, &set); + } + } else + sc->px_max_avail = 0; +} + +static int +acpi_px_to_set(device_t dev, struct acpi_px *px, struct cf_setting *set) +{ + + if (px == NULL || set == NULL) + return (EINVAL); + + set->freq = px->core_freq; + set->power = px->power; + /* XXX Include BM latency too? */ + set->lat = px->trans_lat; + set->volts = CPUFREQ_VAL_UNKNOWN; + set->dev = dev; + + return (0); +} + +static int +acpi_px_settings(device_t dev, struct cf_setting *sets, int *count, int *type) +{ + struct acpi_perf_softc *sc; + int x, y; + + sc = device_get_softc(dev); + if (sets == NULL || count == NULL) + return (EINVAL); + if (*count < sc->px_count - sc->px_max_avail) + return (ENOMEM); + + /* Return a list of settings that are currently valid. */ + y = 0; + for (x = sc->px_max_avail; x < sc->px_count; x++, y++) + acpi_px_to_set(dev, &sc->px_states[x], &sets[y]); + *count = sc->px_count - sc->px_max_avail; + *type = CPUFREQ_TYPE_ABSOLUTE; + + return (0); +} + +static int +acpi_px_set(device_t dev, const struct cf_setting *set) +{ + struct acpi_perf_softc *sc; + int i, status, sts_val, tries; + + if (set == NULL) + return (EINVAL); + sc = device_get_softc(dev); + + /* Look up appropriate state, based on frequency. */ + for (i = sc->px_max_avail; i < sc->px_count; i++) { + if (CPUFREQ_CMP(set->freq, sc->px_states[i].core_freq)) + break; + } + if (i == sc->px_count) + return (EINVAL); + + /* Write the appropriate value to the register. */ + PX_SET_REG(sc->perf_ctrl, sc->px_states[i].ctrl_val); + + /* Try for up to 1 ms to verify the desired state was selected. */ + sts_val = sc->px_states[i].sts_val; + for (tries = 0; tries < 100; tries++) { + status = PX_GET_REG(sc->perf_status); + if (status == sts_val) + break; + DELAY(10); + } + if (tries == 100) { + device_printf(dev, "Px transition to %d failed\n", + sc->px_states[i].core_freq); + return (ENXIO); + } + sc->px_curr_state = i; + + return (0); +} + +static int +acpi_px_get(device_t dev, struct cf_setting *set) +{ + struct acpi_perf_softc *sc; + uint64_t rate; + int i; + struct pcpu *pc; + + if (set == NULL) + return (EINVAL); + sc = device_get_softc(dev); + + /* If we've set the rate before, use the cached value. */ + if (sc->px_curr_state != CPUFREQ_VAL_UNKNOWN) { + acpi_px_to_set(dev, &sc->px_states[sc->px_curr_state], set); + return (0); + } + + /* Otherwise, estimate and try to match against our settings. */ + pc = cpu_get_pcpu(dev); + if (pc == NULL) + return (ENXIO); + cpu_est_clockrate(pc->pc_cpuid, &rate); + rate /= 1000000; + for (i = 0; i < sc->px_count; i++) { + if (CPUFREQ_CMP(sc->px_states[i].core_freq, rate)) { + sc->px_curr_state = i; + acpi_px_to_set(dev, &sc->px_states[i], set); + break; + } + } + + /* No match, give up. */ + if (i == sc->px_count) { + sc->px_curr_state = CPUFREQ_VAL_UNKNOWN; + set->freq = CPUFREQ_VAL_UNKNOWN; + } + + return (0); +} Index: kern/cpufreq_if.m =================================================================== RCS file: kern/cpufreq_if.m diff -N kern/cpufreq_if.m --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ kern/cpufreq_if.m 1 Feb 2005 05:49:04 -0000 @@ -0,0 +1,92 @@ +# +# Copyright (c) 2004 Nate Lawson +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +#include + +INTERFACE cpufreq; + +HEADER { + struct cf_level; + struct cf_setting; +}; + +# cpufreq interface methods + +# +# Set the current CPU frequency level. +# +METHOD int set { + device_t dev; + const struct cf_level *level; + int priority; +}; + +# +# Get the current active level. +# +METHOD int get { + device_t dev; + struct cf_level *level; +}; + +# +# Get the current possible levels, based on all drivers. +# +METHOD int levels { + device_t dev; + struct cf_level *levels; + int *count; +}; + +# Individual frequency driver methods + +# +# Set an individual driver's setting. +# +METHOD int drv_set { + device_t dev; + const struct cf_setting *set; +}; + +# +# Get an individual driver's setting. +# +METHOD int drv_get { + device_t dev; + struct cf_setting *set; +}; + +# +# Get the settings supported by a driver. +# +METHOD int drv_settings { + device_t dev; + struct cf_setting *sets; + int *count; + int *type; +}; Index: kern/kern_cpu.c =================================================================== RCS file: kern/kern_cpu.c diff -N kern/kern_cpu.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ kern/kern_cpu.c 1 Feb 2005 07:15:16 -0000 @@ -0,0 +1,533 @@ +/*- + * Copyright (c) 2004-2005 Nate Lawson (SDG) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "cpufreq_if.h" + +/* + * Common CPU frequency glue code. Drivers for specific hardware can + * attach this interface to allow users to get/set the CPU frequency. + */ + +/* + * Number of levels we can handle. Levels are synthesized from settings + * so for N settings there may be N^2 levels. + */ +#define CF_MAX_LEVELS 32 + +struct cpufreq_softc { + struct cf_level curr_level; + int priority; + struct cf_level_lst all_levels; + device_t dev; + struct sysctl_ctx_list sysctl_ctx; +}; + +struct cf_setting_array { + struct cf_setting sets[MAX_SETTINGS]; + int count; + TAILQ_ENTRY(cf_setting_array) link; +}; + +TAILQ_HEAD(cf_setting_lst, cf_setting_array); + +static int cpufreq_attach(device_t dev); +static int cpufreq_detach(device_t dev); +static void cpufreq_evaluate(void *arg); +static int cf_set_method(device_t dev, const struct cf_level *level, + int priority); +static int cf_get_method(device_t dev, struct cf_level *level); +static int cf_levels_method(device_t dev, struct cf_level *levels, + int *count); +static int cpufreq_insert_abs(struct cf_level_lst *list, + struct cf_setting *sets, int count); +static int cpufreq_curr_sysctl(SYSCTL_HANDLER_ARGS); +static int cpufreq_levels_sysctl(SYSCTL_HANDLER_ARGS); + +static device_method_t cpufreq_methods[] = { + DEVMETHOD(device_probe, bus_generic_probe), + DEVMETHOD(device_attach, cpufreq_attach), + DEVMETHOD(device_detach, cpufreq_detach), + + DEVMETHOD(cpufreq_set, cf_set_method), + DEVMETHOD(cpufreq_get, cf_get_method), + DEVMETHOD(cpufreq_levels, cf_levels_method), + {0, 0} +}; +static driver_t cpufreq_driver = { + "cpufreq", cpufreq_methods, sizeof(struct cpufreq_softc) +}; +static devclass_t cpufreq_dc; +DRIVER_MODULE(cpufreq, cpu, cpufreq_driver, cpufreq_dc, 0, 0); + +static eventhandler_tag cf_ev_tag; + +static int +cpufreq_attach(device_t dev) +{ + struct cpufreq_softc *sc; + device_t parent; + int numdevs; + + sc = device_get_softc(dev); + parent = device_get_parent(dev); + sc->dev = dev; + sysctl_ctx_init(&sc->sysctl_ctx); + TAILQ_INIT(&sc->all_levels); + sc->curr_level.total_set.freq = CPUFREQ_VAL_UNKNOWN; + + /* + * Only initialize one set of sysctls for all CPUs. In the future, + * if multiple CPUs can have different settings, we can move these + * sysctls to be under every CPU instead of just the first one. + */ + numdevs = devclass_get_count(cpufreq_dc); + if (numdevs > 1) + return (0); + + SYSCTL_ADD_PROC(&sc->sysctl_ctx, + SYSCTL_CHILDREN(device_get_sysctl_tree(parent)), + OID_AUTO, "freq", CTLTYPE_INT | CTLFLAG_RW, sc, 0, + cpufreq_curr_sysctl, "I", "Current CPU frequency"); + SYSCTL_ADD_PROC(&sc->sysctl_ctx, + SYSCTL_CHILDREN(device_get_sysctl_tree(parent)), + OID_AUTO, "freq_levels", CTLTYPE_STRING | CTLFLAG_RD, sc, 0, + cpufreq_levels_sysctl, "A", "CPU frequency levels"); + cf_ev_tag = EVENTHANDLER_REGISTER(cpufreq_changed, cpufreq_evaluate, + NULL, EVENTHANDLER_PRI_ANY); + + return (0); +} + +static int +cpufreq_detach(device_t dev) +{ + struct cpufreq_softc *sc; + int numdevs; + + sc = device_get_softc(dev); + sysctl_ctx_free(&sc->sysctl_ctx); + + /* Only clean up these resources when the last device is detaching. */ + numdevs = devclass_get_count(cpufreq_dc); + if (numdevs == 1) + EVENTHANDLER_DEREGISTER(cpufreq_changed, cf_ev_tag); + + return (0); +} + +static void +cpufreq_evaluate(void *arg) +{ + /* TODO: Re-evaluate when notified of changes to drivers. */ +} + +static int +cf_set_method(device_t dev, const struct cf_level *level, int priority) +{ + struct cpufreq_softc *sc; + const struct cf_setting *set; + int error; + + sc = device_get_softc(dev); + + /* If already at this level, just return. */ + if (CPUFREQ_CMP(sc->curr_level.total_set.freq, level->total_set.freq)) + return (0); + + /* First, set the absolute frequency via its driver. */ + set = &level->abs_set; + if (set->dev) { + if (!device_is_attached(set->dev)) { + error = ENXIO; + goto out; + } + error = CPUFREQ_DRV_SET(set->dev, set); + if (error) { + goto out; + } + } + + /* TODO: Next, set any/all relative frequencies via their drivers. */ + + /* Record the current level. */ + sc->curr_level = *level; + sc->priority = priority; + error = 0; + +out: + if (error) + device_printf(set->dev, "set freq failed, err %d\n", error); + return (error); +} + +static int +cf_get_method(device_t dev, struct cf_level *level) +{ + struct cpufreq_softc *sc; + struct cf_level *levels; + struct cf_setting *curr_set, set; + struct pcpu *pc; + device_t *devs; + int count, error, i, numdevs; + uint64_t rate; + + sc = device_get_softc(dev); + curr_set = &sc->curr_level.total_set; + levels = NULL; + + /* If we already know the current frequency, we're done. */ + if (curr_set->freq != CPUFREQ_VAL_UNKNOWN) + goto out; + + /* + * We need to figure out the current level. Loop through every + * driver, getting the current setting. Then, attempt to get a best + * match of settings against each level. + */ + count = CF_MAX_LEVELS; + levels = malloc(count * sizeof(*levels), M_TEMP, M_NOWAIT); + if (levels == NULL) + return (ENOMEM); + error = CPUFREQ_LEVELS(sc->dev, levels, &count); + if (error) + goto out; + error = device_get_children(device_get_parent(dev), &devs, &numdevs); + if (error) + goto out; + for (i = 0; i < numdevs && curr_set->freq == CPUFREQ_VAL_UNKNOWN; i++) { + if (!device_is_attached(devs[i])) + continue; + error = CPUFREQ_DRV_GET(devs[i], &set); + if (error) + continue; + for (i = 0; i < count; i++) { + if (CPUFREQ_CMP(set.freq, levels[i].abs_set.freq)) { + sc->curr_level = levels[i]; + break; + } + } + } + free(devs, M_TEMP); + if (curr_set->freq != CPUFREQ_VAL_UNKNOWN) + goto out; + + /* + * We couldn't find an exact match, so attempt to estimate and then + * match against a level. + */ + pc = cpu_get_pcpu(dev); + if (pc == NULL) { + error = ENXIO; + goto out; + } + cpu_est_clockrate(pc->pc_cpuid, &rate); + rate /= 1000000; + for (i = 0; i < count; i++) { + if (CPUFREQ_CMP(rate, levels[i].total_set.freq)) { + sc->curr_level = levels[i]; + break; + } + } + +out: + if (levels) + free(levels, M_TEMP); + *level = sc->curr_level; + return (0); +} + +static int +cf_levels_method(device_t dev, struct cf_level *levels, int *count) +{ + TAILQ_HEAD(cf_setting_lst,cf_setting_array) rel_sets; + struct cpufreq_softc *sc; + struct cf_level *lev; + struct cf_setting *sets; + struct pcpu *pc; + device_t *devs; + int error, i, numdevs, numlevels, set_count, type; + uint64_t rate; + + if (levels == NULL || count == NULL) + return (EINVAL); + + TAILQ_INIT(&rel_sets); + sc = device_get_softc(dev); + error = device_get_children(device_get_parent(dev), &devs, &numdevs); + if (error) + return (error); + sets = malloc(MAX_SETTINGS * sizeof(*sets), M_TEMP, M_NOWAIT); + if (sets == NULL) { + free(devs, M_TEMP); + return (ENOMEM); + } + + /* Clear all previous levels. */ + while ((lev = TAILQ_FIRST(&sc->all_levels)) != NULL) { + TAILQ_REMOVE(&sc->all_levels, lev, link); + free(lev, M_TEMP); + } + + /* Get settings from all cpufreq drivers. */ + numlevels = 0; + for (i = 0; i < numdevs; i++) { + if (!device_is_attached(devs[i])) + continue; + set_count = MAX_SETTINGS; + error = CPUFREQ_DRV_SETTINGS(devs[i], sets, &set_count, &type); + if (error || set_count == 0) + continue; + error = cpufreq_insert_abs(&sc->all_levels, sets, set_count); + if (error) + goto out; + numlevels += set_count; + } + + /* If the caller doesn't have enough space, return the actual count. */ + if (numlevels > *count) { + *count = numlevels; + error = E2BIG; + goto out; + } + + /* If there are no absolute levels, create a fake one at 100%. */ + if (TAILQ_EMPTY(&sc->all_levels)) { + bzero(&sets[0], sizeof(*sets)); + pc = cpu_get_pcpu(dev); + if (pc == NULL) { + error = ENXIO; + goto out; + } + cpu_est_clockrate(pc->pc_cpuid, &rate); + sets[0].freq = rate / 1000000; + error = cpufreq_insert_abs(&sc->all_levels, sets, 1); + if (error) + goto out; + } + + /* TODO: Create a combined list of absolute + relative levels. */ + i = 0; + TAILQ_FOREACH(lev, &sc->all_levels, link) { + /* For now, just assume total freq equals absolute freq. */ + lev->total_set = lev->abs_set; + lev->total_set.dev = NULL; + levels[i] = *lev; + i++; + } + *count = i; + error = 0; + +out: + free(devs, M_TEMP); + free(sets, M_TEMP); + return (error); +} + +/* + * Create levels for an array of absolute settings and insert them in + * sorted order in the specified list. + */ +static int +cpufreq_insert_abs(struct cf_level_lst *list, struct cf_setting *sets, + int count) +{ + struct cf_level *level, *search; + int i; + + for (i = 0; i < count; i++) { + level = malloc(sizeof(*level), M_TEMP, M_NOWAIT); + if (level == NULL) + return (ENOMEM); + level->abs_set = sets[i]; + + if (TAILQ_EMPTY(list)) { + TAILQ_INSERT_HEAD(list, level, link); + continue; + } + + TAILQ_FOREACH_REVERSE(search, list, cf_level_lst, link) { + if (sets[i].freq <= search->abs_set.freq) { + TAILQ_INSERT_AFTER(list, search, level, link); + break; + } + } + } + return (0); +} + +static int +cpufreq_curr_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct cpufreq_softc *sc; + struct cf_level *levels; + int count, error, freq, i; + + sc = oidp->oid_arg1; + count = CF_MAX_LEVELS; + levels = malloc(count * sizeof(*levels), M_TEMP, M_NOWAIT); + if (levels == NULL) + return (ENOMEM); + + error = CPUFREQ_GET(sc->dev, &levels[0]); + if (error) + goto out; + freq = levels[0].total_set.freq; + error = sysctl_handle_int(oidp, &freq, 0, req); + if (error != 0 || req->newptr == NULL) + goto out; + + error = CPUFREQ_LEVELS(sc->dev, levels, &count); + if (error) + goto out; + for (i = 0; i < count; i++) { + if (CPUFREQ_CMP(levels[i].total_set.freq, freq)) { + error = CPUFREQ_SET(sc->dev, &levels[i], + CPUFREQ_PRIO_USER); + break; + } + } + if (i == count) + error = EINVAL; + +out: + if (levels) + free(levels, M_TEMP); + return (error); +} + +static int +cpufreq_levels_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct cpufreq_softc *sc; + struct cf_level *levels; + struct cf_setting *set; + struct sbuf sb; + int count, error, i; + + sc = oidp->oid_arg1; + sbuf_new(&sb, NULL, 128, SBUF_AUTOEXTEND); + + /* Get settings from the device and generate the output string. */ + count = CF_MAX_LEVELS; + levels = malloc(count * sizeof(*levels), M_TEMP, M_NOWAIT); + if (levels == NULL) + return (ENOMEM); + error = CPUFREQ_LEVELS(sc->dev, levels, &count); + if (error) + goto out; + if (count) { + for (i = 0; i < count; i++) { + set = &levels[i].total_set; + sbuf_printf(&sb, "%d/%d ", set->freq, set->power); + } + } else + sbuf_cpy(&sb, "0"); + sbuf_trim(&sb); + sbuf_finish(&sb); + error = sysctl_handle_string(oidp, sbuf_data(&sb), sbuf_len(&sb), req); + +out: + free(levels, M_TEMP); + sbuf_delete(&sb); + return (error); +} + +int +cpufreq_register(device_t dev) +{ + device_t cf_dev, cpu_dev; + + /* + * Only add one cpufreq device (on cpu0) for all control. Once + * independent multi-cpu control appears, we can assign one cpufreq + * device per cpu. + */ + cf_dev = devclass_get_device(cpufreq_dc, 0); + if (cf_dev) { + device_printf(dev, + "warning: only one cpufreq device at a time supported\n"); + return (0); + } + + /* Add the child device and sysctls. */ + cpu_dev = devclass_get_device(devclass_find("cpu"), 0); + cf_dev = BUS_ADD_CHILD(cpu_dev, 0, "cpufreq", 0); + if (cf_dev == NULL) + return (ENOMEM); + device_quiet(cf_dev); + + return (device_probe_and_attach(cf_dev)); +} + +int +cpufreq_unregister(device_t dev) +{ + device_t cf_dev, *devs; + int cfcount, count, devcount, error, i, type; + struct cf_setting set; + + /* + * If this is the last cpufreq child device, remove the control + * device as well. We identify cpufreq children by calling a method + * they support. + */ + error = device_get_children(device_get_parent(dev), &devs, &devcount); + if (error) + return (error); + cf_dev = devclass_get_device(cpufreq_dc, 0); + KASSERT(cf_dev != NULL, ("unregister with no cpufreq dev")); + cfcount = 0; + for (i = 0; i < devcount; i++) { + if (!device_is_attached(devs[i])) + continue; + count = 1; + if (CPUFREQ_DRV_SETTINGS(devs[i], &set, &count, &type) == 0) + cfcount++; + } + if (cfcount <= 1) { + device_delete_child(device_get_parent(cf_dev), cf_dev); + } + free(devs, M_TEMP); + + return (0); +} Index: dev/cpufreq/speedstep_ich.c =================================================================== RCS file: dev/cpufreq/speedstep_ich.c diff -N dev/cpufreq/speedstep_ich.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ dev/cpufreq/speedstep_ich.c 1 Feb 2005 16:24:21 -0000 @@ -0,0 +1,372 @@ +/*- + * Copyright (c) 2004-2005 Nate Lawson (SDG) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "cpufreq_if.h" + +/* + * The SpeedStep ICH feature is a chipset-initiated voltage and frequency + * transition available on the ICH2M, 3M, and 4M. It is different from + * the newer Pentium-M SpeedStep feature. It offers only two levels of + * frequency/voltage. Often, the BIOS will select one of the levels via + * SMM code during the power-on process (i.e., choose a lower level if the + * system is off AC power.) + */ + +struct ichss_softc { + device_t dev; + int bm_rid; /* Bus-mastering control (PM2REG). */ + struct resource *bm_reg; + int ctrl_rid; /* Control/status register. */ + struct resource *ctrl_reg; + struct cf_setting sets[2]; /* Only two settings. */ +}; + +/* Supported PCI IDs. */ +#define PCI_VENDOR_INTEL 0x8086 +#define PCI_DEV_82801BA 0x244c /* ICH2M */ +#define PCI_DEV_82801CA 0x248c /* ICH3M */ +#define PCI_DEV_82801DB 0x24cc /* ICH4M */ +#define PCI_DEV_82815BA 0x1130 /* Unsupported/buggy part */ + +/* PCI config registers for finding PMBASE and enabling SpeedStep. */ +#define ICHSS_PMBASE_OFFSET 0x40 +#define ICHSS_PMCFG_OFFSET 0xa0 + +/* Values and masks. */ +#define ICHSS_ENABLE (1<<3) /* Enable SpeedStep control. */ +#define ICHSS_IO_REG 0x1 /* Access register via I/O space. */ +#define ICHSS_PMBASE_MASK 0xff80 /* PMBASE address bits. */ +#define ICHSS_CTRL_BIT 0x1 /* 0 is high speed, 1 is low. */ +#define ICHSS_BM_DISABLE 0x1 + +/* Offsets from PMBASE for various registers. */ +#define ICHSS_BM_OFFSET 0x20 +#define ICHSS_CTRL_OFFSET 0x50 + +#define ICH_GET_REG(reg) \ + (bus_space_read_1(rman_get_bustag((reg)), \ + rman_get_bushandle((reg)), 0)) +#define ICH_SET_REG(reg, val) \ + (bus_space_write_1(rman_get_bustag((reg)), \ + rman_get_bushandle((reg)), 0, (val))) + +static int ichss_pci_probe(device_t dev); +static int ichss_probe(device_t dev); +static int ichss_attach(device_t dev); +static int ichss_detach(device_t dev); +static int ichss_settings(device_t dev, struct cf_setting *sets, + int *count, int *type); +static int ichss_set(device_t dev, const struct cf_setting *set); +static int ichss_get(device_t dev, struct cf_setting *set); + +static device_method_t ichss_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, ichss_probe), + DEVMETHOD(device_attach, ichss_attach), + DEVMETHOD(device_detach, ichss_detach), + + /* cpufreq interface */ + DEVMETHOD(cpufreq_drv_set, ichss_set), + DEVMETHOD(cpufreq_drv_get, ichss_get), + DEVMETHOD(cpufreq_drv_settings, ichss_settings), + {0, 0} +}; +static driver_t ichss_driver = { + "ichss", ichss_methods, sizeof(struct ichss_softc) +}; +static devclass_t ichss_devclass; +DRIVER_MODULE(ichss, cpu, ichss_driver, ichss_devclass, 0, 0); + +static device_method_t ichss_pci_methods[] = { + DEVMETHOD(device_probe, ichss_pci_probe), + {0, 0} +}; +static driver_t ichss_pci_driver = { + "ichss_pci", ichss_pci_methods, 0 +}; +static devclass_t ichss_pci_devclass; +DRIVER_MODULE(ichss_pci, pci, ichss_pci_driver, ichss_pci_devclass, 0, 0); + +#if 0 +#define DPRINT(x...) printf(x) +#else +#define DPRINT(x...) +#endif + +/* + * We detect the chipset by looking for its LPC bus ID during the PCI + * scan and reading its config registers during the probe. However, + * we add the ichss child under the cpu device since even though the + * chipset provides the control, it really affects the cpu only. + * + * XXX This approach does not work if the module is loaded after boot. + */ +static int +ichss_pci_probe(device_t dev) +{ + device_t child, parent; + uint32_t pmbase; + uint16_t ss_en; + + /* + * TODO: add a quirk to disable if we see the 82815_MC along + * with the 82801BA and revision < 5. + */ + if (pci_get_vendor(dev) != PCI_VENDOR_INTEL || + (pci_get_device(dev) != PCI_DEV_82801BA && + pci_get_device(dev) != PCI_DEV_82801CA && + pci_get_device(dev) != PCI_DEV_82801DB)) + return (ENXIO); + + /* Only one CPU is supported for this hardware. */ + if (devclass_get_device(ichss_devclass, 0)) + return (ENXIO); + + /* Add a child under the CPU parent. */ + parent = devclass_get_device(devclass_find("cpu"), 0); + KASSERT(parent != NULL, ("cpu parent is NULL")); + child = BUS_ADD_CHILD(parent, 0, "ichss", 0); + if (child == NULL) { + device_printf(parent, "add SpeedStep child failed\n"); + return (ENXIO); + } + + /* Find the PMBASE register from our PCI config header. */ + pmbase = pci_read_config(dev, ICHSS_PMBASE_OFFSET, sizeof(pmbase)); + if ((pmbase & ICHSS_IO_REG) == 0) { + printf("ichss: invalid PMBASE memory type\n"); + return (ENXIO); + } + pmbase &= ICHSS_PMBASE_MASK; + if (pmbase == 0) { + printf("ichss: invalid zero PMBASE address\n"); + return (ENXIO); + } + DPRINT("ichss: PMBASE is %#x\n", pmbase); + + /* Add the bus master arbitration and control registers. */ + bus_set_resource(child, SYS_RES_IOPORT, 0, pmbase + ICHSS_BM_OFFSET, + 1); + bus_set_resource(child, SYS_RES_IOPORT, 1, pmbase + ICHSS_CTRL_OFFSET, + 1); + + /* Activate SpeedStep control if not already enabled. */ + ss_en = pci_read_config(dev, ICHSS_PMCFG_OFFSET, sizeof(ss_en)); + if ((ss_en & ICHSS_ENABLE) == 0) { + printf("ichss: enabling SpeedStep support\n"); + pci_write_config(dev, ICHSS_PMCFG_OFFSET, + ss_en | ICHSS_ENABLE, sizeof(ss_en)); + } + + /* Attach the new CPU child now. */ + device_probe_and_attach(child); + + return (ENXIO); +} + +static int +ichss_probe(device_t dev) +{ + device_t perf_dev; + + /* If the ACPI perf driver has attached, let it manage things. */ + perf_dev = devclass_get_device(devclass_find("acpi_perf"), 0); + if (perf_dev && device_is_attached(perf_dev)) + return (ENXIO); + + device_set_desc(dev, "SpeedStep ICH"); + return (-1000); +} + +static int +ichss_attach(device_t dev) +{ + struct ichss_softc *sc; + + sc = device_get_softc(dev); + sc->dev = dev; + + sc->bm_rid = 0; + sc->bm_reg = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &sc->bm_rid, + RF_ACTIVE); + if (sc->bm_reg == NULL) { + device_printf(dev, "failed to alloc BM arb register\n"); + return (ENXIO); + } + sc->ctrl_rid = 1; + sc->ctrl_reg = bus_alloc_resource_any(dev, SYS_RES_IOPORT, + &sc->ctrl_rid, RF_ACTIVE); + if (sc->ctrl_reg == NULL) { + device_printf(dev, "failed to alloc control register\n"); + bus_release_resource(dev, SYS_RES_IOPORT, sc->bm_rid, + sc->bm_reg); + return (ENXIO); + } + + /* Setup some defaults for our exported settings. */ + sc->sets[0].freq = CPUFREQ_VAL_UNKNOWN; + sc->sets[0].volts = CPUFREQ_VAL_UNKNOWN; + sc->sets[0].power = CPUFREQ_VAL_UNKNOWN; + sc->sets[0].lat = 1000; + sc->sets[0].dev = dev; + sc->sets[1] = sc->sets[0]; + cpufreq_register(dev); + + return (0); +} + +static int +ichss_detach(device_t dev) +{ + /* TODO: teardown BM and CTRL registers. */ + return (ENXIO); +} + +static int +ichss_settings(device_t dev, struct cf_setting *sets, int *count, int *type) +{ + struct ichss_softc *sc; + struct cf_setting set; + int first, i; + + if (sets == NULL || count == NULL) + return (EINVAL); + if (*count < 2) { + *count = 2; + return (E2BIG); + } + sc = device_get_softc(dev); + + /* + * Estimate frequencies for both levels, temporarily switching to + * the other one if we haven't calibrated it yet. + */ + ichss_get(dev, &set); + for (i = 0; i < 2; i++) { + if (sc->sets[i].freq == CPUFREQ_VAL_UNKNOWN) { + first = (i == 0) ? 1 : 0; + ichss_set(dev, &sc->sets[i]); + ichss_set(dev, &sc->sets[first]); + } + } + + bcopy(sc->sets, sets, sizeof(sc->sets)); + *count = 2; + *type = CPUFREQ_TYPE_ABSOLUTE; + + return (0); +} + +static int +ichss_set(device_t dev, const struct cf_setting *set) +{ + struct ichss_softc *sc; + uint8_t bmval, new_val, old_val, req_val; + uint64_t rate; + + /* Look up appropriate bit value based on frequency. */ + sc = device_get_softc(dev); + if (CPUFREQ_CMP(set->freq, sc->sets[0].freq)) + req_val = 0; + else if (CPUFREQ_CMP(set->freq, sc->sets[1].freq)) + req_val = ICHSS_CTRL_BIT; + else + return (EINVAL); + DPRINT("ichss: requested setting %d\n", req_val); + + /* Disable interrupts and get the other register contents. */ + disable_intr(); + old_val = ICH_GET_REG(sc->ctrl_reg) & ~ICHSS_CTRL_BIT; + + /* + * Disable bus master arbitration, write the new value to the control + * register, and then re-enable bus master arbitration. + */ + bmval = ICH_GET_REG(sc->bm_reg) | ICHSS_BM_DISABLE; + ICH_SET_REG(sc->bm_reg, bmval); + ICH_SET_REG(sc->ctrl_reg, old_val | req_val); + ICH_SET_REG(sc->bm_reg, bmval & ~ICHSS_BM_DISABLE); + + /* Get the new value and re-enable interrupts. */ + new_val = ICH_GET_REG(sc->ctrl_reg); + enable_intr(); + + /* Check if the desired state was indeed selected. */ + if (req_val != (new_val & ICHSS_CTRL_BIT)) { + device_printf(sc->dev, "transition to %d failed\n", req_val); + return (ENXIO); + } + + /* Re-initialize our cycle counter if we don't know this new state. */ + if (sc->sets[req_val].freq == CPUFREQ_VAL_UNKNOWN) { + cpu_est_clockrate(0, &rate); + sc->sets[req_val].freq = rate / 1000000; + DPRINT("ichss: set calibrated new rate of %d\n", + sc->sets[req_val].freq); + } + + return (0); +} + +static int +ichss_get(device_t dev, struct cf_setting *set) +{ + struct ichss_softc *sc; + uint64_t rate; + uint8_t state; + + sc = device_get_softc(dev); + state = ICH_GET_REG(sc->ctrl_reg) & ICHSS_CTRL_BIT; + + /* If we haven't changed settings yet, estimate the current value. */ + if (sc->sets[state].freq == CPUFREQ_VAL_UNKNOWN) { + cpu_est_clockrate(0, &rate); + sc->sets[state].freq = rate / 1000000; + DPRINT("ichss: get calibrated new rate of %d\n", + sc->sets[state].freq); + } + *set = sc->sets[state]; + + return (0); +} Index: modules/Makefile =================================================================== RCS file: /home/ncvs/src/sys/modules/Makefile,v --- modules/Makefile.orig Tue Jan 4 09:36:38 2005 +++ modules/Makefile Wed Feb 2 12:40:02 2005 @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/modules/Makefile,v 1.393.2.6 2004/12/30 00:48:36 obrien Exp $ +# $FreeBSD: src/sys/modules/Makefile,v 1.400 2004/09/10 20:57:45 wpaul Exp $ # pcic -- currently broken and being worked on out of tree. # oldcard -- specialized use for debugging only. @@ -48,6 +48,7 @@ coda5 \ ${_coff} \ ${_cp} \ + cpufreq \ ${_crypto} \ ${_cryptodev} \ ${_ctau} \ Index: modules/acpi/Makefile =================================================================== RCS file: /home/ncvs/src/sys/modules/acpi/Makefile,v --- modules/acpi/Makefile.orig Wed Jul 21 10:28:16 2004 +++ modules/acpi/Makefile Wed Feb 2 12:46:29 2005 @@ -1,5 +1,6 @@ # $FreeBSD: src/sys/modules/acpi/Makefile,v 1.40 2004/07/21 14:47:54 nyan Exp $ -SUBDIR= acpi acpi_asus acpi_panasonic acpi_toshiba acpi_video +SUBDIR= acpi acpi_asus acpi_panasonic acpi_perf \ + acpi_toshiba acpi_video .include Index: modules/acpi/acpi_perf/Makefile =================================================================== RCS file: modules/acpi/acpi_perf/Makefile diff -N modules/acpi/acpi_perf/Makefile --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ modules/acpi/acpi_perf/Makefile 31 Jan 2005 06:00:37 -0000 @@ -0,0 +1,11 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../../dev/acpica +CFLAGS+= -I${.CURDIR}/../../../contrib/dev/acpica + +KMOD= acpi_perf +WARNS?= 2 +SRCS= acpi_perf.c +SRCS+= acpi_if.h bus_if.h cpufreq_if.h device_if.h opt_acpi.h + +.include Index: conf/files =================================================================== RCS file: /home/ncvs/src/sys/conf/files,v --- conf/files.orig Thu Jan 27 10:06:48 2005 +++ conf/files Wed Feb 2 12:50:43 2005 @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.943.2.6 2005/01/25 16:26:25 rik Exp $ +# $FreeBSD: src/sys/conf/files,v 1.953 2004/09/16 20:35:27 glebius Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -58,6 +58,7 @@ kern/device_if.m standard kern/bus_if.m standard kern/clock_if.m optional genclock +kern/cpufreq_if.m standard kern/linker_if.m standard cam/cam.c optional scbus cam/cam_periph.c optional scbus @@ -1075,6 +1076,7 @@ kern/kern_condvar.c standard kern/kern_conf.c standard kern/kern_context.c standard +kern/kern_cpu.c standard kern/kern_descrip.c standard kern/kern_poll.c optional device_polling kern/kern_environment.c standard Index: conf/kmod.mk =================================================================== RCS file: /home/ncvs/src/sys/conf/kmod.mk,v --- conf/kmod.mk.orig Sat Aug 14 16:53:04 2004 +++ conf/kmod.mk Wed Feb 2 13:09:26 2005 @@ -290,7 +290,7 @@ .endfor .endif -MFILES?= kern/bus_if.m kern/device_if.m dev/iicbus/iicbb_if.m \ +MFILES?= kern/bus_if.m cpufreq_if.m kern/device_if.m dev/iicbus/iicbb_if.m \ dev/iicbus/iicbus_if.m isa/isa_if.m \ libkern/iconv_converter_if.m \ dev/acpica/acpi_if.m dev/eisa/eisa_if.m dev/mii/miibus_if.m \ --==_Exmh_-302709550 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" --==_Exmh_-302709550-- From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 01:02:24 2005 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A48C016A7AE; Sun, 3 Jul 2005 01:02:03 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id A76C445397; Sun, 3 Jul 2005 00:52:20 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 72FF9621F2; Sat, 2 Jul 2005 17:19:34 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id 9C05D5C9D6 for ; Thu, 17 Feb 2005 19:24:28 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 260A85736A; Fri, 18 Feb 2005 03:24:24 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id DC47116A4CE; Fri, 18 Feb 2005 03:24:19 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AAFE516A4CE; Fri, 18 Feb 2005 03:24:15 +0000 (GMT) Received: from pne-smtpout1-sn2.hy.skanova.net (pne-smtpout1-sn2.hy.skanova.net [81.228.8.83]) by mx1.FreeBSD.org (Postfix) with ESMTP id 32F3843D41; Fri, 18 Feb 2005 03:24:15 +0000 (GMT) (envelope-from pawel.worach@telia.com) Received: from [127.0.0.1] (81.225.14.129) by pne-smtpout1-sn2.hy.skanova.net (7.1.026.7) (authenticated as u86211448) id 41E32167005DE136; Fri, 18 Feb 2005 04:23:43 +0100 Message-ID: <42155FBD.5050701@telia.com> From: Pawel Worach User-Agent: Mozilla Thunderbird 1.0 (X11/20050214) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Nate Lawson References: <4213F066.2050708@root.org> <4214119B.2010909@telia.com> <421537E9.8050203@root.org> In-Reply-To: <421537E9.8050203@root.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on elvis.mu.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.0.1 X-Spam-Level: Cc: acpi@freebsd.org, current@freebsd.org Subject: Re: patch: p4tcc and speedstep cpufreq drivers X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 01:02:27 -0000 X-Original-Date: Fri, 18 Feb 2005 04:23:41 +0100 X-List-Received-Date: Sun, 03 Jul 2005 01:02:27 -0000 Nate Lawson wrote: > > Apologies. I found 2 bugs, one was not calling cpufreq_register() and > the other was that the code to detect acpi_perf (in ichss and est) was > incorrect. I've committed fixes for that and have updated the patch. > Please ues this version and test again. > On boot pre-seed PRNG does 'sysctl -a' which panics like this. - only cpufreq.ko loaded - last line of 'sysctl -a' output is "dev.cpu.0.%parent: acpi0" Fatal trap 12: page fault while in kernel mode fault virtual address = 0x63204b53 fault code = supervisor read, page not present instruction pointer = 0x8:0xc08ac32b stack pointer = 0x10:0xe4d38ab8 frame pointer = 0x10:0xe4d38ac4 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 56 (sysctl) [thread pid 56 tid 100043 ] Stopped at est_settings+0x1b: movzwl 0(%ecx),%eax db> tr Tracing pid 56 tid 100043 td 0xc2329450 est_settings(c2367880,c23c2e00,e4d38af4,c231b800,c23c2e00) at est_settings+0x1b cf_levels_method(c2367980,c2590000,e4d38b50,5000,1) at cf_levels_method+0x18a cf_get_method(c2367980,c258b000,c06d2c98,1,c228b960) at cf_get_method+0xb5 cpufreq_curr_sysctl(c236c740,c231b800,0,e4d38c08,e4d38c08) at cpufreq_curr_sysctl+0x96 sysctl_root(0,e4d38c78,4,e4d38c08,c2329450) at sysctl_root+0x134 userland_sysctl(c2329450,e4d38c78,4,0,bfbfdbac) at userland_sysctl+0x13c __sysctl(c2329450,e4d38d14,18,0,e4d38d20) at __sysctl+0xdc syscall(2f,2f,2f,bfbfdbac,bfbfe470) at syscall+0x330 Xint0x80_syscall() at Xint0x80_syscall+0x1f --- syscall (202, FreeBSD ELF32, __sysctl), eip = 0x280bdc3f, esp = 0xbfbfdb2c, ebp = 0xbfbfdb58 --- db> call doadump Dumping 1023 MB 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240 256 272 288 304 320 336 352 368 384 400 416 432 448 464 480 496 512 528 544 560 576 592 608 624 640 656 672 688 704 720 736 752 768 784 800 816 832 848 864 880 896 912 928 944 960 976 992 1008 (kgdb) l *est_settings+0x1b 0x243b is in est_settings (/usr/src/sys/modules/cpufreq/../../i386/cpufreq/est.c:723). 718 719 if (*count < EST_MAX_SETTINGS) 720 return (E2BIG); 721 722 i = 0; 723 for (f = sc->freq_list; f->freq != 0; f++) { 724 sets[i].freq = f->freq; 725 sets[i].volts = f->volts; 726 sets[i].power = CPUFREQ_VAL_UNKNOWN; 727 sets[i].lat = EST_TRANS_LAT; -- Pawel _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 01:03:08 2005 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E765216B710; Sun, 3 Jul 2005 01:02:44 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6412D44CF4; Sun, 3 Jul 2005 00:54:29 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 06ED361BEF; Sat, 2 Jul 2005 17:18:32 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id E9B725C9CC for ; Wed, 2 Feb 2005 12:04:05 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 26E9B56A1C; Wed, 2 Feb 2005 20:04:02 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 815C416A4D8; Wed, 2 Feb 2005 20:03:58 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3263D16A4CE; Wed, 2 Feb 2005 20:03:54 +0000 (GMT) Received: from www.cryptography.com (li-22.members.linode.com [64.5.53.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id CEB1643D55; Wed, 2 Feb 2005 20:03:51 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.0.0.34] (adsl-67-119-74-222.dsl.sntc01.pacbell.net [67.119.74.222]) by www.cryptography.com (8.12.8/8.12.8) with ESMTP id j12K3oWk031180 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 2 Feb 2005 12:03:51 -0800 Message-ID: <42013223.4080704@root.org> From: Nate Lawson User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Colin Percival References: <41FFB53B.3020907@root.org> <42012739.9080501@freebsd.org> In-Reply-To: <42012739.9080501@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on elvis.mu.org X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.1 X-Spam-Level: Cc: acpi@freebsd.org, current@freebsd.org Subject: Re: New cpufreq framework and drivers X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 01:03:08 -0000 X-Original-Date: Wed, 02 Feb 2005 12:03:47 -0800 X-List-Received-Date: Sun, 03 Jul 2005 01:03:08 -0000 Colin Percival wrote: > Nate Lawson wrote: > >> Hardware drivers are of two types, absolute >> and relative. SpeedStep, Powernow, etc. are absolute drivers in that >> they set the cpu's base frequency. ACPI throttling, Longrun, etc. are >> relative drivers that reduce the processor's clock to a fraction of >> its current base (i.e., they have an additive effect.) > > > If my first glance at the patch is correct, this would have my laptop (a > 1.4GHz > Pentium M) reporting the availability of the frequencies 600MHz, 800MHz, > etc. > from enhanced speedstep, along with the frequencies 300MHz, 400MHz, > 500MHz, and > 700MHz obtained via 50% clock throttling. That is correct. The code to support relative drivers was removed before posting to give the basic framework more testing before I commit it shortly. The relative support will go in soon after that code is committed. There are a lot of nuances that you'll see when I post the relative states patch. For instance, if a state has the same frequency of another state, the one with the lower power consumption is preferred. > While this in itself is entirely valid, a clock speed of 700MHz obtained by > running the processor at 1400MHz with a 50% "duty cycle" would draw more > power > than a clock speed of 800MHz obtained by running the processor at 800MHz > with > a lower voltage; is there any mechanism to inform userland daemons of such > oddities? I would hate to see a daemon lowering the clock speed from > 800MHz > to 700MHz in an attempt to save power... If you look at the kernel interface (sys/sys/cpu.h, struct cf_setting), you'll see that frequency, power, latency, and other values are available. The user sysctl interface exports frequency/power values as follows: dev.cpu.0.freq=733 dev.cpu.0.freq_levels=1000/18200 733/15100 That is Mhz and mW, respectively. With synthetic states (ones derived from a base absolute frequency and a modifying relative frequency), the cpufreq framework builds a power estimate. For example, a level comprised of 1400 Mhz at 20000 mW and a 50% relative setting would have an exported power of 10000 mW since relative drivers give a linear reduction in power consumption. Your absolute setting of 800 Mhz would likely have a lower power level and so any daemon should take that into consideration. -- Nate _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 01:03:10 2005 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3FBD316A807; Sun, 3 Jul 2005 01:02:46 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id BB74344CEC; Sun, 3 Jul 2005 00:54:34 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 0892161F36; Sat, 2 Jul 2005 17:19:01 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id 80A4D5C985; Wed, 9 Feb 2005 07:42:34 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 4545556B1C; Wed, 9 Feb 2005 15:42:26 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 485BA16A4F7; Wed, 9 Feb 2005 15:42:24 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 29B6816A4CE; Wed, 9 Feb 2005 15:42:20 +0000 (GMT) Received: from www.portaone.com (web.portaone.com [195.70.151.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 609D943D1D; Wed, 9 Feb 2005 15:42:19 +0000 (GMT) (envelope-from sobomax@portaone.com) Received: from [192.168.1.26] (SIRIUS-ats227-UTC.ukrtel.net [195.5.25.154]) (authenticated bits=0) by www.portaone.com (8.12.11/8.12.11) with ESMTP id j19FgDNt015050 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 9 Feb 2005 16:42:15 +0100 (CET) (envelope-from sobomax@portaone.com) Message-ID: <420A2F47.1070907@portaone.com> From: Maxim Sobolev Organization: Porta Software Ltd User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Nate Lawson References: <42068A5C.1030300@root.org> <420757AD.9060603@portaone.com> <420904CD.7070405@root.org> In-Reply-To: <420904CD.7070405@root.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.80/685/Wed Jan 26 10:08:24 2005 clamav-milter version 0.80j on www.portaone.com X-Virus-Status: Clean X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on elvis.mu.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.0.1 X-Spam-Level: Cc: acpi@freebsd.org, current@freebsd.org Subject: Re: HEADSUP: cpufreq import complete, acpi_throttling changed X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 01:03:11 -0000 X-Original-Date: Wed, 09 Feb 2005 17:41:59 +0200 X-List-Received-Date: Sun, 03 Jul 2005 01:03:11 -0000 Nate Lawson wrote: > Maxim Sobolev wrote: > >> Great! It would be nice if you can document this new facility in the >> Handbook, since it is likely to be of interest for very large >> percentage of FreeBSD users. Also, it should be mentioned in the >> release notes. > > > Man page committed so no one has an excuse to avoid updating their > drivers. ;-) The man page may be improved more over time, but the > interfaces needed to update drivers are completely documented. I am not talking about API documentation, but documentation on how to use the new framework to control power consumption/heat dissipation. This is crucial if you want cpufreq to be actually used by those FreeBSD users who don't read freebsd-current in general or have missed your post in particular. ;-) -Maxim _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 01:03:13 2005 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5DF4216B72D; Sun, 3 Jul 2005 01:02:46 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5326E44CF9; Sun, 3 Jul 2005 00:54:31 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 0E68861D2D; Sat, 2 Jul 2005 17:18:47 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id 1AF365CA14; Mon, 7 Feb 2005 05:12:21 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id C7ADF569E3; Mon, 7 Feb 2005 13:10:49 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 3E85D16A5FF; Mon, 7 Feb 2005 13:10:04 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DD74A16A4CE for ; Mon, 7 Feb 2005 00:08:32 +0000 (GMT) Received: from ank-pki.ru (mercury.ank-pki.ru [213.170.76.146]) by mx1.FreeBSD.org (Postfix) with ESMTP id ACF2043D39 for ; Mon, 7 Feb 2005 00:08:31 +0000 (GMT) (envelope-from toxa@cterra.ru) Received: (qmail 46637 invoked by uid 0); 7 Feb 2005 03:08:19 +0300 Received: from toxa@cterra.ru by mercury.ank-pki.ru by uid 0 with qmail-scanner-1.22 (spamassassin: 3.0.2. Clear:RC:0(62.89.204.62):SA:0(?/?):. Processed in 11.3972 secs); 07 Feb 2005 00:08:19 -0000 Received: from unknown (HELO localhost) (toxa@62.89.204.62) by mail.ank-pki.ru with SMTP; 7 Feb 2005 03:08:07 +0300 From: "Anton A. Karpov" To: current@freebsd.org, acpi@freebsd.org X-Comment-To: "Anton A. Karpov" Message-ID: <20050207000604.GA4385@laptoxa.toxa.lan> Mail-Followup-To: current@freebsd.org, acpi@freebsd.org References: <42068A5C.1030300@root.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <42068A5C.1030300@root.org> User-Agent: Outluck Express 1.5.6i for MS-DOS 6.22-SMP X-Mailer: See User-Agent above :) X-Operating-System: MS-DOS 6.22-CURRENT on Sony VAIO laptop X-PGP-Public-Key: http://toxahost.ru/gpg/pubkey.asc X-Useless-Header: Do Androids Dream of Electric Sheep? X-Mailman-Approved-At: Mon, 07 Feb 2005 13:09:50 +0000 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on elvis.mu.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.0.1 X-Spam-Level: Cc: Subject: Re: HEADSUP: cpufreq import complete, acpi_throttling changed X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 01:03:16 -0000 X-Original-Date: Mon, 7 Feb 2005 03:06:04 +0300 X-List-Received-Date: Sun, 03 Jul 2005 01:03:16 -0000 On Sun, Feb 06, 2005 at 01:21:32PM -0800, Nate Lawson wrote: > I've finished the major work of importing cpufreq. As part of this, the > sysctls for acpi throttling have been removed. The power_profile script > has been updated, so you can use performance/economy_cpu_freq= in > rc.conf to set AC on/offline cpu frequencies. The acpi throttling > support has been compiled into acpi_perf.ko so load that to get > throttling. Do a sysctl dev.cpu to get an understanding of the cpufreq > sysctls. > > If you have throttling, please test the new configuration to be sure it > still works as before. Final upcoming work will be manpage support and > bugfixing as necessary. > MY laptop has CPU: Mobile Intel(R) Pentium(R) 4 - M CPU 2.00GHz (1988.52-MHz 686-class CPU). I've tested tx states with the following script: #!/bin/sh freq_levels=`sysctl dev.cpu.0.freq_levels|cut -d : -f 2|sed -e 's/\/-1//g'` echo "Supported freq levels are: ${freq_levels}" for i in ${freq_levels} do echo "[=== Results testing [$i] freq level ===]" sysctl dev.cpu.0.freq=$i 1> /dev/null openssl speed blowfish done Here is some output: Supported freq levels are: 1991 1742 1493 1244 1196 1046 995 897 746 598 497 448 299 248 149 [=== Results testing [1991] freq level ===] type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes blowfish cbc 44067.47k 46774.97k 46975.74k 47349.96k 47353.11k ... [=== Results testing [1196] freq level ===] type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes blowfish cbc 26456.76k 27924.48k 28192.14k 28336.50k 28410.68k ... [=== Results testing [149] freq level ===] type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes blowfish cbc 2541.21k 2660.68k 2731.58k 2720.56k 2720.05k It seems to work. By the way, what does /-1 mean, in dev.cpu.0.freq_levels output? -- Anton A. Karpov PGP key: http://www.toxahost.ru/pgp/pubkey.asc =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~= Contrary to popular belief, Unix is user friendly. It just happens to be very selective about who it decides to make friends with. /* no comment */ =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~= _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 01:03:17 2005 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5BCD716B75C; Sun, 3 Jul 2005 01:02:47 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 310E345456; Sun, 3 Jul 2005 00:54:39 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 0F01A62121; Sat, 2 Jul 2005 17:19:24 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id C367C5C900; Tue, 15 Feb 2005 09:24:40 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 2662E56946; Tue, 15 Feb 2005 17:24:15 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id B86DA16A4E6; Tue, 15 Feb 2005 17:24:13 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7DFF416A4CE; Tue, 15 Feb 2005 17:24:08 +0000 (GMT) Received: from www.cryptography.com (li-22.members.linode.com [64.5.53.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 37AE143D41; Tue, 15 Feb 2005 17:24:08 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.0.5.51] (adsl-64-171-186-189.dsl.snfc21.pacbell.net [64.171.186.189]) by www.cryptography.com (8.12.8/8.12.8) with ESMTP id j1FHO7Zj030026 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 15 Feb 2005 09:24:07 -0800 Message-ID: <42123035.50009@root.org> From: Nate Lawson User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jiawei Ye References: <20050213231306.376E05D07@ptavv.es.net> <420FE3C7.6020003@root.org> <20050214152319.bqxon1xk0g008s4k@netchild.homeip.net> <4210D155.6080706@root.org> <4211A8DD.4010406@root.org> <42122489.4030705@root.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on elvis.mu.org X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.1 X-Spam-Level: Cc: acpi@freebsd.org, Alexander Leidinger , current@freebsd.org Subject: Re: HEADSUP: cpufreq import complete, acpi_throttling changed X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 01:03:17 -0000 X-Original-Date: Tue, 15 Feb 2005 09:24:05 -0800 X-List-Received-Date: Sun, 03 Jul 2005 01:03:17 -0000 Jiawei Ye wrote: > On Tue, 15 Feb 2005 08:34:17 -0800, Nate Lawson wrote: > >>>dev.cpu.0.freq_levels: 1818/-1 1590/-1 1363/-1 1136/-1 909/-1 681/-1 >>>454/-1 227/-1 >> >>I don't know, what's your CPUs actual full speed clock rate? Your >>system only has throttling so the only way to get those levels is to >>estimate the full speed rate and derive the rest from it. I'm working >>to make the estimate more correct in the future, but the current code >>should be right +/- a few Mhz. >> >>-- >>Nate > > Sorry I didn't make myself clear. I was referring to the '-1'. It used > to be 0 there. Yeah, that was part of something I corrected and is right. The power is set to -1 which is "I don't know." Without a base power to derive from, there's no way to know how much each state saves you. Once the Enhanced SpeedStep driver is committed, you'll have more settings and also known power values. So it looks like your system is working just fine. -- Nate _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 01:03:17 2005 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 231EB16B772; Sun, 3 Jul 2005 01:02:48 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id C0ED144CE1; Sun, 3 Jul 2005 00:54:39 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 0BF8B62106; Sat, 2 Jul 2005 17:19:23 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id E10375C98B; Tue, 15 Feb 2005 08:36:48 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 06F815699B; Tue, 15 Feb 2005 16:36:33 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 2867716A4ED; Tue, 15 Feb 2005 16:36:32 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6E4A416A4CE for ; Tue, 15 Feb 2005 16:36:27 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.200]) by mx1.FreeBSD.org (Postfix) with ESMTP id D0EFA43D2F for ; Tue, 15 Feb 2005 16:36:26 +0000 (GMT) (envelope-from leafy7382@gmail.com) Received: by rproxy.gmail.com with SMTP id 34so44781rns for ; Tue, 15 Feb 2005 08:36:25 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=W9796Mowf6GRB65YcRZ+uEIe19Pl4O1/qVXOo72aDcH2b5ktbIylnP/E6QKSrkZhfFISCSK4TGvS68jgPY4ro558lsgBjnyAzi1cbgvIW0LhXQO4NEfpPZO+4rQYPx5bfWDghiUFWY81TWY6KcKUTANmRY74YhJqL6oFN8qKVfM= Received: by 10.38.179.80 with SMTP id b80mr30844rnf; Tue, 15 Feb 2005 08:36:25 -0800 (PST) Received: by 10.38.8.9 with HTTP; Tue, 15 Feb 2005 08:36:25 -0800 (PST) Message-ID: From: Jiawei Ye To: Nate Lawson In-Reply-To: <42122489.4030705@root.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <20050213231306.376E05D07@ptavv.es.net> <420FE3C7.6020003@root.org> <20050214152319.bqxon1xk0g008s4k@netchild.homeip.net> <4210D155.6080706@root.org> <4211A8DD.4010406@root.org> <42122489.4030705@root.org> X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on elvis.mu.org X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_BY_IP autolearn=ham version=3.0.1 X-Spam-Level: Cc: acpi@freebsd.org, Alexander Leidinger , current@freebsd.org Subject: Re: HEADSUP: cpufreq import complete, acpi_throttling changed X-BeenThere: freebsd-acpi@freebsd.org Reply-To: Jiawei Ye List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 01:03:18 -0000 X-Original-Date: Wed, 16 Feb 2005 00:36:25 +0800 X-List-Received-Date: Sun, 03 Jul 2005 01:03:18 -0000 On Tue, 15 Feb 2005 08:34:17 -0800, Nate Lawson wrote: > > dev.cpu.0.freq_levels: 1818/-1 1590/-1 1363/-1 1136/-1 909/-1 681/-1 > > 454/-1 227/-1 > > I don't know, what's your CPUs actual full speed clock rate? Your > system only has throttling so the only way to get those levels is to > estimate the full speed rate and derive the rest from it. I'm working > to make the estimate more correct in the future, but the current code > should be right +/- a few Mhz. > > -- > Nate Sorry I didn't make myself clear. I was referring to the '-1'. It used to be 0 there. Jiawei -- "Without the userland, the kernel is useless." --inspired by The Tao of Programming _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 01:03:13 2005 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9C56B16AC9B; Sun, 3 Jul 2005 01:02:46 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0EA2C44CFF; Sun, 3 Jul 2005 00:54:34 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 0696161F0F; Sat, 2 Jul 2005 17:18:59 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id 012425C981; Wed, 9 Feb 2005 10:44:52 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 5FD6E572FE; Wed, 9 Feb 2005 18:44:45 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 0CC0E16A4FF; Wed, 9 Feb 2005 18:44:43 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CB2B916A4CE; Wed, 9 Feb 2005 18:44:37 +0000 (GMT) Received: from www.cryptography.com (li-22.members.linode.com [64.5.53.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8DF7343D1D; Wed, 9 Feb 2005 18:44:37 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.0.0.34] (adsl-67-119-74-222.dsl.sntc01.pacbell.net [67.119.74.222]) by www.cryptography.com (8.12.8/8.12.8) with ESMTP id j19IiaWk031621 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 9 Feb 2005 10:44:36 -0800 Message-ID: <420A5A13.1020402@root.org> From: Nate Lawson User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jung-uk Kim References: <42068A5C.1030300@root.org> <200502081743.24169.jkim@niksun.com> In-Reply-To: <200502081743.24169.jkim@niksun.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on elvis.mu.org X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.1 X-Spam-Level: Cc: freebsd-acpi@freebsd.org, freebsd-current@freebsd.org Subject: Re: HEADSUP: cpufreq import complete, acpi_throttling changed X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 01:03:18 -0000 X-Original-Date: Wed, 09 Feb 2005 10:44:35 -0800 X-List-Received-Date: Sun, 03 Jul 2005 01:03:18 -0000 Jung-uk Kim wrote: > > I ported Athlon 64's Cool'n'Quiet part of 'acpi_ppc' to the cpufreq > interface. This is really quick-and-dirty version (i. e., lots of > cut-and-paste's from acpi_perf and acpi_ppc) but it seems to work. > The original driver is available from here: > > http://www.spa.is.uec.ac.jp/~nfukuda/software/ Thanks, that's very quick of you. I want to coordinate with Bruno Ducrot and his powernow driver to be sure we don't overlap efforts. In terms of code duplication, I'm working on some changes to acpi_perf to allow it to be used as a source of information without directly linking to it. That would allow powernow and cnq to be truly standalone. I'll finish that and then get back to you. -- Nate _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 01:04:02 2005 Return-Path: X-Original-To: freebsd-acpi@FreeBSD.org Delivered-To: freebsd-acpi@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7ECC616B913; Sun, 3 Jul 2005 01:03:17 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5C0ED45562; Sun, 3 Jul 2005 00:56:17 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 100A6615E6; Sat, 2 Jul 2005 17:17:24 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id AF1C45C773; Wed, 12 Jan 2005 13:15:35 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 934FD56C75; Wed, 12 Jan 2005 21:14:54 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 12E4E16A4FC; Wed, 12 Jan 2005 21:14:51 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8195B16A4D0 for ; Wed, 12 Jan 2005 21:14:46 +0000 (GMT) Received: from mail3.speakeasy.net (mail3.speakeasy.net [216.254.0.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD58143D39 for ; Wed, 12 Jan 2005 21:14:45 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 1923 invoked from network); 12 Jan 2005 21:14:45 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 12 Jan 2005 21:14:45 -0000 Received: from [10.50.41.243] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id j0CLEcLn027907; Wed, 12 Jan 2005 16:14:41 -0500 (EST) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-acpi@FreeBSD.org User-Agent: KMail/1.6.2 References: <20050111202452.GK795@darkness.comp.waw.pl> <200501121442.02702.jhb@FreeBSD.org> <200501121506.50867.jhb@FreeBSD.org> In-Reply-To: <200501121506.50867.jhb@FreeBSD.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200501121615.23209.jhb@FreeBSD.org> X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on elvis.mu.org X-Spam-Status: No, score=-6.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.1 X-Spam-Level: Cc: acpi@FreeBSD.org, freebsd-current@FreeBSD.org, Pawel Jakub Dawidek Subject: Re: Intel SHG2 and ACPI problems. X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 01:04:02 -0000 X-Original-Date: Wed, 12 Jan 2005 16:15:23 -0500 X-List-Received-Date: Sun, 03 Jul 2005 01:04:02 -0000 On Wednesday 12 January 2005 03:06 pm, John Baldwin wrote: > On Wednesday 12 January 2005 02:42 pm, John Baldwin wrote: > > On Tuesday 11 January 2005 05:40 pm, Pawel Jakub Dawidek wrote: > > > On Tue, Jan 11, 2005 at 02:16:06PM -0800, Nate Lawson wrote: > > > +> Pawel Jakub Dawidek wrote: > > > +> >I had problems with ACPI on Intel SHG2 motherboard. > > > +> >I made a patch with works for me just fine. Could you, Nate, verify > > > it +> >and commit if it is ok. > > > +> >If you need some more info, just ask. > > > +> > > > > +> > http://people.freebsd.org/~pjd/patches/acpi_pci_link.c.patch > > > +> > > > +> John mentioned that it appears the root problem is that _CRS is > > > failing +> for you. Can you send a dmesg from a broken boot (without > > > your patch)? > > > > > > Here you go: > > > > > > http://people.freebsd.org/~pjd/misc/boot-v1.txt > > > > Ok, this is a rather large patch as allowing for a b0rked _CRS required a > > good bit of work. I've only compile tested it and haven't run tested it > > so far, so beware. Note that it does include fixes for some bugs related > > to ExtIRQ routing (I wrote the irq to the wrong resource structure :( ) > > and to parsing the buffer we handed to _SRS (end pointer was wrong so I > > probably only ever parsed the first resource, which is the common case, > > so this probably didn't affect anyone). > > Gee, patch would help: > > [snip] Please ignore changes in this patch to files other than acpi_pci_link.c, sorry. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 01:04:02 2005 Return-Path: X-Original-To: acpi@FreeBSD.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7ECC616B913; Sun, 3 Jul 2005 01:03:17 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5C0ED45562; Sun, 3 Jul 2005 00:56:17 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 100A6615E6; Sat, 2 Jul 2005 17:17:24 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id AF1C45C773; Wed, 12 Jan 2005 13:15:35 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 934FD56C75; Wed, 12 Jan 2005 21:14:54 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 12E4E16A4FC; Wed, 12 Jan 2005 21:14:51 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8195B16A4D0 for ; Wed, 12 Jan 2005 21:14:46 +0000 (GMT) Received: from mail3.speakeasy.net (mail3.speakeasy.net [216.254.0.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD58143D39 for ; Wed, 12 Jan 2005 21:14:45 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 1923 invoked from network); 12 Jan 2005 21:14:45 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 12 Jan 2005 21:14:45 -0000 Received: from [10.50.41.243] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id j0CLEcLn027907; Wed, 12 Jan 2005 16:14:41 -0500 (EST) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-acpi@FreeBSD.org User-Agent: KMail/1.6.2 References: <20050111202452.GK795@darkness.comp.waw.pl> <200501121442.02702.jhb@FreeBSD.org> <200501121506.50867.jhb@FreeBSD.org> In-Reply-To: <200501121506.50867.jhb@FreeBSD.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200501121615.23209.jhb@FreeBSD.org> X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on elvis.mu.org X-Spam-Status: No, score=-6.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.1 X-Spam-Level: Cc: acpi@FreeBSD.org, freebsd-current@FreeBSD.org, Pawel Jakub Dawidek Subject: Re: Intel SHG2 and ACPI problems. X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 01:04:02 -0000 X-Original-Date: Wed, 12 Jan 2005 16:15:23 -0500 X-List-Received-Date: Sun, 03 Jul 2005 01:04:02 -0000 On Wednesday 12 January 2005 03:06 pm, John Baldwin wrote: > On Wednesday 12 January 2005 02:42 pm, John Baldwin wrote: > > On Tuesday 11 January 2005 05:40 pm, Pawel Jakub Dawidek wrote: > > > On Tue, Jan 11, 2005 at 02:16:06PM -0800, Nate Lawson wrote: > > > +> Pawel Jakub Dawidek wrote: > > > +> >I had problems with ACPI on Intel SHG2 motherboard. > > > +> >I made a patch with works for me just fine. Could you, Nate, verify > > > it +> >and commit if it is ok. > > > +> >If you need some more info, just ask. > > > +> > > > > +> > http://people.freebsd.org/~pjd/patches/acpi_pci_link.c.patch > > > +> > > > +> John mentioned that it appears the root problem is that _CRS is > > > failing +> for you. Can you send a dmesg from a broken boot (without > > > your patch)? > > > > > > Here you go: > > > > > > http://people.freebsd.org/~pjd/misc/boot-v1.txt > > > > Ok, this is a rather large patch as allowing for a b0rked _CRS required a > > good bit of work. I've only compile tested it and haven't run tested it > > so far, so beware. Note that it does include fixes for some bugs related > > to ExtIRQ routing (I wrote the irq to the wrong resource structure :( ) > > and to parsing the buffer we handed to _SRS (end pointer was wrong so I > > probably only ever parsed the first resource, which is the common case, > > so this probably didn't affect anyone). > > Gee, patch would help: > > [snip] Please ignore changes in this patch to files other than acpi_pci_link.c, sorry. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 01:04:06 2005 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 830F816B98B; Sun, 3 Jul 2005 01:03:28 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8EC6545581; Sun, 3 Jul 2005 00:56:34 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 1A97A6200C; Sat, 2 Jul 2005 17:19:20 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id D45395C8EF; Sun, 13 Feb 2005 15:13:21 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 250B356A66; Sun, 13 Feb 2005 23:13:19 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id A84EB16A510; Sun, 13 Feb 2005 23:13:12 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BC95616A4CE; Sun, 13 Feb 2005 23:13:07 +0000 (GMT) Received: from postal1.es.net (postal1.es.net [198.128.3.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 891F143D39; Sun, 13 Feb 2005 23:13:07 +0000 (GMT) (envelope-from oberman@es.net) Received: from ptavv.es.net ([198.128.4.29]) by postal1.es.net (Postal Node 1) with ESMTP (SSL) id IBA74465; Sun, 13 Feb 2005 15:13:07 -0800 Received: from ptavv (localhost [127.0.0.1]) by ptavv.es.net (Tachyon Server) with ESMTP id 376E05D07; Sun, 13 Feb 2005 15:13:06 -0800 (PST) To: Nate Lawson In-reply-to: Your message of "Sun, 06 Feb 2005 13:21:32 PST." <42068A5C.1030300@root.org> From: "Kevin Oberman" Message-Id: <20050213231306.376E05D07@ptavv.es.net> X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on elvis.mu.org X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.1 X-Spam-Level: Cc: acpi@freebsd.org, current@freebsd.org Subject: Re: HEADSUP: cpufreq import complete, acpi_throttling changed X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 01:04:06 -0000 X-Original-Date: Sun, 13 Feb 2005 15:13:06 -0800 X-List-Received-Date: Sun, 03 Jul 2005 01:04:06 -0000 > Date: Sun, 06 Feb 2005 13:21:32 -0800 > From: Nate Lawson > Sender: owner-freebsd-acpi@freebsd.org > > I've finished the major work of importing cpufreq. As part of this, the > sysctls for acpi throttling have been removed. The power_profile script > has been updated, so you can use performance/economy_cpu_freq= in > rc.conf to set AC on/offline cpu frequencies. The acpi throttling > support has been compiled into acpi_perf.ko so load that to get > throttling. Do a sysctl dev.cpu to get an understanding of the cpufreq > sysctls. > > If you have throttling, please test the new configuration to be sure it > still works as before. Final upcoming work will be manpage support and > bugfixing as necessary. On my T30, throttling has simply vanished. Kernel sources as of this afternoon at about 11:00 PST. Id Refs Address Size Name 1 24 0xc0400000 3ba9c4 kernel 2 1 0xc07bb000 1e4b0 if_wi.ko 3 1 0xc07da000 4ce4 acpi_video.ko 4 18 0xc07df000 53650 acpi.ko 5 1 0xc0833000 32a0 cpufreq.ko 6 1 0xc0837000 3b8c acpi_ibm.ko 7 1 0xc083b000 49c0 acpi_perf.ko 8 1 0xc0840000 2ca8 wlan_wep.ko 9 1 0xc1d04000 a000 ntfs.ko 10 1 0xc1d83000 6000 linprocfs.ko 11 1 0xc1d89000 15000 linux.ko 12 1 0xc1dab000 3000 fdescfs.ko 13 1 0xc1e54000 3000 daemon_saver.ko sysctl hw.acpi does not list any throttling entries at all. It does list an amazing number of frequency settings, but only 1800 and 1200 seem to actually work. Perhaps the others are derived by mixing the two capabilities? On the earlier versions of cpufreq I was getting only the two frequencies listed along with the 8 throttling states. Did I miss a message on this? I am especially concerned because my CPU is now running VERY hot when busy. It never used to exceed about 180F and now it quickly jumps to 190+ when the system is working (such as a buildkernel). Since it was previously running without throttling, I don't understand why things are suddenly worse. Any idea on what is happening? I don't want to fry my T30. dmesg and config available on request. -- 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 _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 3 01:04:07 2005 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BA7E016B722; Sun, 3 Jul 2005 01:03:28 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC3EA45582; Sun, 3 Jul 2005 00:56:34 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 15FDE62108; Sat, 2 Jul 2005 17:19:23 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id BA6575C9CA; Tue, 15 Feb 2005 08:35:28 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 626C557171; Tue, 15 Feb 2005 16:34:27 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id CC3DA16A4F0; Tue, 15 Feb 2005 16:34:24 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E7F6C16A4CE; Tue, 15 Feb 2005 16:34:19 +0000 (GMT) Received: from www.cryptography.com (li-22.members.linode.com [64.5.53.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id A410443D2D; Tue, 15 Feb 2005 16:34:19 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.0.5.51] (adsl-64-171-186-189.dsl.snfc21.pacbell.net [64.171.186.189]) by www.cryptography.com (8.12.8/8.12.8) with ESMTP id j1FGYIZj029166 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 15 Feb 2005 08:34:18 -0800 Message-ID: <42122489.4030705@root.org> From: Nate Lawson User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jiawei Ye References: <20050213231306.376E05D07@ptavv.es.net> <420FE3C7.6020003@root.org> <20050214152319.bqxon1xk0g008s4k@netchild.homeip.net> <4210D155.6080706@root.org> <4211A8DD.4010406@root.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on elvis.mu.org X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.1 X-Spam-Level: Cc: acpi@freebsd.org, Alexander Leidinger , current@freebsd.org Subject: Re: HEADSUP: cpufreq import complete, acpi_throttling changed X-BeenThere: freebsd-acpi@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 01:04:07 -0000 X-Original-Date: Tue, 15 Feb 2005 08:34:17 -0800 X-List-Received-Date: Sun, 03 Jul 2005 01:04:07 -0000 Jiawei Ye wrote: > On Mon, 14 Feb 2005 23:46:37 -0800, Nate Lawson wrote: > >>I just committed a patch that may fix this issue. >> >>-- >>Nate >> > > Does this look right to you? > > leafy@chihiro:~$ sysctl dev.cpu > dev.cpu.0.%desc: ACPI CPU > dev.cpu.0.%driver: cpu > dev.cpu.0.%location: handle=\_PR_.CPU1 > dev.cpu.0.%pnpinfo: _HID=none _UID=0 > dev.cpu.0.%parent: acpi0 > dev.cpu.0.freq: 1818 > dev.cpu.0.freq_levels: 1818/-1 1590/-1 1363/-1 1136/-1 909/-1 681/-1 > 454/-1 227/-1 I don't know, what's your CPUs actual full speed clock rate? Your system only has throttling so the only way to get those levels is to estimate the full speed rate and derive the rest from it. I'm working to make the estimate more correct in the future, but the current code should be right +/- a few Mhz. -- Nate _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Mon Jul 4 11:02:02 2005 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CB84716A41F for ; Mon, 4 Jul 2005 11:02:02 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E90F43D53 for ; Mon, 4 Jul 2005 11:02:02 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j64B22Ug034434 for ; Mon, 4 Jul 2005 11:02:02 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j64B21or034423 for freebsd-acpi@freebsd.org; Mon, 4 Jul 2005 11:02:01 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 4 Jul 2005 11:02:01 GMT Message-Id: <200507041102.j64B21or034423@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: freebsd-acpi@FreeBSD.org Cc: Subject: Current problem reports assigned to you 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, 04 Jul 2005 11:02:03 -0000 Current FreeBSD problem reports Critical problems Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2003/07/22] i386/54756 acpi ACPI suspend/resume problem on CF-W2 lapt o [2003/08/17] i386/55661 acpi ACPI suspend/resume problem on ARMADA M70 o [2003/08/20] kern/55822 acpi No ACPI power off with SMP kernel o [2003/08/27] kern/56024 acpi ACPI suspend drains battery while in S3 o [2003/09/03] i386/56372 acpi acpi don't work on TYAN tiger100 M/B f [2003/09/10] kern/56659 acpi ACPI trouble on IBM ThinkPad X31 f [2003/12/17] i386/60317 acpi FreeBSD 5.2rc1 doesn't boot with ACPI ena f [2004/03/02] kern/63666 acpi [acpi] Network card 3c575B do not work af o [2004/03/09] i386/64002 acpi acpi problem o [2004/05/27] i386/67273 acpi [hang] system hangs with acpi and Xfree o [2004/10/12] i386/72566 acpi ACPI, FreeBSD disables fan on Compaq Arma o [2005/03/21] i386/79080 acpi acpi thermal changes freezes HP nx6110 o [2005/03/21] i386/79081 acpi ACPI suspend/resume not working on HP nx6 13 problems total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- f [2004/01/22] i386/61703 acpi ACPI + Sound + Boot = Reboot o [2004/03/17] kern/64365 acpi ACPI problems f [2004/05/25] i386/67189 acpi ACPI S3 reboot computer on Dell Latitude o [2004/05/28] kern/67309 acpi zzz reboot computer (ACPI S3) f [2004/06/23] i386/68219 acpi ACPI + snd_maestro3 problem o [2004/07/29] i386/69750 acpi Boot without ACPI failed on ASUS L5 o [2004/11/11] i386/73822 acpi acpi / thermal support o [2004/11/11] kern/73823 acpi acpi / power-on by timer support o [2004/11/17] kern/74030 acpi Unplugging AC causes battery % to stay lo o [2004/11/21] kern/74215 acpi [request] add ACPI headers to /usr/includ o [2005/05/09] kern/80815 acpi ACPI(pci_link) problem in 5.4-STABLE: TIM 11 problems total. From owner-freebsd-acpi@FreeBSD.ORG Mon Jul 4 13:02:12 2005 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 05B9216A41C for ; Mon, 4 Jul 2005 13:02:12 +0000 (GMT) (envelope-from ducrot@poupinou.org) Received: from poup.poupinou.org (poup.poupinou.org [195.101.94.96]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8A2A543D48 for ; Mon, 4 Jul 2005 13:02:11 +0000 (GMT) (envelope-from ducrot@poupinou.org) Received: from ducrot by poup.poupinou.org with local (Exim) id 1DpQaI-0008Ur-00; Mon, 04 Jul 2005 15:02:02 +0200 Date: Mon, 4 Jul 2005 15:02:01 +0200 To: mgedv online Message-ID: <20050704130201.GA32646@poupinou.org> References: <20050701170910.9FCB5186800@mgedv.at> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20050701170910.9FCB5186800@mgedv.at> User-Agent: Mutt/1.5.6+20040907i From: Bruno Ducrot Cc: freebsd-acpi@freebsd.org Subject: Re: hp proliant acpi 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, 04 Jul 2005 13:02:12 -0000 On Fri, Jul 01, 2005 at 07:09:12PM +0200, mgedv online wrote: > > hi guys, > > reading the sysctl-tz0 values for my DL320 i get strange values like > "hw.acpi.thermal.tz0.temperature: 8.3C". > > machine is a HP Proliant DL320 G2, latest BIOS loaded. > current room-temp. is ~25°C. > > if i try "sysctl -b hw.acpi.thermal.tz0.temperature | od -X" i get > the result "0xAFF" (dec. 2.815K). this matches the strange 8.3°C. ... ... > # acpidump -d -t -v ... > Scope (\_TZ) > { > Name (\TEMP, 0x0AFF) > ThermalZone (THM0) > { > Name (_TSP, 0x3C) > Name (_TC1, 0x04) > Name (_TC2, 0x04) > Name (_PSL, Package (0x01) > { > \_PR.CPU0 > }) > Method (_PSV, 0, NotSerialized) > { > Store ("_PSV Method", Debug) > Return (0x0B0E) > } > > Method (_SCP, 1, NotSerialized) > { > Notify (\_TZ.THM0, 0x81) > } > > Method (_TMP, 0, NotSerialized) > { > Store ("_TMP Method", Debug) > Return (\TEMP) As you can see, this Method (_TMP()) always return the value given by \TEMP, but \TEMP is updated nowhere (grepping \TEMP throughout that dump reveal there isn't any other reference). Therefore, the value returned by this method give always 0xaff. Unfortunately, we can't help you there. Maybe you may want to check if by chance any other methods will work (IPMI)? Cheers, -- Bruno Ducrot -- Which is worse: ignorance or apathy? -- Don't know. Don't care. From owner-freebsd-acpi@FreeBSD.ORG Thu Jul 7 01:07:07 2005 Return-Path: X-Original-To: acpi@FreeBSD.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5D97616A41C; Thu, 7 Jul 2005 01:07:07 +0000 (GMT) (envelope-from nate@root.org) Received: from www.cryptography.com (li-22.members.linode.com [64.5.53.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1283443D48; Thu, 7 Jul 2005 01:07:07 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.0.0.34] (adsl-67-119-74-222.dsl.sntc01.pacbell.net [67.119.74.222]) by www.cryptography.com (8.12.8/8.12.8) with ESMTP id j67175o5026248 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 6 Jul 2005 18:07:06 -0700 Message-ID: <42CC7E67.50401@root.org> Date: Wed, 06 Jul 2005 17:59:19 -0700 From: Nate Lawson User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Hajimu UMEMOTO References: <42CB0369.1000701@root.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: acpi@FreeBSD.org, takawata@FreeBSD.org Subject: passive cooling and cpufreq 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: Thu, 07 Jul 2005 01:07:07 -0000 Hajimu UMEMOTO wrote: >> Nate Lawson said: > nate> ume@ showed a patch for passive cooling in usermode via powerd(8). I > nate> recommended he port it to acpi_thermal kernel mode. The cpufreq kernel > nate> interface (see cpufreq_if.m and cpufreq(4)) shows how to control CPU > nate> frequency from other kernel drivers. > > I made in-kernel version of passive cooling already, and it seems > working fine on my laptop: > > http://www.imasy.or.jp/~ume/FreeBSD/passive-cooling-20050703.diff > > However, there are some issue. > I added some funtions into kern_cpu.c and call them from > acpi_thermal.c directly. Perhaps, we should call cpufreq stuff via > acpi_perf to see _PSL for mapping between thermal zone and CPU. But, > acpi_perf doesn't appered on my CF-R4. It seems that > acpi_perf_attach() returns 0, but sc->info_only is on. Is it correct > behavior? > Further, there is conflict with userland, in short powerd(8). So, I > needed to modify cpufreq_curr_sysctl() to fake frequency. Instead, I > implemented to be able to obtain actuall frequency via > dev.cpu.0.realdreq. I have moved this email to acpi@ for general discussion. There is a much simpler way to access cpufreq(4) from the kernel that shouldn't require modifications. It exports newbus methods for controling the frequency. This kind of code should work: #include device_t cpufreq_dev; struct cf_level levels[CPUFREQ_MAX_LEVELS]; // or better, malloc int num_levels = CPUFREQ_MAX_LEVELS; // Find cpufreq0 device pointer cpufreq_dev = devclass_get_device(devclass_find("cpufreq"), 0); if (cpufreq_dev == NULL) return error, no passive cooling possible // Now find all possible levels error = CPUFREQ_LEVELS(cpufreq_dev, levels, &num_levels); if (error) free levels and return error, no supported freq control // Calculate target frequency based on _TC1 and _TC2 desired_freq = ... // Select appropriate level now, picking one that is "close enough" for (i = 0; i < num_levels; i++) { if (CPUFREQ_CMP(levels[i].total_set.freq, desired_freq)) break; } if (i == num_levels) problem, requested frequency not found.. round down to next? // Desired level found, now switch to it error = CPUFREQ_SET(cpufreq_dev, &levels[i], CPUFREQ_PRIO_KERN); That is all, simple eh? :) The cpufreq kernel interface wraps access to all cpufreq hardware drivers (acpi_perf, est, p4tcc, acpi_throttle, etc.) You only need to call methods on cpufreq0 and it will handle getting the desired frequency for you. See "man 4 cpufreq" for details. acpi_perf has two modes, one that supplies info only. If your BIOS only supports that mode, usually another driver like est will handle the actual hardware. Since cpufreq is smart and probes all possible cpu frequency control devices, parsing _PSL is not necessary. cpufreq(4) can actually use more devices than are present in _PSL. If needed in the future, acpi_perf can be linked with _PSL so that dependencies are known. Similar to the above code snippet, you can get the frequency from cpufreq0 via the CPUFREQ_GET() method. You shouldn't need to go through sysctl. There should be no conflict with userland. The above priority value (CPUFREQ_PRIO_KERN) specifies that this call overrides settings made previously (ie. via sysctl.) However, cpufreq(4) saves the old setting so that once the cooling condition passes, CPUFREQ_SET(dev, NULL, CPUFREQ_PRIO_KERN) can be used to restore it. -- Nate From owner-freebsd-acpi@FreeBSD.ORG Thu Jul 7 09:46:05 2005 Return-Path: X-Original-To: acpi@FreeBSD.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 30BC216A41C; Thu, 7 Jul 2005 09:46:05 +0000 (GMT) (envelope-from ume@mahoroba.org) Received: from ameno.mahoroba.org (gw4.mahoroba.org [218.45.22.175]) by mx1.FreeBSD.org (Postfix) with ESMTP id BAD0E43D53; Thu, 7 Jul 2005 09:46:03 +0000 (GMT) (envelope-from ume@mahoroba.org) Received: from localhost (IDENT:A75+tQgB3acS9yJQ6BlMhxLG/fAN7ykBxVw/2GJZox9tTIm1TTJqicRAg/Tpsf4c@localhost [IPv6:::1]) (user=ume mech=CRAM-MD5 bits=0) by ameno.mahoroba.org (8.13.3/8.13.3) with ESMTP/inet6 id j679juYE046504 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 7 Jul 2005 18:45:59 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Thu, 07 Jul 2005 18:45:56 +0900 Message-ID: From: Hajimu UMEMOTO To: Nate Lawson In-Reply-To: <42CC7E67.50401@root.org> References: <42CB0369.1000701@root.org> <42CC7E67.50401@root.org> User-Agent: xcite1.38> Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 Emacs/21.3 (i386--freebsd) MULE/5.0 (SAKAKI) X-Operating-System: FreeBSD 5.4-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 authentication, not delayed by milter-greylist-2.0 (ameno.mahoroba.org [IPv6:::1]); Thu, 07 Jul 2005 18:46:00 +0900 (JST) X-Virus-Scanned: by amavisd-new X-Virus-Status: Clean X-Spam-Status: No, score=-5.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on ameno.mahoroba.org Cc: acpi@FreeBSD.org, takawata@FreeBSD.org Subject: Re: passive cooling and cpufreq 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: Thu, 07 Jul 2005 09:46:05 -0000 Hi, >>>>> On Wed, 06 Jul 2005 17:59:19 -0700 >>>>> Nate Lawson said: nate> I have moved this email to acpi@ for general discussion. Okay, thanks. nate> There is a much simpler way to access cpufreq(4) from the kernel that nate> shouldn't require modifications. It exports newbus methods for nate> controling the frequency. This kind of code should work: nate> That is all, simple eh? :) The cpufreq kernel interface wraps access nate> to all cpufreq hardware drivers (acpi_perf, est, p4tcc, acpi_throttle, nate> etc.) You only need to call methods on cpufreq0 and it will handle nate> getting the desired frequency for you. See "man 4 cpufreq" for details. Oh, it's cool. I didn't know how to obtain cpufreq_dc from outside of kern_cpu.c. So, I added some functions into kern_cpu.c in my previous patch. However, it seems cpufreq_curr_sysctl() set frequency to all CPUs with some comment. Is it enough to set frequency to only one CPU? nate> acpi_perf has two modes, one that supplies info only. If your BIOS only nate> supports that mode, usually another driver like est will handle the nate> actual hardware. Since cpufreq is smart and probes all possible cpu nate> frequency control devices, parsing _PSL is not necessary. cpufreq(4) nate> can actually use more devices than are present in _PSL. If needed in nate> the future, acpi_perf can be linked with _PSL so that dependencies are nate> known. Thank you for clarification. nate> There should be no conflict with userland. The above priority value nate> (CPUFREQ_PRIO_KERN) specifies that this call overrides settings made nate> previously (ie. via sysctl.) However, cpufreq(4) saves the old setting nate> so that once the cooling condition passes, CPUFREQ_SET(dev, NULL, nate> CPUFREQ_PRIO_KERN) can be used to restore it. It's cool. But, I think it is insufficient. In passive cooling state, it appears that there is some room to raise frequency from powerd(8). So, powerd(8) tries to raise frequency continuously. I think it is not desired behavior. This is a reason why I modified cpufreq_curr_sysctl() in my previous patch to return faked value in passive cooling state. I made my new patch: http://www.imasy.or.jp/~ume/FreeBSD/passive-cooling-20050707.diff It doesn't modify kern_cpu.c. Instead, I added some code into powerd(8) to don't try to update frequency when hw.acpi.thermal.tz0.passive_active is on. And, I needed to ignore EPERM when updating dev.cpu.0.freq. 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 Sat Jul 9 12:13:16 2005 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A2E7B16A41C for ; Sat, 9 Jul 2005 12:13:16 +0000 (GMT) (envelope-from kuba@server.roztocze.com.pl) Received: from roztocze.com.pl (server.roztocze.com.pl [217.96.30.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id E950D43D45 for ; Sat, 9 Jul 2005 12:13:15 +0000 (GMT) (envelope-from kuba@server.roztocze.com.pl) Received: from server.roztocze.com.pl (localhost [127.0.0.1]) by roztocze.com.pl (8.13.4/8.13.4) with ESMTP id j69CDCWl005261 for ; Sat, 9 Jul 2005 14:13:12 +0200 Received: (from kuba@localhost) by server.roztocze.com.pl (8.13.4/8.13.4/Submit) id j69CDCcF021548 for freebsd-acpi@freebsd.org; Sat, 9 Jul 2005 14:13:12 +0200 Date: Sat, 9 Jul 2005 14:13:12 +0200 From: KubaTyszko To: freebsd-acpi@freebsd.org Message-ID: <20050709121312.GB30018@lbl.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2i X-Virus-Scanned: amavisd-new at roztocze.com.pl Subject: is anyone working on software suspend-to-disk and/or -current 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: Sat, 09 Jul 2005 12:13:16 -0000 radeon drivers ? Reply-To: kuba@lbl.pl hi. i am unappy owner of thinkpad t42 with rare issue with short suspend-to-ram time (drains battery in 10 hours - probably because of wrong radeon support. is anyone working on suspend-to-disk with software support ? (that would fix my problem a bit...) or fixing radeon support that suspent-to-ram would normally shut down the display and make my notebook sleep longer... thanks.