From owner-freebsd-acpi@FreeBSD.ORG Thu Mar 19 08:11:05 2015 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19B104FF for ; Thu, 19 Mar 2015 08:11:05 +0000 (UTC) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F519935 for ; Thu, 19 Mar 2015 08:11:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id t2J8AfGD011554; Thu, 19 Mar 2015 19:10:41 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Thu, 19 Mar 2015 19:10:40 +1100 (EST) From: Ian Smith To: Warner Losh Subject: Re: [PATCH] ACPI CMOS region support rev. 5 In-Reply-To: Message-ID: <20150319184348.X22641@sola.nimnet.asn.au> References: <20150222180817.GD27984@strugglingcoder.info> <54EB8C21.2080600@att.net> <2401337.2oUs7iAbtB@ralph.baldwin.cx> <54EF3D5D.4010106@att.net> <20150227222203.P38620@sola.nimnet.asn.au> <20150228125857.D1277@besplex.bde.org> <54F14368.4020807@att.net> <20150302002647.W42658@sola.nimnet.asn.au> <54F5E53D.1090601@att.net> <20150306025800.U46361@sola.nimnet.asn.au> <54F9D7E6.4050807@att.net> <5504FF32.3020202@att.net> <20150317001401.X22641@sola.nimnet.asn.au> <5506F00A.3030708@att.net> <5506FBE3.1000009@att.net> <20150317041624.K22641@sola.nimnet.asn.au> <55073442.5060005@att.net> <20150317222704.K22641@sola.nimnet.asn.au> <550825DE.7030406@att.net> <56B494A3-2058-4B7B-8183-646A46753A53@bsdimp.com> <5509A282.6070207@att.net> MIME-Version: 1.0 Content-ID: <20150319184542.U22641@sola.nimnet.asn.au> Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-1 Content-Transfer-Encoding: 8BIT X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: Anthony Jenkins , freebsd-acpi@freebsd.org X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Mar 2015 08:11:05 -0000 On Wed, 18 Mar 2015 15:30:23 -0600, Warner Losh wrote: > > On Mar 18, 2015, at 10:06 AM, Anthony Jenkins wrote: > > > > On 03/18/2015 11:29 AM, Warner Losh wrote: > >>> On Mar 17, 2015, at 7:02 AM, Anthony Jenkins wrote: > >>>> \Where else might ATRTC_VERBOSE be set otherwise? > >>> I'm picturing a (future?) config(5) knob, e.g. > >>> > >>> device atrtc > >>> options ATRTC_VERBOSE=1 > >>> > >>> > >>> so it can be set at compile time. > >> Why not just boot verbose? history has shown too many options like > >> this is hard to use. You can blame this on me :) I agree about the option not being needed; the way it is you can just set sysctl hw.acpi.atrtc_verbose=0 to quell reports of successful access, if it turns out these are routine on some machines, especially outside of boot/suspend/resume contexts. However I'll still argue that, this being a new gadget and that we could use finding out which vendors want to read or write which locations in CMOS for whatever reason, at least while it's in head, we should log all access by default unless setting atrtc_verbose=0, and in _any_ case we should be logging attempts to R/W out-of-bounds CMOS locations. > > I think I understand what you're saying... I also prefer fewer config(5) > > knobs. So you're suggesting I determine (at runtime) the boot verbose > > setting (kenv(2) or however it's properly done) and dump the > > compile-time verbosity setting? > > if (bootverbose) > do verbose things; > > is how that˙˙s done. Sure, and maybe successful access could be limited to bootverbose, and we could ask people whose boxes fail to boot/suspend/resume/whatever to boot verbose to reveal such as why Anthony's HP Envy either failed to suspend or immediately resumed - which isn't entirely clear, even with the messages - unless its ACPI AML succeeded in reading minute, hour and weekday, but I have a feeling we may see more of this sort of thing. cheers, Ian From owner-freebsd-acpi@FreeBSD.ORG Thu Mar 19 13:11:17 2015 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8A8BDF3 for ; Thu, 19 Mar 2015 13:11:17 +0000 (UTC) Received: from nm12.bullet.mail.ne1.yahoo.com (nm12.bullet.mail.ne1.yahoo.com [98.138.90.75]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 759B6ED0 for ; Thu, 19 Mar 2015 13:11:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=att.net; s=s1024; t=1426770670; bh=AmpkyMRIAmOjUJPxUaox6qc6M/BJ4Nz3fBZY+GGDijU=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=rKgGRcw1kmOCLqhLTU3jUKs4ioTPyJKlZrtOJOyUx6f8/O+svcTRk7hi/1jkdG1uKKVoQ/zSnPQzL6wNoSOeFoED6xhDs9N4+HB+HgA1K+yWks2YO0wy+vZNEDIpENWI+VsoTJ+YRxjtVqKpmEuFj65EQmQo/M89jne/oUx3hXM= Received: from [98.138.226.180] by nm12.bullet.mail.ne1.yahoo.com with NNFMP; 19 Mar 2015 13:11:10 -0000 Received: from [98.138.226.130] by tm15.bullet.mail.ne1.yahoo.com with NNFMP; 19 Mar 2015 13:11:10 -0000 Received: from [127.0.0.1] by smtp217.mail.ne1.yahoo.com with NNFMP; 19 Mar 2015 13:11:10 -0000 X-Yahoo-Newman-Id: 235953.59350.bm@smtp217.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: b2OiB2wVM1m7izx63TRrzL04fr4_zF29OQFtO0lR50lxlqV v.pgHT3jxlMqhtCDAFuRhsRCjbVv44eYl35OrAlkUXCgi.FJJdZYd_.A5Wp8 .CTcgxceQvwEw6pcaLtdiyodtuZ2TWbWTLUfFD66H5KWkB6HyFSiWOjWMf.7 NFuEh1z3Jbf7kF8Y4zQgHjl6AUffv88ALGMKTjdmD8KakyNoxyr_DIyky71W TdCrB9osaCN5JhfrXGnHaFMGRMmus9w9rKSEjUPBoMUBUWqemeBZ1868XUUw axxLZ0x7rs7ex0BNqiLUnY2vtnQVBwz.XNtT_4Rj7Vd2L8LZL8SNo3nQqvWa DbvAuHf6XoBSSFn..F0RlK7I4vHovLDbRjdDQIGGOYbnTMmKxzDbgPBsSd7P Bk0y3_T8epKwvT8JUvfLzsSJOVDmpwxf3_qagoTzijyANDvc4bNq21zMv.Vp BnhTALw0WrVwkYpW8lqsV18rvGoaw4f1d11dWXU6QRFx.VjXRgVXK_.sU76C fX_dwQip.fWF2GHWDJ4bHOZSLfaAf.ODMgiYDNoMXeNYu97Vj X-Yahoo-SMTP: OKD1keCswBBTAmAF1s00hLyKW3wE3YfSK0Eazl6b4VZG4LTqJxg- Message-ID: <550ACAEC.3060808@att.net> Date: Thu, 19 Mar 2015 09:11:08 -0400 From: Anthony Jenkins User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Ian Smith , Warner Losh Subject: Re: [PATCH] ACPI CMOS region support rev. 5 References: <20150222180817.GD27984@strugglingcoder.info> <54EB8C21.2080600@att.net> <2401337.2oUs7iAbtB@ralph.baldwin.cx> <54EF3D5D.4010106@att.net> <20150227222203.P38620@sola.nimnet.asn.au> <20150228125857.D1277@besplex.bde.org> <54F14368.4020807@att.net> <20150302002647.W42658@sola.nimnet.asn.au> <54F5E53D.1090601@att.net> <20150306025800.U46361@sola.nimnet.asn.au> <54F9D7E6.4050807@att.net> <5504FF32.3020202@att.net> <20150317001401.X22641@sola.nimnet.asn.au> <5506F00A.3030708@att.net> <5506FBE3.1000009@att.net> <20150317041624.K22641@sola.nimnet.asn.au> <55073442.5060005@att.net> <20150317222704.K22641@sola.nimnet.asn.au> <550825DE.7030406@att.net> <56B494A3-2058-4B7B-8183-646A46753A53@bsdimp.com> <5509A282.6070207@att.net> <20150319184348.X22641@sola.nimnet.asn.au> In-Reply-To: <20150319184348.X22641@sola.nimnet.asn.au> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: freebsd-acpi@freebsd.org X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Mar 2015 13:11:17 -0000 On 03/19/2015 04:10 AM, Ian Smith wrote: > On Wed, 18 Mar 2015 15:30:23 -0600, Warner Losh wrote: > > > On Mar 18, 2015, at 10:06 AM, Anthony Jenkins wrote: > > > > > > On 03/18/2015 11:29 AM, Warner Losh wrote: > > >>> On Mar 17, 2015, at 7:02 AM, Anthony Jenkins wrote: > > >>>> \Where else might ATRTC_VERBOSE be set otherwise? > > >>> I'm picturing a (future?) config(5) knob, e.g. > > >>> > > >>> device atrtc > > >>> options ATRTC_VERBOSE=1 > > >>> > > >>> > > >>> so it can be set at compile time. > > >> Why not just boot verbose? history has shown too many options like > > >> this is hard to use. > > You can blame this on me :) I agree about the option not being needed; > the way it is you can just set sysctl hw.acpi.atrtc_verbose=0 to quell > reports of successful access, if it turns out these are routine on some > machines, especially outside of boot/suspend/resume contexts. > > However I'll still argue that, this being a new gadget and that we could > use finding out which vendors want to read or write which locations in > CMOS for whatever reason, at least while it's in head, we should log all > access by default unless setting atrtc_verbose=0, So the default verbosity of ACPI CMOS region accesses should be "verbose"? I personally don't mind the default being "silent" and asking people triaging an ACPI problem to boot verbosely and send the logs (I think that's in the FreeBSD ACPI handbook anyway). > and in _any_ case we > should be logging attempts to R/W out-of-bounds CMOS locations. Error logs are always printed; they don't honor atrtc_verbose. > > > I think I understand what you're saying... I also prefer fewer config(5) > > > knobs. So you're suggesting I determine (at runtime) the boot verbose > > > setting (kenv(2) or however it's properly done) and dump the > > > compile-time verbosity setting? > > > > if (bootverbose) > > do verbose things; > > > > is how that˙˙s done. > > Sure, and maybe successful access could be limited to bootverbose, and > we could ask people whose boxes fail to boot/suspend/resume/whatever to > boot verbose to reveal such as why Anthony's HP Envy either failed to > suspend or immediately resumed - which isn't entirely clear, even with > the messages - unless its ACPI AML succeeded in reading minute, hour and > weekday, but I have a feeling we may see more of this sort of thing. Now that I think about it, adding this ACPI CMOS region access should simply eliminate a class of failures where FreeBSD wasn't giving the BIOS access to CMOS. Logging /successful/ R/W accesses to CMOS by the BIOS (AML) won't really provide any useful info (IMHO), but the user can flip on bootverbose if she's curious. If a user's box fails to boot/suspend/resume/whatever, we'll see any ACPI CMOS region access errors. Anthony > cheers, Ian