MoBo Designers and BIOS Programmers: Difference between S4 and S5 for WakeUp event

ruckb

Member
Jun 9, 2000
175
0
0
Hello,

I asked this question already once, and got no answer. Maybe I'm more lucky this time.

The WINXP Task Scheduler is able to wake up my PC from S4 (Hybernation mode). But at the time the Wake up event occurs the system state is the same then in S5 (Soft off). The only difference between S4 and S5 is the boot of the OS after switching on the PC.

So my question is: Why is it no possible to WakeUp the PC from S5 ?

Or the better one: Why (how) is it possible to wake the system from S4 ?

I'm just checking the RTC datasheets, even I think the RTC is not used for this feature. If it would the RTC would have to has two possibilities for programming the wake up, as the BIOS is already using this feature, and if the Taskscheduler would use the same this two things would have problems!

Can sombody tell me wich RTC devices are used normally on a Mobo, and direct me to a datasheet for this RTCs?

thanks

Hermann
 

Peter

Elite Member
Oct 15, 1999
9,640
1
0
S5 is Soft-Off mode. The only thing that still gets powered is the power control circuitry in the chipset. No other devices are powered, hence, no wakeup from peripherals like keyboard, modem, LAN, legacy serial or whatever.
In S4 mode, the peripherals are halted but still (partially) powered.
 

ruckb

Member
Jun 9, 2000
175
0
0
Hi Peter,

thanks for the response,

but I don't think, that in S4 anything more than in S5 is powered. You can dissconnect Power when the System is in S4
reconnect it, and the system is booting from hybernation mode without problems.

On my notebook I do even change my HDD to boot different OS in S4 ==> not problem!

The off state in S4 is the same than in S5. The only difference is the boot information, which is changed when setting the System in S4.

I have checked the ACPI spec 2.0b in the meantime. I have found two bits: Power Button Status bit, and Sleep button status bit. This two bits might be the difference, but I have to read the Spec more in detail.
If this two bits would be stored in the RTC, and RTC is reacting on this bits, this could be the Answer. But then I still do not
understand, why BIOS boot on time and Wake from S4 do not interfear which each other.

thanks

hermann
 

sao123

Lifer
May 27, 2002
12,650
203
106
The difference is in the shutdown before the wake up.
In the shutdown to go into s4 mode, a suspend state record is written to the hard drive, to reinstate upon power on.
Without this restore point...the system must perform a full warm boot. (s5 power on)
 

ruckb

Member
Jun 9, 2000
175
0
0
H sao123,

I aggree with you, that the shutdown is different, but this does makes no difference at the time a wake up event occurs when the system is in S4 or S5 mode.
this information written to the HDD is checked and used after the BIOS boot to decide whether the OS has to boot, or the system has to be restored from
the information stored on the HDD.


There has not only the suspend state record to be written to the hard drive but also some additional information to a hardware which is working in both S4 and S5 states.
As mentioned the power/sleep status bits could be written into the RTC. If this would be true, it could be possible to wake a system from S5 by overriding this bits.
But then I have still no explanation how to coexistance of the BIOS function "boot on time" and the task scheduler is working!

thanks

Hermann
 

sao123

Lifer
May 27, 2002
12,650
203
106
Well, the scope of your question is increasing... but here is more info.

The 5 states pf APM are as follows:
S1 - Full On (System is not power managed, All devices are on.)
S2 - APM Enabled (Normal mode - System is working, system is power managed, CPU clock is slowed or stopped as necessary, DEvices are power managed as necessary.)
S3 - APM Standby (System is in a low power state with some power savings, Most devices are in low power mode, The CPU is slowed or stopped. Operational parameters are retained in Main Memory. System quickly returns to S2 state. The resume timer event must be used to return to state S2, The OS is then notified. Prior operation resumes. Interrupts are processed normally in this state.
S4 - APM suspend (System is in a low power mode with max power saving, All power managed devices are not powered. The CPU is stopped and unpowered. Operational parameters are saved to permanent storage for for restoration. System takes a relatively long time to return to state S2. The resume timer must be initiated by another wake up event, which it then finishes the complete wakeup. The OS is notified & prior operation resumes. Interrupts are not processed in this state.
S5 - Off (Power supply is off, operational parameters are not saved. System resets and fully initialises to the S2 state.)


However....after further reading I found the real difference to be this:
At some point during the boot strap after the core tests... the BIOS checks the memory location 0000:0472h. A value of 1234h at this location indicates a warm boot (minimal or no post). any other value is a cold boot (full post.) This flag is the determining factor between the S4, S5 states.
 

ruckb

Member
Jun 9, 2000
175
0
0
HI sao,

thanks for the answer.

In principle this goes in the right direction, but there is one problem in your argumentation: You mention, that the BIOS checks the memory location somewhere.
But the BIOS is not active at the time a wake up event occurs.

I have checked the ACPI spec a little bit closer, and found some things:
Quote: "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."

The RTC_EN bit is the bit which allows the RTC to wake up the PC. RTC Wake up event AND RTC_EN (logical AND function) is needed to Wake the PC. There is a bINT signal (That I expect to signal the Wake up event) from the RTC, but I do not know who is receiving the Signal. This should be a similar signal as the ON switch is generating (I think a short low pulse).

Always if the PC is entering some Power down state the ACPI tables are written by the OS.
But where are this ACPI tables written too ? it has to be some NVRAM somewhere.
In S4 the OFF state is the same than in S5, with the difference of the ACPI tables. But which device should evaluate this tables when no devices is powered up (except the RTC). And the RTC has no chance to check e. g. any NVRAM in the RTC or BIOS device.
There is even a enable bit for wakeup in the RTC defined.
But if this one is used then this functionallity would have problems, if there is the Wake on time in the BIOS enabled. As both would use the same resources.

So what I'm still missing is the connection between the ACPI Spec and the Hardware like the followin:
When OS sets the PC in "Suspend to disk" it writes the time/date register in the RTC and enables the WakeUp. The other information in the ACPI table is stored ????
When the Wake condition is met (time/date fits, and wakeUp enabled) the RTC sets bINT to low, which causes the ????? device to switch on the ATX power supply.

But this would mean, if it is possible to prevent the RTC_En bit to be set when the system is shutting down a Wake from S5 would be possible!

But most of this are just assumptions. If somebody would more in detail I'm still very interested!

thanks


Hermann
 

sao123

Lifer
May 27, 2002
12,650
203
106
I believe youll find your answer here...in The ACPI specifications document.

http://www.acpi.info/DOWNLOADS/ACPIspec-2-0b.pdf

I believe the bottom of document page 22 (adobe page 40) will explaine about the memory location check, i described earlier. though I believe all of chapter 2 will benefit you for your answer.
 

ruckb

Member
Jun 9, 2000
175
0
0
Hi Sao,

the quote I made was from this spec ...

and the information based on RTC registers ist from a TI RTC datasheet.

But as I mentioned before, I'm to stupid to map the Spec to a Hardware schematic. :-(
I'm used to hardware related DRAM/chipsetspecs specs. This one is a level to high for me ...

but thanks for the link

Hermann

btw: how are earning your money ?
 

ruckb

Member
Jun 9, 2000
175
0
0
It is getting more and more clear.

a friend pointed me the the datasheet of a southbridge with integrated RTC, and finally I found all the registers mentioned in the ACPI Spec in Hardware.

But this would mean, that if I'm rewriting the RTC_En bit, and then switch off the PC (no chance to overwrite it while shutdown) it might be possible, that the
system starts from S5 by an RTC event.

Thanks for all the feedback!

hermann
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |