Hi,
this patch adds support to create the OFW device tree from the LinuxBIOS
device tree, so it doesn't need to do all the probing etc. again.
With kind regards,
Jens
Author: wmb
Date: 2007-10-10 02:10:18 +0200 (Wed, 10 Oct 2007)
New Revision: 670
Added:
cpu/x86/pc/olpc/timertest.fth
Modified:
cpu/x86/pc/olpc/devices.fth
Log:
OLPC Trac #4050 - added selftest /isa/timer to catch broken 14 MHz clocks.
Modified: cpu/x86/pc/olpc/devices.fth
===================================================================
--- cpu/x86/pc/olpc/devices.fth 2007-10-10 00:08:32 UTC (rev 669)
+++ cpu/x86/pc/olpc/devices.fth 2007-10-10 00:10:18 UTC (rev 670)
@@ -64,6 +64,8 @@
[then]
+fload ${BP}/cpu/x86/pc/olpc/timertest.fth \ Selftest for PIT timer
+
1 [if]
dev /interrupt-controller
h# 20 to vector-base0
@@ -111,6 +113,9 @@
[then]
fload ${BP}/dev/pci/isaall.fth
+\ We don't need a serial selftest because the serial port is internal only
+\ and the selftest turns off the diag device
+dev /serial warning @ warning off : selftest false ; warning ! device-end
devalias com1 /isa/serial@i3f8:115200
devalias mouse /isa/8042/mouse
devalias d disk
Added: cpu/x86/pc/olpc/timertest.fth
===================================================================
--- cpu/x86/pc/olpc/timertest.fth (rev 0)
+++ cpu/x86/pc/olpc/timertest.fth 2007-10-10 00:10:18 UTC (rev 670)
@@ -0,0 +1,61 @@
+purpose: Selftest for ISA timer
+\ See license at end of file
+
+dev /isa/timer
+
+: wait-rollover ( -- error? )
+ get-msecs d# 200 + begin ( time-limit )
+ 0 count@ 1 = if drop false exit then
+ dup get-msecs - ( time-limit diff )
+ 0<= until
+ drop true
+;
+: selftest ( -- error? )
+ 0 count@ 0= if
+ 1 ms
+ 0 count@ 0= if
+ ." The ISA PIT timer is not ticking." cr
+ ." Possible cause: bad 14 MHz clock to CS5536 chip." cr
+ true exit
+ then
+ then
+
+ wait-rollover if
+ ." The ISA PIT timer did not reach a count of 1." cr
+ true exit
+ then
+
+ 1 ms
+
+ 0 count@ d# 10000 d# 11000 between 0= if
+ ." The ISA PIT timer is ticking at the wrong rate." cr
+ true exit
+ then
+
+ false
+;
+
+device-end
+\ 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
Author: wmb
Date: 2007-10-10 02:08:32 +0200 (Wed, 10 Oct 2007)
New Revision: 669
Modified:
ofw/core/ofwcore.fth
Log:
test-all - If an individual test fails, highlight (red letters) the
error message and wait 10 seconds so the user can see it.
Modified: ofw/core/ofwcore.fth
===================================================================
--- ofw/core/ofwcore.fth 2007-10-10 00:07:12 UTC (rev 668)
+++ ofw/core/ofwcore.fth 2007-10-10 00:08:32 UTC (rev 669)
@@ -3211,7 +3211,12 @@
method-name 2@ current-device ( method-adr,len phandle )
execute-phandle-method drop ( result )
- ?dup if ??cr ." Selftest failed. Return code = " .d cr then
+ ?dup if
+ red-letters
+ ??cr ." Selftest failed. Return code = " .d cr
+ d# 10000 ms
+ black-letters
+ then
then ( )
;
I would like to know if it would be possible, now or in the future, to
instantly switch between two running operating systems on one machine. For
example by dividing the RAM on the machine to be dedicated to each OS, and
having a buffer for device states.
It would be really cool, for example, to launch a shortcut from within
windows that launches a program in Linux. Though some multitasking would be
lost, as processes in Windows would be suspended. Or maybe not, with
multi-processor systems? I don't know anything about this... just a dream.
Would be great to migrate people to Linux. M
> I'll have to see yet what's wrong with earlyprintk.
Linux fixups didn't get called because there was no way the Linux ELF kernel
could be recognised as such. So the fix to the fix is a one-liner plus a
comment. The recogniser needs further refinement, but on top of LinuxBIOSv2
this boots Linux at least in qemu and on my real machine.
Please apply!
Signed-off-by: Torsten Duwe <duwe(a)lst.de>