星期五, 1月 25, 2008

ACPI Sleeping State Definitions

ACPI 針對系統、Device等定義了各種不同的Power management。其中對於Sleep State的描述如下。其中Definition的欄位是我從ACPI specification 3.0b裡抄下來的。最右邊的"意思是..."欄位是我的註解。







StateDefinition意思是...
S1The S1 sleeping state is a low wake latency sleeping state. In this state, no system context is lost (CPU or chip set) and hardware maintains all system context.CPU 停止執行,Cache內容已經清掉,但是仍然維持供電,所以CPU的內容仍然都在(register)。
S2The S2 sleeping state is a low wake latency sleeping state. This state is similar to the S1 sleeping state except that the CPU and system cache context is lost (the OS is responsible for maintaining the caches and CPU context). Control starts from the processor’s reset vector after the wake event.CPU暫存器以及Cache的內容會丟失,所以當小睡片刻後,再被人叫醒時,OS需要將之前CPU各個暫存器(也就是程式執行到什麼地方)的內容恢復,然後繼續工作。
S3The S3 sleeping state is a low wake latency sleeping state where all system context is lost except system memory. CPU, cache, and chip set context are lost in this state. Hardware maintains memory context and restores some CPU and L2 configuration context. Control starts from the processor’s reset vector after the wake event.這個階段睡的更死了,CPU的內容不但已經不見了,連南北橋的設定值一併都關閉,週邊幾乎除了只剩下記憶體仍舊持續供電外幾乎全數關閉。所以在被叫醒時,BIOS要負責再重新初始化南北橋晶片組,回復CPU睡著前的狀態。這在Windows叫"待命"(Suspend, Suspend to RAM)
S4The S4 sleeping state is the lowest power, longest wake latency sleeping state supported by ACPI. In order to reduce power to a minimum, it is assumed that the hardware platform has powered off all devices. Platform context is maintained.這是更進階的睡覺模式,基本上跟關機是一樣的狀態。所以的工作狀態全數關閉。記憶體、週邊全數進入關機模式,但是系統的狀態仍然還需要存在。可是既然所有的電都關閉了,那工作狀態要存在什麼地方?當然是Non Volatile Memory,也就是HDD之類不需要供電仍然能儲存資料的儲存設備。這在Windows裡叫"休眠"(Hibernation or Suspend to Disk)。
S5The S5 state is similar to the S4 state except that the OS does not save any context. The system is in the “soft” off state and requires a complete boot when it wakes. Software uses a different state value to distinguish between the S5 state and the S4 state to allow for initial boot operations within the BIOS to distinguish whether or not the boot is going to wake from a saved memory image.這基本上已經是關機了,因為系統沒有儲存跟工作有關的任何資訊,要再重新工作唯有開機一途。

沒有留言: