From owner-freebsd-acpi@FreeBSD.ORG Sun Jun 17 18:07:53 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 A21A3106566B for ; Sun, 17 Jun 2012 18:07:53 +0000 (UTC) (envelope-from iwasaki@jp.FreeBSD.org) Received: from locore.org (ns01.locore.org [218.45.21.227]) by mx1.freebsd.org (Postfix) with ESMTP id 48C6E8FC0A for ; Sun, 17 Jun 2012 18:07:52 +0000 (UTC) Received: from localhost (celeron.v4.locore.org [192.168.0.10]) by locore.org (8.14.5/8.14.5/iwasaki) with ESMTP/inet id q5HI7hZe010249; Mon, 18 Jun 2012 03:07:44 +0900 (JST) (envelope-from iwasaki@jp.FreeBSD.org) Date: Mon, 18 Jun 2012 03:07:25 +0900 (JST) Message-Id: <20120618.030725.95800960.iwasaki@jp.FreeBSD.org> To: kob6558@gmail.com From: Mitsuru IWASAKI In-Reply-To: References: <20120616.025804.48535013.iwasaki@jp.FreeBSD.org> <4FDBE1BA.3070204@gmail.com> X-Mailer: Mew version 3.3 on Emacs 20.7 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@freebsd.org Subject: Re: [CFT] acpi_ibm event handler X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jun 2012 18:07:53 -0000 Hi, > Brightness can be adjusted using "acpi_call -p '\VBRC' -i n" (where n > is 0-15). acpi_call must be installed from ports. But this command > sets absolute brightness, so it can't raise or lower the brightness > unless you have the current value and I don't know how to get that. > This is the case on my T520. X61 has the same problem. There are 2 video device object in ACPI namespace, \_SB.PCI0.VID (vgapci attached but brightness control doesn't work) and \_SB.PCI0.AGP.VID (has VBRC method but no driver attached because of wrong _ADR). The custom DSDT with the following patches and acpi_video(4) now can adjust brightness level :) http://people.freebsd.org/~iwasaki/acpi/tpx61.asl.diff If you want to make the custom DSDT, I can help you. Thanks! From owner-freebsd-acpi@FreeBSD.ORG Mon Jun 18 11:07:38 2012 Return-Path: Delivered-To: freebsd-acpi@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9A9D91065673 for ; Mon, 18 Jun 2012 11:07:38 +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 6B0E08FC18 for ; Mon, 18 Jun 2012 11:07:38 +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 q5IB7cMf007874 for ; Mon, 18 Jun 2012 11:07:38 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q5IB7b0N007872 for freebsd-acpi@FreeBSD.org; Mon, 18 Jun 2012 11:07:37 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 18 Jun 2012 11:07:37 GMT Message-Id: <201206181107.q5IB7b0N007872@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, 18 Jun 2012 11:07:38 -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/164329 acpi [acpi] hw.acpi.thermal.tz0.temperature shows strange v o kern/163268 acpi [acpi_hp] fix driver detach in absence of CMI o kern/162859 acpi [acpi] ACPI battery/acline monitoring partialy working 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 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, 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 p kern/128634 acpi [patch] fix acpi_asus(4) in asus a6f laptop o bin/126162 acpi [acpi] ACPI autoload failed : loading required module 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 s kern/112544 acpi [acpi] [patch] Add High Precision Event Timer Driver f o kern/105537 acpi [acpi] problems in acpi on HP Compaq nc6320 o kern/91594 acpi [acpi] FreeBSD > 5.4 w/ACPI fails to detect Intel Pro/ o kern/73823 acpi [request] acpi / power-on by timer support o kern/56024 acpi ACPI suspend drains battery while in S3 32 problems total. From owner-freebsd-acpi@FreeBSD.ORG Tue Jun 19 16:02:57 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 96283106564A; Tue, 19 Jun 2012 16:02:57 +0000 (UTC) (envelope-from seanbru@yahoo-inc.com) Received: from mrout1-b.corp.bf1.yahoo.com (mrout1-b.corp.bf1.yahoo.com [98.139.253.104]) by mx1.freebsd.org (Postfix) with ESMTP id 4C5048FC1A; Tue, 19 Jun 2012 16:02:57 +0000 (UTC) Received: from [IPv6:::1] (proxy6.corp.yahoo.com [216.145.48.19]) by mrout1-b.corp.bf1.yahoo.com (8.14.4/8.14.4/y.out) with ESMTP id q5JG29AC014932; Tue, 19 Jun 2012 09:02:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yahoo-inc.com; s=cobra; t=1340121732; bh=HnLTb6VevXDp7Lsz1t5JxMKksXBk5vCxx1OEYFCB8Uk=; h=Subject:From:Reply-To:To:Content-Type:Date:Message-ID: Mime-Version:Content-Transfer-Encoding; b=lRjLio3hrGrABJES5HyqbjnlO18JBqggIJlQYQRL3osGNlZRwzNl+4Dd5ZzH0XUnV OrpSzoFoYNsSAbj1/9b8m3eEGvDUseT7WuAlONE+pKBeMHpWfwNW8iQKR6Npf77b1l Vpwe9cMPWIbnUKNMCtSglqXgJAhUeoTAN7LIuGg8= From: Sean Bruno To: freebsd-acpi@freebsd.org Content-Type: text/plain; charset="UTF-8" Date: Tue, 19 Jun 2012 09:02:08 -0700 Message-ID: <1340121728.5203.8.camel@powernoodle> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Milter-Version: master.31+4-gbc07cd5+ X-CLX-ID: 121730001 Subject: [CFT] Sparse Cstate Support -- Its possible, that I don't know what I'm doing. X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: sbruno@freebsd.org List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jun 2012 16:02:57 -0000 I've noted that a lot of servers/laptops are advertising Cstates C1 and C3, but not C2 nowadays. I'm not clear if the code is causing failures to drop into C3, but it sure doesn't look right to me. More or less, this is due to the code making assumptions that the index into the cpu's array of Cstates is complete and is non-sparse (e.g. element 0 is C1, element 1 is C2, element 2 is C3 ... etc). The first impact of this behavior is to list C3 as C2 in the list of Cstates when you retrieve the cx_supported sysctls for the cpus. The second impact is that the power_profile script never drops to a valid Cstate when you set the economy_lowest variable in rc.conf. I've attempted to patch this with the following patchset to acpi_cpu.c and to the power_profile rc.d script. With these patches, I can set my power_profile to economy and the system does indeed drop into C3 saving around 25watts as measured on a Dell R410 with stable/9. The attempt here is to try and eliminate the comparisons between the index in the array of Cstates and the value of the Cstate. This patchset is against HEAD and has been tested on the R410. Does this look right to you folks? http://people.freebsd.org/~sbruno/acpi_cpu_cstate_sparse.txt Sean From owner-freebsd-acpi@FreeBSD.ORG Tue Jun 19 21:07:53 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 D6B93106566B; Tue, 19 Jun 2012 21:07:53 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id F07238FC0A; Tue, 19 Jun 2012 21:07:52 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id AAA13665; Wed, 20 Jun 2012 00:07:51 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Sh5eQ-000BCS-Sx; Wed, 20 Jun 2012 00:07:51 +0300 Message-ID: <4FE0EA24.6000906@FreeBSD.org> Date: Wed, 20 Jun 2012 00:07:48 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120613 Thunderbird/13.0 MIME-Version: 1.0 To: sbruno@FreeBSD.org References: <1340121728.5203.8.camel@powernoodle> In-Reply-To: <1340121728.5203.8.camel@powernoodle> X-Enigmail-Version: 1.4.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@FreeBSD.org, Sean Bruno Subject: Re: [CFT] Sparse Cstate Support -- Its possible, that I don't know what I'm doing. 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, 19 Jun 2012 21:07:53 -0000 on 19/06/2012 19:02 Sean Bruno said the following: > The first impact of this behavior is to list C3 as C2 in the list of > Cstates when you retrieve the cx_supported sysctls for the cpus. I do not think that this is a real problem. A cosmetic one - most likely. > The > second impact is that the power_profile script never drops to a valid > Cstate when you set the economy_lowest variable in rc.conf. Could you please explain if this somehow follows from your first observation and how? If not, could you please share your finding on what exactly causes this to happen? Also, are we talking about a laptop here? Namely, judging from the reference to 'economy_lowest', are AC state changes in play? -- Andriy Gapon From owner-freebsd-acpi@FreeBSD.ORG Tue Jun 19 21:43:00 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 3B794106564A; Tue, 19 Jun 2012 21:43:00 +0000 (UTC) (envelope-from seanbru@yahoo-inc.com) Received: from mrout1-b.corp.bf1.yahoo.com (mrout1-b.corp.bf1.yahoo.com [98.139.253.104]) by mx1.freebsd.org (Postfix) with ESMTP id D74F68FC18; Tue, 19 Jun 2012 21:42:59 +0000 (UTC) Received: from [IPv6:::1] (rideseveral.corp.yahoo.com [10.73.160.231]) by mrout1-b.corp.bf1.yahoo.com (8.14.4/8.14.4/y.out) with ESMTP id q5JLggjt090221; Tue, 19 Jun 2012 14:42:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yahoo-inc.com; s=cobra; t=1340142163; bh=2okPJml7Tf+/SK6L5Z+8tXk5kFlrI29w2Gdv4yQVi5I=; h=Subject:From:To:Cc:In-Reply-To:References:Content-Type:Date: Message-ID:Mime-Version:Content-Transfer-Encoding; b=wfs63A0X9UQAl7n4icLre3nKPaF/2YXwarR3h6zyHsmRZ3RrHHM/1NgxBU3yltwhW bY/QJAgDPLOfpggciGMq6wMDCVRSSo/253fuzW7duXDtRR2tAN+Xp3oxBJ7YPS4Drb 9gVB16iMJMRsCzULG2fZcCQnR5lNLmu+fNY8ErPA= From: Sean Bruno To: Andriy Gapon In-Reply-To: <4FE0EA24.6000906@FreeBSD.org> References: <1340121728.5203.8.camel@powernoodle> <4FE0EA24.6000906@FreeBSD.org> Content-Type: text/plain; charset="UTF-8" Date: Tue, 19 Jun 2012 14:42:42 -0700 Message-ID: <1340142162.3201.12.camel@powernoodle.corp.yahoo.com> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Milter-Version: master.31+4-gbc07cd5+ X-CLX-ID: 142162002 Cc: "freebsd-acpi@freebsd.org" Subject: Re: [CFT] Sparse Cstate Support -- Its possible, that I don't know what I'm doing. 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, 19 Jun 2012 21:43:00 -0000 On Tue, 2012-06-19 at 14:07 -0700, Andriy Gapon wrote: > on 19/06/2012 19:02 Sean Bruno said the following: > > The first impact of this behavior is to list C3 as C2 in the list of > > Cstates when you retrieve the cx_supported sysctls for the cpus. > > I do not think that this is a real problem. A cosmetic one - most likely. > Yes, most likely. Except that the code seems to think that the index of the Cstates is good enough for a comparison to value. More over, the sysctl's accept a value like "C3" and manipulate that into an index into the Cstate array without checking for the Cstate value. The impact of this patch corrects this cosmetic display issue. > > The > > second impact is that the power_profile script never drops to a valid > > Cstate when you set the economy_lowest variable in rc.conf. > > Could you please explain if this somehow follows from your first observation and > how? > If not, could you please share your finding on what exactly causes this to happen? > > Also, are we talking about a laptop here? Namely, judging from the reference to > 'economy_lowest', are AC state changes in play? > No, what I was attempting to do was configure a server such that it would attempt to use the C3 state at idle. Since the server gets configured by the power_state scripts via devd, the server is never configured with its global cx_lowest as anything other than C1. e.g: -bash-4.2$ sysctl -a|grep cx_lowest hw.acpi.cpu.cx_lowest: C1 dev.cpu.0.cx_lowest: C1 dev.cpu.1.cx_lowest: C1 -bash-4.2$ sysctl -a|grep cx_supported dev.cpu.0.cx_supported: C1/1 C2/96 dev.cpu.1.cx_supported: C1/1 C2/96 It seems that the rc.conf value of performance_cx_lowest="LOW" is what I really want, not economy_cx_lowest. Sean From owner-freebsd-acpi@FreeBSD.ORG Wed Jun 20 05:00: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 115CC1065670; Wed, 20 Jun 2012 05:00:55 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 0E6F78FC0C; Wed, 20 Jun 2012 05:00:53 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id IAA18521; Wed, 20 Jun 2012 08:00:49 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1ShD29-000EDn-Bz; Wed, 20 Jun 2012 08:00:49 +0300 Message-ID: <4FE158FF.5070209@FreeBSD.org> Date: Wed, 20 Jun 2012 08:00:47 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120613 Thunderbird/13.0 MIME-Version: 1.0 To: Sean Bruno References: <1340121728.5203.8.camel@powernoodle> <4FE0EA24.6000906@FreeBSD.org> <1340142162.3201.12.camel@powernoodle.corp.yahoo.com> In-Reply-To: <1340142162.3201.12.camel@powernoodle.corp.yahoo.com> X-Enigmail-Version: 1.4.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: "sbruno@freebsd.org" , "freebsd-acpi@freebsd.org" Subject: Re: [CFT] Sparse Cstate Support -- Its possible, that I don't know what I'm doing. 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, 20 Jun 2012 05:00:55 -0000 on 20/06/2012 00:42 Sean Bruno said the following: > On Tue, 2012-06-19 at 14:07 -0700, Andriy Gapon wrote: >> on 19/06/2012 19:02 Sean Bruno said the following: >>> The first impact of this behavior is to list C3 as C2 in the list of >>> Cstates when you retrieve the cx_supported sysctls for the cpus. >> >> I do not think that this is a real problem. A cosmetic one - most likely. >> > Yes, most likely. Except that the code seems to think that the index of > the Cstates is good enough for a comparison to value. More over, the > sysctl's accept a value like "C3" and manipulate that into an index into > the Cstate array without checking for the Cstate value. > > The impact of this patch corrects this cosmetic display issue. If you accept that there are "FreeBSD C-states" and everything is done in terms of them, then there is no problem. I once wrote this trivial patch to see more information about FreeBSD-reported C-states: https://gitorious.org/~avg/freebsd/avgbsd/commit/043e9b0da5b46d389971e0166789fbee8a4e8622?format=patch >>> The >>> second impact is that the power_profile script never drops to a valid >>> Cstate when you set the economy_lowest variable in rc.conf. >> >> Could you please explain if this somehow follows from your first observation and >> how? >> If not, could you please share your finding on what exactly causes this to happen? >> >> Also, are we talking about a laptop here? Namely, judging from the reference to >> 'economy_lowest', are AC state changes in play? >> > > No, what I was attempting to do was configure a server such that it > would attempt to use the C3 state at idle. Since the server gets > configured by the power_state scripts via devd, the server is never > configured with its global cx_lowest as anything other than C1. e.g: > > -bash-4.2$ sysctl -a|grep cx_lowest > hw.acpi.cpu.cx_lowest: C1 > dev.cpu.0.cx_lowest: C1 > dev.cpu.1.cx_lowest: C1 > > -bash-4.2$ sysctl -a|grep cx_supported > dev.cpu.0.cx_supported: C1/1 C2/96 > dev.cpu.1.cx_supported: C1/1 C2/96 > > > It seems that the rc.conf value of performance_cx_lowest="LOW" is what I > really want, not economy_cx_lowest. Yes. Could you please try this without using your patch? I get an impression that its effect was to actually request C2 when cx_lowest is set to C1. -- Andriy Gapon From owner-freebsd-acpi@FreeBSD.ORG Wed Jun 20 16:12:07 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 BE8F51065673; Wed, 20 Jun 2012 16:12:07 +0000 (UTC) (envelope-from seanbru@yahoo-inc.com) Received: from mrout2-b.corp.bf1.yahoo.com (mrout2-b.corp.bf1.yahoo.com [98.139.253.105]) by mx1.freebsd.org (Postfix) with ESMTP id 68A9B8FC26; Wed, 20 Jun 2012 16:12:07 +0000 (UTC) Received: from [IPv6:::1] (rideseveral.corp.yahoo.com [10.73.160.231]) by mrout2-b.corp.bf1.yahoo.com (8.14.4/8.14.4/y.out) with ESMTP id q5KGBQKU029623; Wed, 20 Jun 2012 09:11:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yahoo-inc.com; s=cobra; t=1340208687; bh=i/i92JhX3yVmLySYTOkrsAol6nsv67dv5aNWpaMxPRY=; h=Subject:From:To:Cc:In-Reply-To:References:Content-Type:Date: Message-ID:Mime-Version:Content-Transfer-Encoding; b=euHFOUDy8q7nwqt+ewLgFVLTrZtOg7y5uQHhVow5IMKyTj4E0x9Z3I2m+IG8d84b3 9Gn30R+Tw7IeX/klddJowO3qqfNgJFBcQBeX7NHJ4TvVC6T0KFb5XgpSzHqfBZrbed x4RMLlMec2hdzo5MOrMNpCBeQRUzHc73erJIAhUg= From: Sean Bruno To: Andriy Gapon In-Reply-To: <4FE158FF.5070209@FreeBSD.org> References: <1340121728.5203.8.camel@powernoodle> <4FE0EA24.6000906@FreeBSD.org> <1340142162.3201.12.camel@powernoodle.corp.yahoo.com> <4FE158FF.5070209@FreeBSD.org> Content-Type: text/plain; charset="UTF-8" Date: Wed, 20 Jun 2012 09:11:26 -0700 Message-ID: <1340208686.2858.0.camel@powernoodle.corp.yahoo.com> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Milter-Version: master.31+4-gbc07cd5+ X-CLX-ID: 208686001 Cc: "sbruno@freebsd.org" , "freebsd-acpi@freebsd.org" Subject: Re: [CFT] Sparse Cstate Support -- Its possible, that I don't know what I'm doing. 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, 20 Jun 2012 16:12:07 -0000 On Tue, 2012-06-19 at 22:00 -0700, Andriy Gapon wrote: > > It seems that the rc.conf value of performance_cx_lowest="LOW" is > what I > > really want, not economy_cx_lowest. > > Yes. Could you please try this without using your patch? > > I get an impression that its effect was to actually request C2 when > cx_lowest is > set to C1. > > -- > Andriy Gapon Confirmed. If I set performance_cx_lowest="LOW" then the system sets the "C2" state and really implements C3 correctly. I see a 25 watt power saving without the patch on the Dell r410. sean From owner-freebsd-acpi@FreeBSD.ORG Wed Jun 20 16:14:44 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 5EDF0106566B; Wed, 20 Jun 2012 16:14:44 +0000 (UTC) (envelope-from seanbru@yahoo-inc.com) Received: from mrout2-b.corp.bf1.yahoo.com (mrout2-b.corp.bf1.yahoo.com [98.139.253.105]) by mx1.freebsd.org (Postfix) with ESMTP id 0F0518FC15; Wed, 20 Jun 2012 16:14:43 +0000 (UTC) Received: from [IPv6:::1] (rideseveral.corp.yahoo.com [10.73.160.231]) by mrout2-b.corp.bf1.yahoo.com (8.14.4/8.14.4/y.out) with ESMTP id q5KGE9Im031004; Wed, 20 Jun 2012 09:14:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yahoo-inc.com; s=cobra; t=1340208850; bh=ogXrWECm53Z+3zT/HtaWBLqQNOR1+Y14iYww2DM6Q4w=; h=Subject:From:To:Cc:In-Reply-To:References:Content-Type:Date: Message-ID:Mime-Version:Content-Transfer-Encoding; b=wI1TqjYMDvwBiQZ4yxEI0R2mwpxLF63m6sTm0o3wXx+eb66TrosU3mWy85h7BrbOK X2a6HFjDM/RMNhkMpg0bU3K+teWU09KU4ztXy6sBN8bUlPatO80WEWOFd3qVpYmfTS NhRKvZfB5jFqiDqHg/mtlrsvrs7k796AMvqroYx0= From: Sean Bruno To: Andriy Gapon In-Reply-To: <4FE158FF.5070209@FreeBSD.org> References: <1340121728.5203.8.camel@powernoodle> <4FE0EA24.6000906@FreeBSD.org> <1340142162.3201.12.camel@powernoodle.corp.yahoo.com> <4FE158FF.5070209@FreeBSD.org> Content-Type: text/plain; charset="UTF-8" Date: Wed, 20 Jun 2012 09:14:09 -0700 Message-ID: <1340208849.2858.2.camel@powernoodle.corp.yahoo.com> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Milter-Version: master.31+4-gbc07cd5+ X-CLX-ID: 208849002 Cc: "sbruno@freebsd.org" , "freebsd-acpi@freebsd.org" Subject: Re: [CFT] Sparse Cstate Support -- Its possible, that I don't know what I'm doing. 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, 20 Jun 2012 16:14:44 -0000 On Tue, 2012-06-19 at 22:00 -0700, Andriy Gapon wrote: > > I do not think that this is a real problem. A cosmetic one - most > likely. > >> > > Yes, most likely. Except that the code seems to think that the > index of > > the Cstates is good enough for a comparison to value. More over, > the > > sysctl's accept a value like "C3" and manipulate that into an index > into > > the Cstate array without checking for the Cstate value. > > > > The impact of this patch corrects this cosmetic display issue. > > If you accept that there are "FreeBSD C-states" and everything is done > in terms > of them, then there is no problem. > I once wrote this trivial patch to see more information about > FreeBSD-reported > C-states: > https://gitorious.org/~avg/freebsd/avgbsd/commit/043e9b0da5b46d389971e0166789fbee8a4e8622?format=patch Since this patch changes the output of the sysctl format, I disagree with it. I also, disagree with the idea of "FreeBSD C-states" as that is not the intention of the code. The code, from my read, is trying to interpret C-states as though they are always defined sequentially and non-sparse. I am still of the opinion that my patch is correct at this point. Sean From owner-freebsd-acpi@FreeBSD.ORG Wed Jun 20 16:44:47 2012 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 790F0106566C; Wed, 20 Jun 2012 16:44:47 +0000 (UTC) (envelope-from seanbru@yahoo-inc.com) Received: from mrout1-b.corp.bf1.yahoo.com (mrout1-b.corp.bf1.yahoo.com [98.139.253.104]) by mx1.freebsd.org (Postfix) with ESMTP id 2419C8FC17; Wed, 20 Jun 2012 16:44:47 +0000 (UTC) Received: from [IPv6:::1] (rideseveral.corp.yahoo.com [10.73.160.231]) by mrout1-b.corp.bf1.yahoo.com (8.14.4/8.14.4/y.out) with ESMTP id q5KGi8qI031100; Wed, 20 Jun 2012 09:44:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yahoo-inc.com; s=cobra; t=1340210649; bh=ty5wrM8xyapNlyQqA2HCMe+hA/5p8YRGof/78+uP004=; h=Subject:From:To:Cc:In-Reply-To:References:Content-Type:Date: Message-ID:Mime-Version:Content-Transfer-Encoding; b=w1P1ebKp3knfFbe86Fh4h7skiTIWFmpzMF3Fz0zfyFRch2uW1zdHOBVjbf4B8I8DA yYbns6DBLm3ir+c8uePpjEJ+0tgpFBAjsO35EF6RT0i/52fQFUZt+MP80GaKEB0Jrr 1/NsNahQts3aVPymDp6YJi5imCJrMeYpKw0dbL24= From: Sean Bruno To: "sbruno@freebsd.org" In-Reply-To: <1340121728.5203.8.camel@powernoodle> References: <1340121728.5203.8.camel@powernoodle> Content-Type: text/plain; charset="UTF-8" Date: Wed, 20 Jun 2012 09:44:08 -0700 Message-ID: <1340210648.2858.9.camel@powernoodle.corp.yahoo.com> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Milter-Version: master.31+4-gbc07cd5+ X-CLX-ID: 210649002 Cc: "freebsd-acpi@freebsd.org" Subject: Re: [CFT] Sparse Cstate Support -- Its possible, that I don't know what I'm doing. 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, 20 Jun 2012 16:44:47 -0000 On Tue, 2012-06-19 at 09:02 -0700, Sean Bruno wrote: > http://people.freebsd.org/~sbruno/acpi_cpu_cstate_sparse.txt also, I wanted to point out that I'm returning BUS_PROBE_GENERIC here. I want to emulate the Intel acpi_idle code that exists in linux-land and I *thought* that I could setup an acpi_cpu_idle module that would come in at a higher priority on Intel cpus, however there's some SYSINIT() hackery going on that I don't know how to handle gracefully. I'm not sure how to proceed with a different idle module here. thoughts? e.g. static void acpi_cpu_postattach(void *unused __unused) { device_t *devices; int err; int i, n; err = devclass_get_devices(acpi_cpu_devclass, &devices, &n); if (err != 0) { printf("devclass_get_devices(acpi_cpu_devclass) failed\n"); return; } for (i = 0; i < n; i++) bus_generic_probe(devices[i]); for (i = 0; i < n; i++) bus_generic_attach(devices[i]); free(devices, M_TEMP); } SYSINIT(acpi_cpu, SI_SUB_CONFIGURE, SI_ORDER_MIDDLE, acpi_cpu_postattach, NULL); From owner-freebsd-acpi@FreeBSD.ORG Wed Jun 20 19:32:08 2012 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AA923106564A; Wed, 20 Jun 2012 19:32:08 +0000 (UTC) (envelope-from mbsd@isgroup.com.ua) Received: from mail.standard.com.ua (mail.isgroup.com.ua [46.229.54.104]) by mx1.freebsd.org (Postfix) with ESMTP id 13CA68FC19; Wed, 20 Jun 2012 19:32:07 +0000 (UTC) Received: from [192.168.0.2] (unused-213.111.71.69.bilink.ua [213.111.71.69] (may be forged)) (authenticated bits=0) by mail.standard.com.ua (8.14.3/8.14.3) with ESMTP id q5KJOddo046734; Wed, 20 Jun 2012 22:24:40 +0300 (EEST) (envelope-from mbsd@isgroup.com.ua) From: mbsd To: Mitsuru IWASAKI In-Reply-To: <20120516.113117.66055741.iwasaki@jp.FreeBSD.org> References: <9E61BC2D-2654-40D9-936F-A99CD7AC1354@entel.upc.edu> <20120514.131617.129792413.iwasaki@jp.FreeBSD.org> <4FB146F8.9090901@FreeBSD.org> <20120516.113117.66055741.iwasaki@jp.FreeBSD.org> Content-Type: text/plain; charset="UTF-8" Date: Wed, 20 Jun 2012 22:31:44 +0300 Message-ID: <1340220704.2098.8.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.9 required=9.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mail.isgroup.com.ua Cc: freebsd-acpi@freebsd.org, gperez@entel.upc.edu, freebsd-current@freebsd.org Subject: Re: [CFT] SMP/i386 suspend/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: Wed, 20 Jun 2012 19:32:08 -0000 Hi developers. I want help you with your acpi work. I have thinkpad t61. Could you write a small to do. Step by step, how tests your patches? Which information is important for send. On Wed, 2012-05-16 at 11:31 +0900, Mitsuru IWASAKI wrote: > Hi, > > > First of all, thank you very much for your work! I wanted to do it > > for very long time but I had no time to actually implement it. :-) > > Welcome! I also wanted to do this for very long time but I had no > time and test machines ;) > Recently I got Core Duo (Thinkpad X60) and Core 2 Duo (X61) machines. > I have some more ideas on wakecode but I'm not sure whether it is possible > for now. I'll propose it when it is ready. > > > I know for sure it is not related to your patches. In fact, we cannot > > resume most NVIDIA controllers without NVIDIA kernel driver + binary > > X.org driver + VT switching hack (i.e., > > Hmm, my knowledge on recent hardware is very poor, so your comments > are very helpful to catch up. Thanks. > > > > We can improve video initialization on another opportunity. Linux > > > have many video hacks while we have only hw.acpi.reset_video ;) > > > > FYI, we don't need hw.acpi.reset_video any more (and it is even > > harmful). It is done from vesa.ko now. > > Yeah, I thought that we need INT10 to set video mode again in > realmode, but found it can be done in protected mode with > x86bios_intr(), great! > > Anyway, thanks for many things! > _______________________________________________ > freebsd-acpi@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-acpi > To unsubscribe, send any mail to "freebsd-acpi-unsubscribe@freebsd.org" From owner-freebsd-acpi@FreeBSD.ORG Wed Jun 20 20:18:26 2012 Return-Path: Delivered-To: freebsd-acpi@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F2F8A106564A; Wed, 20 Jun 2012 20:18:26 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 152B98FC14; Wed, 20 Jun 2012 20:18:25 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id XAA29642; Wed, 20 Jun 2012 23:18:15 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1ShRLz-000FHH-LH; Wed, 20 Jun 2012 23:18:15 +0300 Message-ID: <4FE23004.3080609@FreeBSD.org> Date: Wed, 20 Jun 2012 23:18:12 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120613 Thunderbird/13.0 MIME-Version: 1.0 To: Sean Bruno References: <1340121728.5203.8.camel@powernoodle> <4FE0EA24.6000906@FreeBSD.org> <1340142162.3201.12.camel@powernoodle.corp.yahoo.com> <4FE158FF.5070209@FreeBSD.org> <1340208849.2858.2.camel@powernoodle.corp.yahoo.com> In-Reply-To: <1340208849.2858.2.camel@powernoodle.corp.yahoo.com> X-Enigmail-Version: 1.4.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: "sbruno@freebsd.org" , "freebsd-acpi@freebsd.org" Subject: Re: [CFT] Sparse Cstate Support -- Its possible, that I don't know what I'm doing. 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, 20 Jun 2012 20:18:27 -0000 on 20/06/2012 19:14 Sean Bruno said the following: > Since this patch changes the output of the sysctl format, I disagree > with it. And I am not proposing it for the tree. > I also, disagree with the idea of "FreeBSD C-states" as that is not the > intention of the code. The code, from my read, is trying to interpret > C-states as though they are always defined sequentially and non-sparse. I seem to recall that this is an ACPI requirement. I could be mistaken, but no time to double-check at the moment. > I am still of the opinion that my patch is correct at this point. -- Andriy Gapon From owner-freebsd-acpi@FreeBSD.ORG Wed Jun 20 20:55:58 2012 Return-Path: Delivered-To: freebsd-acpi@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 968C01065673; Wed, 20 Jun 2012 20:55:58 +0000 (UTC) (envelope-from seanbru@yahoo-inc.com) Received: from mrout1-b.corp.bf1.yahoo.com (mrout1-b.corp.bf1.yahoo.com [98.139.253.104]) by mx1.freebsd.org (Postfix) with ESMTP id 554558FC22; Wed, 20 Jun 2012 20:55:58 +0000 (UTC) Received: from [IPv6:::1] (rideseveral.corp.yahoo.com [10.73.160.231]) by mrout1-b.corp.bf1.yahoo.com (8.14.4/8.14.4/y.out) with ESMTP id q5KKsd9M080350; Wed, 20 Jun 2012 13:54:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yahoo-inc.com; s=cobra; t=1340225681; bh=b1T1z5K/D8ecPO0oi4cDJ9ap9WJtfsavWQZMazpCWw4=; h=Subject:From:To:Cc:In-Reply-To:References:Content-Type:Date: Message-ID:Mime-Version:Content-Transfer-Encoding; b=VZDqwXSBRsWBmOA5Tkh/Un7BkZ7jGWFYG2UU/cxa7uUNvTQIwFSPQ/8tCAFYOHPb1 vWQZJlL31P61XPazPNYVjb2cC9CelMwdBgzIoIownBYdL6uigTwVm4o5PfsK1Q5dmb GkLNbRouoJTCE4JtAdxasFqKTbg2SatEhKo5oeP4= From: Sean Bruno To: Andriy Gapon In-Reply-To: <4FE23004.3080609@FreeBSD.org> References: <1340121728.5203.8.camel@powernoodle> <4FE0EA24.6000906@FreeBSD.org> <1340142162.3201.12.camel@powernoodle.corp.yahoo.com> <4FE158FF.5070209@FreeBSD.org> <1340208849.2858.2.camel@powernoodle.corp.yahoo.com> <4FE23004.3080609@FreeBSD.org> Content-Type: text/plain; charset="UTF-8" Date: Wed, 20 Jun 2012 13:54:39 -0700 Message-ID: <1340225679.2858.26.camel@powernoodle.corp.yahoo.com> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Milter-Version: master.31+4-gbc07cd5+ X-CLX-ID: 225680001 Cc: "sbruno@freebsd.org" , "freebsd-acpi@freebsd.org" Subject: Re: [CFT] Sparse Cstate Support -- Its possible, that I don't know what I'm doing. 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, 20 Jun 2012 20:55:58 -0000 On Wed, 2012-06-20 at 13:18 -0700, Andriy Gapon wrote: > > I also, disagree with the idea of "FreeBSD C-states" as that is not > the > > intention of the code. The code, from my read, is trying to > interpret > > C-states as though they are always defined sequentially and > non-sparse. > > I seem to recall that this is an ACPI requirement. I could be > mistaken, but no > time to double-check at the moment. > > Just to check as I'm actively looking at this code I went and grabbed the December 6, 2011 ACPI spec. http://www.acpi.info/spec.htm chap 8.1 pretty clearly states that C2 and C3 are optional states. So it appears that you can have a C3 without a C2. So, I suspect that the idea that the index the cx_states array is always going to be 1 less that the ACPI Cstate value isn't by spec. Or something ... :-) Sean "I have no idea how computers work" Bruno From owner-freebsd-acpi@FreeBSD.ORG Wed Jun 20 23:29:10 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 BD856106566C; Wed, 20 Jun 2012 23:29:10 +0000 (UTC) (envelope-from seanbru@yahoo-inc.com) Received: from mrout1-b.corp.bf1.yahoo.com (mrout1-b.corp.bf1.yahoo.com [98.139.253.104]) by mx1.freebsd.org (Postfix) with ESMTP id 7F6578FC14; Wed, 20 Jun 2012 23:29:10 +0000 (UTC) Received: from [IPv6:::1] (rideseveral.corp.yahoo.com [10.73.160.231]) by mrout1-b.corp.bf1.yahoo.com (8.14.4/8.14.4/y.out) with ESMTP id q5KNSa7A071150; Wed, 20 Jun 2012 16:28:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yahoo-inc.com; s=cobra; t=1340234917; bh=p0Z153vY9sOCFsmYgLiZ2ZVqvSwf2i9Unv/Qo7sbjl4=; h=Subject:From:To:Cc:In-Reply-To:References:Content-Type:Date: Message-ID:Mime-Version:Content-Transfer-Encoding; b=VnV4cqJEzqdVX+wVYqEN9uO5SZnizcupjKue7wmOOxZPFTf/UDyEHyYRyt5DawZiW uGnq05MReko04n97uZt2fNJsqgamxUI4kEBo/R/rfdhT/OVHqCV6mdiZPEp4InlrRg o9txsPhSN/8T5qlisY+2csW0sfn1HskJ34zaHawY= From: Sean Bruno To: "sbruno@freebsd.org" In-Reply-To: <1340210648.2858.9.camel@powernoodle.corp.yahoo.com> References: <1340121728.5203.8.camel@powernoodle> <1340210648.2858.9.camel@powernoodle.corp.yahoo.com> Content-Type: text/plain; charset="UTF-8" Date: Wed, 20 Jun 2012 16:28:36 -0700 Message-ID: <1340234916.2858.29.camel@powernoodle.corp.yahoo.com> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Milter-Version: master.31+4-gbc07cd5+ X-CLX-ID: 234916001 Cc: "freebsd-acpi@freebsd.org" Subject: Re: [CFT] Sparse Cstate Support -- Its possible, that I don't know what I'm doing. 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, 20 Jun 2012 23:29:10 -0000 On Wed, 2012-06-20 at 09:44 -0700, Sean Bruno wrote: > On Tue, 2012-06-19 at 09:02 -0700, Sean Bruno wrote: > > http://people.freebsd.org/~sbruno/acpi_cpu_cstate_sparse.txt > > also, I wanted to point out that I'm returning BUS_PROBE_GENERIC here. > > I want to emulate the Intel acpi_idle code that exists in linux-land and > I *thought* that I could setup an acpi_cpu_idle module that would come > in at a higher priority on Intel cpus, however there's some SYSINIT() > hackery going on that I don't know how to handle gracefully. I'm not > sure how to proceed with a different idle module here. thoughts? > > e.g. > > static void > acpi_cpu_postattach(void *unused __unused) > { > device_t *devices; > int err; > int i, n; > > err = devclass_get_devices(acpi_cpu_devclass, &devices, &n); > if (err != 0) { > printf("devclass_get_devices(acpi_cpu_devclass) failed\n"); > return; > } > for (i = 0; i < n; i++) > bus_generic_probe(devices[i]); > for (i = 0; i < n; i++) > bus_generic_attach(devices[i]); > free(devices, M_TEMP); > } > > SYSINIT(acpi_cpu, SI_SUB_CONFIGURE, SI_ORDER_MIDDLE, > acpi_cpu_postattach, NULL); > > Ohhhhhh ... right. This entire idea is stupid and fully demonstrates my lack of understanding. bus_probe/attach can't be used, there's no BUS here. So, SYSINIT() to the rescue. Ok, that changes things around a lot for me. This BUS_PROBE_GENERIC idea is a dud. /me goes back to reading first and typing second Sean From owner-freebsd-acpi@FreeBSD.ORG Thu Jun 21 13:50:32 2012 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 02F301065673; Thu, 21 Jun 2012 13:50:32 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id CA34C8FC0C; Thu, 21 Jun 2012 13:50:31 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 344D2B983; Thu, 21 Jun 2012 09:50:31 -0400 (EDT) From: John Baldwin To: freebsd-acpi@freebsd.org Date: Thu, 21 Jun 2012 09:50:23 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <1340121728.5203.8.camel@powernoodle> <1340210648.2858.9.camel@powernoodle.corp.yahoo.com> <1340234916.2858.29.camel@powernoodle.corp.yahoo.com> In-Reply-To: <1340234916.2858.29.camel@powernoodle.corp.yahoo.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201206210950.23259.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 21 Jun 2012 09:50:31 -0400 (EDT) Cc: Sean Bruno Subject: Re: [CFT] Sparse Cstate Support -- Its possible, that I don't know what I'm doing. 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, 21 Jun 2012 13:50:32 -0000 On Wednesday, June 20, 2012 7:28:36 pm Sean Bruno wrote: > On Wed, 2012-06-20 at 09:44 -0700, Sean Bruno wrote: > > On Tue, 2012-06-19 at 09:02 -0700, Sean Bruno wrote: > > > http://people.freebsd.org/~sbruno/acpi_cpu_cstate_sparse.txt > > > > also, I wanted to point out that I'm returning BUS_PROBE_GENERIC here. > > > > I want to emulate the Intel acpi_idle code that exists in linux-land and > > I *thought* that I could setup an acpi_cpu_idle module that would come > > in at a higher priority on Intel cpus, however there's some SYSINIT() > > hackery going on that I don't know how to handle gracefully. I'm not > > sure how to proceed with a different idle module here. thoughts? > > > > e.g. > > > > static void > > acpi_cpu_postattach(void *unused __unused) > > { > > device_t *devices; > > int err; > > int i, n; > > > > err = devclass_get_devices(acpi_cpu_devclass, &devices, &n); > > if (err != 0) { > > printf("devclass_get_devices(acpi_cpu_devclass) failed\n"); > > return; > > } > > for (i = 0; i < n; i++) > > bus_generic_probe(devices[i]); > > for (i = 0; i < n; i++) > > bus_generic_attach(devices[i]); > > free(devices, M_TEMP); > > } > > > > SYSINIT(acpi_cpu, SI_SUB_CONFIGURE, SI_ORDER_MIDDLE, > > acpi_cpu_postattach, NULL); > > > > > > > Ohhhhhh ... right. This entire idea is stupid and fully demonstrates my > lack of understanding. bus_probe/attach can't be used, there's no BUS > here. So, SYSINIT() to the rescue. Ok, that changes things around a > lot for me. This BUS_PROBE_GENERIC idea is a dud. No, every device in new-bus can be a bus (and acpi_cpuX is in fact a bus). The issue here is that this driver is deferring attaching child devices until later in the boot. This is a bit of a lame workaround that should be using new-bus multipass instead. -- John Baldwin From owner-freebsd-acpi@FreeBSD.ORG Thu Jun 21 14:55:13 2012 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 41AED106566C; Thu, 21 Jun 2012 14:55:13 +0000 (UTC) (envelope-from iwasaki@jp.FreeBSD.org) Received: from locore.org (ns01.locore.org [218.45.21.227]) by mx1.freebsd.org (Postfix) with ESMTP id CC2DB8FC0A; Thu, 21 Jun 2012 14:55:12 +0000 (UTC) Received: from localhost (celeron.v4.locore.org [192.168.0.10]) by locore.org (8.14.5/8.14.5/iwasaki) with ESMTP/inet id q5LEsnJX031159; Thu, 21 Jun 2012 23:54:49 +0900 (JST) (envelope-from iwasaki@jp.FreeBSD.org) Date: Thu, 21 Jun 2012 23:54:49 +0900 (JST) Message-Id: <20120621.235449.88474084.iwasaki@jp.FreeBSD.org> To: mbsd@isgroup.com.ua From: Mitsuru IWASAKI In-Reply-To: <1340220704.2098.8.camel@localhost> References: <4FB146F8.9090901@FreeBSD.org> <20120516.113117.66055741.iwasaki@jp.FreeBSD.org> <1340220704.2098.8.camel@localhost> X-Mailer: Mew version 3.3 on Emacs 20.7 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@freebsd.org, gperez@entel.upc.edu, freebsd-current@freebsd.org Subject: Re: [CFT] SMP/i386 suspend/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, 21 Jun 2012 14:55:13 -0000 Hi, From: mbsd Subject: Re: [CFT] SMP/i386 suspend/resume Date: Wed, 20 Jun 2012 22:31:44 +0300 Message-ID: <1340220704.2098.8.camel@localhost> > Hi developers. > > I want help you with your acpi work. I have thinkpad t61. > Could you write a small to do. Step by step, how tests your patches? > Which information is important for send. The patches were already merged to CURRENT and RELENG_9. So, please try RELENG_9 and report any problems suspend/resume. I'll try to fix them until 9.1-RELEASE :) Thanks! > > On Wed, 2012-05-16 at 11:31 +0900, Mitsuru IWASAKI wrote: > > Hi, > > > > > First of all, thank you very much for your work! I wanted to do it > > > for very long time but I had no time to actually implement it. :-) > > > > Welcome! I also wanted to do this for very long time but I had no > > time and test machines ;) > > Recently I got Core Duo (Thinkpad X60) and Core 2 Duo (X61) machines. > > I have some more ideas on wakecode but I'm not sure whether it is possible > > for now. I'll propose it when it is ready. > > > > > I know for sure it is not related to your patches. In fact, we cannot > > > resume most NVIDIA controllers without NVIDIA kernel driver + binary > > > X.org driver + VT switching hack (i.e., > > > > Hmm, my knowledge on recent hardware is very poor, so your comments > > are very helpful to catch up. Thanks. > > > > > > We can improve video initialization on another opportunity. Linux > > > > have many video hacks while we have only hw.acpi.reset_video ;) > > > > > > FYI, we don't need hw.acpi.reset_video any more (and it is even > > > harmful). It is done from vesa.ko now. > > > > Yeah, I thought that we need INT10 to set video mode again in > > realmode, but found it can be done in protected mode with > > x86bios_intr(), great! > > > > Anyway, thanks for many things! > > _______________________________________________ > > freebsd-acpi@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-acpi > > To unsubscribe, send any mail to "freebsd-acpi-unsubscribe@freebsd.org" > > > From owner-freebsd-acpi@FreeBSD.ORG Fri Jun 22 07:24:24 2012 Return-Path: Delivered-To: freebsd-acpi@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 838EA106566C; Fri, 22 Jun 2012 07:24:24 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 9C1AA8FC0C; Fri, 22 Jun 2012 07:24:23 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id KAA17418; Fri, 22 Jun 2012 10:24:11 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1ShyDz-000MYC-AA; Fri, 22 Jun 2012 10:24:11 +0300 Message-ID: <4FE41D9A.4080008@FreeBSD.org> Date: Fri, 22 Jun 2012 10:24:10 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120613 Thunderbird/13.0 MIME-Version: 1.0 To: Sean Bruno References: <1340121728.5203.8.camel@powernoodle> <1340210648.2858.9.camel@powernoodle.corp.yahoo.com> In-Reply-To: <1340210648.2858.9.camel@powernoodle.corp.yahoo.com> X-Enigmail-Version: 1.4.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: "sbruno@freebsd.org" , "freebsd-acpi@freebsd.org" Subject: Re: [CFT] Sparse Cstate Support -- Its possible, that I don't know what I'm doing. 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, 22 Jun 2012 07:24:24 -0000 on 20/06/2012 19:44 Sean Bruno said the following: > On Tue, 2012-06-19 at 09:02 -0700, Sean Bruno wrote: >> http://people.freebsd.org/~sbruno/acpi_cpu_cstate_sparse.txt > > also, I wanted to point out that I'm returning BUS_PROBE_GENERIC here. > > I want to emulate the Intel acpi_idle code that exists in linux-land and > I *thought* that I could setup an acpi_cpu_idle module that would come > in at a higher priority on Intel cpus, however there's some SYSINIT() > hackery going on that I don't know how to handle gracefully. I'm not > sure how to proceed with a different idle module here. thoughts? > > e.g. > > static void > acpi_cpu_postattach(void *unused __unused) > { > device_t *devices; > int err; > int i, n; > > err = devclass_get_devices(acpi_cpu_devclass, &devices, &n); > if (err != 0) { > printf("devclass_get_devices(acpi_cpu_devclass) failed\n"); > return; > } > for (i = 0; i < n; i++) > bus_generic_probe(devices[i]); > for (i = 0; i < n; i++) > bus_generic_attach(devices[i]); > free(devices, M_TEMP); > } > > SYSINIT(acpi_cpu, SI_SUB_CONFIGURE, SI_ORDER_MIDDLE, > acpi_cpu_postattach, NULL); > > Just a little bit of explanation for the code. acpi_cpu driver is attached very early because it does some ACPI configuration in its attach method (_OSC/_PDC calls) and correct behavior of other ACPI drivers may depend on this. On the other hand, acpi_cpu acts as a bus and has child devices. Some of those children can not attach that early because they need more of the system to be initialized (e.g. PCI bus). Hence the SYSINIT hack to attach them later. -- Andriy Gapon From owner-freebsd-acpi@FreeBSD.ORG Fri Jun 22 07:25:50 2012 Return-Path: Delivered-To: freebsd-acpi@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 56DD7106566C; Fri, 22 Jun 2012 07:25:50 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 684F88FC0A; Fri, 22 Jun 2012 07:25:49 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id KAA17435; Fri, 22 Jun 2012 10:25:48 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1ShyFX-000MYM-S5; Fri, 22 Jun 2012 10:25:47 +0300 Message-ID: <4FE41DFB.7010008@FreeBSD.org> Date: Fri, 22 Jun 2012 10:25:47 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120613 Thunderbird/13.0 MIME-Version: 1.0 To: John Baldwin References: <1340121728.5203.8.camel@powernoodle> <1340210648.2858.9.camel@powernoodle.corp.yahoo.com> <1340234916.2858.29.camel@powernoodle.corp.yahoo.com> <201206210950.23259.jhb@freebsd.org> In-Reply-To: <201206210950.23259.jhb@freebsd.org> X-Enigmail-Version: 1.4.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@FreeBSD.org, Sean Bruno Subject: Re: [CFT] Sparse Cstate Support -- Its possible, that I don't know what I'm doing. 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, 22 Jun 2012 07:25:50 -0000 on 21/06/2012 16:50 John Baldwin said the following: > On Wednesday, June 20, 2012 7:28:36 pm Sean Bruno wrote: >> On Wed, 2012-06-20 at 09:44 -0700, Sean Bruno wrote: >>> On Tue, 2012-06-19 at 09:02 -0700, Sean Bruno wrote: >>>> http://people.freebsd.org/~sbruno/acpi_cpu_cstate_sparse.txt >>> >>> also, I wanted to point out that I'm returning BUS_PROBE_GENERIC here. >>> >>> I want to emulate the Intel acpi_idle code that exists in linux-land and >>> I *thought* that I could setup an acpi_cpu_idle module that would come >>> in at a higher priority on Intel cpus, however there's some SYSINIT() >>> hackery going on that I don't know how to handle gracefully. I'm not >>> sure how to proceed with a different idle module here. thoughts? >>> >>> e.g. >>> >>> static void >>> acpi_cpu_postattach(void *unused __unused) >>> { >>> device_t *devices; >>> int err; >>> int i, n; >>> >>> err = devclass_get_devices(acpi_cpu_devclass, &devices, &n); >>> if (err != 0) { >>> printf("devclass_get_devices(acpi_cpu_devclass) failed\n"); >>> return; >>> } >>> for (i = 0; i < n; i++) >>> bus_generic_probe(devices[i]); >>> for (i = 0; i < n; i++) >>> bus_generic_attach(devices[i]); >>> free(devices, M_TEMP); >>> } >>> >>> SYSINIT(acpi_cpu, SI_SUB_CONFIGURE, SI_ORDER_MIDDLE, >>> acpi_cpu_postattach, NULL); >>> >>> >> >> >> Ohhhhhh ... right. This entire idea is stupid and fully demonstrates my >> lack of understanding. bus_probe/attach can't be used, there's no BUS >> here. So, SYSINIT() to the rescue. Ok, that changes things around a >> lot for me. This BUS_PROBE_GENERIC idea is a dud. > > No, every device in new-bus can be a bus (and acpi_cpuX is in fact a bus). > The issue here is that this driver is deferring attaching child devices until > later in the boot. This is a bit of a lame workaround that should be using > new-bus multipass instead. > Yes. The only excuse is that the hack was introduced, if I remember correctly, before the multipass support. -- Andriy Gapon From owner-freebsd-acpi@FreeBSD.ORG Fri Jun 22 07:30:31 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 492411065670; Fri, 22 Jun 2012 07:30:31 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 5C1AC8FC12; Fri, 22 Jun 2012 07:30:30 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id KAA17487; Fri, 22 Jun 2012 10:30:26 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1ShyK2-000MYq-88; Fri, 22 Jun 2012 10:30:26 +0300 Message-ID: <4FE41F11.4080601@FreeBSD.org> Date: Fri, 22 Jun 2012 10:30:25 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120613 Thunderbird/13.0 MIME-Version: 1.0 To: Sean Bruno References: <1340121728.5203.8.camel@powernoodle> <4FE0EA24.6000906@FreeBSD.org> <1340142162.3201.12.camel@powernoodle.corp.yahoo.com> <4FE158FF.5070209@FreeBSD.org> <1340208849.2858.2.camel@powernoodle.corp.yahoo.com> <4FE23004.3080609@FreeBSD.org> <1340225679.2858.26.camel@powernoodle.corp.yahoo.com> In-Reply-To: <1340225679.2858.26.camel@powernoodle.corp.yahoo.com> X-Enigmail-Version: 1.4.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: "sbruno@freebsd.org" , "freebsd-acpi@freebsd.org" Subject: Re: [CFT] Sparse Cstate Support -- Its possible, that I don't know what I'm doing. 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, 22 Jun 2012 07:30:31 -0000 on 20/06/2012 23:54 Sean Bruno said the following: > On Wed, 2012-06-20 at 13:18 -0700, Andriy Gapon wrote: >>> I also, disagree with the idea of "FreeBSD C-states" as that is not >> the >>> intention of the code. The code, from my read, is trying to >> interpret >>> C-states as though they are always defined sequentially and >> non-sparse. >> >> I seem to recall that this is an ACPI requirement. I could be >> mistaken, but no >> time to double-check at the moment. >> >> > > Just to check as I'm actively looking at this code I went and grabbed > the December 6, 2011 ACPI spec. http://www.acpi.info/spec.htm > > chap 8.1 pretty clearly states that C2 and C3 are optional states. So it > appears that you can have a C3 without a C2. So, I suspect that the > idea that the index the cx_states array is always going to be 1 less > that the ACPI Cstate value isn't by spec. Or something ... :-) I think that the chapter on _CST is more relevant here (8.4.2.1 in my copy of the spec). But anyway, there is no such requirement in the specification. I was misremembering the requirement that states should be ordered. So, would you like to produce a cleaned up version of your patch with only this change in it? -- Andriy Gapon From owner-freebsd-acpi@FreeBSD.ORG Sat Jun 23 03:24:30 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 59A00106566B for ; Sat, 23 Jun 2012 03:24:30 +0000 (UTC) (envelope-from wollman@hergotha.csail.mit.edu) Received: from hergotha.csail.mit.edu (wollman-1-pt.tunnel.tserv4.nyc4.ipv6.he.net [IPv6:2001:470:1f06:ccb::2]) by mx1.freebsd.org (Postfix) with ESMTP id 012FF8FC12 for ; Sat, 23 Jun 2012 03:24:29 +0000 (UTC) Received: from hergotha.csail.mit.edu (localhost [127.0.0.1]) by hergotha.csail.mit.edu (8.14.5/8.14.5) with ESMTP id q5N3OTTD012558 for ; Fri, 22 Jun 2012 23:24:29 -0400 (EDT) (envelope-from wollman@hergotha.csail.mit.edu) Received: (from wollman@localhost) by hergotha.csail.mit.edu (8.14.5/8.14.4/Submit) id q5N3OTNj012555; Fri, 22 Jun 2012 23:24:29 -0400 (EDT) (envelope-from wollman) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <20453.14061.23653.52464@hergotha.csail.mit.edu> Date: Fri, 22 Jun 2012 23:24:29 -0400 From: Garrett Wollman To: freebsd-acpi@freebsd.org X-Mailer: VM 7.17 under 21.4 (patch 22) "Instant Classic" XEmacs Lucid X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (hergotha.csail.mit.edu [127.0.0.1]); Fri, 22 Jun 2012 23:24:29 -0400 (EDT) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED, T_FILL_THIS_FORM_SHORT autolearn=disabled version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on hergotha.csail.mit.edu Subject: IPMI attachment fails: vendor bug, or just unusual choice? 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, 23 Jun 2012 03:24:30 -0000 On my Quanta QSSC-S99Q, the IPMI driver has trouble using the ACPI attachment. It reports: ipmi0: on acpi0 ipmi0: unknown resource type device_attach: ipmi0 attach returned 6 It then goes on to find it the old-fashioned way as ipmi1, which sometimes works and sometiems doesn't. (Not worrying about that part yet -- I think it's a timing issue.) Looking at the code, it looks like this can only happen if there are neither I/O port nor memory resources defined for this device. However, there clearly is one in the AML: Device (MI0) { Name (_HID, EisaId ("IPI0001")) Method (_STA, 0, NotSerialized) { If (LEqual (OSN, Zero)) { Return (Zero) } Return (0x0F) } Name (_STR, Unicode ("IPMI_KCS")) Name (_UID, Zero) Name (_CRS, ResourceTemplate () { IO (Decode16, 0x0CA2, // Range Minimum 0x0CA3, // Range Maximum 0x00, // Alignment 0x02, // Length ) }) Method (_IFT, 0, NotSerialized) { Return (One) } Method (_SRV, 0, NotSerialized) { Return (0x0200) } } Did the vendor screw this up by writing this as a port range? Or is this perfectly legitimate and just not implemented? I will be trying the following when I am next in physical proximity to one of these machines: Index: dev/acpica/acpi_resource.c =================================================================== --- dev/acpica/acpi_resource.c (revision 237411) +++ dev/acpica/acpi_resource.c (working copy) @@ -504,7 +504,29 @@ if (cp == NULL) return; - device_printf(dev, "I/O range not supported\n"); + /* HACK HACK HACK */ + /* + * On my Quanta QSSC-S99Q, with the following DSDT, the IPMI interface + * shows up as a port range resource. I think this is actually a bug + * in the vendor's ASL, but haven't verified this with ACPI experts. + * Signature "DSDT" + * Length 0x00006122 (24866) + * Revision 0x01 **** 32-bit table (V1), no 64-bit math support + * Checksum 0x6A + * OEM ID "Z99_3" + * OEM Table ID "Z99_3A03" + * OEM Revision 0x00000A03 (2563) + * Compiler ID "INTL" + * Compiler Version 0x20051117 (537202967) + * + * If the port range contains exactly as many ports as the specified + * length, assume the vendor screwed it up and treat like a fixed + * port resource. + */ + if (high == low + length - 1 && align == 0) + acpi_res_set_ioport(dev, context, low, length); + else + device_printf(dev, "I/O range not supported\n"); } static void -GAWollman