Author: wmb Date: 2007-11-16 22:57:42 +0100 (Fri, 16 Nov 2007) New Revision: 733
Modified: cpu/x86/pc/olpc/resume.bth Log: OLPC trac 4981 - don't hang indefinitely if the suspend sequence fails to power down the CPU.
Modified: cpu/x86/pc/olpc/resume.bth =================================================================== --- cpu/x86/pc/olpc/resume.bth 2007-11-16 21:48:09 UTC (rev 732) +++ cpu/x86/pc/olpc/resume.bth 2007-11-16 21:57:42 UTC (rev 733) @@ -315,8 +315,16 @@ wrmsr \ Write GLD_MSR_PM to self-refresh memory di dx mov bx ax mov ax dx out \ Write PM1_CNT to initial suspend
- begin again \ Spin in this cache line while going down + h# fff # cx mov begin nop loopa \ Spin in this cache line while going down
+ \ If the processor didn't really go down, perhaps because a wakeup event was + \ already pending, restart the memory clocks and proceed as with a wakeup + h# 0. h# 2000.2004 set-msr \ GLD_MSR_PM MSR number + h# 2000.0018 rmsr h# 5000 bitset h# 2000.0018 wmsr \ Set refresh interval + + \ Increment the CMOS byte at offset 3f + h# 3f # al mov al h# 70 # out h# 71 # al in al inc al h# 71 # out + \ Resume code here resume-entry put-branch