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
Author: wmb
Date: Thu Dec 22 03:17:46 2011
New Revision: 2780
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2780
Log:
WiFi - Fixed a problem that made WEP authentication not work when the access point is set for WEP open authentication mode instead of WEP shared key mode. Shared key mode used to be the norm, but open is now believed to be somewhat better, eliminating a WEP-key recovery attack on the challenge phase of the shared-mode authentication protocol.
Modified:
dev/libertas.fth
ofw/wifi/eapol.fth
Modified: dev/libertas.fth
==============================================================================
--- dev/libertas.fth Thu Dec 22 03:17:42 2011 (r2779)
+++ dev/libertas.fth Thu Dec 22 03:17:46 2011 (r2780)
@@ -1404,6 +1404,12 @@
#rates +xw \ len
common-rates #rates +x$ \ common supported data rates
+ ktype kt-wep = if
+ h# 11f +xw
+ 2 +xw
+ auth-mode +xw
+ then
+
\ RSN (WPA2)
ktype kt-wpa2 = if
/x \ Save beginning offset
@@ -1443,7 +1449,15 @@
finish-cmd outbuf-wait if false exit then
respbuf >fw-data 2 + le-w@ ?dup if \ This is the IEEE Status Code
- ." Failed to associate: " u. cr
+ dup d# 13 = ktype kt-wep = and if ( status )
+ \ Retry, toggling the WEP authentication between shared (1) and open (0)
+ 1 auth-mode - set-auth-mode ( status )
+ ?set-wep
+ set-mac-control
+ drop ( )
+ else ( status )
+ ." Failed to associate: " u. cr ( )
+ then ( )
false
else
respbuf >fw-data 4 + le-w@ to assoc-id
@@ -1471,7 +1485,7 @@
then ( ch ssid$ target-mac$ )
?set-wep \ Set WEP keys again, if ktype is WEP
set-mac-control
- 2dup authenticate ( ch ssid$ target-mac$ )
+\ 2dup authenticate ( ch ssid$ target-mac$ )
d# 10 0 do ( ch ssid$ target-mac$ )
4 pick 4 pick 4 pick 4 pick 4 pick ( ch ssid$ target-mac$ ch ssid$ target-mac$ )
bss-type bss-type-managed = if (associate) else (join) then ( ch ssid$ target-mac$ ok? )
Modified: ofw/wifi/eapol.fth
==============================================================================
--- ofw/wifi/eapol.fth Thu Dec 22 03:17:42 2011 (r2779)
+++ ofw/wifi/eapol.fth Thu Dec 22 03:17:46 2011 (r2780)
@@ -735,7 +735,11 @@
disable-rsn
disable-wep
endof
- kt-wep of am-shared set-auth-mode
+ kt-wep of am-open set-auth-mode
+ \ Open authentication is best for WEP because it prevents attacks
+ \ on the authentication challenge that can lead to key recovery.
+ \ If open authentication fails, the driver can retry the association
+ \ attempt with shared key mode.
wifi-wep4$ wifi-wep3$ wifi-wep2$ wifi-wep1$ wifi-wep-idx set-wep
disable-rsn
endof
Author: pgf
Date: Mon Dec 19 20:40:55 2011
New Revision: 2776
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2776
Log:
use correct EC command opcode for fetching firmware git hash string
this opcode was forced to change due to conflicting assignment between
XO platforms. 0x55 was already in use for "turn off power". new
value is 0x64.
Modified:
dev/olpc/kb3700/eccmds.fth
Modified: dev/olpc/kb3700/eccmds.fth
==============================================================================
--- dev/olpc/kb3700/eccmds.fth Fri Dec 16 00:03:06 2011 (r2775)
+++ dev/olpc/kb3700/eccmds.fth Mon Dec 19 20:40:55 2011 (r2776)
@@ -78,7 +78,7 @@
;
: ec-hash$ ( -- adr len )
- 0 d# 16 h# 55 do-ec-cmd-buf ( adr )
+ 0 d# 16 h# 64 do-ec-cmd-buf ( adr )
d# 16 cscount-max
;