From owner-freebsd-acpi@FreeBSD.ORG Fri Jun 27 20:49:01 2014 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 180453F6 for ; Fri, 27 Jun 2014 20:49:01 +0000 (UTC) Received: from nm9-vm7.access.bullet.mail.bf1.yahoo.com (nm9-vm7.access.bullet.mail.bf1.yahoo.com [216.109.114.198]) (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 BC1172B1E for ; Fri, 27 Jun 2014 20:49:00 +0000 (UTC) Received: from [66.196.81.158] by nm9.access.bullet.mail.bf1.yahoo.com with NNFMP; 27 Jun 2014 20:48:58 -0000 Received: from [98.138.104.96] by tm4.access.bullet.mail.bf1.yahoo.com with NNFMP; 27 Jun 2014 20:48:58 -0000 Received: from [127.0.0.1] by smtp116.sbc.mail.ne1.yahoo.com with NNFMP; 27 Jun 2014 20:48:58 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=att.net; s=s1024; t=1403902138; bh=eRJndhO/gLOZS/+cS2W5lM+sguyS+ENfKyM/Q27Uvyk=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=mGQJld6C/9R7GGfHZXqnIDX/5ZYCujcDGTNIrS41s1Z/fSGU1JTQV1w0prTq5ziNUuivivKShasbF476cqQH4XCs6KZ9EE6lDmr51i6nNx1DJ161dEHYYUXZRasZONSnGij19l1sZJMuk3M9dHqp5IEcBgySBfdIKJOgmOnMji4= X-Yahoo-Newman-Id: 579312.97843.bm@smtp116.sbc.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: fOWgWV8VM1l3ClK9pWTXs12mjm.EZisrmUCUO5x.sQbBFYN BAlGLtDLUcnbJi4XCPfbRx4j3DFgA7XOX1fENuveOu0wv1Az3ZGojpMAppZP btas_LFN2OTNF7R9md8zFpSTb0KB_OjXUsJNZEfoSVuNuVl9SWM3y9luverS K6olzjlTQ3Jpcd4d3AaHaQGLpP53h9oVkIN0rS4EvCIiIz1j44rSAv6YjfIA PtemuDzGc2Q.RHv3LLRgQzr8rR5D9froqasQaRPT_V76Lj_MERVBB7sWChCE .romLFutxHyuGyv3MAtVO9wSDkYcn9TQ.OZQpuM9tK09BBGFlApZ5EuT3tI4 r4UAZTtBePNlPL7hjVzXE7LV4iy8iEi8dDFw8tE.oF57ScQ1eGl90Dqg9_I6 4xskElNAgBKhtsg68vJ9qNffyQSsjVBf92RlEmQXuvH9A8y3wjUudyZQ2g8L 0SJeCt_sJJFU5732MJPJlGQ4SeiyhReCaeGbJGhIYfHET4hLcnn1iAMDJMFC 1BM.4jm_i9N4JHFrnrCo2e8P_mWPS6c5PmNYhDW72GazlKg-- X-Yahoo-SMTP: OKD1keCswBBTAmAF1s00hLyKW3wE3YfSK0Eazl6b4VZG4LTqJxg- X-Rocket-Received: from [64.100.76.67] (Anthony.B.Jenkins@64.100.76.67 with plain [98.138.84.52]) by smtp116.sbc.mail.ne1.yahoo.com with SMTP; 27 Jun 2014 20:48:58 +0000 UTC Message-ID: <53ADD8B9.5060401@att.net> Date: Fri, 27 Jun 2014 16:48:57 -0400 From: Anthony Jenkins User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Ian Smith Subject: Re: Impossible shutdown References: <20140625222911.GA34447@hellgate.Dlink> <53AC07A3.7070904@att.net> <20140627143031.P50382@sola.nimnet.asn.au> In-Reply-To: <20140627143031.P50382@sola.nimnet.asn.au> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Bykov Vladislav , freebsd-acpi@freebsd.org X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jun 2014 20:49:01 -0000 On 06/27/2014 01:16, Ian Smith wrote: > On Thu, 26 Jun 2014 07:44:35 -0400, Anthony Jenkins wrote: > > On 06/25/2014 18:29, Bykov Vladislav wrote: > > > Hello. > > > > > > I have a problem with ACPI on HP Envy 4 that causes in impossible shutdown. It > > > reaches an error while prepairing to shutdown, and reboots the machine. > > > > > > I already did sent a bug report about 2-3 months ago, but things doesn't seems > > > to move on. > > > > > > Here's an error when booting the machine: > > > > > > ACPI Error: No handler for Region [RCM0] (0xfffffe0002b0f800) [SystemCMOS] (20110527/evregion-421) > > > ACPI Error: Region SystemCMOS (ID=5) has no handler (20110527/exfldio-310) > > > ACPI Error: Method parse/execution failed [\134_SB_.WMID.ESDT] (Node 0xfffffe0002aee440), AE_NOT_EXIST (20110527/psparse-560) > > > ACPI Error: Method parse/execution failed [\134_SB_.PCI0.LPCB.EC0_._Q42] (Node 0xfffffe0002b16d40), AE_NOT_EXIST (20110527/psparse-560) > > > acpi_ec0: evaluation of query method _Q42 failed: AE_NOT_EXIST > > > > > > And here's the one when I'm trying to shut it down: > > > > > > usbus2: Controller shutdown complete > > > ACPI Error: No handler for Region [RCM0] (0xfffffe0002b15900) [SystemCMOS] (20110527/evregion-421) > > > ACPI Error: Region SystemCMOS (ID=5) has no handler (20110527/exfldio-310) > > > ACPI Error: Method parse/execution failed [\_SB_.WMID.ESDT] (Node 0xfffffe0002af5800), AE_NOT_EXIST (20110527/psparse-560) > > > ACPI Error: Method parse/execution failed [\_PTS] (Node 0xfffffe0002af86c0), AE_NOT_EXIST (20110527/psparse-560) > > > acpi0: AcpiEnterSleepStatePrep failed - AE_NOT_EXIST > > > Rebooting... > > > > > > I've tried FreeBSD 9, FreeBSD 10, and -CURRENT. All have the same problem. > > > > Here's a case where my patch to implement the SystemCMOS region > > handler should help; it allows my HP Envy to power down and allows it > > to suspend/resume except the LCD backlight doesn't come back when > > resuming. Biggest problem with the patch IMHO is I'm stealing > > ("borrowing") from the real time clock (RTC) I/O region, but I don't > > think we have an "actual" FreeBSD driver for that. > > > > Reposting here, or search this list for "Naive implementation of > > AcpiExCmosSpaceHandler", let me know if it doesn't apply cleanly to > > your version of FreeBSD . I've posted it upstream to the acpica > > mailing list, but no response. > > > > diff --git a/source/components/events/evhandler.c b/source/components/events/evhandler.c > > Interesting. I wonder if this is needed for reading the RTC for the > time on boot, and writing it back on shutdown - which I would have > thought too generic to have left out on any machine? Or is this perhaps > retrieving at boot then restoring at shutdown some other system-specific > information in NVRAM? It's the latter; they (presumably the BIOS ACPI shutdown/resume methods) are just reading/writing locations in the non-volatile CMOS storage, which just happens to be shared with the RTC. The RTC proper has some 16 bytes of registers which represent the real time clock - the rest are presumably storage, though the platform could probably do whatever it wants with various locations. > If the latter, then the usage in /sys/dev/acpi_support/acpi_ibm.c > revealed below might illustrate another way of dealing with this? > > % find /sys/ -type f -exec egrep -H 'rtcin|writertc' {} \; | grep -v drm_mode_set_crtcinfo > > shows everything using the rtcin() and writertc() functions, implemented > for x86 at least in /sys/x86/isa/atrtc.c .. but I have no idea whether > you can access those functions from where / when you're tinkering here. This is the way I think it's /supposed/ to be done - from my skimming of one of the ACPI specs, there's a PNP identifier for the CMOS/RTC device. If that identifier is probed, the OS should install a SystemCMOS region handler (which would use the I/O methods of the RTC driver which takes care of locking/consistency). > Yours looks more likely portable for upstream acpica, but it also looks > potentially quite dangerous 'in the wrong hands' :) Personally I don't think my patch can live upstream in acpica-land because it can step on the toes of an existing OS CMOS/RTC driver talking to the RTC I/O ports. I just don't know how to do all this with our rtc driver yet, particularly the PNPxxxxxx stuff. I'll look into it when I get some free cycles. > cheers, Ian > _______________________________________________ > 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" >