Author: wmb Date: Thu Nov 4 19:18:07 2010 New Revision: 2006 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2006
Log: OLPC XO-1.75 - Add crypto verifier, fix screen flashing bug.
Added: cpu/arm/olpc/1.75/wlan-version.fth Modified: cpu/arm/call.fth cpu/arm/mmp2/hash.fth cpu/arm/olpc/1.75/devices.fth cpu/arm/olpc/1.75/lcd.fth cpu/arm/olpc/1.75/olpc.bth cpu/arm/olpc/1.75/prefw.bth cpu/arm/olpc/1.75/sdhci.fth
Modified: cpu/arm/call.fth ============================================================================== --- cpu/arm/call.fth Thu Nov 4 04:35:15 2010 (r2005) +++ cpu/arm/call.fth Thu Nov 4 19:18:07 2010 (r2006) @@ -1,7 +1,7 @@ purpose: From Forth, call the C subroutine whose address is on the stack \ See license at end of file
-code sp-call ( [ arg5 .. arg0 ] adr sp -- [ arg5 .. arg0 ] result ) +code sp-call ( [ arg19 .. arg0 ] adr sp -- [ arg19 .. arg0 ] result ) pop r6,sp \ Get the subroutine address
str sp,'user saved-sp \ Save for callbacks @@ -10,10 +10,22 @@
mov rp,#0 \ Set the frame pointer to null
- \ Pass up to 6 arguments - ldmia sp,{r0,r1,r2,r3,r4,r5} + \ Pass up to 20 arguments + add r4,sp,#0x10 + sub r5,tos,#0x50 + + ldmia r4!,{r0,r1,r2,r3} \ Arguments 4-7 + stmia r5!,{r0,r1,r2,r3} \ .. onto new stack + ldmia r4!,{r0,r1,r2,r3} \ Arguments 8-11 + stmia r5!,{r0,r1,r2,r3} \ .. onto new stack + ldmia r4!,{r0,r1,r2,r3} \ Arguments 12-15 + stmia r5!,{r0,r1,r2,r3} \ .. onto new stack + ldmia r4!,{r0,r1,r2,r3} \ Arguments 16-19 + stmia r5!,{r0,r1,r2,r3} \ .. onto new stack
- mov sp,tos \ Switch to the new stack + ldmia sp,{r0,r1,r2,r3} \ First 4 arguments in registers + + sub sp,tos,#0x50 \ Switch to the new stack
mov lk,pc \ Set link register to return address mov pc,r6 \ Call the subroutine @@ -23,7 +35,7 @@ ldr sp,'user saved-sp \ Restore the stack pointer mov tos,r0 \ Return subroutine result c; -: call ( [ arg5 .. arg0 ] adr -- [ arg5 .. arg0 ] result ) sp@ sp-call ; +: call ( [ arg19 .. arg0 ] adr -- [ arg19 .. arg0 ] result ) sp@ sp-call ;
\ LICENSE_BEGIN \ Copyright (c) 1997 FirmWorks
Modified: cpu/arm/mmp2/hash.fth ============================================================================== --- cpu/arm/mmp2/hash.fth Thu Nov 4 04:35:15 2010 (r2005) +++ cpu/arm/mmp2/hash.fth Thu Nov 4 19:18:07 2010 (r2006) @@ -137,7 +137,7 @@ ; [else] \ This procedure works -: init-entropy-digital ( -- ) +: init-entropy ( -- ) \ Using digital method h# 21117c0 h# d4292c00 l! ; [then] @@ -149,6 +149,11 @@ : random-long ( -- l ) random-short random-short wljoin ; +alias random random-long + +stand-init: Random number generator + init-entropy +;
\ LICENSE_BEGIN \ Copyright (c) 2010 FirmWorks
Modified: cpu/arm/olpc/1.75/devices.fth ============================================================================== --- cpu/arm/olpc/1.75/devices.fth Thu Nov 4 04:35:15 2010 (r2005) +++ cpu/arm/olpc/1.75/devices.fth Thu Nov 4 19:18:07 2010 (r2006) @@ -185,6 +185,7 @@
devalias int /sd@d4281000/disk devalias ext /sd@d4280000/disk +devalias net /wlan \ XXX should report-net in case of USB Ethernet
fload ${BP}/dev/olpc/kb3700/spicmd.fth
Modified: cpu/arm/olpc/1.75/lcd.fth ============================================================================== --- cpu/arm/olpc/1.75/lcd.fth Thu Nov 4 04:35:15 2010 (r2005) +++ cpu/arm/olpc/1.75/lcd.fth Thu Nov 4 19:18:07 2010 (r2006) @@ -26,5 +26,5 @@ h# 2000000d h# 1b8 lcd! \ Dumb panel controller - 18 bit RGB666 on LDD[17:0] h# 01330133 h# 13c lcd! \ Panel VSYNC Pulse Pixel Edge Control clkdiv h# 1a8 lcd! \ Clock divider - h# 00021100 h# 190 lcd! \ DMA CTRL 0 - enable DMA, 24 bpp mode + h# 08021100 h# 190 lcd! \ DMA CTRL 0 - enable DMA, 24 bpp mode ;
Modified: cpu/arm/olpc/1.75/olpc.bth ============================================================================== --- cpu/arm/olpc/1.75/olpc.bth Thu Nov 4 04:35:15 2010 (r2005) +++ cpu/arm/olpc/1.75/olpc.bth Thu Nov 4 19:18:07 2010 (r2006) @@ -3,6 +3,7 @@ command: &builder &this in: ${BP}/cpu/arm/olpc/1.75/build/fw.img in: sd8686.bin +in: verify.img build-now
fload ${BP}/cpu/arm/olpc/1.75/fw-version.fth @@ -126,14 +127,13 @@ " memtest" " memtest" $add-deflated-dropin [then]
-0 [if] " verify.img" " verify" $add-deflated-dropin " os.public" " ospubkey" $add-dropin \ Incompressible " fw.public" " fwpubkey" $add-dropin \ Incompressible " fs.public" " fspubkey" $add-dropin \ Incompressible " lease.public" " leasepubkey" $add-dropin \ Incompressible " developer.public" " develpubkey" $add-dropin \ Incompressible -[then] + " sourceurl" " sourceurl" $add-dropin
0 [if]
Modified: cpu/arm/olpc/1.75/prefw.bth ============================================================================== --- cpu/arm/olpc/1.75/prefw.bth Thu Nov 4 04:35:15 2010 (r2005) +++ cpu/arm/olpc/1.75/prefw.bth Thu Nov 4 19:18:07 2010 (r2006) @@ -167,6 +167,10 @@
fload ${BP}/forth/lib/selstr.fth
+fload ${BP}/cpu/arm/mmp2/hash.fth \ Hashes - SHA1, SHA-256, MD5 +fload ${BP}/cpu/x86/pc/olpc/crypto.fth \ Cryptographic image validation +fload ${BP}/cpu/x86/pc/olpc/lzip.fth \ Access zip images from memory + fload ${BP}/ofw/inet/loadtcp.fth
support-package: http @@ -185,8 +189,6 @@ fload ${BP}/cpu/arm/olpc/1.75/memtest.fth [then]
-fload ${BP}/cpu/arm/mmp2/hash.fth \ Hashes - SHA1, SHA-256, MD5 - fload ${BP}/ofw/wifi/wifi-cfg.fth support-package: supplicant fload ${BP}/ofw/wifi/loadpkg.fth
Modified: cpu/arm/olpc/1.75/sdhci.fth ============================================================================== --- cpu/arm/olpc/1.75/sdhci.fth Thu Nov 4 04:35:15 2010 (r2005) +++ cpu/arm/olpc/1.75/sdhci.fth Thu Nov 4 19:18:07 2010 (r2006) @@ -96,7 +96,7 @@
end-package
-stand-init: \ SDHC clocks +stand-init: SDHC clocks h# 41b h# d4282854 l! \ SD0 (external SD) clocks, plus set master clock divisor h# 1b h# d4282858 l! \ SD1 (WLAN) clocks h# 1b h# d42828e8 l! \ SD2 (internal microSD) clocks
Added: cpu/arm/olpc/1.75/wlan-version.fth ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ cpu/arm/olpc/1.75/wlan-version.fth Thu Nov 4 19:18:07 2010 (r2006) @@ -0,0 +1,7 @@ +\ The wireless LAN module firmware +macro: WLAN_VERSION 9.0.7.p2 + +\ Alternate command for getting WLAN firmware, for testing new versions. +\ Temporarily uncomment the line and modify the path as necessary +\ macro: GET_WLAN cp "/c/Documents and Settings/Mitch Bradley/My Documents/OLPC/DiskImages/sd8686-9.70.7.p0.bin" sd8686.bin; cp "/c/Documents and Settings/Mitch Bradley/My Documents/OLPC/DiskImages/sd8686_helper.bin" sd8686_helper.bin +\ macro: GET_WLAN wget http://dev.laptop.org/pub/firmware/libertas/thinfirm/lbtf_sdio-9.0.7.p2.bin -O sd8686.bin