Author: wmb Date: Wed Aug 10 01:13:17 2011 New Revision: 2455 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2455
Log: Alex - fit and finish improvements to diagnostics.
Modified: cpu/x86/pc/alex/devices.fth cpu/x86/pc/alex/fw.bth cpu/x86/pc/alex/mfgtest.fth cpu/x86/pc/alex/probemem.fth cpu/x86/pc/alex/spiui.fth
Modified: cpu/x86/pc/alex/devices.fth ============================================================================== --- cpu/x86/pc/alex/devices.fth Wed Aug 10 00:58:17 2011 (r2454) +++ cpu/x86/pc/alex/devices.fth Wed Aug 10 01:13:17 2011 (r2455) @@ -112,6 +112,7 @@
fload ${BP}/cpu/x86/pc/cpunode.fth fload ${BP}/cpu/x86/k6cputest.fth \ Burnin test for K6 CPU +dev /cpu 1 to default#passes dend
fload ${BP}/ofw/core/countdwn.fth \ Startup countdown fload ${BP}/forth/lib/pattern.fth \ Text string pattern matching @@ -124,6 +125,7 @@ fload ${BP}/dev/intel/graphics/pineview.fth alias /scanline bytes/line fload ${BP}/dev/video/common/rectangle16.fth + alias color! 4drop end-package devalias screen /pci/display@2,0 \ Explicit, because it's not probed
@@ -181,6 +183,7 @@
fload ${BP}/cpu/x86/pc/alex/spiui.fth \ User interface for SPI FLASH programming : urom ( -- ) " flash! u:\alex.rom" evaluate ; +: netrom ( -- ) " flash! http:\10.20.0.105\alex.rom" evaluate ;
\ LICENSE_BEGIN \ Copyright (c) 2011 FirmWorks
Modified: cpu/x86/pc/alex/fw.bth ============================================================================== --- cpu/x86/pc/alex/fw.bth Wed Aug 10 00:58:17 2011 (r2454) +++ cpu/x86/pc/alex/fw.bth Wed Aug 10 01:13:17 2011 (r2455) @@ -61,7 +61,7 @@ dev / 1 encode-int " #address-cells" property 1 encode-int " #size-cells" property -" Generic PC" model +" Samsung Alex Chromebook" model " PC" encode-string " architecture" property
\ XXX figure out bus frequency. How? @@ -81,6 +81,7 @@ fload ${BP}/ofw/core/allocmor.fth \ Secondary allocator
fload ${BP}/cpu/x86/pc/rootnode.fth \ Platform-specific root node changes +dev / " Samsung Alex Chromebook" " banner-name" string-property dend
fload ${BP}/cpu/x86/pc/isaio.fth fload ${BP}/dev/pci/configm1.fth \ Generic PCI configuration access @@ -259,8 +260,6 @@
: startup ( -- ) standalone? 0= if exit then - ." calibrate-ms" cr - calibrate-ms
." nvramrc" cr use-nvramrc? if nvramrc safe-evaluate then @@ -277,20 +276,16 @@ warning on only forth also definitions
- ." Installing alarms" cr install-alarm
#line off
- ." Open Firmware demonstration version by FirmWorks (info@firmworks.com)" cr + ." Open Firmware demonstration version by FirmWorks" cr
-[ifdef] linux-support ." See " - blue-letters ." http://www.firmworks.com/linux/demo.html" black-letters + blue-letters ." http://wiki.laptop.org/go/Forth_Lessons" black-letters cr cr
- ." Type 'help-linux' to learn about Linux loading options" cr -[then] quit ;
Modified: cpu/x86/pc/alex/mfgtest.fth ============================================================================== --- cpu/x86/pc/alex/mfgtest.fth Wed Aug 10 00:58:17 2011 (r2454) +++ cpu/x86/pc/alex/mfgtest.fth Wed Aug 10 01:13:17 2011 (r2455) @@ -46,23 +46,14 @@
: dummy-test-dev ( $ -- ) clear-n-restore-scroller - ??cr ." Testing " type ." in the future" cr + ??cr ." Testing " type ." - to be implemented" cr mfg-color-green sq-border! d# 2000 hold-message cursor-off gui-alerts refresh flush-keyboard ;
-: mfg-test-dev ( $ -- ) - clear-n-restore-scroller - ??cr ." Testing " 2dup type cr - locate-device if - ." Can't find device node" cr - flush-keyboard - mfg-wait-return - exit - then ( phandle ) - " selftest" rot execute-phandle-method ( return abort? ) +: mfg-test-result ( return abort? -- ) if ?dup if ??cr ." Selftest failed. Return code = " .d cr @@ -90,6 +81,32 @@ cursor-off gui-alerts refresh flush-keyboard ; +: mfg-test-dev ( $ -- ) + clear-n-restore-scroller + ??cr ." Testing " 2dup type cr + locate-device if + ." Can't find device node" cr + flush-keyboard + mfg-wait-return + exit + then ( phandle ) + " selftest" rot execute-phandle-method ( return abort? ) + mfg-test-result +; +: mfg-test-disk ( name$ -- ) + clear-n-restore-scroller + ??cr ." Testing " 2dup type cr + + ['] $.partitions catch if + 2drop false + else + 0 true + then + + d# 2000 ms \ More time to inspect + + mfg-test-result +;
: draw-error-border ( -- ) mfg-color-red d# 20 d# 20 d# 1160 d# 820 d# 20 box @@ -164,15 +181,16 @@ pass? 0= if unloop exit then loop all-tests-passed -; +; + : quit-item ( -- ) menu-done ; : cpu-item ( -- ) " /cpu" mfg-test-dev ; : battery-item ( -- ) " /battery" dummy-test-dev ; -: spiflash-item ( -- ) " /flash" dummy-test-dev ; +: spiflash-item ( -- ) " /flash" mfg-test-dev ; : memory-item ( -- ) " /memory" mfg-test-dev ; : usb-item ( -- ) " /usb" mfg-test-dev ; -: int-sd-item ( -- ) " disk:0" dummy-test-dev ; -: ext-sd-item ( -- ) " ext:0" mfg-test-dev ; +: int-sd-item ( -- ) " disk" mfg-test-disk ; +\ : ext-sd-item ( -- ) " ext:0" mfg-test-dev ; : rtc-item ( -- ) " /rtc" mfg-test-dev ; : display-item ( -- ) " screen" mfg-test-dev ; : audio-item ( -- ) " /audio" dummy-test-dev ;
Modified: cpu/x86/pc/alex/probemem.fth ============================================================================== --- cpu/x86/pc/alex/probemem.fth Wed Aug 10 00:58:17 2011 (r2454) +++ cpu/x86/pc/alex/probemem.fth Wed Aug 10 01:13:17 2011 (r2455) @@ -15,10 +15,8 @@ \ for use as DMA memory. mem-info-pa 2 la+ l@ h# a.0000 release-range \ Below DOS hole
- fw-pa h# 10.0000 u> if - h# 10.0000 fw-pa over - release - fw-pa /fw-ram + heap-base heap-size + umax /ram release - then + h# 10.0000 fw-pa release-range + fw-pa /fw-ram + heap-base heap-size + umax usable-ramtop release-range ;
[ifndef] 8u.h
Modified: cpu/x86/pc/alex/spiui.fth ============================================================================== --- cpu/x86/pc/alex/spiui.fth Wed Aug 10 00:58:17 2011 (r2454) +++ cpu/x86/pc/alex/spiui.fth Wed Aug 10 01:13:17 2011 (r2455) @@ -149,6 +149,8 @@ dev /flash : selftest ( -- error? ) .cbfs + d# 2000 ms \ More time to inspect + false ; device-end
openfirmware@openfirmware.info