[OpenBIOS] r687 - cpu/x86/pc/olpc dev/olpc/kb3700

svn at openbios.org svn at openbios.org
Fri Oct 19 00:43:46 CEST 2007


Author: wmb
Date: 2007-10-19 00:43:46 +0200 (Fri, 19 Oct 2007)
New Revision: 687

Modified:
   cpu/x86/pc/olpc/security.fth
   dev/olpc/kb3700/ecio.fth
Log:
OLPC trac #1193 - disable indexed I/O when entering the kernel in secure mode.



Modified: cpu/x86/pc/olpc/security.fth
===================================================================
--- cpu/x86/pc/olpc/security.fth	2007-10-18 21:26:57 UTC (rev 686)
+++ cpu/x86/pc/olpc/security.fth	2007-10-18 22:43:46 UTC (rev 687)
@@ -465,7 +465,7 @@
 
 : security-failure  ( -- )
    visible
-   ." Security failure" cr
+   ." Stopping" cr
 
    d# 10000 ms
    power-off
@@ -636,6 +636,12 @@
                security-failure
             then
 
+            ec-indexed-io-off?  if
+               visible
+               .ec-ixio-msg
+               security-failure
+            then
+
             \ Latch alternate? flag for next startup
             alternate?  if  [char] A h# 82 cmos!  then
 
@@ -696,7 +702,7 @@
          then                               ( list$ )
 
          load-from-device  if               ( list$ )
-\           write-protect-fw ec-indexed-io-off  ( list$ )
+            write-protect-fw ec-indexed-io-off  ( list$ )
             2drop                           ( )
             ['] secure-load-ramdisk to load-ramdisk
             " init-program" $find  if

Modified: dev/olpc/kb3700/ecio.fth
===================================================================
--- dev/olpc/kb3700/ecio.fth	2007-10-18 21:26:57 UTC (rev 686)
+++ dev/olpc/kb3700/ecio.fth	2007-10-18 22:43:46 UTC (rev 687)
@@ -193,9 +193,16 @@
 \ because it continuously fetches from the SPI FLASH when it's on.  That
 \ interferes with our accesses.
 
+: ec-indexed-io-off?  ( -- flag )  h# ff14 ec@  h# ff =  ;
+: .ec-ixio-msg  ( -- )
+   ." Writing to the SPI FLASH is disabled."  cr
+   ." Disconnect/reconnect the battery and AC and try again."  cr
+;
+
 0 value kbc-off?
 : kbc-off  ( -- )
    kbc-off?  if  exit  then  \ Fast bail out
+   ec-indexed-io-off?  if  .ec-ixio-msg  abort  then
    h# d8 ec-cmd66      \ Prepare for reset
    h# ff14 ec@  1 or  h# ff14 ec!
    true to kbc-off?




More information about the OpenBIOS mailing list