From owner-freebsd-questions Sat Jun 22 17: 3:39 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mailout04.sul.t-online.com (mailout04.sul.t-online.com [194.25.134.18]) by hub.freebsd.org (Postfix) with ESMTP id 7987637B400 for ; Sat, 22 Jun 2002 17:03:34 -0700 (PDT) Received: from fwd05.sul.t-online.de by mailout04.sul.t-online.com with smtp id 17Luqr-00056c-01; Sun, 23 Jun 2002 02:03:33 +0200 Received: from server.private.priv (520047598427-0001@[80.143.85.160]) by fmrl05.sul.t-online.com with esmtp id 17Luqh-1WAhRwC; Sun, 23 Jun 2002 02:03:23 +0200 Received: from physik (physik.private.priv [192.168.1.10]) by server.private.priv (8.12.3/8.12.3) with ESMTP id g5N03l2A041412 for ; Sun, 23 Jun 2002 02:03:48 +0200 (CEST) (envelope-from achim.hensel@ruhr-uni-bochum.de) From: "Achim Hensel" To: freebsd-questions@FreeBSD.ORG Date: Sun, 23 Jun 2002 02:03:26 +0200 MIME-Version: 1.0 Subject: Standard way to inlude probe_keyboard counter for buffer clearing? Reply-To: achim.hensel@ruhr-uni-bochum.de Message-ID: <3D152C6E.5063.2700D36@localhost> X-PM-Encryptor: IDWPGP-PM32, 4 X-mailer: Pegasus Mail for Windows (v4.01) Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: Quoted-printable Content-description: Mail message body X-Sender: 520047598427-0001@t-dialin.net Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG -----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