Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Jun 2002 02:03:26 +0200
From:      "Achim Hensel" <achim.hensel@ruhr-uni-bochum.de>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Standard way to inlude probe_keyboard counter for buffer clearing?
Message-ID:  <3D152C6E.5063.2700D36@localhost>

next in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello Folks

(It seems I got visited from an old Bug)

Description
=3D=3D=3D=3D=3D=3D=3D=3D

I want to run a headless FreeBSD R4.6-Box, but the Loader hangs (in =

an endless loop), if no keyboard is attached.
(see: Problem Report i386/3124). My system is an old 486, and I =

killed this bug at linux.

Question:
=3D=3D=3D=3D=3D=3D=3D

Is there a standard way (patch, etc.) to modify the keyboard setup =

function keyboard_probe in such a way, that only a limited number of =

attempts to clear the kbd buffer will be executed, e.g. by =

introducing a counter?

I know, space in boot block is scarce, so a established method would =

be good.

Reason:
=3D=3D=3D=3D=3D

In the function probe_keyboard() of
  /usr/src/sys/i386/boot/biosboot/probe_keyboard.c
or
  sys/boot/i386/libi386/vidconsole.c
the keyboard buffer is emptied with

/* flush any noise */
while (inb(IO_KBD + KBD_STATUS_PORT) & KBDS_ANY_BUFFER_FULL) {
    delay7();
    inb(IO_KBD + KBD_DATA_PORT);
    delay1ms();
}

It seems that without a keyboard, the kbd buffer looks always non-
empty (maybe a KEYBOARD_ABSENT Messange behaves like a non-empty kbd =

buffer). This bug was solved at my old linux box by adding a counter, =

which limited the code to some 1000's loops.


CU,
	Achim
- --
Achim Hensel                                       achim.hensel@ruhr-
uni-bochum.de
Tel.: +49/234/473094      http://homepage.ruhr-uni-
bochum.de/achim.hensel

-----BEGIN PGP SIGNATURE-----
Version: idw's PGP-Frontend 4.8.5 / 2-2002 + PGP 6.5.X

iQA/AwUBPRUCTJi0ooM1RDDeEQI2lwCeJmUQ96P/Sok71qj9gd4QdIJLywwAoLBh
TMifRIQ7ppb53igXxkjt3OQO
=3Dxa4E
-----END PGP SIGNATURE-----

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D152C6E.5063.2700D36>