From owner-freebsd-acpi@FreeBSD.ORG Mon May 15 11:02:35 2006 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 95C9F16A401 for ; Mon, 15 May 2006 11:02:35 +0000 (UTC) (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 44E2F43D48 for ; Mon, 15 May 2006 11:02:35 +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.4/8.13.4) with ESMTP id k4FB2ZQZ075088 for ; Mon, 15 May 2006 11:02:35 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k4FB2XRs075078 for freebsd-acpi@freebsd.org; Mon, 15 May 2006 11:02:33 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 15 May 2006 11:02:33 GMT Message-Id: <200605151102.k4FB2XRs075078@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, 15 May 2006 11:02:35 -0000 Current FreeBSD problem reports Critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2006/03/01] i386/93963 acpi [panic] [patch] ACPI Panic with some ACPI 1 problem total. 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 [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 o [2005/04/28] i386/80426 acpi [APIC] [panic] 5.4-RC3 still panic when b o [2005/10/17] i386/87568 acpi [ACPI] [REGRESSION] 6.0-STABLE needs ACPI 11 problems total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2004/05/28] kern/67309 acpi zzz reboot computer (ACPI S3) o [2004/07/29] i386/69750 acpi Boot without ACPI failed on ASUS L5 o [2004/11/11] i386/73822 acpi [request] add thermal support to ACPI o [2004/11/11] kern/73823 acpi [feature request] acpi / power-on by time f [2004/11/17] kern/74030 acpi Unplugging AC causes battery % to stay lo 5 problems total. From owner-freebsd-acpi@FreeBSD.ORG Tue May 16 04:45:37 2006 Return-Path: X-Original-To: freebsd-acpi@hub.freebsd.org Delivered-To: freebsd-acpi@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC2EA16A426; Tue, 16 May 2006 04:45:37 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5186543D6D; Tue, 16 May 2006 04:45:34 +0000 (GMT) (envelope-from rodrigc@FreeBSD.org) Received: from freefall.freebsd.org (rodrigc@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k4G4jYJe052676; Tue, 16 May 2006 04:45:34 GMT (envelope-from rodrigc@freefall.freebsd.org) Received: (from rodrigc@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k4G4jYU7052672; Tue, 16 May 2006 04:45:34 GMT (envelope-from rodrigc) Date: Tue, 16 May 2006 04:45:34 GMT From: Craig Rodrigues Message-Id: <200605160445.k4G4jYU7052672@freefall.freebsd.org> To: paul.lkw@mfun.org, rodrigc@FreeBSD.org, freebsd-standards@FreeBSD.org, freebsd-acpi@FreeBSD.org Cc: Subject: Re: kern/90871: ACPI problems with ASUS A8N-VM-CSM X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2006 04:45:38 -0000 Old Synopsis: ACPI Not Work New Synopsis: ACPI problems with ASUS A8N-VM-CSM State-Changed-From-To: open->feedback State-Changed-By: rodrigc State-Changed-When: Tue May 16 04:42:20 UTC 2006 State-Changed-Why: It looks like the DSDT is broken on your motherboard. Did you follow the advice by Adriaan de Groot to fix it? Responsible-Changed-From-To: freebsd-standards->freebsd-acpi Responsible-Changed-By: rodrigc Responsible-Changed-When: Tue May 16 04:42:20 UTC 2006 Responsible-Changed-Why: It looks like the DSDT is broken on your motherboard. Did you follow the advice by Adriaan de Groot to fix it? http://www.freebsd.org/cgi/query-pr.cgi?pr=90871 From owner-freebsd-acpi@FreeBSD.ORG Thu May 18 16:07:00 2006 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 9934A16A6C9 for ; Thu, 18 May 2006 16:07:00 +0000 (UTC) (envelope-from m.ehinger@ltur.de) Received: from postx.gateway-inter.net (postx.gateway-inter.net [213.144.19.80]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E83343D5A for ; Thu, 18 May 2006 16:06:59 +0000 (GMT) (envelope-from m.ehinger@ltur.de) To: freebsd-acpi@freebsd.org Message-ID: From: m.ehinger@ltur.de Date: Thu, 18 May 2006 18:07:23 +0200 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Subject: GPU Temperature raise after resume 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, 18 May 2006 16:07:01 -0000 Hi, i recognize an raise of temperature of the GPU after i resumed my Thinkpad T42 with Ati Radeon 9600 Graphic Chip. Temperature raises about 10 Degrees Centigrade within 10 minutes. If i start X temperature drops within seconds to its normal value before suspend ( about 45 degrees centigrade). I'm using CURRENT from last week. Sorry for the inaccuracy but i have no access to my notebook at the moment. i hope i am on the right list? thanks in advance Maik From owner-freebsd-acpi@FreeBSD.ORG Thu May 18 23:26:22 2006 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 E401D16A404 for ; Thu, 18 May 2006 23:26:22 +0000 (UTC) (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 981A743D48 for ; Thu, 18 May 2006 23:26:22 +0000 (GMT) (envelope-from nate@root.org) Received: from [222.109.84.127] ([222.109.84.127]) by www.cryptography.com (8.12.8/8.12.8) with ESMTP id k4INQJqM021722 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 18 May 2006 16:26:21 -0700 Message-ID: <446D0248.6040507@root.org> Date: Fri, 19 May 2006 08:24:56 +0900 From: Nate Lawson User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: m.ehinger@ltur.de References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@freebsd.org Subject: Re: GPU Temperature raise after resume 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, 18 May 2006 23:26:23 -0000 m.ehinger@ltur.de wrote: > Hi, > > i recognize an raise of temperature of the GPU after i resumed my Thinkpad T42 with Ati Radeon 9600 Graphic Chip. Temperature raises > about 10 Degrees Centigrade within 10 minutes. > If i start X temperature drops within seconds to its normal value before suspend ( about 45 degrees centigrade). > > I'm using CURRENT from last week. Sorry for the inaccuracy but i have no access to my notebook at the moment. > > i hope i am on the right list? > > thanks in advance There must be something in the X server that sets lower power states for the GPU. Video cards are extremely proprietary and most of the intelligence is in the X server, not ACPI. -- Nate From owner-freebsd-acpi@FreeBSD.ORG Fri May 19 14:28:00 2006 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 D059F16A420; Fri, 19 May 2006 14:28:00 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id E277743D6A; Fri, 19 May 2006 14:27:57 +0000 (GMT) (envelope-from avg@icyb.net.ua) Received: from [212.40.38.87] (oddity-e.topspin.kiev.ua [212.40.38.87]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id RAA28386; Fri, 19 May 2006 17:27:55 +0300 (EEST) (envelope-from avg@icyb.net.ua) Message-ID: <446DD5EB.6030300@icyb.net.ua> Date: Fri, 19 May 2006 17:27:55 +0300 From: Andriy Gapon User-Agent: Thunderbird 1.5.0.2 (X11/20060512) MIME-Version: 1.0 To: freebsd-stable@freebsd.org, freebsd-acpi@freebsd.org, freebsd-hardware@freebsd.org Content-Type: text/plain; charset=KOI8-U Content-Transfer-Encoding: 7bit Cc: Subject: 5.4=>6.1 regression: nforce2 vs. APIC [+fix] 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: Fri, 19 May 2006 14:28:01 -0000 [Disclaimer, just in case: I do mean APIC, not ACPI] This is a good lesson for me for not trying any RCs or BETAs in due time. Short description of my system: nforce2 based motherboard NF-7 v2 with the latest BIOS (v2.7), CPU is Athlon XP. After upgrading from 5.4 to 6.1 I started to experience complete system freezes after some (short) time after each boot. 100% reproducible, time before lockup varied from several seconds to several minutes. I already had freezes but with different symptoms on this system with 5.2.1 and APIC enabled: http://lists.freebsd.org/pipermail/freebsd-questions/2004-September/058392.html These freezes were fixed either in 5.3 or in 5.4, I don't remember now precisely, but I had APIC enabled in kernel and BIOS for a long time. (Just in case: I did have interrupts > 15 all that time). So I went and disabled APIC in BIOS and freezes went away. I am not sure exactly why, but I wanted my APIC back. So I googled up a lot of information about nforce2+APIC, nforce2+Linux and APIC+FreeBSD. Here's a brief summary of my findings: 1. apparently on FreeBSD 5.4 APIC works in mixed mode, system uses IRQ0 timer and everything is OK (for reasons not clear to me). 2. apparently linux 2.4.* works similarly but had or has some problems with nforce2 because almost all BIOSes (MADTs) on almost all nforce2-based MBs (save for some Shuttles) have bogus IRQ0->PIN2 override and that screwed something in linux. This might be (have been) causing problems for some FreeBSD users, but not for me, not my MB. 3. apparently linux 2.6.* uses LAPIC timer similarly to FreeBSD 6.1, but people still experienced or experience hard freezes when they have all of the following 3 enabled: LAPIC timer, APIC and "Disconnect CPU on C1" chipset feature. The latter is done through either BOIS setting or through programs like fvcool. I indeed verified that if I disable "C1 disconnect", then 6.1 with APIC enabled works well. But the CPU temperature went up as well, so I wanted my "C1 disconnect" back :) After fruitlessly trying to hack sources to disable LAPIC timer and go back to IRQ0 timer and make this portion of kernel behave similarly to 5.4 (this is a long and uninteresting story), I finally found a very useful piece of information from within nVidia itself: http://lkml.org/lkml/2004/5/3/157 Based on that info and the linux patch in that thread I came up with the following PCI fixup. Now I am running 6.1 with both APIC and "C1 disconnect" enabled for 2 days without any problems. --- sys/dev/pci/fixup_pci.c.orig Wed May 17 21:08:47 2006 +++ sys/dev/pci/fixup_pci.c Thu May 18 16:42:53 2006 @@ -51,6 +51,7 @@ static int fixup_pci_probe(device_t dev); static void fixwsc_natoma(device_t dev); +static void fixc1_nforce2(device_t dev); static device_method_t fixup_pci_methods[] = { /* Device interface */ @@ -76,6 +77,9 @@ case 0x12378086: /* Intel 82440FX (Natoma) */ fixwsc_natoma(dev); break; + case 0x01e010de: /* nVidia nforce2 */ + fixc1_nforce2(dev); + break; } return(ENXIO); } @@ -99,4 +103,18 @@ pci_write_config(dev, 0x50, pmccfg, 2); } #endif +} + +/* + * See: http://lkml.org/lkml/2004/5/3/157 + */ +static void +fixc1_nforce2(device_t dev) +{ + uint32_t val; + + val = pci_read_config(dev, 0x6c, 4); + val &= 0xfff1ffff; + pci_write_config(dev, 0x6c, val, 4); + printf("fixup from nforce2 C1 CPU disconnect hangs\n"); } -- Andriy Gapon From owner-freebsd-acpi@FreeBSD.ORG Fri May 19 14:55:04 2006 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 B399D16A427 for ; Fri, 19 May 2006 14:55:04 +0000 (UTC) (envelope-from LoN_Kamikaze@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 5D7EE43D55 for ; Fri, 19 May 2006 14:55:03 +0000 (GMT) (envelope-from LoN_Kamikaze@gmx.de) Received: (qmail invoked by alias); 19 May 2006 14:55:02 -0000 Received: from p54A7F38D.dip.t-dialin.net (EHLO [192.168.0.12]) [84.167.243.141] by mail.gmx.net (mp030) with SMTP; 19 May 2006 16:55:02 +0200 X-Authenticated: #5465401 Message-ID: <446DDC3E.1080102@gmx.de> Date: Fri, 19 May 2006 16:54:54 +0200 From: "[LoN]Kamikaze" Organization: Lords of Nightmare User-Agent: Thunderbird 1.5.0.2 (X11/20060423) MIME-Version: 1.0 To: Andriy Gapon References: <446DD5EB.6030300@icyb.net.ua> In-Reply-To: <446DD5EB.6030300@icyb.net.ua> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Cc: freebsd-acpi@freebsd.org, freebsd-stable@freebsd.org, freebsd-hardware@freebsd.org Subject: Re: 5.4=>6.1 regression: nforce2 vs. APIC [+fix] 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: Fri, 19 May 2006 14:55:05 -0000 Andriy Gapon wrote: > [Disclaimer, just in case: I do mean APIC, not ACPI] > > > Based on that info and the linux patch in that thread I came up with the > following PCI fixup. Now I am running 6.1 with both APIC and "C1 > disconnect" enabled for 2 days without any problems. > Did you file a PR with your fix? From owner-freebsd-acpi@FreeBSD.ORG Fri May 19 15:16:43 2006 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 0CAD016A45B; Fri, 19 May 2006 15:16:43 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8534343D46; Fri, 19 May 2006 15:16:42 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k4JFGesI037477; Fri, 19 May 2006 11:16:41 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-acpi@freebsd.org Date: Fri, 19 May 2006 11:16:05 -0400 User-Agent: KMail/1.9.1 References: <446DD5EB.6030300@icyb.net.ua> In-Reply-To: <446DD5EB.6030300@icyb.net.ua> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200605191116.06248.jhb@freebsd.org> Content-Type: text/plain; charset="koi8-u" Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.87.1/1471/Fri May 19 10:07:46 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: freebsd-stable@freebsd.org, Andriy Gapon , freebsd-hardware@freebsd.org Subject: Re: 5.4=>6.1 regression: nforce2 vs. APIC [+fix] 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: Fri, 19 May 2006 15:16:43 -0000 On Friday 19 May 2006 10:27, Andriy Gapon wrote: > [Disclaimer, just in case: I do mean APIC, not ACPI] > > This is a good lesson for me for not trying any RCs or BETAs in due time. > > Short description of my system: nforce2 based motherboard NF-7 v2 with > the latest BIOS (v2.7), CPU is Athlon XP. > > ... > > Based on that info and the linux patch in that thread I came up with the > following PCI fixup. Now I am running 6.1 with both APIC and "C1 > disconnect" enabled for 2 days without any problems. Good find! The patch looks good. I've modified it slight to expand the comment and to make it more paranoid and only trigger for bus/slot/function 0/0/0 like the post mentions along with a minor tweak to the printf. Can you test to make sure I didn't break anything in the process? -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-acpi@FreeBSD.ORG Fri May 19 15:20:55 2006 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 B7D1716A41F; Fri, 19 May 2006 15:20:55 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3E7DD43D45; Fri, 19 May 2006 15:20:53 +0000 (GMT) (envelope-from avg@icyb.net.ua) Received: from [212.40.38.87] (oddity-e.topspin.kiev.ua [212.40.38.87]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id SAA29490; Fri, 19 May 2006 18:20:52 +0300 (EEST) (envelope-from avg@icyb.net.ua) Message-ID: <446DE254.50103@icyb.net.ua> Date: Fri, 19 May 2006 18:20:52 +0300 From: Andriy Gapon User-Agent: Thunderbird 1.5.0.2 (X11/20060512) MIME-Version: 1.0 To: John Baldwin References: <446DD5EB.6030300@icyb.net.ua> <200605191116.06248.jhb@freebsd.org> In-Reply-To: <200605191116.06248.jhb@freebsd.org> Content-Type: text/plain; charset=KOI8-U Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@freebsd.org, freebsd-stable@freebsd.org, freebsd-hardware@freebsd.org Subject: Re: 5.4=>6.1 regression: nforce2 vs. APIC [+fix] 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: Fri, 19 May 2006 15:20:55 -0000 on 19/05/2006 18:16 John Baldwin said the following: > On Friday 19 May 2006 10:27, Andriy Gapon wrote: >> [Disclaimer, just in case: I do mean APIC, not ACPI] >> >> This is a good lesson for me for not trying any RCs or BETAs in due time. >> >> Short description of my system: nforce2 based motherboard NF-7 v2 with >> the latest BIOS (v2.7), CPU is Athlon XP. >> >> ... >> >> Based on that info and the linux patch in that thread I came up with the >> following PCI fixup. Now I am running 6.1 with both APIC and "C1 >> disconnect" enabled for 2 days without any problems. > > Good find! The patch looks good. I've modified it slight to expand > the comment and to make it more paranoid and only trigger for > bus/slot/function 0/0/0 like the post mentions along with a minor > tweak to the printf. Can you test to make sure I didn't break anything in the > process? Jon, sure, where can I find your version of the patch ? :-) -- Andriy Gapon From owner-freebsd-acpi@FreeBSD.ORG Fri May 19 15:21:00 2006 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 16C3F16A422 for ; Fri, 19 May 2006 15:21:00 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id C88D443D49 for ; Fri, 19 May 2006 15:20:58 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k4JFKuoE037509; Fri, 19 May 2006 11:20:57 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-acpi@freebsd.org Date: Fri, 19 May 2006 11:21:00 -0400 User-Agent: KMail/1.9.1 References: <446DD5EB.6030300@icyb.net.ua> <200605191116.06248.jhb@freebsd.org> In-Reply-To: <200605191116.06248.jhb@freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="koi8-u" Content-Transfer-Encoding: 7bit Message-Id: <200605191121.01775.jhb@freebsd.org> X-Virus-Scanned: ClamAV 0.87.1/1471/Fri May 19 10:07:46 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: Andriy Gapon Subject: Re: 5.4=>6.1 regression: nforce2 vs. APIC [+fix] 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: Fri, 19 May 2006 15:21:00 -0000 On Friday 19 May 2006 11:16, John Baldwin wrote: > On Friday 19 May 2006 10:27, Andriy Gapon wrote: > > [Disclaimer, just in case: I do mean APIC, not ACPI] > > > > This is a good lesson for me for not trying any RCs or BETAs in due time. > > > > Short description of my system: nforce2 based motherboard NF-7 v2 with > > the latest BIOS (v2.7), CPU is Athlon XP. > > > > ... > > > > Based on that info and the linux patch in that thread I came up with the > > following PCI fixup. Now I am running 6.1 with both APIC and "C1 > > disconnect" enabled for 2 days without any problems. > > Good find! The patch looks good. I've modified it slight to expand > the comment and to make it more paranoid and only trigger for > bus/slot/function 0/0/0 like the post mentions along with a minor > tweak to the printf. Can you test to make sure I didn't break anything in > the process? So somehow I lost the patch, so here's another try: Index: fixup_pci.c =================================================================== RCS file: /usr/cvs/src/sys/dev/pci/fixup_pci.c,v retrieving revision 1.6 diff -u -r1.6 fixup_pci.c --- fixup_pci.c 30 May 2004 17:57:41 -0000 1.6 +++ fixup_pci.c 19 May 2006 15:14:26 -0000 @@ -51,6 +51,7 @@ static int fixup_pci_probe(device_t dev); static void fixwsc_natoma(device_t dev); +static void fixc1_nforce2(device_t dev); static device_method_t fixup_pci_methods[] = { /* Device interface */ @@ -76,6 +77,9 @@ case 0x12378086: /* Intel 82440FX (Natoma) */ fixwsc_natoma(dev); break; + case 0x01e010de: /* nVidia nForce2 */ + fixc1_nforce2(dev); + break; } return(ENXIO); } @@ -100,3 +104,37 @@ } #endif } + +/* + * Set the SYSTEM_IDLE_TIMEOUT to 80 ns on nForce2 systems to work + * around a hang that is triggered when the CPU generates a very fast + * CONNECT/HALT cycle sequence. Specifically, the hang can result in + * the lapic timer being stopped. + * + * This requires changing the value for config register at offset 0x6c + * for the Host-PCI bridge at bus/dev/function 0/0/0: + * + * Chip Current Value New Value + * ---- ---------- ---------- + * C17 0x1F0FFF01 0x1F01FF01 + * C18D 0x9F0FFF01 0x9F01FF01 + * + * We do this by always clearing the bits in 0x000e0000. + * + * See also: http://lkml.org/lkml/2004/5/3/157 + */ +static void +fixc1_nforce2(device_t dev) +{ + uint32_t val; + + if (pci_get_bus(dev) == 0 && pci_get_slot(dev) == 0 && + pci_get_function(dev) == 0) { + val = pci_read_config(dev, 0x6c, 4); + if (val & 0x000e0000) { + printf("Correcting nForce2 C1 CPU disconnect hangs\n"); + val &= ~0x000e0000; + pci_write_config(dev, 0x6c, val, 4); + } + } +} -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-acpi@FreeBSD.ORG Fri May 19 15:33:51 2006 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 43F6816A498; Fri, 19 May 2006 15:33:51 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4A42443D90; Fri, 19 May 2006 15:33:20 +0000 (GMT) (envelope-from avg@icyb.net.ua) Received: from [212.40.38.87] (oddity-e.topspin.kiev.ua [212.40.38.87]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id SAA29684; Fri, 19 May 2006 18:33:17 +0300 (EEST) (envelope-from avg@icyb.net.ua) Message-ID: <446DE53D.3020303@icyb.net.ua> Date: Fri, 19 May 2006 18:33:17 +0300 From: Andriy Gapon User-Agent: Thunderbird 1.5.0.2 (X11/20060512) MIME-Version: 1.0 To: John Baldwin References: <446DD5EB.6030300@icyb.net.ua> <200605191116.06248.jhb@freebsd.org> <200605191121.01775.jhb@freebsd.org> In-Reply-To: <200605191121.01775.jhb@freebsd.org> Content-Type: text/plain; charset=KOI8-U Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@freebsd.org Subject: Re: 5.4=>6.1 regression: nforce2 vs. APIC [+fix] 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: Fri, 19 May 2006 15:33:59 -0000 on 19/05/2006 18:21 John Baldwin said the following: > So somehow I lost the patch, so here's another try: Jon, I haven't rebooted yet but there was one minor compilation problem after applying the patch - "no new line at the end of file". Adding it, of course, helped. -- Andriy Gapon From owner-freebsd-acpi@FreeBSD.ORG Fri May 19 15:35:31 2006 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 6E6E116A4F3; Fri, 19 May 2006 15:35:31 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1ED3443D8B; Fri, 19 May 2006 15:35:19 +0000 (GMT) (envelope-from avg@icyb.net.ua) Received: from [212.40.38.87] (oddity-e.topspin.kiev.ua [212.40.38.87]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id SAA29715; Fri, 19 May 2006 18:35:15 +0300 (EEST) (envelope-from avg@icyb.net.ua) Message-ID: <446DE5B3.1040101@icyb.net.ua> Date: Fri, 19 May 2006 18:35:15 +0300 From: Andriy Gapon User-Agent: Thunderbird 1.5.0.2 (X11/20060512) MIME-Version: 1.0 To: "[LoN]Kamikaze" References: <446DD5EB.6030300@icyb.net.ua> <446DDC3E.1080102@gmx.de> In-Reply-To: <446DDC3E.1080102@gmx.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@freebsd.org, freebsd-stable@freebsd.org, freebsd-hardware@freebsd.org Subject: Re: 5.4=>6.1 regression: nforce2 vs. APIC [+fix] 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: Fri, 19 May 2006 15:35:37 -0000 on 19/05/2006 17:54 [LoN]Kamikaze said the following: > Andriy Gapon wrote: >> [Disclaimer, just in case: I do mean APIC, not ACPI] >> >> >> Based on that info and the linux patch in that thread I came up with the >> following PCI fixup. Now I am running 6.1 with both APIC and "C1 >> disconnect" enabled for 2 days without any problems. >> > > Did you file a PR with your fix? Not yet. I wanted to receive some feedback and test results first (and kinda hoped that this will get included without a PR). -- Andriy Gapon From owner-freebsd-acpi@FreeBSD.ORG Fri May 19 16:32:13 2006 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 5062F16A41F; Fri, 19 May 2006 16:32:13 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id EBCD943D53; Fri, 19 May 2006 16:32:11 +0000 (GMT) (envelope-from avg@icyb.net.ua) Received: from [212.40.38.87] (oddity-e.topspin.kiev.ua [212.40.38.87]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id TAA00830; Fri, 19 May 2006 19:32:09 +0300 (EEST) (envelope-from avg@icyb.net.ua) Message-ID: <446DF309.7030907@icyb.net.ua> Date: Fri, 19 May 2006 19:32:09 +0300 From: Andriy Gapon User-Agent: Thunderbird 1.5.0.2 (X11/20060512) MIME-Version: 1.0 To: John Baldwin References: <446DD5EB.6030300@icyb.net.ua> <200605191116.06248.jhb@freebsd.org> <200605191121.01775.jhb@freebsd.org> In-Reply-To: <200605191121.01775.jhb@freebsd.org> Content-Type: text/plain; charset=KOI8-U Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@freebsd.org Subject: Re: 5.4=>6.1 regression: nforce2 vs. APIC [+fix] 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: Fri, 19 May 2006 16:32:13 -0000 on 19/05/2006 18:21 John Baldwin said the following: > So somehow I lost the patch, so here's another try: Jon, I have now tested your patch - works great! Thank you for perfecting it! I hope that it gets onto RELENG_6 if not on RELENG_6_1. -- Andriy Gapon