OpenBIOS
Threads by month
- ----- 2025 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2000 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1999 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1998 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1997 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1996 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1995 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1994 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1993 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1992 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1991 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1990 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1989 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1988 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1987 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1986 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1985 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1984 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1983 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1982 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1981 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1980 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1979 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1978 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1977 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1976 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1975 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1974 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1973 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1972 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1971 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1970 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1969 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1968 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1967 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1966 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1965 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1964 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1963 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1962 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1961 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1960 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1959 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1958 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1957 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1956 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1955 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1954 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1953 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1952 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1951 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1950 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1949 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1948 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1947 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1946 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1945 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1944 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1943 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1942 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1941 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1940 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1939 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1938 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1937 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1936 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1935 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1934 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1933 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1932 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1931 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1930 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1929 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1928 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1927 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1926 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1925 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1924 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1923 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1922 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1921 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1920 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1919 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1918 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1917 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1916 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1915 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1914 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1913 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1912 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1911 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1910 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1909 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1908 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1907 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1906 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1905 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1904 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
November 2007
- 5 participants
- 46 discussions
Author: wmb
Date: 2007-11-14 08:37:37 +0100 (Wed, 14 Nov 2007)
New Revision: 728
Modified:
cpu/x86/pc/olpc/resume.bth
Log:
Fixed a problem introduced by svn 726 - a misplaced progress report killed a register.
Modified: cpu/x86/pc/olpc/resume.bth
===================================================================
--- cpu/x86/pc/olpc/resume.bth 2007-11-14 07:12:55 UTC (rev 727)
+++ cpu/x86/pc/olpc/resume.bth 2007-11-14 07:37:37 UTC (rev 728)
@@ -85,8 +85,6 @@
\ Physical addresses from now on
- h# f1 resume-progress
-
\ suspend-physical
\ here suspend-entry put-branch
resume-data # bp mov
1
0
Author: wmb
Date: 2007-11-14 08:12:55 +0100 (Wed, 14 Nov 2007)
New Revision: 727
Modified:
ofw/fs/jffs2/jffs2.fth
Log:
OLPC Trac 4898 - support . and .. in pathnames on JFFS2.
Modified: ofw/fs/jffs2/jffs2.fth
===================================================================
--- ofw/fs/jffs2/jffs2.fth 2007-11-14 07:11:25 UTC (rev 726)
+++ ofw/fs/jffs2/jffs2.fth 2007-11-14 07:12:55 UTC (rev 727)
@@ -87,6 +87,12 @@
true value first-time?
-1 value partition#
+\ This is a run-time cache of the parent inums for the directory inums we
+\ have seen, used for resolving "..".
+d# 256 2* /n* constant /parent-buf
+/parent-buf buffer: parents
+0 value next-parent
+
: allocate-buffers ( -- )
/eblock dma-alloc to block-buf
/page d# 1024 max /eblock min to /empty-scan
@@ -99,6 +105,7 @@
\ /page d# 100 / pages/chip * to alloc-len
\ alloc-len dma-alloc to inodes
\ alloc-len dma-alloc to dirents
+ parents to next-parent
;
: release-buffers ( -- )
@@ -1165,16 +1172,53 @@
r> drop ( )
;
+: >parent ( ino -- true | pino false )
+ dup 1 = if false exit then ( ino ) \ Root is special
+ parents begin dup next-parent <> while ( ino adr )
+ 2dup @ = if nip na1+ @ false exit then ( ino adr )
+ 2 na+ ( ino adr' )
+ repeat ( ino adr )
+ 2drop true
+;
+
+: remember-parent ( pino ino -- )
+ dup >parent if ( pino ino )
+ next-parent parents - /parent-buf >= if
+ ." Parent directory cache overflow" cr
+ 2drop exit
+ then
+ next-parent ! next-parent na1+ !
+ next-parent 2 na+ to next-parent
+ else ( pino ino existing-pino )
+ 3drop
+ then
+;
+
+: select-parent ( -- error? )
+ wd-inum >parent if true exit then ( pino )
+ to wd-inum
+ false
+;
+
: $find-name ( name$ -- error? )
-1 to my-vers ( name$ )
+ 2dup " ." $= if 2drop false exit then ( name$ ) \ Change nothing...
+ 2dup " .." $= if ( name$ )
+ 2drop ( )
+ select-parent exit
+ then ( name$ )
+
0 dirent-offset !
dirents begin next-pino-match while ( name$ adr' offset )
2over ?update-dirent ( name$ adr )
repeat ( name$ )
2drop ( )
my-vers 0< if true exit then ( )
- wf-type 4 = if wf-inum to wd-inum then
+ wf-type 4 = if
+ wd-inum wf-inum remember-parent
+ wf-inum to wd-inum
+ then
false
;
1
0
Author: wmb
Date: 2007-11-14 08:11:25 +0100 (Wed, 14 Nov 2007)
New Revision: 726
Modified:
cpu/x86/pc/olpc/draminit.fth
cpu/x86/pc/olpc/resume.bth
cpu/x86/pc/olpc/rmstart.fth
cpu/x86/pc/olpc/romreset.bth
Log:
OLPC - added CMOS RAM writes to suspend/resume sequence to record the
progress in case of failures.
Modified: cpu/x86/pc/olpc/draminit.fth
===================================================================
--- cpu/x86/pc/olpc/draminit.fth 2007-11-08 21:59:58 UTC (rev 725)
+++ cpu/x86/pc/olpc/draminit.fth 2007-11-14 07:11:25 UTC (rev 726)
@@ -1,4 +1,8 @@
h# 18 # al mov al h# 80 # out
+ h# 1430 # dx mov dx ax in h# 9999 # ax cmp = if
+ h# 34 # al mov al h# 70 # out \ Write to CMOS 0x34
+ h# 18 # al mov al h# 71 # out \ Write value 01
+ then
\ Enable DLL, load Extended Mode Register by set and clear PROG_DRAM
20000018 rmsr
@@ -40,6 +44,10 @@
ax h# ffff0 #) mov
h# 19 # al mov al h# 80 # out
+ h# 1430 # dx mov dx ax in h# 9999 # ax cmp = if
+ h# 34 # al mov al h# 70 # out \ Write to CMOS 0x34
+ h# 19 # al mov al h# 71 # out \ Write value 01
+ then
\ Turn on the cache
cr0 ax mov
@@ -48,6 +56,11 @@
invd
h# 1a # al mov al h# 80 # out
+ h# 1430 # dx mov dx ax in h# 9999 # ax cmp = if
+ h# 34 # al mov al h# 70 # out \ Write to CMOS 0x34
+ h# 1a # al mov al h# 71 # out \ Write value 01
+ then
+
0000f001.00001400. 5140000f set-msr \ PMS BAR
\ It is tempting to test bit 0 of PM register 5c, but a 5536 erratum
@@ -58,6 +71,9 @@
1430 port-rl h# 9999 # ax cmp = if \ Wakeup event flag
0 1430 port-wl
h# 1b # al mov al h# 80 # out
+ h# 34 # al mov al h# 70 # out \ Write to CMOS 0x34
+ h# 1b # al mov al h# 71 # out \ Write value 01
+
char r 3f8 port-wb begin 3fd port-rb 40 bitand 0<> until
resume-data # sp mov
Modified: cpu/x86/pc/olpc/resume.bth
===================================================================
--- cpu/x86/pc/olpc/resume.bth 2007-11-08 21:59:58 UTC (rev 725)
+++ cpu/x86/pc/olpc/resume.bth 2007-11-14 07:11:25 UTC (rev 726)
@@ -33,6 +33,10 @@
h# efc0.0000 constant uoc-pa
h# 1000 constant gpio-port
+: resume-progress ( byte -- )
+ " h# 34 # al mov al h# 70 # out ( byte ) # al mov al h# 71 # out" eval
+;
+
start-assembling \ Turn on the target assembler
protected-mode
@@ -60,6 +64,8 @@
gs push
ss push dx pop \ SS in dx
+ h# f0 resume-progress
+
here 5 + dup #) call di pop \ Virtual address of EIP in DI
( here ) asm-base - # di sub \ Virtual address of suspend-base in DI
@@ -79,6 +85,8 @@
\ Physical addresses from now on
+ h# f1 resume-progress
+
\ suspend-physical
\ here suspend-entry put-branch
resume-data # bp mov
@@ -287,6 +295,8 @@
\ h# 0100.ffff h# 1840 port-wl \ Enable Power button wakeup, clear status bits
h# ffff.ffff h# 1858 port-wl \ Clear all status bits
+ h# fe resume-progress
+
wbinvd \ Flush the cache
h# 00ff.ff00 h# 2000.0018 bitclr-msr \ Set refresh to 0, disabling GX refresh
@@ -325,6 +335,8 @@
cld
+ h# 20 resume-progress
+
\ MSR init
h# 30 [bp] si mov \ MSR table start address
si bx mov
@@ -338,6 +350,8 @@
si bx cmp
= until
+ h# 21 resume-progress
+
[ifdef] checksum-test
\ Checksum memory from 1M to top (excluding framebuffer)
bx bx xor
@@ -356,6 +370,8 @@
ax lods ax dx xchg ax lods ax dx xchg h# c000.2001 wmsr \ Video output format
ax lods ax dx xchg ax lods ax dx xchg h# c000.2011 wmsr \ TFTP pad select
+ h# 22 resume-progress
+
[ifdef] reset-smbus-bitbang
\ GPIO15 is SMB_DATA
\ GPIO14 is SMB_CLOCK
@@ -389,6 +405,8 @@
begin rdtsc bx ax sub 0>= until
[then]
+ h# 23 resume-progress
+
h# 1038 # dx mov \ Low bank - first contiguous GPIO register
h# 3c /l / # cx mov \ Register count (stop at lock register)
begin
@@ -424,6 +442,8 @@
ax lods h# 10c4 # dx mov ax dx out \ Neg edge enable
ax lods h# 10bc # dx mov ax dx out \ High bank lock
+ h# 24 resume-progress
+
[ifdef] save-display
\ \ h# 3c 0 do l@+ i gp! 4 +loop l@+ h# 4c gp!
@@ -482,6 +502,8 @@
h# 500.0000 # vp-pa h# 410 + #) mov
[then]
+ h# 25 resume-progress
+
\ 0 h# 1842 pw! \ Disable power button during early startup
\ Restore Interrupt controller setup
@@ -507,6 +529,8 @@
al lods h# 4d0 # dx mov al dx out \ Edge/level low
al lods h# 4d1 # dx mov al dx out \ Edge/level high
+ h# 26 resume-progress
+
\ Restore PIT (timer)
h# 30 # al mov al h# 43 # out \ Load LSB,MSB for counter 0
al lods al h# 40 out
@@ -524,6 +548,8 @@
al lods al h# 61 # out
al lods h# 5140.0037 wmsr \ PIT Count Enable MSR - high bits irrelevant
+ h# 27 resume-progress
+
\ SMBUS controller
h# 18b3 # dx mov \ SMBUS base port
al lods al dx out \ Reg 3
@@ -571,6 +597,8 @@
\ End of DCON SMbus reset dance
[then]
+ h# 28 resume-progress
+
\ MFGPTs 0-5. MFGPT 6 and 7 are in the standby domain, live during suspend
h# 1800 # dx mov \ MFGPT base port
h# 18 # cx mov
@@ -579,6 +607,8 @@
dx inc dx inc
loopa
+ h# 29 resume-progress
+
\ AC97
\ Codec
@@ -595,6 +625,8 @@
h# 100 # h# 58 [bx] mov \ HcRhPortStatus[2] register - Power on
[then]
+ h# 2a resume-progress
+
\ Restore CaFe configuration
h# 6010 config-setup ax lods ax dx out \ NAND BAR
@@ -629,6 +661,8 @@
h# 100 # h# 60 [bx] mov \ HcRhPortStatus[4] register - Power on
[then]
+ h# 2b resume-progress
+
\ Display stuff
h# 4758 # h# fe00.4000 #) mov \ Unlock display controller registers
@@ -648,6 +682,8 @@
\ DCON fiddling
\ USB
+ h# 2c resume-progress
+
h# 2c [bp] di mov \ VA of suspend-base in di
h# 28 [bp] si mov \ PDIR VA
h# 24 [bp] cx mov \ PDIR entry 0
@@ -667,6 +703,8 @@
\ Force the paging enable to take place
h# eb asm8, 0 asm8, \ jmp to next location to enable paging
+ h# 2d resume-progress
+
\ Now jump back to the virtual execution address
here asm-base - 8 + # di add \ The add instruction is 6 bytes, the jmp is 2
di jmp
Modified: cpu/x86/pc/olpc/rmstart.fth
===================================================================
--- cpu/x86/pc/olpc/rmstart.fth 2007-11-08 21:59:58 UTC (rev 725)
+++ cpu/x86/pc/olpc/rmstart.fth 2007-11-14 07:11:25 UTC (rev 726)
@@ -156,9 +156,20 @@
op: h# 510100e1 # cx mov \ IOD Base Mask 1 MSR
wrmsr
+ op: h# 0000f001 # dx mov \ Maps I/O space at 0x1400 to the
+ op: h# 00001400 # ax mov \ power management registers
+ op: h# 5140000f # cx mov \ PMS BAR
+ wrmsr
+
\ Writes 4 to CODEC register 0x76 to turn off VBIAS (VREFOUT)
op: h# 7601.0004 # ax mov op: h# 148c # dx mov op: ax dx out
+ op: h# 1430 # dx mov op: dx ax in op: h# 9999 # ax cmp = if
+ h# 34 # al mov al h# 70 # out \ Write to CMOS 0x34
+ h# 01 # al mov al h# 71 # out \ Write value 01
+ then
+
+
\ End of MIC LED code.
\ This code is highly optimized because it runs when the CPU is in
@@ -176,12 +187,12 @@
al al test 0= if
rdmsr \ Get base MSR value with divisors
op: h# 04de.0000 # ax or \ Set the startup time (de) and breadcrumb (4)
- op: h# 0000.04d9 # dx mov \ PLL value for 133 MB clk, 433 CPU
+ op: h# 0000.04d9 # dx mov \ PLL value for 333 MB clk, 433 CPU
else
al dec al h# 71 # out \ Decrement safety counter
rdmsr \ Get base MSR value with divisors
op: h# 04de.0000 # ax or \ Set the startup time (de) and breadcrumb (4)
- op: h# 0000.04d9 # dx mov \ PLL value for 167 MB clk, 433 CPU
+ op: h# 0000.04d3 # dx mov \ PLL value for 333 MB clk, 333 CPU
then
wrmsr \ Put in the base value
op: h# 0000.1800 invert # ax and \ Turn off the BYPASS bits
@@ -208,6 +219,12 @@
\ Return to here after the reset
h# 02 # al mov al h# 80 # out
+ op: h# 1430 # dx mov op: dx ax in op: h# 9999 # ax cmp = if
+ h# 34 # al mov al h# 70 # out \ Write to CMOS 0x34
+ h# 02 # al mov al h# 71 # out \ Write value 01
+ then
+
+
[ifdef] init-com1 init-com1 [then]
[ifdef] debug-reset
@@ -235,6 +252,12 @@
h# 03 # al mov al h# 80 # out
+ op: h# 1430 # dx mov op: dx ax in op: h# 9999 # ax cmp = if
+ h# 34 # al mov al h# 70 # out \ Write to CMOS 0x34
+ h# 01 # al mov al h# 71 # out \ Write value 01
+ then
+
+
\ We are in protected mode, but we are still executing from old
\ 16-bit code segment, and will continue to do so until the far jump
\ below
@@ -263,6 +286,12 @@
[then]
h# 0f # al mov al h# 80 # out
+
+ op: h# 1430 # dx mov op: dx ax in op: h# 9999 # ax cmp = if
+ h# 34 # al mov al h# 70 # out \ Write to CMOS 0x34
+ h# 0f # al mov al h# 71 # out \ Write value 01
+ then
+
op: ad: ResetBase h# 10 #) far jmp \ Jump to Forth startup
real-mode
Modified: cpu/x86/pc/olpc/romreset.bth
===================================================================
--- cpu/x86/pc/olpc/romreset.bth 2007-11-08 21:59:58 UTC (rev 725)
+++ cpu/x86/pc/olpc/romreset.bth 2007-11-14 07:11:25 UTC (rev 726)
@@ -52,6 +52,11 @@
label startup
h# 10 # al mov al h# 80 # out
+ h# 1430 # dx mov dx ax in h# 9999 # ax cmp = if
+ h# 34 # al mov al h# 70 # out \ Write to CMOS 0x34
+ h# 10 # al mov al h# 71 # out \ Write value 01
+ then
+
long-offsets on
h# 4c000017 rmsr h# 10 bitand 0<> if \ LX branch
@@ -118,6 +123,11 @@
[then] \ lx-devel
h# 11 # al mov al h# 80 # out
+ h# 1430 # dx mov dx ax in h# 9999 # ax cmp = if
+ h# 34 # al mov al h# 70 # out \ Write to CMOS 0x34
+ h# 11 # al mov al h# 71 # out \ Write value 01
+ then
+
\ Init memory controller
\ sdram_initialize,generic_sdram.c
@@ -263,6 +273,11 @@
[then]
h# 11 # al mov al h# 80 # out
+ h# 1430 # dx mov dx ax in h# 9999 # ax cmp = if
+ h# 34 # al mov al h# 70 # out \ Write to CMOS 0x34
+ h# 10 # al mov al h# 71 # out \ Write value 01
+ then
+
\ Init memory controller
\ sdram_initialize,generic_sdram.c
@@ -322,6 +337,10 @@
\ char b 3f8 port-wb begin 3fd port-rb 40 bitand 0<> until
h# 12 # al mov al h# 80 # out
+ h# 1430 # dx mov dx ax in h# 9999 # ax cmp = if
+ h# 34 # al mov al h# 70 # out \ Write to CMOS 0x34
+ h# 12 # al mov al h# 71 # out \ Write value 01
+ then
fload ${BP}/cpu/x86/pc/olpc/draminit.fth
@@ -337,6 +356,11 @@
\ Now we can use the stack and do conventional subroutine calls
h# 1f # al mov al h# 80 # out
+ h# 1430 # dx mov dx ax in h# 9999 # ax cmp = if
+ h# 34 # al mov al h# 70 # out \ Write to CMOS 0x34
+ h# 1f # al mov al h# 71 # out \ Write value 01
+ then
+
fload ${BP}/cpu/x86/pc/resetend.fth
end-code
1
0
This requires at least
--- tmp/openfirmware/cpu/x86/pc/biosload/fw.bth.orig 2007-11-12
00:01:00.000000000 +0100
+++ tmp/openfirmware/cpu/x86/pc/biosload/fw.bth 2007-11-12 00:14:04.000000000
+0100
@@ -119,6 +119,7 @@
[then]
[ifdef] linux-support
+\needs unix-seconds> fload ${BP}/ofw/fs/unixtime.fth \ Unix time
calculation
support-package: ext2-file-system
fload ${BP}/ofw/fs/ext2fs/ext2fs.fth \ Linux file system
end-support-package
for me :-(
Signed-off-by: Torsten Duwe <duwe(a)lst.de>
1
0

Nov. 11, 2007
Author: blueswirl
Date: 2007-11-11 19:02:11 +0100 (Sun, 11 Nov 2007)
New Revision: 175
Modified:
openbios-devel/arch/sparc32/entry.S
openbios-devel/arch/sparc32/openbios.c
openbios-devel/drivers/esp.c
openbios-devel/drivers/obio.c
openbios-devel/drivers/sbus.c
openbios-devel/include/openbios/drivers.h
Log:
Add SPARCserver 600MP emulation
Modified: openbios-devel/arch/sparc32/entry.S
===================================================================
--- openbios-devel/arch/sparc32/entry.S 2007-11-10 09:33:13 UTC (rev 174)
+++ openbios-devel/arch/sparc32/entry.S 2007-11-11 18:02:11 UTC (rev 175)
@@ -17,6 +17,8 @@
#define PHYS_SS10_EEPROM 0xf1200000
#define PHYS_SS10_INTR0 0xf1400000
+#define SUN_MACHINE_ID 0x1fd9
+
#define WRITE_PAUSE nop; nop; nop; /* Have to do this after %wim/%psr chg */
.globl entry, _entry
@@ -110,9 +112,11 @@
cmp %g2, 'U'
bne bad_nvram
- ! Ok, this is SS-10
- mov 0x72, %y
+ ! Ok, this is SS-10 or SS-600MP
! Check if this not the first SMP CPU, if so, bypass PROM entirely
+ set PHYS_SS10_EEPROM + SUN_MACHINE_ID, %g1
+ lduba [%g1] ASI_M_CTL, %g2
+ mov %g2, %y
set PHYS_SS10_EEPROM + 0x2E, %g1
lduba [%g1] ASI_M_CTL, %g2
stba %g0, [%g2] ASI_M_CTL
Modified: openbios-devel/arch/sparc32/openbios.c
===================================================================
--- openbios-devel/arch/sparc32/openbios.c 2007-11-10 09:33:13 UTC (rev 174)
+++ openbios-devel/arch/sparc32/openbios.c 2007-11-11 18:02:11 UTC (rev 175)
@@ -65,6 +65,22 @@
.le_base = 0xef0c00000ULL,
.machine_id = 0x72,
},
+ /* SS-600MP */
+ {
+ .iommu_base = 0xfe0000000ULL,
+ .tcx_base = 0xe20000000ULL,
+ .slavio_base = 0xff1000000ULL,
+ .ms_kb_base = 0xff1000000ULL,
+ .serial_base = 0xff1100000ULL,
+ .nvram_base = 0xff1200000ULL,
+ .fd_offset = -1,
+ .counter_offset = 0x00300000, // 0xff1300000ULL,
+ .intr_offset = 0x00400000, // 0xff1400000ULL,
+ .dma_base = 0xef0081000ULL,
+ .esp_base = 0xef0080000ULL,
+ .le_base = 0xef0060000ULL,
+ .machine_id = 0x71,
+ },
};
static const struct hwdef *hwdef;
Modified: openbios-devel/drivers/esp.c
===================================================================
--- openbios-devel/drivers/esp.c 2007-11-10 09:33:13 UTC (rev 174)
+++ openbios-devel/drivers/esp.c 2007-11-11 18:02:11 UTC (rev 175)
@@ -25,9 +25,6 @@
#include "asm/dma.h"
#include "esp.h"
-#define MACIO_ESPDMA 0x00400000ULL /* ESP DMA controller */
-#define MACIO_ESP 0x00800000ULL /* ESP SCSI */
-
#define BUFSIZE 4096
#define REGISTER_NAMED_NODE( name, path ) do { \
@@ -318,7 +315,7 @@
espdma_init(unsigned int slot, uint64_t base, unsigned long offset,
struct esp_dma *espdma)
{
- espdma->regs = (void *)map_io(base + (uint64_t)offset + MACIO_ESPDMA, 0x10);
+ espdma->regs = (void *)map_io(base + (uint64_t)offset, 0x10);
if (espdma->regs == 0) {
DPRINTF("espdma_init: cannot map registers\n");
@@ -366,7 +363,7 @@
/* set reg */
PUSH(slot);
fword("encode-int");
- PUSH(offset + MACIO_ESPDMA);
+ PUSH(offset);
fword("encode-int");
fword("encode+");
PUSH(0x00000010);
@@ -430,7 +427,8 @@
}
int
-ob_esp_init(unsigned int slot, uint64_t base, unsigned long offset)
+ob_esp_init(unsigned int slot, uint64_t base, unsigned long espoffset,
+ unsigned long dmaoffset)
{
int id, diskcount = 0, cdcount = 0, *counter_ptr;
char nodebuff[256], aliasbuff[256];
@@ -446,11 +444,11 @@
global_esp = esp;
- if (espdma_init(slot, base, offset, &esp->espdma) != 0) {
+ if (espdma_init(slot, base, dmaoffset, &esp->espdma) != 0) {
return -1;
}
/* Get the IO region */
- esp->ll = (void *)map_io(base + (uint64_t)offset + MACIO_ESP,
+ esp->ll = (void *)map_io(base + (uint64_t)espoffset,
sizeof(struct esp_regs));
if (esp->ll == 0) {
DPRINTF("Can't map ESP registers\n");
@@ -489,7 +487,7 @@
fword("find-device");
PUSH(slot);
fword("encode-int");
- PUSH(offset + MACIO_ESP);
+ PUSH(espoffset);
fword("encode-int");
fword("encode+");
PUSH(0x00000010);
Modified: openbios-devel/drivers/obio.c
===================================================================
--- openbios-devel/drivers/obio.c 2007-11-10 09:33:13 UTC (rev 174)
+++ openbios-devel/drivers/obio.c 2007-11-11 18:02:11 UTC (rev 175)
@@ -736,6 +736,16 @@
fword("property");
switch (machine_id) {
+ case 0x71:
+ push_str("SPARCsystem 600(1 X 390Z55)");
+ fword("encode-string");
+ push_str("banner-name");
+ fword("property");
+ push_str("SUNW,SPARCsystem-600");
+ fword("encode-string");
+ push_str("name");
+ fword("property");
+ break;
case 0x72:
push_str("SPARCstation 10 (1 X 390Z55)");
fword("encode-string");
@@ -1204,7 +1214,8 @@
ob_nvram_init(slavio_base, SLAVIO_NVRAM);
// 82078 FDC
- ob_fd_init(slavio_base, fd_offset, FD_INTR);
+ if (fd_offset != (unsigned long) -1)
+ ob_fd_init(slavio_base, fd_offset, FD_INTR);
ob_sconfig_init(slavio_base, SLAVIO_SCONFIG);
Modified: openbios-devel/drivers/sbus.c
===================================================================
--- openbios-devel/drivers/sbus.c 2007-11-10 09:33:13 UTC (rev 174)
+++ openbios-devel/drivers/sbus.c 2007-11-11 18:02:11 UTC (rev 175)
@@ -24,6 +24,11 @@
#define POWER_OFFSET 0x0a000000ULL
#define CS4231_REGS 0x40
#define CS4231_OFFSET 0x0c000000ULL
+#define MACIO_ESPDMA 0x00400000ULL /* ESP DMA controller */
+#define MACIO_ESP 0x00800000ULL /* ESP SCSI */
+#define SS600MP_ESPDMA 0x00081000ULL
+#define SS600MP_ESP 0x00080000ULL
+#define SS600MP_LEBUFFER (SS600MP_ESPDMA + 0x10) // XXX should be 0x40000
static void
ob_sbus_node_init(uint64_t base)
@@ -52,13 +57,14 @@
}
static void
-ob_le_init(unsigned int slot, unsigned long base, unsigned long offset)
+ob_le_init(unsigned int slot, unsigned long base, unsigned long leoffset,
+ unsigned long dmaoffset)
{
push_str("/iommu/sbus/ledma");
fword("find-device");
PUSH(slot);
fword("encode-int");
- PUSH(offset + 0x00400010);
+ PUSH(dmaoffset);
fword("encode-int");
fword("encode+");
PUSH(0x00000020);
@@ -71,7 +77,7 @@
fword("find-device");
PUSH(slot);
fword("encode-int");
- PUSH(offset + 0x00c00000);
+ PUSH(leoffset);
fword("encode-int");
fword("encode+");
PUSH(0x00000004);
@@ -352,11 +358,11 @@
// NCR 53c9x, aka ESP. See
// http://www.ibiblio.org/pub/historic-linux/early-ports/Sparc/NCR/NCR53C9X.txt
#ifdef CONFIG_DRIVER_ESP
- ob_esp_init(slot, base, offset);
+ ob_esp_init(slot, base, offset + MACIO_ESP, offset + MACIO_ESPDMA);
#endif
// NCR 92C990, Am7990, Lance. See http://www.amd.com
- ob_le_init(slot, base, offset);
+ ob_le_init(slot, base, offset + 0x00c00000, offset + 0x00400010);
// Parallel port
//ob_bpp_init(base);
@@ -401,6 +407,26 @@
}
static void
+sbus_probe_slot_ss600mp(unsigned int slot, uint64_t base)
+{
+ // OpenBIOS and Qemu don't know how to do Sbus probing
+ switch(slot) {
+ case 2: // SUNW,tcx
+ ob_tcx_init(slot, base);
+ break;
+ case 0xf: // le, esp, bpp, power-management
+#ifdef CONFIG_DRIVER_ESP
+ ob_esp_init(slot, base, SS600MP_ESP, SS600MP_ESPDMA);
+#endif
+ // NCR 92C990, Am7990, Lance. See http://www.amd.com
+ ob_le_init(slot, base, 0x00060000, SS600MP_LEBUFFER);
+ break;
+ default:
+ break;
+ }
+}
+
+static void
ob_sbus_open(int *idx)
{
int ret=1;
@@ -440,6 +466,7 @@
{ 5, 0, 0x70000000, 0x10000000,},
};
+/* Shared with ss600mp */
static const struct sbus_offset sbus_offsets_ss10[SBUS_SLOTS] = {
{ 0, 0, 0xe00000000ULL, 0x10000000,},
{ 1, 0, 0xe10000000ULL, 0x10000000,},
@@ -515,11 +542,34 @@
return 0;
}
+static int
+ob_sbus_init_ss600mp(uint64_t base)
+{
+ unsigned int slot;
+ int notfirst = 0;
+
+ for (slot = 0; slot < SBUS_SLOTS; slot++) {
+ if (sbus_offsets_ss10[slot].size > 0)
+ ob_add_sbus_range(&sbus_offsets_ss10[slot], notfirst++);
+ }
+ push_str("ranges");
+ fword("property");
+
+ for (slot = 0; slot < SBUS_SLOTS; slot++) {
+ if (sbus_offsets_ss10[slot].size > 0)
+ sbus_probe_slot_ss600mp(slot, sbus_offsets_ss10[slot].base);
+ }
+
+ return 0;
+}
+
int ob_sbus_init(uint64_t base, int machine_id)
{
ob_sbus_node_init(base);
switch (machine_id) {
+ case 0x71:
+ return ob_sbus_init_ss600mp(base);
case 0x72:
return ob_sbus_init_ss10(base);
case 0x80:
Modified: openbios-devel/include/openbios/drivers.h
===================================================================
--- openbios-devel/include/openbios/drivers.h 2007-11-10 09:33:13 UTC (rev 174)
+++ openbios-devel/include/openbios/drivers.h 2007-11-11 18:02:11 UTC (rev 175)
@@ -21,7 +21,8 @@
int ob_ide_init(void);
#endif
#ifdef CONFIG_DRIVER_ESP
-int ob_esp_init(unsigned int slot, uint64_t base, unsigned long offset);
+int ob_esp_init(unsigned int slot, uint64_t base, unsigned long espoffset,
+ unsigned long dmaoffset);
#endif
#ifdef CONFIG_DRIVER_OBIO
int ob_obio_init(uint64_t slavio_base, unsigned long fd_offset,
1
0
Author: blueswirl
Date: 2007-11-10 10:33:13 +0100 (Sat, 10 Nov 2007)
New Revision: 174
Modified:
openbios-devel/arch/sparc64/openbios.c
Log:
Add Sparc64 CPU identification
Modified: openbios-devel/arch/sparc64/openbios.c
===================================================================
--- openbios-devel/arch/sparc64/openbios.c 2007-11-09 20:40:09 UTC (rev 173)
+++ openbios-devel/arch/sparc64/openbios.c 2007-11-10 09:33:13 UTC (rev 174)
@@ -56,11 +56,98 @@
#define OBIO_CMDLINE_MAX 256
static char obio_cmdline[OBIO_CMDLINE_MAX];
+struct cpudef {
+ unsigned long iu_version;
+ const char *name;
+};
+
+static const struct cpudef sparc_defs[] = {
+ {
+ .iu_version = (0x04ULL << 48) | (0x02ULL << 32),
+ .name = "FJSV,GP",
+ },
+ {
+ .iu_version = (0x04ULL << 48) | (0x03ULL << 32),
+ .name = "FJSV,GPUSK",
+ },
+ {
+ .iu_version = (0x04ULL << 48) | (0x04ULL << 32),
+ .name = "FJSV,GPUSC",
+ },
+ {
+ .iu_version = (0x04ULL << 48) | (0x05ULL << 32),
+ .name = "FJSV,GPUZC",
+ },
+ {
+ .iu_version = (0x17ULL << 48) | (0x10ULL << 32),
+ .name = "SUNW,UltraSPARC",
+ },
+ {
+ .iu_version = (0x17ULL << 48) | (0x11ULL << 32),
+ .name = "SUNW,UltraSPARC-II",
+ },
+ {
+ .iu_version = (0x17ULL << 48) | (0x12ULL << 32),
+ .name = "SUNW,UltraSPARC-IIi",
+ },
+ {
+ .iu_version = (0x17ULL << 48) | (0x13ULL << 32),
+ .name = "SUNW,UltraSPARC-IIe",
+ },
+ {
+ .iu_version = (0x3eULL << 48) | (0x14ULL << 32),
+ .name = "SUNW,UltraSPARC-III",
+ },
+ {
+ .iu_version = (0x3eULL << 48) | (0x15ULL << 32),
+ .name = "SUNW,UltraSPARC-III+",
+ },
+ {
+ .iu_version = (0x3eULL << 48) | (0x16ULL << 32),
+ .name = "SUNW,UltraSPARC-IIIi",
+ },
+ {
+ .iu_version = (0x3eULL << 48) | (0x18ULL << 32),
+ .name = "SUNW,UltraSPARC-IV",
+ },
+ {
+ .iu_version = (0x3eULL << 48) | (0x19ULL << 32),
+ .name = "SUNW,UltraSPARC-IV+",
+ },
+ {
+ .iu_version = (0x3eULL << 48) | (0x22ULL << 32),
+ .name = "SUNW,UltraSPARC-IIIi+",
+ },
+ {
+ .iu_version = (0x22ULL << 48) | (0x10ULL << 32),
+ .name = "SUNW,UltraSPARC",
+ },
+};
+
+static const struct cpudef *
+id_cpu(void)
+{
+ unsigned long iu_version;
+ unsigned int i;
+
+ asm("rdpr %%ver, %0\n"
+ : "=r"(iu_version) :);
+ iu_version &= 0xffffffff00000000ULL;
+
+ for (i = 0; i < sizeof(sparc_defs)/sizeof(struct cpudef); i++) {
+ if (iu_version == sparc_defs[i].iu_version)
+ return &sparc_defs[i];
+ }
+ printk("Unknown cpu (psr %lx), freezing!\n", iu_version);
+ for (;;);
+}
+
void arch_nvram_get(char *data)
{
unsigned short i;
unsigned char *nvptr = &nv_info;
uint32_t size;
+ struct cpudef *cpu;
extern uint32_t kernel_image;
extern uint32_t kernel_size;
extern uint32_t cmdline;
@@ -91,6 +178,10 @@
outb((i + NVRAM_OB_OFFSET) >> 8, 0x75);
data[i] = inb(0x77);
}
+
+ printk("CPUs: %x", nv_info.smp_cpus);
+ cpu = id_cpu();
+ printk(" x %s\n", cpu->name);
}
void arch_nvram_put(char *data)
1
0
Author: blueswirl
Date: 2007-11-09 21:40:09 +0100 (Fri, 09 Nov 2007)
New Revision: 173
Modified:
openbios-devel/drivers/obio.c
Log:
More CPU definitions
Modified: openbios-devel/drivers/obio.c
===================================================================
--- openbios-devel/drivers/obio.c 2007-11-07 16:00:02 UTC (rev 172)
+++ openbios-devel/drivers/obio.c 2007-11-09 20:40:09 UTC (rev 173)
@@ -407,6 +407,12 @@
}
+static void bad_cpu_init(void)
+{
+ printk("This CPU is not supported yet, freezing.\n");
+ for(;;);
+}
+
struct cpudef {
unsigned long iu_version;
const char *name;
@@ -420,6 +426,11 @@
static const struct cpudef sparc_defs[] = {
{
+ .iu_version = 0x00 << 24, /* Impl 0, ver 0 */
+ .name = "FMI,MB86900",
+ .initfn = bad_cpu_init,
+ },
+ {
.iu_version = 0x04 << 24, /* Impl 0, ver 4 */
.name = "FMI,MB86904",
.psr_impl = 0,
@@ -458,6 +469,45 @@
.initfn = mb86904_init,
},
{
+ .iu_version = 0x10 << 24, /* Impl 1, ver 0 */
+ .name = "LSI,L64811",
+ .initfn = bad_cpu_init,
+ },
+ {
+ .iu_version = 0x11 << 24, /* Impl 1, ver 1 */
+ .name = "CY,CY7C601",
+ .psr_impl = 1,
+ .psr_vers = 1,
+ .impl = 1,
+ .vers = 1,
+ .mmu_nctx = 0x10,
+ .initfn = bad_cpu_init,
+ },
+ {
+ .iu_version = 0x13 << 24, /* Impl 1, ver 3 */
+ .name = "CY,CY7C611",
+ .initfn = bad_cpu_init,
+ },
+ {
+ .iu_version = 0x40000000,
+ .name = "TI,TMS390Z55",
+ .psr_impl = 4,
+ .psr_vers = 0,
+ .impl = 0,
+ .vers = 4,
+ .dcache_line_size = 0x20,
+ .dcache_lines = 0x80,
+ .dcache_assoc = 4,
+ .icache_line_size = 0x40,
+ .icache_lines = 0x40,
+ .icache_assoc = 5,
+ .ecache_line_size = 0x20,
+ .ecache_lines = 0x8000,
+ .ecache_assoc = 1,
+ .mmu_nctx = 0x10000,
+ .initfn = tms390z55_init,
+ },
+ {
.iu_version = 0x41000000,
.name = "TI,TMS390S10",
.psr_impl = 4,
@@ -477,17 +527,55 @@
.initfn = tms390z55_init,
},
{
- .iu_version = 0x40000000,
- .name = "TI,TMS390Z55",
+ .iu_version = 0x42000000,
+ .name = "TI,TMS390S10",
.psr_impl = 4,
- .psr_vers = 0,
- .impl = 0,
+ .psr_vers = 2,
+ .impl = 4,
+ .vers = 2,
+ .dcache_line_size = 0x10,
+ .dcache_lines = 0x80,
+ .dcache_assoc = 4,
+ .icache_line_size = 0x20,
+ .icache_lines = 0x80,
+ .icache_assoc = 5,
+ .ecache_line_size = 0x20,
+ .ecache_lines = 0x8000,
+ .ecache_assoc = 1,
+ .mmu_nctx = 0x10000,
+ .initfn = tms390z55_init,
+ },
+ {
+ .iu_version = 0x43000000,
+ .name = "TI,TMS390S10",
+ .psr_impl = 4,
+ .psr_vers = 3,
+ .impl = 4,
+ .vers = 3,
+ .dcache_line_size = 0x10,
+ .dcache_lines = 0x80,
+ .dcache_assoc = 4,
+ .icache_line_size = 0x20,
+ .icache_lines = 0x80,
+ .icache_assoc = 5,
+ .ecache_line_size = 0x20,
+ .ecache_lines = 0x8000,
+ .ecache_assoc = 1,
+ .mmu_nctx = 0x10000,
+ .initfn = tms390z55_init,
+ },
+ {
+ .iu_version = 0x44000000,
+ .name = "TI,TMS390S10",
+ .psr_impl = 4,
+ .psr_vers = 4,
+ .impl = 4,
.vers = 4,
- .dcache_line_size = 0x20,
+ .dcache_line_size = 0x10,
.dcache_lines = 0x80,
.dcache_assoc = 4,
- .icache_line_size = 0x40,
- .icache_lines = 0x40,
+ .icache_line_size = 0x20,
+ .icache_lines = 0x80,
.icache_assoc = 5,
.ecache_line_size = 0x20,
.ecache_lines = 0x8000,
@@ -514,6 +602,50 @@
.mmu_nctx = 0x10000,
.initfn = rt625_init,
},
+ {
+ .iu_version = 0x1f000000,
+ .name = "Ross,RT620",
+ .psr_impl = 1,
+ .psr_vers = 15,
+ .impl = 1,
+ .vers = 7,
+ .dcache_line_size = 0x20,
+ .dcache_lines = 0x80,
+ .dcache_assoc = 4,
+ .icache_line_size = 0x40,
+ .icache_lines = 0x40,
+ .icache_assoc = 5,
+ .ecache_line_size = 0x20,
+ .ecache_lines = 0x8000,
+ .ecache_assoc = 1,
+ .mmu_nctx = 0x10000,
+ .initfn = rt625_init,
+ },
+ {
+ .iu_version = 0x20000000,
+ .name = "BIT,B5010",
+ .initfn = bad_cpu_init,
+ },
+ {
+ .iu_version = 0x50000000,
+ .name = "MC,MN10501",
+ .initfn = bad_cpu_init,
+ },
+ {
+ .iu_version = 0x90 << 24, /* Impl 9, ver 0 */
+ .name = "Weitek,W8601",
+ .initfn = bad_cpu_init,
+ },
+ {
+ .iu_version = 0xf2000000,
+ .name = "GR,LEON2",
+ .initfn = bad_cpu_init,
+ },
+ {
+ .iu_version = 0xf3000000,
+ .name = "GR,LEON3",
+ .initfn = bad_cpu_init,
+ },
};
static const struct cpudef *
@@ -637,14 +769,15 @@
for (;;);
}
// Add cpus
- printk("CPUs: %x\n", nv_info.smp_cpus);
+ printk("CPUs: %x", nv_info.smp_cpus);
+ cpu = id_cpu();
+ printk(" x %s\n", cpu->name);
for (i = 0; i < (unsigned int)nv_info.smp_cpus; i++) {
push_str("/");
fword("find-device");
fword("new-device");
- cpu = id_cpu();
push_str(cpu->name);
fword("device-name");
1
0
Author: wmb
Date: 2007-11-08 22:59:58 +0100 (Thu, 08 Nov 2007)
New Revision: 725
Modified:
cpu/x86/pc/olpc/versions.fth
Log:
Q2D04
Modified: cpu/x86/pc/olpc/versions.fth
===================================================================
--- cpu/x86/pc/olpc/versions.fth 2007-11-08 00:04:18 UTC (rev 724)
+++ cpu/x86/pc/olpc/versions.fth 2007-11-08 21:59:58 UTC (rev 725)
@@ -2,7 +2,7 @@
\ The overall firmware revision
macro: FW_MAJOR D
-macro: FW_MINOR 03c
+macro: FW_MINOR 04
\ The EC microcode
macro: EC_VERSION d02
@@ -16,7 +16,7 @@
\ The wireless LAN module firmware
macro: WLAN_RPM ${WLAN_VERSION}-1.olpc1
-macro: WLAN_VERSION 5.110.19.p0
+macro: WLAN_VERSION 5.110.20.p0
\ The bios_verify image
macro: CRYPTO_VERSION 0.2
1
0
Author: wmb
Date: 2007-11-08 01:04:18 +0100 (Thu, 08 Nov 2007)
New Revision: 724
Modified:
cpu/x86/pc/olpc/security.fth
Log:
OLPC trac 4707 - allow secure booting even if the real time clock is
set incorrectly. When that is the case, all leases are deemed to have
expired, but things like developer keys still work.
Also added support for developer key expiration. If the expiration date
on either a lease or a developer signature is the value 00000000T000000Z,
the signature doesn't expire and is always deemed timely. Otherwise it
is compared against the current system time.
Modified: cpu/x86/pc/olpc/security.fth
===================================================================
--- cpu/x86/pc/olpc/security.fth 2007-11-07 23:59:05 UTC (rev 723)
+++ cpu/x86/pc/olpc/security.fth 2007-11-08 00:04:18 UTC (rev 724)
@@ -3,6 +3,19 @@
\ Specs at http://wiki.laptop.org/go/Firmware_Security
+: text-on screen-ih stdout ! ;
+
+: visible dcon-unfreeze text-on ;
+
+: ?unfreeze ( -- )
+ game-key@ button-check and if visible unfreeze then
+;
+
+0 0 2value base-xy
+0 0 2value next-xy
+d# 410 d# 540 2constant progress-xy
+d# 557 d# 283 2constant sad-xy
+
true value debug-security?
: ?lease-debug ( msg$ -- )
debug-security? if type else 2drop then
@@ -12,12 +25,52 @@
;
: fail-load ( -- )
- screen-ih stdout !
+ text-on
." OS Load Failed" cr
quit
begin again
;
+0 value security-off?
+
+: security-failure ( -- )
+ visible
+ ." Stopping" cr
+ security-off? if quit then
+
+ d# 10000 ms
+ power-off
+;
+
+: +icon-xy ( delta-x,y -- ) icon-xy d+ to icon-xy ;
+
+
+: show-going ( -- )
+ h# c0 h# c0 h# c0 rgb>565 progress-xy d# 500 d# 100 " fill-rectangle" $call-screen
+ d# 585 d# 613 to icon-xy " bigdot" show-icon
+ dcon-unfreeze
+;
+: show-x ( -- ) " x" show-icon ;
+: show-sad ( -- )
+ icon-xy
+ sad-xy to icon-xy " sad" show-icon
+ to icon-xy
+;
+: show-lock ( -- ) " lock" show-icon ;
+: show-unlock ( -- ) " unlock" show-icon ;
+: show-child ( -- )
+ " erase-screen" $call-screen
+ d# 552 d# 383 to icon-xy " rom:xogray.565" $show-opaque
+ progress-xy to icon-xy \ For boot progress reports
+;
+: show-warnings ( -- )
+ " erase-screen" $call-screen
+ d# 48 d# 32 to icon-xy " rom:warnings.565" $show-opaque
+ dcon-freeze
+;
+
+
+
h# 20 buffer: cn-buf \ filename prefix - either "act" or "run"
h# 20 buffer: fn-buf \ filename tail - either "os" or "rd"
h# 100 buffer: pn-buf \ pathname - either "\boot" or "\boot-alt"
@@ -202,39 +255,6 @@
2nip 2r> 2swap " rmd160" invalid? 0=
;
-\ earliest is the earliest acceptable date value (in seconds).
-\ It is the date that the first test version of this code was
-\ deployed. If a laptop has any earlier date that than, that
-\ date is presumed bogus.
-
-d# 2007 d# 12 * 8 1- + d# 31 * d# 27 + constant earliest
-
-0. 2value current-seconds
-
-\ get-date reads the date and time from the real time clock
-\ and converts it to seconds.
-
-\ The seconds conversion uses a simplified approach that ignores
-\ leap years and the like - it assumes that all months are 31 days.
-\ This is sufficient for comparison purposes so long as we use the
-\ same calculation in all cases. It is not good for doing
-\ arithmetic on dates.
-: get-date ( -- error? )
- time&date ( s m h d m y )
- d# 12 * swap 1- + ( s m h d m' ) \ Months start at 1
- d# 31 * swap 1- + ( s m h d' ) \ Days start at 1
- dup earliest < if ( s m h d' )
- screen-ih stdout !
- ." The clock is not set properly" cr
- 4drop true exit
- then ( s m h d' )
- d# 24 * + ( s m h' )
- d# 60 * + ( s m' ) \ Can't overflow so far
- d# 60 um* ( s d.s' )
- swap 0 d+ to current-seconds
- false
-;
-
\ break$ splits a string into an initial substring of length n
\ (head$) and the residual substring (tail$). If the input
\ string is shorter than n, head$ is the input string and tail$ is
@@ -294,11 +314,45 @@
dup if nip nip then
;
+\ earliest is the earliest acceptable date value (in seconds).
+\ It is the date that the first test version of this code was
+\ deployed. If a laptop has any earlier date that than, that
+\ date is presumed bogus.
+
+" 20070101T000000Z" expiration-to-seconds drop 2constant earliest
+
+0. 2value current-seconds
+
+\ get-date reads the date and time from the real time clock
+\ and converts it to seconds.
+
+\ The seconds conversion uses a simplified approach that ignores
+\ leap years and the like - it assumes that all months are 31 days.
+\ This is sufficient for comparison purposes so long as we use the
+\ same calculation in all cases. It is not good for doing
+\ arithmetic on dates.
+: get-date ( -- )
+ time&date ( s m h d m y )
+ d# 12 * swap 1- + ( s m h d m' ) \ Months start at 1
+ d# 31 * swap 1- + ( s m h d' ) \ Days start at 1
+ d# 24 * + ( s m h' )
+ d# 60 * + ( s m' ) \ Can't overflow so far
+ d# 60 um* ( s d.s' )
+ swap 0 d+ to current-seconds
+;
+
\ expired? determines whether or not the expiration time string is
\ earlier than this machine's current time (from the real time clock).
: expired? ( expiration$ -- bad? )
- expiration-to-seconds if true exit then
+ expiration-to-seconds if true exit then ( d.seconds )
+
+ current-seconds 0. d= if ( d.seconds )
+ then
+
+ \ If the date is bad, leases are deemed to have expired
+ current-seconds earliest d< if 2drop true exit then
+
current-seconds d<
;
@@ -360,6 +414,22 @@
: my-sn$ ( -- adr len ) machine-id-buf d# 11 ;
+: check-expiry ( exp$ -- exp$ -1|0 )
+ \ Check for non-expiring case
+ 2dup " 00000000T000000Z" $= if 0 exit then
+
+ dup d# 16 <> if ( expiration$ )
+ " has bad expiration format" ?lease-debug-cr
+ -1 exit
+ then ( expiration$ )
+
+ 2dup expired? if
+ " expired" ?lease-debug-cr
+ -1 exit
+ then ( expiration$ )
+ 0
+;
+
\ check-machine-signature verifies the signed object consisting
\ of the machine identification info (SN + UUID) plus the expiration
\ time "expiration$" against the crypto signature string sig$,
@@ -378,6 +448,20 @@
: set-disposition ( adr -- ) c@ machine-id-buf d# 49 + c! ;
+\ Checks the tail of a timed signature - lease or developer key
+: check-timed-signature ( rem$ -- -1|0|1 )
+ bl left-parse-string ( rem$ serial$ )
+ my-sn$ $= 0= if 2drop 0 exit then ( rem$ )
+
+ \ Disposition code
+ bl left-parse-string 1 <> if 3drop -1 exit then ( rem$ disp-adr )
+ set-disposition ( rem$ )
+
+ bl left-parse-string check-expiry if 4drop -1 exit then ( sig$ exp$ )
+
+ check-machine-signature ( -1|0|1 )
+;
+
\ check-lease checks a lease signature record in act01: format
\ -1 means lease is for this machine and is invalid
@@ -388,29 +472,8 @@
bl left-parse-string " act01:" $= 0= if
" Not act01:" ?lease-debug-cr
2drop -1 exit
- then
-
- bl left-parse-string ( rem$ serial$ )
- my-sn$ $= 0= if ( rem$ )
- " is for a different system" ?lease-debug-cr
- 2drop 0 exit
then ( rem$ )
-
- \ Disposition code
- bl left-parse-string 1 <> if 3drop -1 exit then ( rem$ disp-adr )
- set-disposition ( rem$ )
-
- bl left-parse-string ( sig$ expiration$ )
- dup d# 16 <> if ( sig$ expiration$ )
- " has bad expiration format" ?lease-debug-cr
- 4drop -1 exit
- then ( sig$ expiration$ )
-
- 2dup expired? if
- " expired" ?lease-debug-cr
- 4drop -1 exit
- then ( sig$ expiration$ )
- check-machine-signature ( -1|0|1 )
+ check-timed-signature ( -1|0|1 )
;
\ lease-valid? tries to read a lease file from the currently-selected
@@ -419,13 +482,12 @@
\ a valid lease was found.
: lease-valid? ( -- valid? )
- " ${DN}\security\lease.sig" expand$ ( name$ )
+ " ${DN}\security\lease.sig" expand$ ( name$ )
" Trying " ?lease-debug 2dup ?lease-debug-cr
- r/o open-file if drop false exit then ( ih )
+ r/o open-file if drop false exit then >r ( r: ih )
+ " Lease " ?lease-debug
load-started
- >r ( r: ih )
- " Lease " ?lease-debug ( r: ih )
- leasekey$ to pubkey$ ( r: ih )
+ leasekey$ to pubkey$
begin
sec-line-buf /sec-line-max r@ read-line if ( actual -eof? )
2drop r> close-file drop false exit
@@ -436,6 +498,7 @@
-1 of r> close-file drop " lock" show-icon false exit endof
endcase
repeat
+ " No matching records" ?lease-debug-cr
r> close-file drop false
;
@@ -455,6 +518,10 @@
;
0 value alternate?
+: show-dot ( -- )
+ alternate? if " yellowdot" else " lightdot" then show-icon
+;
+
: set-alternate ( -- )
button-o game-key? if true to alternate? exit then
h# 82 cmos@ [char] A = if
@@ -464,53 +531,6 @@
false to alternate?
;
-0 0 2value base-xy
-d# 410 d# 540 2constant progress-xy
-
-: text-on screen-ih stdout ! ;
-
-: visible dcon-unfreeze text-on ;
-
-: ?unfreeze ( -- )
- game-key@ button-check and if visible unfreeze then
-;
-
-0 value security-off?
-
-: security-failure ( -- )
- visible
- ." Stopping" cr
- security-off? if quit then
-
- d# 10000 ms
- power-off
-;
-
-: +icon-xy ( delta-x,y -- ) icon-xy d+ to icon-xy ;
-
-: show-going ( -- )
- h# c0 h# c0 h# c0 rgb>565 progress-xy d# 500 d# 100 " fill-rectangle" $call-screen
- d# 585 d# 613 to icon-xy " bigdot" show-icon
- dcon-unfreeze
-;
-: show-dot ( -- )
- alternate? if " yellowdot" else " lightdot" then show-icon
-;
-: show-x ( -- ) " x" show-icon ;
-: show-sad ( -- ) " sad" show-icon ;
-: show-lock ( -- ) " lock" show-icon ;
-: show-unlock ( -- ) " unlock" show-icon ;
-: show-child ( -- )
- " erase-screen" $call-screen
- d# 552 d# 383 to icon-xy " rom:xogray.565" $show-opaque
- progress-xy to icon-xy \ For boot progress reports
-;
-: show-warnings ( -- )
- " erase-screen" $call-screen
- d# 48 d# 32 to icon-xy " rom:warnings.565" $show-opaque
- dcon-freeze
-;
-
\ secure-load-ramdisk is called during the process of preparing an
\ OS image for execution. It looks for an initrd bundle file on
\ the same device where the OS image was found, in a file named
@@ -568,16 +588,7 @@
: check-devel-key ( dev01$ -- -1|0|1 )
bl left-parse-string " dev01:" $= 0= if 2drop -1 exit then ( rem$ )
- bl left-parse-string ( rem$ serial$ )
- my-sn$ $= 0= if 2drop 0 exit then ( rem$ )
-
- \ Disposition code
- bl left-parse-string 1 <> if 3drop -1 exit then ( rem$ disp-adr )
- set-disposition ( rem$ )
-
- develkey$ to pubkey$ ( rem$ )
- bl left-parse-string ( sig01$ exp$ )
- check-machine-signature ( -1|0|1 )
+ check-timed-signature
;
\ has-developer-key? searches for a valid developer key on the
@@ -587,9 +598,10 @@
button-x game-key? if false exit then
" ${DN}\security\develop.sig" expand$ ( name$ )
" Trying " ?lease-debug 2dup ?lease-debug-cr
- r/o open-file if drop false exit then ( ih )
- >r
+ r/o open-file if drop false exit then >r ( r: ih )
+ " Devel key " ?lease-debug
load-started
+ develkey$ to pubkey$
begin
sec-line-buf /sec-line-max r@ read-line if ( actual -eof? )
2drop r> close-file drop false exit
@@ -600,6 +612,7 @@
-1 of r> close-file drop false exit endof
endcase
repeat
+ " No matching records" ?lease-debug-cr
r> close-file drop false
;
@@ -707,7 +720,6 @@
0<>
;
-0 0 2value next-xy
: load-from-list ( list$ -- devkey? )
" dev /jffs2-file-system ' ?unfreeze to scan-callout dend" eval
@@ -753,7 +765,7 @@
: all-devices$ ( -- list$ ) " disk: sd: nand:" ;
-d# 410 d# 540 2constant progress-xy
+
: secure-startup ( -- )
['] noop to ?show-device
['] noop to load-done
@@ -777,8 +789,12 @@
persistent-devkey? if true to security-off? visible exit then
get-my-sn if visible ." No serial number" cr show-sad security-failure then
- get-date if visible ." Invalid system date" cr show-sad security-failure then
+ get-date current-seconds earliest d< if
+ \ This is not fatal, because we don't want a brick if the RTC battery fails
+ visible ." Invalid system date" cr show-sad
+ then
+
load-crypto if visible ." Crytpo load failed" cr show-sad security-failure then ( )
alternate? if " \boot-alt" else " \boot" then pn-buf place
1
0
Author: wmb
Date: 2007-11-08 00:59:05 +0100 (Thu, 08 Nov 2007)
New Revision: 723
Added:
ofw/inet/sntp.fth
Modified:
cpu/x86/pc/olpc/fw.bth
Log:
Added SNTP support and the new OLPC command "ntp-set-clock".
Modified: cpu/x86/pc/olpc/fw.bth
===================================================================
--- cpu/x86/pc/olpc/fw.bth 2007-11-07 23:57:36 UTC (rev 722)
+++ cpu/x86/pc/olpc/fw.bth 2007-11-07 23:59:05 UTC (rev 723)
@@ -138,12 +138,14 @@
[then]
[ifdef] linux-support
+\needs unix-seconds> fload ${BP}/ofw/fs/unixtime.fth \ Unix time calculation
support-package: ext2-file-system
fload ${BP}/ofw/fs/ext2fs/ext2fs.fth \ Linux file system
end-support-package
[then]
[ifdef] jffs2-support
+\needs unix-seconds> fload ${BP}/ofw/fs/unixtime.fth \ Unix time calculation
support-package: jffs2-file-system
fload ${BP}/ofw/fs/jffs2/jffs2.fth \ Journaling flash file system 2
end-support-package
@@ -419,6 +421,23 @@
;
' olpc-ssids to default-ssids
+fload ${BP}/ofw/inet/sntp.fth
+: olpc-ntp-servers ( -- )
+ " time 172.18.0.1 0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org"
+;
+' olpc-ntp-servers to ntp-servers
+: ntp-time&date ( -- s m h d m y )
+ ntp-timestamp abort" Can't contact NTP server"
+ ntp>time&date
+;
+: .clock ( -- )
+ time&date .date space .time ." UTC" cr
+;
+: ntp-set-clock ( -- )
+ ntp-time&date " set-time" clock-node @ $call-method
+ .clock
+;
+
[ifdef] use-ppp
fload ${BP}/ofw/ppp/loadppp.fth
[then]
Added: ofw/inet/sntp.fth
===================================================================
--- ofw/inet/sntp.fth (rev 0)
+++ ofw/inet/sntp.fth 2007-11-07 23:59:05 UTC (rev 723)
@@ -0,0 +1,101 @@
+purpose: Get data and time from an NTP server using SNTP
+\ See license at end of file
+
+0 value ip-ih
+: $call-ip ip-ih $call-method ;
+
+d# 123 constant ntp-port#
+h# 30 constant /sntp-request
+
+: send-sntp-request ( -- )
+ /sntp-request " allocate-udp" $call-ip >r
+ r@ /sntp-request erase
+ 3 3 lshift \ SNTP version 3
+ 3 or \ Client request
+ r@ c!
+ r@ /sntp-request ntp-port# ntp-port# " send-udp-packet" $call-ip
+ r> /sntp-request " free-udp" $call-ip
+;
+: receive-sntp-reply ( -- true | d.timestamp false )
+ ntp-port# " receive-udp-packet" $call-ip if ( ) \ Timeout
+ true exit
+ then ( adr len src-port# )
+ drop ( adr len )
+ h# 30 < if ( adr len )
+ ." Bad NTP reply length" cr
+ drop true exit
+ then ( adr )
+\ dup c@ h# c0 and if ( adr ) \ Check LI field
+\ ." NTP server not synchronized" cr
+\ drop true exit
+\ then ( adr )
+ dup h# 2c + be-l@ ( adr fraction )
+ dup 0= if ( adr fraction )
+ ." NTP server not synchronized" cr
+ 2drop true exit
+ then ( adr fraction )
+ swap h# 28 + be-l@ ( fraction seconds )
+ false ( d.timestamp false )
+;
+: try-sntp ( hostname$ -- true | d.timestamp false )
+ " ip" open-dev to ip-ih
+ ip-ih 0= if
+ ." Networking not available" cr
+ true exit
+ then
+
+ d# 5,000 " set-timeout" $call-ip
+ " $set-host" $call-ip
+ send-sntp-request
+ receive-sntp-reply
+ ip-ih close-dev
+;
+
+defer ntp-servers
+: default-ntp-servers " 0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org" ;
+' default-ntp-servers to ntp-servers
+
+: ntp-timestamp ( -- true | d.timestamp false )
+ ntp-servers begin dup while ( rem$ )
+ bl left-parse-string ( rem$ server$ )
+ ['] try-sntp catch if ( rem$ x x )
+ 2drop ( rem$ )
+ else ( rem$ [ true | d.timestamp false ] )
+ 0= if ( rem$ d.timestamp )
+ 2nip false exit
+ then ( rem$ )
+ then ( rem$ )
+ repeat ( rem$ )
+ 2drop true
+;
+
+d# 2,208,988,800 constant unix-epoch
+
+: ntp>time&date ( d.timestamp -- s m h m d y )
+ nip unix-epoch - unix-seconds>
+;
+
+
+\ LICENSE_BEGIN
+\ Copyright (c) 2007 FirmWorks
+\
+\ Permission is hereby granted, free of charge, to any person obtaining
+\ a copy of this software and associated documentation files (the
+\ "Software"), to deal in the Software without restriction, including
+\ without limitation the rights to use, copy, modify, merge, publish,
+\ distribute, sublicense, and/or sell copies of the Software, and to
+\ permit persons to whom the Software is furnished to do so, subject to
+\ the following conditions:
+\
+\ The above copyright notice and this permission notice shall be
+\ included in all copies or substantial portions of the Software.
+\
+\ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+\ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+\ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+\ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+\ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+\ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+\ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+\
+\ LICENSE_END
1
0