[openfirmware] [commit] r2456 - cpu/x86/pc/alex dev

repository service svn at openfirmware.info
Wed Aug 10 01:54:30 CEST 2011


Author: wmb
Date: Wed Aug 10 01:54:30 2011
New Revision: 2456
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2456

Log:
Alex - turn off serial output.

Added:
   dev/null2.fth
   dev/nulluart.fth
Modified:
   cpu/x86/pc/alex/config.fth
   cpu/x86/pc/alex/devices.fth
   cpu/x86/pc/alex/fw.bth
   cpu/x86/pc/alex/usb.fth

Modified: cpu/x86/pc/alex/config.fth
==============================================================================
--- cpu/x86/pc/alex/config.fth	Wed Aug 10 01:13:17 2011	(r2455)
+++ cpu/x86/pc/alex/config.fth	Wed Aug 10 01:54:30 2011	(r2456)
@@ -5,12 +5,12 @@
 
 create coreboot-loaded
 create coreboot-qemu
-create debug-startup
+\ create debug-startup
 
 create use-timestamp-counter
 create use-tsc-timing
 
-create serial-console
+\ create serial-console
 
 \ In virtual mode, OFW runs with the MMU on.  The advantages are
 \ that OFW can automatically locate itself out of the way, at the

Modified: cpu/x86/pc/alex/devices.fth
==============================================================================
--- cpu/x86/pc/alex/devices.fth	Wed Aug 10 01:13:17 2011	(r2455)
+++ cpu/x86/pc/alex/devices.fth	Wed Aug 10 01:54:30 2011	(r2456)
@@ -81,16 +81,18 @@
 fload ${BP}/cpu/x86/pc/isatick.fth		\ Use ISA timer as the alarm tick timer
 fload ${BP}/cpu/x86/pc/olpc/timertest.fth  \ Selftest for PIT timer
 
+fload ${BP}/dev/pci/isaall.fth
+devalias mouse /isa/8042/mouse
+
+fload ${BP}/cpu/x86/pc/tsccal1.fth
+
 [ifdef] resident-packages
 support-package: 16550
 fload ${BP}/dev/16550pkg/16550.fth  \ Serial port support package
 end-support-package
 [then]
 
-fload ${BP}/dev/pci/isaall.fth
-devalias mouse /isa/8042/mouse
-
-fload ${BP}/cpu/x86/pc/tsccal1.fth
+fload ${BP}/dev/null2.fth
 
 0 0  hex mem-uart-base (u.)  " /" begin-package
    4 encode-int  0 encode-int encode+    " interrupts" property
@@ -99,7 +101,13 @@
    fload ${BP}/dev/16550pkg/isa-int.fth
 end-package
 devalias com1 /serial:115200
-: com1  ( -- adr len )  " com1"  ;  ' com1 to fallback-device
+: com1  ( -- adr len )  " com1"  ;
+[ifdef] serial-console
+' com1 to fallback-device
+[else]
+: devnull  ( -- adr len )  " /null"  ;
+' devnull to fallback-device
+[then]
 
 0 0  " i70"  " /isa" begin-package   	\ Real-time clock node
    fload ${BP}/dev/ds1385r.fth
@@ -166,8 +174,13 @@
 ;
 
 fload ${BP}/cpu/x86/inoutstr.fth	\ Multiple I/O port read/write
+
+[ifdef] serial-console
 fload ${BP}/dev/isa/diaguart.fth	\ ISA COM port driver
 fload ${BP}/forth/lib/sysuart.fth	\ Use UART for key and emit
+[else]
+fload ${BP}/dev/nulluart.fth		\ Null UART driver
+[then]
 
 0 value keyboard-ih
 0 value screen-ih

Modified: cpu/x86/pc/alex/fw.bth
==============================================================================
--- cpu/x86/pc/alex/fw.bth	Wed Aug 10 01:13:17 2011	(r2455)
+++ cpu/x86/pc/alex/fw.bth	Wed Aug 10 01:54:30 2011	(r2456)
@@ -210,8 +210,8 @@
 fload ${BP}/cpu/x86/pc/alex/yuv2rgb.fth       \ YUV2 to RGB conversion
 fload ${BP}/cpu/x86/pc/alex/vstest.fth        \ Video stream test helpers
 
