summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1996-10-08 22:41:34 +0000
committerbde <bde@FreeBSD.org>1996-10-08 22:41:34 +0000
commit28e40e3bc6a3ad09dbb13f62579877b676cf5755 (patch)
tree5667797bdab1d7d085d45ba22525c62e6264ee9a
parentda493162e3e5a52e07bc557550981b45ccdf1599 (diff)
downloadFreeBSD-src-28e40e3bc6a3ad09dbb13f62579877b676cf5755.zip
FreeBSD-src-28e40e3bc6a3ad09dbb13f62579877b676cf5755.tar.gz
Added option PROBE_KEYBOARD_LOCK which gives a serial console if the
keyboard is locked.
-rw-r--r--sys/i386/boot/biosboot/Makefile5
-rw-r--r--sys/i386/boot/biosboot/boot.c13
2 files changed, 16 insertions, 2 deletions
diff --git a/sys/i386/boot/biosboot/Makefile b/sys/i386/boot/biosboot/Makefile
index 019dbb0..f74113b 100644
--- a/sys/i386/boot/biosboot/Makefile
+++ b/sys/i386/boot/biosboot/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.46 1996/10/08 22:18:34 bde Exp $
+# $Id: Makefile,v 1.47 1996/10/08 22:35:48 bde Exp $
#
PROG= boot
@@ -17,6 +17,9 @@ CFLAGS+= ${CWARNFLAGS}
# Probe the keyboard and use the serial console if the keyboard isn't found.
#CFLAGS+= -DPROBE_KEYBOARD
+# Probe the keyboard lock and use the serial console if the keyboard is locked.
+CFLAGS+= -DPROBE_KEYBOARD_LOCK
+
# Force use of the serial console (after probing the keyboard if
# PROBE_KEYBOARD is defined).
#CFLAGS+= -DFORCE_COMCONSOLE
diff --git a/sys/i386/boot/biosboot/boot.c b/sys/i386/boot/biosboot/boot.c
index ebe32eb..05b79f6 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.58 1996/09/07 20:18:04 bde Exp $
+ * $Id: boot.c,v 1.59 1996/09/14 07:11:58 bde Exp $
*/
@@ -56,6 +56,9 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <a.out.h>
#include <sys/reboot.h>
#include <machine/bootinfo.h>
+#ifdef PROBE_KEYBOARD_LOCK
+#include <machine/cpufunc.h>
+#endif
#define ouraddr (BOOTSEG << 4) /* XXX */
@@ -86,6 +89,14 @@ boot(int drive)
}
#endif
+#ifdef PROBE_KEYBOARD_LOCK
+ if (!(inb(0x64) & 0x10)) {
+ init_serial();
+ loadflags |= RB_SERIAL;
+ printf("\nKeyboard locked.");
+ }
+#endif
+
#ifdef FORCE_COMCONSOLE
init_serial();
loadflags |= RB_SERIAL;
OpenPOWER on IntegriCloud