Author: wmb Date: 2008-09-30 22:23:34 +0200 (Tue, 30 Sep 2008) New Revision: 949
Modified: cpu/x86/pc/biosload/addrs.fth cpu/x86/pc/biosload/biostart.bth cpu/x86/pc/biosload/devices.fth cpu/x86/pc/biosload/probemem.fth cpu/x86/pc/biosload/start.bth cpu/x86/pc/getms.fth Log: Biosload build - more support for building to run under VirtualBox.
Modified: cpu/x86/pc/biosload/addrs.fth =================================================================== --- cpu/x86/pc/biosload/addrs.fth 2008-09-30 20:18:05 UTC (rev 948) +++ cpu/x86/pc/biosload/addrs.fth 2008-09-30 20:23:34 UTC (rev 949) @@ -20,6 +20,14 @@ h# 08.0000 constant dropin-size [then]
+[ifdef] virtualbox-loaded + h# f0.0000 constant dropin-base \ Location of payload in RAM + h# 08.0000 constant dropin-size + h# 1.0000 constant dma-base \ DMA heap + h# 8.0000 constant dma-size + +[then] + [ifdef] preof-loaded h# 2000.0000 constant ramsize h# fff8.0020 constant dropin-base \ Location of payload in ROM
Modified: cpu/x86/pc/biosload/biostart.bth =================================================================== --- cpu/x86/pc/biosload/biostart.bth 2008-09-30 20:18:05 UTC (rev 948) +++ cpu/x86/pc/biosload/biostart.bth 2008-09-30 20:23:34 UTC (rev 949) @@ -15,7 +15,7 @@
hex
-fload ${BP}/cpu/x86/pc/biosload/addrs.fth +fload ${BP}/cpu/x86/pc/biosload/config.fth
h# 0.0400 constant gdt-pa h# 0.1000 constant stacktop
Modified: cpu/x86/pc/biosload/devices.fth =================================================================== --- cpu/x86/pc/biosload/devices.fth 2008-09-30 20:18:05 UTC (rev 948) +++ cpu/x86/pc/biosload/devices.fth 2008-09-30 20:23:34 UTC (rev 949) @@ -23,10 +23,6 @@ [then]
fload ${BP}/cpu/x86/pc/biosload/pcinode.fth \ System-specific words for PCI - [ifdef] use-mediagx - h# 4100.0000 to first-mem \ Avoid scratchpad RAM - h# ff00.0000 to mem-space-top - [then] end-package stand-init: PCI host bridge " /pci" " init" execute-device-method drop @@ -58,46 +54,30 @@ fload ${BP}/cpu/x86/pc/getms.fth [then]
-[ifdef] use-mediagx -fload ${BP}/dev/mediagx/reg.fth \ MediaGX constants and access -fload ${BP}/dev/mediagx/dump.fth -[then] - [ifdef] use-pci-isa
[ifdef] addresses-assigned \ This must precede isamisc.fth in the load file, to execute it first -fload ${BP}/cpu/x86/pc/biosload/moveisa.fth +fload ${BP}/cpu/x86/pc/moveisa.fth [then]
0 0 " 0" " /pci" begin-package fload ${BP}/dev/pci/isa.fth \ ISA bus bridge under PCI node fload ${BP}/dev/pci/isamisc.fth end-package - -[ifdef] addresses-assigned -fload ${BP}/dev/mediagx/cx5530/nomapsmi.fth [then] -[then]
-dev /interrupt-controller -h# 20 to vector-base0 -h# 28 to vector-base1 -device-end - -[ifdef] use-mediagx -0 0 " 40008100" " /" begin-package - fload ${BP}/dev/mediagx/video/loadpkg.fth -end-package -devalias screen /display -[then] - [ifdef] use-pc87560 0 0 " 5,1" " /pci" begin-package \ ISA bus bridge fload ${BP}/dev/pc87560.fth \ SouthBridge ISA bus bridge end-package [then]
+dev /interrupt-controller +h# 20 to vector-base0 +h# 28 to vector-base1 +device-end + [ifdef] use-pc87317 fload ${BP}/dev/pc87317.fth \ National PC87317 superIO [then] @@ -109,22 +89,30 @@ dup value /device constant /device-phys my-address my-space /device-phys reg - fload ${BP}/cpu/x86/pc/flashpkg.fth +\ fload ${BP}/cpu/x86/pc/flashpkg.fth + fload ${BP}/dev/flashpkg.fth +end-package
- : init ( comp$ /device -- ) - to /device 2>r - 0 0 encode-bytes - 2r> encode-string encode+ - " rom" encode-string encode+ - " compatible" property -[ifdef] enable-flash-select - /device /device-phys <> if enable-flash-select then -[then] - ; +[ifdef] notdef +\ Create a node below the top-level FLASH node to accessing the portion +\ containing the dropin modules +0 0 0 0 " flash" begin-package + " dropins" device-name
+ dropin-size constant /device + fload ${BP}/dev/subrange.fth end-package -" rom" dropin-base <# u#s " /flash@" hold$ u#> $devalias +[then]
+\ devalias dropins /dropins +devalias dropins /flash + +\ Create a pseudo-device that presents the dropin modules as a filesystem. +fload ${BP}/ofw/fs/dropinfs.fth + +\ This devalias lets us say, for example, "dir rom:" +devalias rom /dropin-fs + fload ${BP}/cpu/x86/forthint.fth \ Low-level interrupt handling code fload ${BP}/dev/isa/irq.fth \ ISA interrupt dispatcher fload ${BP}/cpu/x86/pc/isatick.fth \ Use ISA timer as the alarm tick timer @@ -195,8 +183,8 @@ [ifdef] pseudo-nvram fload ${BP}/cpu/x86/pc/biosload/filenv.fth dev /file-nvram -: floppy-nv-file ( -- ) " a:\nvram.dat" ; -' floppy-nv-file to nv-file +: hd-nv-file ( -- ) " c:\nvram.dat" ; +' hd-nv-file to nv-file device-end stand-init: Pseudo-NVRAM " /file-nvram" open-dev to nvram-node
Modified: cpu/x86/pc/biosload/probemem.fth =================================================================== --- cpu/x86/pc/biosload/probemem.fth 2008-09-30 20:18:05 UTC (rev 948) +++ cpu/x86/pc/biosload/probemem.fth 2008-09-30 20:23:34 UTC (rev 949) @@ -41,9 +41,9 @@ fw-pa /fw-ram + heap-base heap-size + umax /ram release then
- dropin-base /ram u< if - dropin-base dropin-size + /ram over - release - then +\ dropin-base /ram u< if +\ dropin-base dropin-size + /ram over - release +\ then [then] ;
Modified: cpu/x86/pc/biosload/start.bth =================================================================== --- cpu/x86/pc/biosload/start.bth 2008-09-30 20:18:05 UTC (rev 948) +++ cpu/x86/pc/biosload/start.bth 2008-09-30 20:23:34 UTC (rev 949) @@ -28,7 +28,7 @@
label startup [ifdef] debug-startup -ascii x report +\ ascii x report [then]
ret
Modified: cpu/x86/pc/getms.fth =================================================================== --- cpu/x86/pc/getms.fth 2008-09-30 20:18:05 UTC (rev 948) +++ cpu/x86/pc/getms.fth 2008-09-30 20:23:34 UTC (rev 949) @@ -56,7 +56,7 @@ \ We use "0<" instead of "0<=" so that we are sure to wait at least \ the requested time; otherwise we might not wait long enough if the \ first call to get-msecs were to occur just before the timer ticked. - begin dup get-msecs - 0<= until \ Loop until target time reached + begin dup ?halt get-msecs - 0<= until \ Loop until target time reached
drop ( ) else ( #ms )
openfirmware@openfirmware.info