Date: Tue, 25 Feb 2014 19:39:36 +1100 (EST) From: Ian Smith <smithi@nimnet.asn.au> To: Willi Eggeling <thewilli@googlemail.com> Cc: freebsd-acpi@freebsd.org Subject: Re: Current state of "RTC wakeup" support Message-ID: <20140225192128.S89549@sola.nimnet.asn.au> In-Reply-To: <E71FAD27-3639-49D6-83A2-7FEAC72CE2C4@googlemail.com> References: <E71FAD27-3639-49D6-83A2-7FEAC72CE2C4@googlemail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 24 Feb 2014 18:13:16 +0100, Willi Eggeling wrote: > Hi! > > According to the FreeBSD ACPI project page > (http://www.freebsd.org/projects/acpi/) RTC support is not realized > yet. As the last update was in 2006 I just wanted to ask if there is > any change about RTC-triggered wakeup that has not been posted to the > page. Is there any? > > All I need is to time system wakeup from S4/S5 on a HP ProLiant N40L. You're talking about http://www.freebsd.org/cgi/query-pr.cgi?pr=kern%2F73823&cat= which is now our oldest outstanding ACPI PR. I did some RTC programming in a past life - in Turbo Pascal no less - and this is not hard to do. I had a patch sort-of on the way when mav@ changed all the clocks and timers around, for 9.0 IIRC, and I got lost. Without delving too deeply into details, there's an alarm wake bit in the RTC that we gratuitously clear whenever we write to the RTC, both on initialisation and when updating CMOS time, also perhaps on init for other uses such as using the RTC interrupt as a low res timer or for profiling, maybe? ISTR that we mostly only needed to mask (ie not disturb) that wake interrupt bit once set and add a small userland utility to set, clear and enable/disable the wake timer bit and set the BCD time, the BIOS should do the rest. We don't support S4 on anything these days, AFAIK, but this could work both from S5 (power off) and S3 (suspend to RAM). cheers, Ian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140225192128.S89549>