From owner-freebsd-acpi@FreeBSD.ORG Mon Jan 2 11:06:55 2012 Return-Path: Delivered-To: freebsd-acpi@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E3C91065672 for ; Mon, 2 Jan 2012 11:06:55 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 1B6498FC12 for ; Mon, 2 Jan 2012 11:06:55 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q02B6sqr005013 for ; Mon, 2 Jan 2012 11:06:54 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q02B6s76005011 for freebsd-acpi@FreeBSD.org; Mon, 2 Jan 2012 11:06:54 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 2 Jan 2012 11:06:54 GMT Message-Id: <201201021106.q02B6s76005011@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-acpi@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-acpi@FreeBSD.org X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2012 11:06:55 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/162859 acpi [acpi] ACPI battery/acline monitoring partialy working o kern/162491 acpi [acpi_hp] [panic] EliteBook 8540p panic on acpi_hp mod o kern/161715 acpi [acpi] Dell E6520 doesn't resume after ACPI suspend o kern/161713 acpi [acpi] Suspend on Dell E6520 o kern/160838 acpi [acpi] ACPI Battery Monitor Non-Functional o kern/160419 acpi [acpi_thermal] acpi_thermal kernel thread high CPU usa o kern/158689 acpi [acpi] value of sysctl hw.acpi.thermal.polling_rate ne o kern/154955 acpi [acpi] Keyboard or ACPI doesn't work on Lenovo S10-3 o kern/152438 acpi [acpi]: patch to acpi_asus(4) to add extra sysctls for o kern/152098 acpi [acpi] Lenovo T61p does not resume o i386/146715 acpi [acpi] Suspend works, resume not on a HP Probook 4510s o kern/145306 acpi [acpi]: Can't change brightness on HP ProBook 4510s f i386/144045 acpi [acpi] [panic] kernel trap with acpi enabled o i386/143798 acpi [acpi] shutdown problem with SiS K7S5A o kern/143420 acpi [acpi] ACPI issues with Toshiba o kern/142009 acpi [acpi] [panic] Panic in AcpiNsGetAttachedObject o kern/139088 acpi [acpi] ACPI Exception: AE_AML_INFINITE_LOOP error o amd64/138210 acpi [acpi] acer aspire 5536 ACPI problems (S3, brightness, f kern/137053 acpi [hang] FreeBSD 8.0 BETA2Compaq Mini 700 locks on boot o kern/137042 acpi [acpi] hp laptop's lcd not wakes up after suspend to r o i386/136008 acpi [acpi] Dell Vostro 1310 will not shutdown (Requires us o bin/135349 acpi [patch] teach acpidump(8) to disassemble arbitrary mem o kern/132602 acpi [acpi] ACPI Problem with Intel SS4200: System does not f kern/130683 acpi [ACPI] shutdown hangs after syncing disks - ACPI race? f i386/129953 acpi [acpi] ACPI timeout (CDROM) with Shuttle X27D p kern/128634 acpi [patch] fix acpi_asus(4) in asus a6f laptop o kern/123039 acpi [acpi] ACPI AML_BUFFER_LIMIT errors during boot a i386/122887 acpi [panic] [atkbdc] 7.0-RELEASE on IBM HS20 panics immed o kern/121504 acpi [patch] Correctly set hw.acpi.osname on certain machin f kern/119200 acpi [acpi] Lid close switch suspends CPU for 1 second on H f kern/115947 acpi [hang] Dell poweredge 860 hangs when stressed and ACPI f i386/114562 acpi [acpi] cardbus is dead after s3 on Thinkpad T43 with a s kern/112544 acpi [acpi] [patch] Add High Precision Event Timer Driver f f kern/106924 acpi [acpi] ACPI resume returns g_vfs_done() errors and ker o kern/105537 acpi [acpi] problems in acpi on HP Compaq nc6320 f kern/102252 acpi acpi thermal does not work on Abit AW8D (intel 975) o kern/91594 acpi [acpi] FreeBSD > 5.4 w/ACPI fails to detect Intel Pro/ f i386/83018 acpi [install] Installer will not boot on Asus P4S8X BIOS 1 o kern/73823 acpi [request] acpi / power-on by timer support o kern/56024 acpi ACPI suspend drains battery while in S3 f i386/55661 acpi ACPI suspend/resume problem on ARMADA M700 41 problems total. From owner-freebsd-acpi@FreeBSD.ORG Tue Jan 3 22:14:42 2012 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F3751065670; Tue, 3 Jan 2012 22:14:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 3CA398FC1B; Tue, 3 Jan 2012 22:14:42 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id CCE8146B1A; Tue, 3 Jan 2012 17:14:41 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 62417B965; Tue, 3 Jan 2012 17:14:41 -0500 (EST) From: John Baldwin To: kron Date: Tue, 3 Jan 2012 17:12:36 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) References: <4ECC9975.5090907@gmail.com> <4ECD6105.1050400@gmail.com> In-Reply-To: <4ECD6105.1050400@gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201201031712.36866.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 03 Jan 2012 17:14:41 -0500 (EST) Cc: freebsd-acpi@freebsd.org, bug-followup@freebsd.org Subject: Re: kern/162578: 9.0-RC2's regression in power management on VIA Samuel 2 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, 03 Jan 2012 22:14:42 -0000 On Wednesday, November 23, 2011 4:09:25 pm kron wrote: > On 2011/11/23 07:57, kron wrote: > > Hello, > > > > I'm bringing this to -acpi@ as suggested by jhb@. > > > > Some time ago while testing 9.0-RC2 I noticed that power management > > got broken (powerd doesn't start, Cx states disappeared) on a specific > > class of our minirouters. I created kern/162578, bisected the issue > > down to r216674 and I contacted the author - jhb@. John was kind to do > > a further analysis. Verbose boots before and after r216674 differ this > > way: > > > > -Calibrating TSC clock ... TSC clock: 532647138 Hz > > +Calibrating TSC clock ... TSC clock: 532648183 Hz > > > > -ACPI timer: 0/4 0/5 0/4 0/5 0/4 0/5 0/4 0/5 0/4 0/4 -> 0 > > -Timecounter "ACPI-safe" frequency 3579545 Hz quality 850 > > -acpi_timer0: <24-bit timer at 3.579545MHz> port 0x4008-0x400b on acpi0 > > +acpi_timer0: couldn't allocate resource (port 0x4008) > > > > -acpi_throttle0: P_CNT from P_BLK 0x4010 > > +acpi_throttle0: failed to attach P_CNT > > +device_attach: acpi_throttle0 attach returned 6 > > > > John's comment: > > > So this is the issue, and it seems what happens is that your > > > BIOS assigns the resources for this range to the pcib0 device > > > when we expect them to be assigned as a system resource (if > > > at all): > > > > > pcib0: port > > > 0xcf8-0xcff,0x4000-0x407f,0x4080-0x40ff,0x5000-0x500f,0x6000-0x607f > > > on acpi0 > > > > > You could try hacking your ASL to not list the 0x4000-0x407f range > > > for now, but the real fix is probably to make resources attached > > > to Host-PCI bridge devices be treated as if they were system > > > resources and put into the ACPI system resource rman instead. > > > That requires a fair bit of work however. > > > > John also suggested to involve jkim@ and -acpi@. > > > > I'm going to experiment with ASL because it would be an acceptable > > solution to me and the real fix is way above my skills ATM. > > As promised, I fiddled with ASL. I did found something which > resembled 0x4000-0x407f: > ... > DefinitionBlock ("/tmp/acpidump.aml", "DSDT", 1, "VIA601", "AWRDACPI", > 0x00001000) > { > .... > Scope (\_SB) > { > ... > Device (PCI0) > { > ... > Method (_CRS, 0, NotSerialized) > { > ... > Name (BUF0, ResourceTemplate () > { > ... > IO (Decode16, > 0x4000, // Range Minimum > 0x4000, // Range Maximum > 0x01, // Alignment > 0x80, // Length > ) > ... > I removed the IO block, compiled, installed the AML, rebooted > and voila - I have my power management back even with r216674. > > Big thanks to jhb@ for guiding me. > > As always, big thanks to all the good souls who write the > Handbook, too. It helped me with ASL and AML. > > As > 1. this hack is good enough for me, and > 2. the real fix John suggested is above my skills > I think the PR can be closed. Can you try an updated HEAD and see if a stock ASL works? -- John Baldwin From owner-freebsd-acpi@FreeBSD.ORG Wed Jan 4 16:08:09 2012 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DFBB8106566B; Wed, 4 Jan 2012 16:08:08 +0000 (UTC) (envelope-from kron24@gmail.com) Received: from mail-ee0-f54.google.com (mail-ee0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id 275CF8FC12; Wed, 4 Jan 2012 16:08:07 +0000 (UTC) Received: by eekc50 with SMTP id c50so19946940eek.13 for ; Wed, 04 Jan 2012 08:08:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=ny3VyMctXvMfZVxp2y6zbNP/KHN9RFmSzgohqFuxvQI=; b=DlD1lHXL6gZ0O6FZm2GmSLguzLRHMQvIz68jFnHpB3I/wEaiWNcpLWt+KcX/a5YwPh zOawUySLrYZTCOagsIjm37I4YVqBFQj6uAiO1H/dV7ryx3Df7fO6FAjO0xpPuF1TGMPv NNgcC1wKvdDuF53ikHLfZ9/GJZukcU9XS1lbM= Received: by 10.14.39.72 with SMTP id c48mr23826395eeb.25.1325691896055; Wed, 04 Jan 2012 07:44:56 -0800 (PST) Received: from nbvk.local (uidzr185150.sattnet.cz. [212.96.185.150]) by mx.google.com with ESMTPS id 76sm221007682eeh.0.2012.01.04.07.44.52 (version=SSLv3 cipher=OTHER); Wed, 04 Jan 2012 07:44:54 -0800 (PST) Message-ID: <4F0473F3.7010904@gmail.com> Date: Wed, 04 Jan 2012 16:44:51 +0100 From: kron User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: John Baldwin References: <4ECC9975.5090907@gmail.com> <4ECD6105.1050400@gmail.com> <201201031712.36866.jhb@freebsd.org> In-Reply-To: <201201031712.36866.jhb@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@freebsd.org, bug-followup@freebsd.org Subject: Re: kern/162578: 9.0-RC2's regression in power management on VIA Samuel 2 X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2012 16:08:09 -0000 On 2012/01/03 23:12, John Baldwin wrote: > On Wednesday, November 23, 2011 4:09:25 pm kron wrote: >> On 2011/11/23 07:57, kron wrote: >>> Hello, >>> >>> I'm bringing this to -acpi@ as suggested by jhb@. >>> >>> Some time ago while testing 9.0-RC2 I noticed that power management >>> got broken (powerd doesn't start, Cx states disappeared) on a specific >>> class of our minirouters. I created kern/162578, bisected the issue >>> down to r216674 and I contacted the author - jhb@. John was kind to do >>> a further analysis. Verbose boots before and after r216674 differ this >>> way: >>> >>> -Calibrating TSC clock ... TSC clock: 532647138 Hz >>> +Calibrating TSC clock ... TSC clock: 532648183 Hz >>> >>> -ACPI timer: 0/4 0/5 0/4 0/5 0/4 0/5 0/4 0/5 0/4 0/4 -> 0 >>> -Timecounter "ACPI-safe" frequency 3579545 Hz quality 850 >>> -acpi_timer0:<24-bit timer at 3.579545MHz> port 0x4008-0x400b on acpi0 >>> +acpi_timer0: couldn't allocate resource (port 0x4008) >>> >>> -acpi_throttle0: P_CNT from P_BLK 0x4010 >>> +acpi_throttle0: failed to attach P_CNT >>> +device_attach: acpi_throttle0 attach returned 6 >>> >>> John's comment: >>> > So this is the issue, and it seems what happens is that your >>> > BIOS assigns the resources for this range to the pcib0 device >>> > when we expect them to be assigned as a system resource (if >>> > at all): >>> >>> > pcib0: port >>> > 0xcf8-0xcff,0x4000-0x407f,0x4080-0x40ff,0x5000-0x500f,0x6000-0x607f >>> > on acpi0 >>> >>> > You could try hacking your ASL to not list the 0x4000-0x407f range >>> > for now, but the real fix is probably to make resources attached >>> > to Host-PCI bridge devices be treated as if they were system >>> > resources and put into the ACPI system resource rman instead. >>> > That requires a fair bit of work however. >>> >>> John also suggested to involve jkim@ and -acpi@. >>> >>> I'm going to experiment with ASL because it would be an acceptable >>> solution to me and the real fix is way above my skills ATM. >> >> As promised, I fiddled with ASL. I did found something which >> resembled 0x4000-0x407f: >> ... >> DefinitionBlock ("/tmp/acpidump.aml", "DSDT", 1, "VIA601", "AWRDACPI", >> 0x00001000) >> { >> .... >> Scope (\_SB) >> { >> ... >> Device (PCI0) >> { >> ... >> Method (_CRS, 0, NotSerialized) >> { >> ... >> Name (BUF0, ResourceTemplate () >> { >> ... >> IO (Decode16, >> 0x4000, // Range Minimum >> 0x4000, // Range Maximum >> 0x01, // Alignment >> 0x80, // Length >> ) >> ... >> I removed the IO block, compiled, installed the AML, rebooted >> and voila - I have my power management back even with r216674. >> >> Big thanks to jhb@ for guiding me. >> >> As always, big thanks to all the good souls who write the >> Handbook, too. It helped me with ASL and AML. >> >> As >> 1. this hack is good enough for me, and >> 2. the real fix John suggested is above my skills >> I think the PR can be closed. > > Can you try an updated HEAD and see if a stock ASL works? Just tested - the stock ASL fails as before: ... acpi0: reservation of 0, a0000 (3) failed acpi0: reservation of 100000, 1f6f0000 (3) failed acpi_timer0: couldn't allocate resource (port 0x4008) ... acpi_throttle0: on cpu0 acpi_throttle0: failed to attach P_CNT device_attach: acpi_throttle0 attach returned 6 ... Oli