From owner-freebsd-acpi@FreeBSD.ORG Wed Jul 16 23:39:06 2014 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C3FA6BB6 for ; Wed, 16 Jul 2014 23:39:06 +0000 (UTC) Received: from mail-ie0-x235.google.com (mail-ie0-x235.google.com [IPv6:2607:f8b0:4001:c03::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7E7082122 for ; Wed, 16 Jul 2014 23:39:06 +0000 (UTC) Received: by mail-ie0-f181.google.com with SMTP id rp18so1710353iec.40 for ; Wed, 16 Jul 2014 16:39:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=/UYjMTTg5P6fhIyUHCQVaAMJXRwbxwJvM/ALpyVWFro=; b=dE2dJk5k5MU9TMZwk4yc5Y8ubOtqTA9uM9ETnjhMROCfuOSXnAiXIS3LNx8A6ilQW2 UH4pGw99aPRtDdLNS+43+nZBl/lifEM60KZTUgXVMhXGb7ZE2/MYJV0APH0GeBVC7NUR WW4JL9Nme7GToUe30wG0Md0HOlgXnT02LcwD0dm5xXGfJOgT4ugfw0KC01HjZ6COYGYi cF7ggF+Bj1zamxRxA2Eb6SYTpigf3+BMcrvBPndM+wApBHe0IjhnCLSjj2ueFz/Oql53 I5vU8Jn4yTynCD5aYqOnRNDHySOEXNTfojmmpYM05GLq1LQs35n4u6uxhAqXdG5rfbVz 7Shg== MIME-Version: 1.0 X-Received: by 10.182.163.46 with SMTP id yf14mr28120831obb.40.1405553945725; Wed, 16 Jul 2014 16:39:05 -0700 (PDT) Received: by 10.182.29.9 with HTTP; Wed, 16 Jul 2014 16:39:05 -0700 (PDT) Received: by 10.182.29.9 with HTTP; Wed, 16 Jul 2014 16:39:05 -0700 (PDT) In-Reply-To: <53C6E9B3.1080402@att.net> References: <53C020CE.8010205@att.net> <53C02604.9070207@att.net> <53C3D322.3080302@att.net> <20140716040719.Y50382@sola.nimnet.asn.au> <20140716143406.V50382@sola.nimnet.asn.au> <53C67D70.6060603@att.net> <20140717011710.W50382@sola.nimnet.asn.au> <53C6E9B3.1080402@att.net> Date: Thu, 17 Jul 2014 01:39:05 +0200 Message-ID: Subject: Re: atrtc.c patch for ACPI CMOS region (was Re: ACPI support - Freebsd 10 on Sony Vaio VPCCA3C5E) From: Daniele Mazzotti To: Anthony Jenkins Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18 Cc: freebsd-acpi@freebsd.org, Ian Smith 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: Wed, 16 Jul 2014 23:39:06 -0000 Hi guys, @Anthony: actually I am a "he" and not a "she" and I never thought about changing my nature below the waist :-). By the way I will try to apply the patch as soon as I will be back home as I left my personal PC at home and I won't be back until Monday. I will let you know if that will fix my suspend/resume issue. Regarding the battery issue I hope that I will try to follow the recommendations from Ian in another email and see what happen. Cheers, Daniele. Il 16/lug/2014 23:08 "Anthony Jenkins" ha scritto: > On 07/16/2014 13:16, Ian Smith wrote: > > On Wed, 16 Jul 2014 09:26:08 -0400, Anthony Jenkins wrote: > > > On 07/16/2014 01:32, Daniele Mazzotti wrote: > > >> Hi guys, thanks again for the support, but I am leaving for a > > >> businesses trip and I will be forced to put this debug thing on hold > > >> for a while. I will be back on track next week. > > > > > > Bah... really wanted to figure out the patch problem. I suspect the > > > file picked up some corruption somewhere between the email and your > > > FreeBSD filesystem. Your OS version has the same revision of that > > > source file as mine, so it should apply cleanly. If you feel like > > > tinkering with it in your free time, I've posted the patch here: > > > http://pastebin.com/P0B44u0c > > > > > > Good luck, > > > Anthony > > > > Either by show raw and save, or by download, the patch has ^M lineends. > Bah! Well that'd explain it... I'm generating the file on a pure FreeBSD > box, opened in gvim, select all, copy, paste to pastebin.com. > > Interesting, but I can't see atrtc.c being the right sort of place for > > this, seems way out of scope. Couldn't you include its headers and use > > functions rtcin() and writertc() from elsewhere in kernel, perhaps a > > module living in the same hierarchy as acpi_ibm, acpi_asus and such, > > that one could build and kldload if useful on a certain machine/s? > This is in support of the PNP0800 device, for which atrtc.c is the driver. > The ACPI spec (5.0 is what I'm reading) says that device should implement > a handler to read offset 0x00-0x7F. > > If so, you haven't to do battle with Time Lords :) with something people > > could add and load at own risk without messing with core kernel stuff. > > > > acpi_ibm should be a useful template, as it includes code to read CMOS > > bytes in the 0x60-0x6f range, presumably updated by the BIOS, whether > > opaquely or somehow via AML code I don't know. It uses rtcin() so has > > that scope in place. > > > > I'd still like to see your patch reject attempts to read or write to at > > least below 0x10. Even reading status register/s resets interrupts, and > > why would anyone need to mess with clock and/or timer regs via ACPI? > I assume it'd be the BIOS AML which would use my CMOS region handler; it'd > be a BIOS bug that reads/writes the clock regs. > > Have you found exactly which CMOS bytes your box needs to meddle with? > I do have printf()s in my code (don't think I added it to the patch) that > says what's read/written, I'll have to look again. > > Maybe you could add a sysctl to limit access to some specific range? > I dunno... I really think what I have is the Right Thing To Do... Someone > else from freebsd-acpi@ suggested this approach. Maybe someone versed in > ACPI could clarify from the spec? > > > Don't mind me, just thinking aloud, and I've no idea how this might > > relate to Daniele's issue with stale battery data? > > Agreed... I'm pretty much just blindly tossing the patch over to her. :-) > She did complain about suspend issues, and my patch fixes suspend issues > on my HP and another guinea pig from the mailing list (with an HP). Next I > need to figure out why acpi_hp doesn't work on my laptop, as I see SystemIO > calls to 0x72/0x73 when I try to adjust the brightness. > > Thanks, > Anthony > > cheers, Ian > > > > PS Daniele: no, never tempted by Sonys; rusted-on Thinkpad kinda guy :) > > _______________________________________________ > > 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" > > > >