Author: wmb Date: 2009-04-18 21:16:40 +0200 (Sat, 18 Apr 2009) New Revision: 1151
Modified: cpu/x86/pc/biosload/devices.fth cpu/x86/pc/biosload/fw.bth Log: biosload version - support config variable storage on a USB stick.
Modified: cpu/x86/pc/biosload/devices.fth =================================================================== --- cpu/x86/pc/biosload/devices.fth 2009-04-18 19:11:32 UTC (rev 1150) +++ cpu/x86/pc/biosload/devices.fth 2009-04-18 19:16:40 UTC (rev 1151) @@ -199,14 +199,19 @@ dev /file-nvram : fd-nv-file ( -- ) " a:\nvram.dat" ; : hd-nv-file ( -- ) " c:\nvram.dat" ; -' fd-nv-file to nv-file +: usb-nv-file ( -- ) " u:\nvram.dat" ; +' usb-nv-file to nv-file device-end +: reread-config-vars ( -- ) + config-valid? if exit then + ['] init-config-vars catch drop +; stand-init: Pseudo-NVRAM " /file-nvram" open-dev to nvram-node nvram-node 0= if ." The configuration EEPROM is not working" cr then - ['] init-config-vars catch drop + reread-config-vars ; [then]
@@ -310,8 +315,13 @@ end-package [then]
+[ifdef] use-usb-debug-port +fload ${BP}/dev/usb2/device/debugport.fth \ ISA COM port driver +[else] fload ${BP}/dev/isa/diaguart.fth \ ISA COM port driver h# 3f8 is uart-base +[then] + fload ${BP}/forth/lib/sysuart.fth \ Use UART for key and emit fload ${BP}/cpu/x86/pc/egauart.fth \ Output also to EGA
Modified: cpu/x86/pc/biosload/fw.bth =================================================================== --- cpu/x86/pc/biosload/fw.bth 2009-04-18 19:11:32 UTC (rev 1150) +++ cpu/x86/pc/biosload/fw.bth 2009-04-18 19:16:40 UTC (rev 1151) @@ -16,7 +16,6 @@
' (quit) to quit
-create debug-startup : \Tags [compile] \ ; immediate : \NotTags [compile] \ ; immediate
@@ -247,9 +246,7 @@ key upc ascii I = if ." Interacting" cr hex interact then then then - \ cr0@ h# 9fff.ffff and cr0! \ enable L1 and L2 caches - ; warning ! [then] @@ -303,6 +300,13 @@ [then] report-disk report-pci-fb + \ In case the config vars are stored on a USB stick ... + [ifdef] reread-config-vars + config-valid? 0= if + reread-config-vars + use-nvramrc? if nvramrc safe-evaluate then + then + [then] ;
: startup ( -- ) @@ -316,6 +320,7 @@ auto-banner? if " Probing" ?type probe-all " Install console" ?type install-console + ?usb-keyboard banner then