-\ false to stand-init-debug?
-true to stand-init-debug?
+false to stand-init-debug?
+\ true to stand-init-debug?
 
 hex
 stand-init-debug?  [if]
@@ -244,13 +244,9 @@
 
 : probe-all  ( -- )
    " probe-" do-drop-in
-   ." probe-pci"  cr
-\   debug-me
    probe-pci
-   probe-usb
-   report-net
-   report-disk
    report-pci-fb
+   silent-probe-usb
 ;
 
 \ This reduces processor use when waiting for a key.  It helps
@@ -261,13 +257,15 @@
 : startup  ( -- )
    standalone?  0=  if  exit  then
 
-    ." nvramrc" cr
-    use-nvramrc?  if  nvramrc safe-evaluate  then
+   use-nvramrc?  if  nvramrc safe-evaluate  then
 
    auto-banner?  if
       " Probing" ?type  probe-all
       install-mux-io
-\      " Install console" ?type  install-console
+[ifndef] serial-console
+      fallback-in-ih  remove-input
+      fallback-out-ih remove-output
+[then]
 \      ?usb-keyboard
       banner
    then
@@ -285,6 +283,7 @@
    ." See "
    blue-letters ." http://wiki.laptop.org/go/Forth_Lessons" black-letters
    cr cr
+   ." Type  menu  to run diagnostics" cr
 
    quit
 ;

Modified: cpu/x86/pc/alex/usb.fth
==============================================================================
--- cpu/x86/pc/alex/usb.fth	Wed Aug 10 01:13:17 2011	(r2455)
+++ cpu/x86/pc/alex/usb.fth	Wed Aug 10 01:54:30 2011	(r2456)
@@ -41,7 +41,13 @@
       pwd$ $nopage-show-devs
    then
 ;
+: show-usb  ( -- )
+   ." USB2 devices:" cr
+   " /" ['] (show-usb2) scan-subtree
 
+   ." USB1 devices:" cr
+   " /" ['] (show-usb1) scan-subtree
+;
 : silent-probe-usb  ( -- )
    " /" ['] (probe-usb2) scan-subtree
    " /" ['] (probe-usb1) scan-subtree
@@ -49,12 +55,7 @@
 ;
 : probe-usb  ( -- )
    silent-probe-usb
-
-   ." USB2 devices:" cr
-   " /" ['] (show-usb2) scan-subtree
-
-   ." USB1 devices:" cr
-   " /" ['] (show-usb1) scan-subtree
+   show-usb
 ;
 alias p2 probe-usb
 

Added: dev/null2.fth
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dev/null2.fth	Wed Aug 10 01:54:30 2011	(r2456)
@@ -0,0 +1,41 @@
+\ See license at end of file
+purpose: Null I/O package - discards output, provides no input
+
+dev /
+new-device
+
+" null" device-name
+
+: open  ( -- flag )  true  ;
+: close  ( -- )  ;
+: size  ( -- ud )  0 0  ;
+: seek  ( ud -- error? )  or  ;  \ error if ud is not 0 0
+: write  ( adr len -- actual )  nip  ;  \ Return actual = len
+: read  ( adr len -- actual )  2drop -2  ;  \ Return -2, indicating no input
+
+finish-device
+device-end
+
+\ LICENSE_BEGIN
+\ Copyright (c) 2006 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

Added: dev/nulluart.fth
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dev/nulluart.fth	Wed Aug 10 01:54:30 2011	(r2456)
@@ -0,0 +1,47 @@
+\ See license at end of file
+purpose: Null diagnostic UART driver
+
+: inituarts  ( -- )  ;
+: ukey?  ( -- flag )  false  ;
+: uemit?  ( -- flag )  false  ;
+: uemit  ( char -- )  drop  ;
+: ukey  ( -- char )  drop  ;
+: ubreak?  ( -- flag )  false  ;
+: clear-break  ( -- )  ;
+
+: install-uart-io  ( -- )
+   ['] lf-pstr          is newline-pstring
+   ['] false            is key?
+   ['] 0                is (key
+   ['] drop             is (emit
+   ['] default-type     is (type
+   ['] emit1            is emit
+   ['] type1            is type
+   ['] crlf             is cr
+   ['] true             is (interactive?
+   ['] cancel           is light
+;
+
+\ LICENSE_BEGIN
+\ Copyright (c) 2011 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



More information about the openfirmware mailing list