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

repository service svn at openfirmware.info
Tue Nov 20 23:54:29 CET 2012


Author: quozl
Date: Tue Nov 20 23:54:29 2012
New Revision: 3445
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3445

Log:
OLPC XO-1 - fix missing random-long in oatstime utility by using the psuedo-random generator seeded with time and milliseconds since boot

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

Modified: cpu/x86/pc/olpc/oatstime.fth
==============================================================================
--- cpu/x86/pc/olpc/oatstime.fth	Tue Nov 20 23:27:07 2012	(r3444)
+++ cpu/x86/pc/olpc/oatstime.fth	Tue Nov 20 23:54:29 2012	(r3445)
@@ -316,6 +316,11 @@
    http-write
    " flush-writes" $call-http
 ;
+[ifndef] random-long
+variable rn
+: random-long  rn @  d# 1103515245 *  d# 12345 +   h# 7FFFFFFF and  dup rn !  ;
+time&date >unix-seconds get-msecs xor rn !
+[then]
 0 value the-nonce
 : oats-msg$  ( -- msg$ )
    random-long abs  dup to the-nonce   ( nonce )



More information about the openfirmware mailing list