Author: wmb Date: 2007-08-31 03:15:01 +0200 (Fri, 31 Aug 2007) New Revision: 591
Added: cpu/x86/pc/olpc/setwp.fth Log: Added "setwp.fth" file.
Added: cpu/x86/pc/olpc/setwp.fth =================================================================== --- cpu/x86/pc/olpc/setwp.fth (rev 0) +++ cpu/x86/pc/olpc/setwp.fth 2007-08-31 01:15:01 UTC (rev 591) @@ -0,0 +1,14 @@ +\ Set the write protect tag. This is used to convert unlocked prototype +\ machined to locked machines for testing the firmware security. This +\ should not be necessary once mass production systems start coming from +\ the factor with the "wp" tag set. + +: set-wp ( -- ) + h# fffefffe 2 " wp" $= if ." wp is already set" cr exit then + h# fffefffe 2 " ww" $= 0= abort" No ww tag" + spi-start spi-identify + " wp" h# efffe write-spi-flash + h# fffefffe 2 " wp" $= if ." Succeeded" cr then + spi-reprogrammed +; +set-wp