[OpenBIOS] r320 - cpu/x86/pc/olpc

svn at openbios.org svn at openbios.org
Wed Apr 25 09:07:59 CEST 2007


Author: wmb
Date: 2007-04-25 09:07:59 +0200 (Wed, 25 Apr 2007)
New Revision: 320

Modified:
   cpu/x86/pc/olpc/draminit.fth
   cpu/x86/pc/olpc/resume.bth
Log:
OLPC suspend/resume - use PM register 0x30 as a breadcrumb register
for resume, instead of looking at bit one of PM+0x54.  This is needed
because of LX errata 34, which sometimes requires an extra reset to
init the memory DLL.


Modified: cpu/x86/pc/olpc/draminit.fth
===================================================================
--- cpu/x86/pc/olpc/draminit.fth	2007-04-25 07:01:05 UTC (rev 319)
+++ cpu/x86/pc/olpc/draminit.fth	2007-04-25 07:07:59 UTC (rev 320)
@@ -51,8 +51,12 @@
    0000f001.00001400.   5140000f set-msr  \ PMS BAR
 
    \ It is tempting to test bit 0 of PM register 5c, but a 5536 erratum
-   \ prevents that bit from working.
-   1454 port-rl  2 bitand  0<>  if  \ Wakeup event flag
+   \ prevents that bit from working.  Bit 1 works, but LX errata 34
+   \ sometimes requires that we reset the system to fix the memory DLL,
+   \ which destroys all the bits of PM register 5c.  So we put a breadcrumb
+   \ in a PM register that we don't otherwise use.
+   1430 port-rl  h# 9999 # ax cmp  =  if  \ Wakeup event flag
+      0 1430 port-wl
       h# 1b # al mov  al h# 80 # out
       char r 3f8 port-wb  begin  3fd port-rb 40 bitand  0<> until
       resume-entry # sp mov  sp jmp

Modified: cpu/x86/pc/olpc/resume.bth
===================================================================
--- cpu/x86/pc/olpc/resume.bth	2007-04-25 07:01:05 UTC (rev 319)
+++ cpu/x86/pc/olpc/resume.bth	2007-04-25 07:07:59 UTC (rev 320)
@@ -258,6 +258,7 @@
 \  This is pointless because register 14 is in the working power domain
 \  and does not retain the value across the suspend
 \  h# 4000.4601 h# 1414 port-wl   \ Release SUSP# 5 mS after wakeup
+   h# 0000.9999 h# 1430 port-wl   \ Breadcrumb indicating sleep
    h# 4000.0001 h# 1434 port-wl   \ Turn on WORK_AUX (== MAIN_ON) at 32 uS
    h# 4000.0080 h# 1438 port-wl   \ RESET_OUT# deassert at 4 mS
    h# 0002.ffff h# 1454 port-wl   \ Clear wakeup type bits




More information about the OpenBIOS mailing list