Current state of "RTC wakeup" support
Ian Smith
smithi at nimnet.asn.au
Tue Feb 25 08:39:46 UTC 2014
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
More information about the freebsd-acpi
mailing list