[openfirmware] [commit] r2575 - cpu/x86/pc/olpc

repository service svn at openfirmware.info
Tue Oct 4 20:18:26 CEST 2011


Author: wmb
Date: Tue Oct  4 20:18:25 2011
New Revision: 2575
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2575

Log:
OLPC - in enable-security, change the hardcoded address for the wp tag to be relative to mfg-data-top, thus allowing it to work for XO-1.75 too.

Modified:
   cpu/x86/pc/olpc/setwp.fth

Modified: cpu/x86/pc/olpc/setwp.fth
==============================================================================
--- cpu/x86/pc/olpc/setwp.fth	Tue Oct  4 03:02:09 2011	(r2574)
+++ cpu/x86/pc/olpc/setwp.fth	Tue Oct  4 20:18:25 2011	(r2575)
@@ -10,9 +10,10 @@
 \ require a full erase.  That is faster and safer than copying out the
 \ data, erasing the block and rewriting it.
 
+: wp-loc$  ( -- adr len )  mfg-data-top 2-  2  ;
 : enable-security  ( "serialnumber" -- )
    board-revision  h# b48 <  abort" Only supported on B4 and later"
-   h# fffefffe 2  " wp"  $=  if  ." wp is already set" cr  exit  then
+   wp-loc$  " wp"  $=  if  ." wp is already set" cr  exit  then
    " SN" find-tag 0=  abort" No serial number (SN tag); enabling security would brick me."  ( sn$ )
    -null            ( sn$' )
    safe-parse-word  ( sn$ confirmation$ )
@@ -22,10 +23,10 @@
    0= abort" Canceled"
 
    " U#" find-tag 0=  abort" No U# tag; enabling security would brick me." 2drop
-   h# fffefffe 2  " ww"  $=  0=  abort" No ww tag"
+   wp-loc$  " ww"  $=  0=  abort" No ww tag"
    spi-start  spi-identify
    " wp"  h# efffe  write-spi-flash
-   h# fffefffe 2  " wp"  $=  if  ." Succeeded" cr  then
+   wp-loc$ " wp"  $=  if  ." Succeeded" cr  then
    spi-reprogrammed
 ;
 



More information about the openfirmware mailing list