From owner-freebsd-current Thu Jan 27 17:38:12 2000 Delivered-To: freebsd-current@freebsd.org Received: from outmail.utsunomiya-u.ac.jp (outmail.utsunomiya-u.ac.jp [160.12.196.3]) by hub.freebsd.org (Postfix) with ESMTP id F08C915835; Thu, 27 Jan 2000 17:38:08 -0800 (PST) (envelope-from yokota@zodiac.mech.utsunomiya-u.ac.jp) Received: from zodiac.mech.utsunomiya-u.ac.jp (IDENT:lql3hrOhwA+vyykbesEa19DSu3eJa7im@zodiac.mech.utsunomiya-u.ac.jp [160.12.42.1]) by outmail.utsunomiya-u.ac.jp (8.9.3/3.7Wpl2) with ESMTP id KAA08561; Fri, 28 Jan 2000 10:37:59 +0900 (JST) Received: from zodiac.mech.utsunomiya-u.ac.jp (zodiac.mech.utsunomiya-u.ac.jp [160.12.42.1]) by zodiac.mech.utsunomiya-u.ac.jp (8.7.6+2.6Wbeta7/3.4W/zodiac-May96) with ESMTP id KAA15711; Fri, 28 Jan 2000 10:43:37 +0900 (JST) Message-Id: <200001280143.KAA15711@zodiac.mech.utsunomiya-u.ac.jp> To: Mike Smith Cc: Warner Losh , Brian Beattie , Bill Fenner , rcarter@pinyon.org, current@freebsd.org, yokota@zodiac.mech.utsunomiya-u.ac.jp Subject: Re: Problems installing FreeBSD 4.0 20000125-CURRENT In-reply-to: Your message of "Thu, 27 Jan 2000 16:14:48 PST." <200001280014.QAA03163@mass.cdrom.com> References: <200001280014.QAA03163@mass.cdrom.com> Date: Fri, 28 Jan 2000 10:43:35 +0900 From: Kazutaka YOKOTA Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >> In message <200001272329.PAA02514@mass.cdrom.com> Mike Smith writes: >> : It doesn't do anything to the keyboard, it just calls the BIOS to find >> : out whether keys have been pressed. >> >> I've been seeing the hit twice fast problem for months. > >It's always been a problem; we don't understand the mechanics of it >however. Susceptibility varies widely between systems, and the best >hypothesis I've been able to come up with is that there are issues with >taking interrupts in vm86 mode; possibly the BIOS is being re-entered in >a fashion it doesn't like. I wonder if the keyboard interrupt is blocked for a prolonged period in the boot loader because of vm86, and quite a number of (up to 16 or something) scan codes are waiting in the keyboard to be received by the host computer, when the kernel is loaded. The keyboard driver atkbd tries to flush pending scan codes, left over from the boot loader, before it starts initializing the keyboard. It may be failing to flush all the pending scan codes if there are too many of them. The following patch will make the driver wait slightly longer to flush inputs. I would like to see if this makes any difference. I should come up with something better this, though... Kazu Index: atkbd.c =================================================================== RCS file: /src/CVS/src/sys/dev/kbd/atkbd.c,v retrieving revision 1.22 diff -u -r1.22 atkbd.c --- atkbd.c 2000/01/20 13:32:53 1.22 +++ atkbd.c 2000/01/28 00:47:27 @@ -1085,7 +1098,7 @@ } /* flush any noise in the buffer */ - empty_both_buffers(kbdc, 10); + empty_both_buffers(kbdc, 200); /* save the current keyboard controller command byte */ m = kbdc_get_device_mask(kbdc) & ~KBD_KBD_CONTROL_BITS; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message