diff options
author | bde <bde@FreeBSD.org> | 1996-03-08 06:29:07 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1996-03-08 06:29:07 +0000 |
commit | 4ce0328b770359966fa9f49ac04f6ee8f1c9d235 (patch) | |
tree | 7eefcc124e3d8fd454679c6bc2acc3e7d73969c9 | |
parent | 627e1bd5852a9e8f74abfba08e9fc6e2e0aedaa2 (diff) | |
download | FreeBSD-src-4ce0328b770359966fa9f49ac04f6ee8f1c9d235.zip FreeBSD-src-4ce0328b770359966fa9f49ac04f6ee8f1c9d235.tar.gz |
Probe the keyboard if PROBE_KEYBOARD is defined instead of when `notyet'
is defined and FORCE_COMCONSOLE isn't defined.
Don't compile any keyboard probing code if PROBE_KEYBOARD isn't defined.
Makefile:
Removed -I paths. They weren't used, and the one to /sys hasn't worked
since the source directory was moved down one level.
-rw-r--r-- | sys/i386/boot/biosboot/Makefile | 9 | ||||
-rw-r--r-- | sys/i386/boot/biosboot/boot.c | 12 | ||||
-rw-r--r-- | sys/i386/boot/biosboot/io.c | 4 | ||||
-rw-r--r-- | sys/i386/boot/biosboot/probe_keyboard.c | 6 |
4 files changed, 18 insertions, 13 deletions
diff --git a/sys/i386/boot/biosboot/Makefile b/sys/i386/boot/biosboot/Makefile index bb3ae78..77e963c 100644 --- a/sys/i386/boot/biosboot/Makefile +++ b/sys/i386/boot/biosboot/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.36 1996/01/21 11:30:11 joerg Exp $ +# $Id: Makefile,v 1.37 1996/02/03 21:12:27 joerg Exp $ # PROG= boot @@ -12,9 +12,12 @@ CFLAGS= -O2 \ -DDO_BAD144 -DBOOTWAIT=${BOOTWAIT} -DTIMEOUT=${TIMEOUT} CFLAGS+= -DCOMCONSOLE=0x3F8 CFLAGS+= -DBOOTSEG=${BOOTSEG} -DBOOTSTACK=${BOOTSTACK} -CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../.. -# Force usage of serial console instead of keyboard probing. +# Probe the keyboard and use the serial console if the keyboard isn't found. +#CFLAGS+= -DPROBE_KEYBOARD + +# Force use of the serial console (after probing the keyboard if +# PROBE_KEYBOARD is defined). #CFLAGS+= -DFORCE_COMCONSOLE # Assume hd(*,a) instead of wd(*,a) if the boot seems to happen from diff --git a/sys/i386/boot/biosboot/boot.c b/sys/i386/boot/biosboot/boot.c index e3ea702..5a8247e 100644 --- a/sys/i386/boot/biosboot/boot.c +++ b/sys/i386/boot/biosboot/boot.c @@ -24,7 +24,7 @@ * the rights to redistribute these changes. * * from: Mach, [92/04/03 16:51:14 rvb] - * $Id: boot.c,v 1.45 1995/06/25 14:02:50 joerg Exp $ + * $Id: boot.c,v 1.46 1995/07/22 22:32:49 joerg Exp $ */ @@ -75,19 +75,19 @@ boot(int drive) { int ret; -#ifndef FORCE_COMCONSOLE -#ifdef notyet +#ifdef PROBE_KEYBOARD if (probe_keyboard()) { init_serial(); loadflags |= RB_SERIAL; printf("\nNo keyboard found."); } -#endif /* notyet */ -#else /* FORCE_COMCONSOLE */ +#endif + +#ifdef FORCE_COMCONSOLE init_serial(); loadflags |= RB_SERIAL; printf("\nSerial console forced."); -#endif /* FORCE_COMCONSOLE */ +#endif /* Pick up the story from the Bios on geometry of disks */ diff --git a/sys/i386/boot/biosboot/io.c b/sys/i386/boot/biosboot/io.c index ff397b0..0a8fd2f 100644 --- a/sys/i386/boot/biosboot/io.c +++ b/sys/i386/boot/biosboot/io.c @@ -24,7 +24,7 @@ * the rights to redistribute these changes. * * from: Mach, Revision 2.2 92/04/04 11:35:57 rpd - * $Id: io.c,v 1.16 1996/01/21 11:30:12 joerg Exp $ + * $Id: io.c,v 1.17 1996/03/08 06:11:33 bde Exp $ */ #include "boot.h" @@ -153,6 +153,7 @@ loop: return(c); } +#ifdef PROBE_KEYBOARD /* * This routine uses an inb to an unused port, the time to execute that * inb is approximately 1.25uS. This value is pretty constant across @@ -170,6 +171,7 @@ delay1ms(void) while (--i >= 0) (void)inb(0x84); } +#endif /* PROBE_KEYBOARD */ static __inline unsigned pword(unsigned physaddr) diff --git a/sys/i386/boot/biosboot/probe_keyboard.c b/sys/i386/boot/biosboot/probe_keyboard.c index bd5113c..2a353d4 100644 --- a/sys/i386/boot/biosboot/probe_keyboard.c +++ b/sys/i386/boot/biosboot/probe_keyboard.c @@ -42,10 +42,10 @@ * * This grody hack brought to you by Bill Paul (wpaul@ctr.columbia.edu) * - * $Id: probe_keyboard.c,v 1.4 1995/04/14 21:26:52 joerg Exp $ + * $Id: probe_keyboard.c,v 1.5 1995/04/20 23:15:10 joerg Exp $ */ -#ifndef FORCE_COMCONSOLE +#ifdef PROBE_KEYBOARD #include <machine/console.h> #include <machine/cpufunc.h> @@ -117,4 +117,4 @@ gotack: return(0); } -#endif /* !FORCE_COMCONSOLE */ +#endif /* PROBE_KEYBOARD */ |