11.1SjdolecekREM >testboot 21.1SjdolecekREM $NetBSD: TestBoot,v 1.1.1.1 2002/05/09 20:03:57 jdolecek Exp $ 31.1SjdolecekREM 41.1SjdolecekREM Copyright (c) 1995 Mark Brinicombe 51.1SjdolecekREM All rights reserved 61.1SjdolecekREM 71.1SjdolecekREM Redistribution and use in source and binary forms, with or without 81.1SjdolecekREM modification, are permitted provided that the following conditions 91.1SjdolecekREM are met: 101.1SjdolecekREM 1. Redistributions of source code must retain the above copyright 111.1SjdolecekREM notice, this list of conditions and the following disclaimer. 121.1SjdolecekREM 2. Redistributions in binary form must reproduce the above copyright 131.1SjdolecekREM notice, this list of conditions and the following disclaimer in the 141.1SjdolecekREM documentation and/or other materials provided with the distribution. 151.1SjdolecekREM 3. All advertising materials mentioning features or use of this software 161.1SjdolecekREM must display the following acknowledgement: 171.1SjdolecekREM This product includes software developed by Mark Brinicombe. 181.1SjdolecekREM 4. The name of the company nor the name of the author may be used to 191.1SjdolecekREM endorse or promote products derived from this software without specific 201.1SjdolecekREM prior written permission. 211.1SjdolecekREM 221.1SjdolecekREM THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 231.1SjdolecekREM IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 241.1SjdolecekREM OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 251.1SjdolecekREM IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 261.1SjdolecekREM INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 271.1SjdolecekREM BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 281.1SjdolecekREM OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 291.1SjdolecekREM ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 301.1SjdolecekREM OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 311.1SjdolecekREM THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 321.1SjdolecekREM DAMAGE. 331.1SjdolecekREM 341.1SjdolecekREM NetBSD kernel project 351.1SjdolecekREM 361.1SjdolecekREM testboot 371.1SjdolecekREM 381.1SjdolecekREM Sets the FastBoot flag as required 391.1SjdolecekREM 401.1SjdolecekREM Created : 12/05/95 411.1SjdolecekREM Last updated : 03/09/95 421.1SjdolecekREM 431.1Sjdolecek 441.1Sjdolecek*Set NetBSD$FastBoot 0 451.1Sjdolecek 461.1SjdolecekREM Test for either ALT keys 471.1Sjdolecek 481.1SjdolecekIF (INKEY(-3) <> 0) THEN 491.1Sjdolecek alt% = TRUE 501.1Sjdolecek *Set NetBSD$FastBoot 1 511.1SjdolecekELSE 521.1Sjdolecek alt% = FALSE 531.1SjdolecekENDIF 541.1Sjdolecek 551.1SjdolecekREM Get byte 80 from the CMOS RAM. This is a RiscIX byte that we are using. 561.1SjdolecekREM bits are as follows : 571.1SjdolecekREM bit 0 - configure bootNetBSD 581.1SjdolecekREM bit 1 - automatic reboot required. 591.1Sjdolecek 601.1SjdolecekSYS "OS_Byte", 161, 80 TO ,,value% 611.1Sjdolecek 621.1SjdolecekREM Has the user configured a NetBSD boot ? 631.1SjdolecekREM If a NetBSD boot has been configured ALT can be used to 641.1SjdolecekREM select a RISC OS boot 651.1Sjdolecek 661.1SjdolecekIF (value% AND &01) THEN 671.1Sjdolecek *Set NetBSD$FastBoot 2 681.1SjdolecekENDIF 691.1Sjdolecek 701.1SjdolecekREM Did the kernel request a automatic reboot ? 711.1Sjdolecek 721.1SjdolecekIF (value% AND &02) THEN 731.1Sjdolecek *Set NetBSD$FastBoot 3 741.1Sjdolecek 751.1Sjdolecek REM Clear the automatic reboot flag 761.1Sjdolecek 771.1Sjdolecek SYS "OS_Byte", 162, 80, value% AND &fd 781.1SjdolecekENDIF 791.1Sjdolecek 801.1SjdolecekREM If the CMOS bits dictate a reboot then allow ALT to override. 811.1SjdolecekIF (value% AND &03) THEN 821.1Sjdolecek IF (alt% = TRUE) THEN 831.1Sjdolecek *Set NetBSD$FastBoot 0 841.1Sjdolecek ENDIF 851.1SjdolecekENDIF 861.1Sjdolecek 871.1Sjdolecek 881.1SjdolecekREM Test for CTRL key - This does a fastconf and will override a reboot 891.1Sjdolecek 901.1SjdolecekIF (INKEY(-2) <> 0) THEN 911.1Sjdolecek *Set NetBSD$FastBoot 4 921.1SjdolecekENDIF 931.1Sjdolecek 941.1SjdolecekON ERROR END 951.1Sjdolecek 961.1Sjdolecek*If <NetBSD$FastBoot> > 0 then RMLoad <BtNetBSD$Dir>.Banner 97