Prev: WinUsb_GetOverlappedResult() with asynchronous call to WinUsb_Read
Next: Odd problem with system time
From: Brett on 7 Apr 2010 13:31 I know that some system BIOS setups expose a power-on timer to power the system from the S5 (soft off) state. Also, I've determined that the Win32 WaitableTimers can wake the system from the S4 (hibernate) state which is nearly identical to S5. So, I'm assuming the WaitableTimers API has the ability to set the system's auto-on timers. Perhaps when Windows goes to hibernate, it checks for the next wakeable timer's expiration and sets the systems auto power-on timer to that time, I don't really know how that works, just hypothesizing. At any rate, it seems that Windows can set the system's auto power-on time. My assumption is that during system shutdown any timers get cleared, so there's not a way for me to set the auto power-on time through the standard SetWaitableTimer function. I'd like to know if there is a way (driver or otherwise) to set the system's auto power-on timer (if it exists). My application is a simple Windows boot test. Currently it works well for warm boot (like restart), but I'd like to add the cold boot feature (power off and then power on). Thanks in advance for any help you can provide. -Brett
From: Pavel A. on 11 Apr 2010 17:01 Windows sets the power-up timer using some ACPI method provided by the machine's BIOS. It can be same timer as in the BIOS setup or a different one. Just use the documented Windows API; chances are it will just work (with a correct ACPI or hardware implementation). Regards, -- pa "Brett" <elderdodds(a)yahoo.notnet> wrote in message news:51ABE6F9-BB65-4829-B668-EDC1CE06E159(a)microsoft.com... > I know that some system BIOS setups expose a power-on timer to power the > system from the S5 (soft off) state. Also, I've determined that the Win32 > WaitableTimers can wake the system from the S4 (hibernate) state which is > nearly identical to S5. So, I'm assuming the WaitableTimers API has the > ability to set the system's auto-on timers. Perhaps when Windows goes to > hibernate, it checks for the next wakeable timer's expiration and sets the > systems auto power-on timer to that time, I don't really know how that > works, > just hypothesizing. > > At any rate, it seems that Windows can set the system's auto power-on > time. > My assumption is that during system shutdown any timers get cleared, so > there's not a way for me to set the auto power-on time through the > standard > SetWaitableTimer function. > I'd like to know if there is a way (driver or otherwise) to set the > system's > auto power-on timer (if it exists). > > My application is a simple Windows boot test. Currently it works well for > warm boot (like restart), but I'd like to add the cold boot feature (power > off and then power on). > > Thanks in advance for any help you can provide. > -Brett
From: Brett on 12 Apr 2010 16:16
For those who may follow... Through my digging, I discovered the RTC Alarm in the ACPI spec. However, the ACPI spec has this little gem: "Notice that the G2/S5 'soft off; and the G3 'mechanical off' states are not sleeping states. The OS will disable the RTC_EN bit prior to entering the G2/S5 or G3 states regardless." Basically this means that the system will not wake from S5 from the RTC alarm. In more recent ACPI spec revisions, it describes an alternative wake alarm (called the "Wake Alarm Device"). This one seems to support waking from the S5 state (optionally). Unfortunately, at least in a couple of the system's I'm targeting, this implementation doesn't appear to exist. "Brett" wrote: > I know that some system BIOS setups expose a power-on timer to power the > system from the S5 (soft off) state. Also, I've determined that the Win32 > WaitableTimers can wake the system from the S4 (hibernate) state which is > nearly identical to S5. So, I'm assuming the WaitableTimers API has the > ability to set the system's auto-on timers. Perhaps when Windows goes to > hibernate, it checks for the next wakeable timer's expiration and sets the > systems auto power-on timer to that time, I don't really know how that works, > just hypothesizing. > > At any rate, it seems that Windows can set the system's auto power-on time. > My assumption is that during system shutdown any timers get cleared, so > there's not a way for me to set the auto power-on time through the standard > SetWaitableTimer function. > I'd like to know if there is a way (driver or otherwise) to set the system's > auto power-on timer (if it exists). > > My application is a simple Windows boot test. Currently it works well for > warm boot (like restart), but I'd like to add the cold boot feature (power > off and then power on). > > Thanks in advance for any help you can provide. > -Brett |