Author: wmb Date: Tue Nov 29 01:26:55 2011 New Revision: 2711 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2711
Log: Newton - fixed a number of bugs found in initial testing.
Modified: cpu/x86/pc/newton/config.fth cpu/x86/pc/newton/devices.fth cpu/x86/pc/newton/fw.bth cpu/x86/pc/newton/probemem.fth
Modified: cpu/x86/pc/newton/config.fth ============================================================================== --- cpu/x86/pc/newton/config.fth Tue Nov 29 01:26:49 2011 (r2710) +++ cpu/x86/pc/newton/config.fth Tue Nov 29 01:26:55 2011 (r2711) @@ -10,10 +10,12 @@ create use-timestamp-counter create use-tsc-timing
-\ create use-vesa -create use-ega +create use-vesa +\ create use-ega \ create serial-console
+create no-keyboard \ Newton has no PS/2 keyboard and mouse + \ In virtual mode, OFW runs with the MMU on. The advantages are \ that OFW can automatically locate itself out of the way, at the \ top of physical memory, it can dynamically allocate exactly as
Modified: cpu/x86/pc/newton/devices.fth ============================================================================== --- cpu/x86/pc/newton/devices.fth Tue Nov 29 01:26:49 2011 (r2710) +++ cpu/x86/pc/newton/devices.fth Tue Nov 29 01:26:55 2011 (r2711) @@ -38,12 +38,13 @@
fload ${BP}/ofw/fs/cbfs.fth \ Coreboot ROM filesystem
+h# 80.0000 to /flash \ Entire device \ Create the top-level device node to access the entire boot FLASH device -0 0 " ffa00000" " /" begin-package +0 0 " ff800000" " /" begin-package " flash" device-name
- h# 10.0000 value /device - h# 10.0000 constant /device-phys + h# 80.0000 value /device + h# 80.0000 constant /device-phys my-address my-space /device-phys reg fload ${BP}/dev/flashpkg.fth fload ${BP}/dev/flashwrite.fth @@ -52,6 +53,28 @@ \ XXX later \ devalias cbfs /flash//cbfs-file-system
+\ Create a node below the top-level FLASH node to accessing the portion +\ containing the dropin modules +0 0 " 200000" " /flash" begin-package + " dropins" device-name + + h# 100000 constant /device + fload ${BP}/dev/subrange.fth +end-package + +devalias dropins /dropins + +\ Create a node below the top-level FLASH node to accessing the portion +\ containing the dropin modules +0 0 " 780000" " /flash" begin-package + " coreboot" device-name + + h# 080000 constant /device + fload ${BP}/dev/subrange.fth +end-package + +devalias coreboot /coreboot + 0 [if] \ This really should be a subrange of /flash 0 0 dropin-base <# u#s u#> " /" begin-package @@ -65,13 +88,15 @@ end-package
devalias dropins /dropinram -[else] -patch /l /di-header first-header -patch /l /di-header first-header -\ devalias dropins cbfs:fallback\payload -devalias dropins /flash [then]
+\ [else] +\ patch /l /di-header first-header +\ patch /l /di-header first-header +\ \ devalias dropins cbfs:fallback\payload +\ devalias dropins /flash +\ [then] + \ Create a pseudo-device that presents the dropin modules as a filesystem. fload ${BP}/ofw/fs/dropinfs.fth
Modified: cpu/x86/pc/newton/fw.bth ============================================================================== --- cpu/x86/pc/newton/fw.bth Tue Nov 29 01:26:49 2011 (r2710) +++ cpu/x86/pc/newton/fw.bth Tue Nov 29 01:26:55 2011 (r2711) @@ -192,15 +192,19 @@ fload ${BP}/cpu/x86/pc/linux.fth
hex +: report-net? ( name$ -- found? ) + 2dup find-package if ( name$ phandle ) + drop " net" 2swap $devalias ( ) + true ( found? ) + else ( name$ ) + 2drop false ( found? ) + then ( found? ) +; \ If there is a PCI ethernet adapter, use it as the default net device, \ otherwise use any ethernet that can be found in the device tree. : report-net ( -- ) - " /pci/ethernet" 2dup find-package if ( name$ phandle ) - drop ( name$ ) - else ( name$ ) - 2drop " /ethernet" ( name$' ) - then ( name$ ) - " net" 2swap $devalias ( ) + " /usb@1a/ethernet" report-net? if exit then + " /usb@1b/ethernet" report-net? if exit then ;
fload ${BP}/cpu/x86/pc/newton/usb.fth @@ -212,6 +216,7 @@ patch merge-rect-565 merge-rect merge-cursor \ Hack since we do all our user-level graphics in 565 patch merge-rect-565 merge-rect merge-cursor \ Hack since we do all our user-level graphics in 565 fload ${BP}/cpu/x86/pc/olpc/via/mfgtest.fth +fload ${BP}/cpu/x86/pc/newton/testitems.fth fload ${BP}/dev/olpc/confirm.fth : bright! ( level -- ) drop ; : backlight-on ( -- ) ;
Modified: cpu/x86/pc/newton/probemem.fth ============================================================================== --- cpu/x86/pc/newton/probemem.fth Tue Nov 29 01:26:49 2011 (r2710) +++ cpu/x86/pc/newton/probemem.fth Tue Nov 29 01:26:55 2011 (r2711) @@ -3,8 +3,8 @@
dev /memory
-: /ram ( -- #bytes ) 0 h# b0 config-w@ wljoin ; \ Base of stolen memory -: usable-ramtop ( -- n ) h# ac config-l@ ; \ Top of usable DRAM +: /ram ( -- #bytes ) h# b0 config-l@ ; \ Base of stolen memory +: usable-ramtop ( -- n ) h# b4 config-l@ ; \ Top of usable DRAM
: release-range ( start-adr end-adr -- ) over - release ;