[openfirmware] [commit] r2783 - cpu/arm/mmp2
repository service
svn at openfirmware.info
Fri Dec 23 00:59:27 CET 2011
Author: wmb
Date: Fri Dec 23 00:59:27 2011
New Revision: 2783
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2783
Log:
OLPC XO-1.75 and XO-3 - Fixed MMP2 hash engine code to use non-cached memory for DMA, fixing a problem whereby the hash answer was often wrong because the source data was stuck in L1 cache and thus invisible to DMA.
Modified:
cpu/arm/mmp2/hash.fth
Modified: cpu/arm/mmp2/hash.fth
==============================================================================
--- cpu/arm/mmp2/hash.fth Fri Dec 23 00:59:23 2011 (r2782)
+++ cpu/arm/mmp2/hash.fth Fri Dec 23 00:59:27 2011 (r2783)
@@ -18,7 +18,7 @@
h# 40 value /hash-block
d# 20 value /hash-digest
-/hash-block 2* buffer: (hash-buf)
+0 value (hash-buf)
: hash-buf ( -- adr ) (hash-buf) /hash-block round-up ; \ Aligned
0 value #hash-buf
0 value #hashed
@@ -39,6 +39,10 @@
h# 291818 io! \ Low word of total size
;
: hash-init ( -- )
+ (hash-buf) 0= if
+ /hash-block 2* " /" " dma-alloc" execute-device-method drop
+ to (hash-buf)
+ then
1 h# 290c00 io! \ Select hash (0) for Accelerator A, crossing to direct DMA to it
dma-stop
8 hash-control! \ Reset
More information about the openfirmware
mailing list