From owner-freebsd-stable@FreeBSD.ORG Tue Nov 11 18:55:46 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDD301065672 for ; Tue, 11 Nov 2008 18:55:46 +0000 (UTC) (envelope-from peter@wemm.org) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.28]) by mx1.freebsd.org (Postfix) with ESMTP id A923B8FC29 for ; Tue, 11 Nov 2008 18:55:46 +0000 (UTC) (envelope-from peter@wemm.org) Received: by yw-out-2324.google.com with SMTP id 9so19356ywe.13 for ; Tue, 11 Nov 2008 10:55:46 -0800 (PST) Received: by 10.142.163.13 with SMTP id l13mr3103833wfe.91.1226429745370; Tue, 11 Nov 2008 10:55:45 -0800 (PST) Received: by 10.142.255.21 with HTTP; Tue, 11 Nov 2008 10:55:45 -0800 (PST) Message-ID: Date: Tue, 11 Nov 2008 10:55:45 -0800 From: "Peter Wemm" To: "Andriy Gapon" In-Reply-To: <4919851B.7050800@icyb.net.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4912E462.4090608@icyb.net.ua> <491586B9.2020303@vwsoft.com> <4919851B.7050800@icyb.net.ua> Cc: Volker , FreeBSD Stable , freebsd-usb@freebsd.org Subject: Re: usb keyboard dying at loader prompt X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2008 18:55:47 -0000 On Tue, Nov 11, 2008 at 5:14 AM, Andriy Gapon wrote: > on 08/11/2008 14:31 Volker said the following: >> Andriy, >> >> On 12/23/-58 20:59, Andriy Gapon wrote: >>> I have a quite strange problem. >>> This is with 7-BETA amd64. >> >> Did it work with earlier versions? > > Can't say, this is a new machine, FreeBSD took its virginity :-) > >>> All of USB is out of kernel and is loaded via modules. >>> BIOS has "Legacy USB" enabled. >>> I have only a USB keyboard, no PS/2 port. >> >> Can you check BIOS settings for EHCI handover? > > No such settings. > >> If the BIOS does not have handover enabled, it may disable legacy >> support after a timeout, which is often bad. IMO this is the same with >> booting off USB drives but every BIOS handles that different. > > This doesn't seem to be the case. The behavior is quite random, > sometimes I can work at loader prompt for may minutes, sometimes > keyboard is dead after a few seconds. > Also, I think USB keyboard is handled by UHCI, not EHCI in my case, but > I am not sure if this matters. My guess is that Legacy support should > work until OS explicitly takes over by using special procedure (this > should be done for UHCI as well). > > BTW, it seems that our UHCI take-over code is far more simple than what > MS described here: > http://www.microsoft.com/whdc/archive/usbhost.mspx#EQHAC > > Anyway, this happens after loader is done. > >>> The keyboard works file in BIOS and for selecting boot device in boot0 >>> menu. It also works in loader menu. If in the menu I select to go to >>> loader prompt then it works for about 5 seconds and then "dies" - no >>> reaction to key presses, no led change, nothing. >>> I haven't actually verified if the keyboard would still work if I stayed >>> in loader menu for longer than ~10 seconds. >>> >>> This doesn't happen if USB is built into kernel. >> >> That sound strange. I have no idea why that might work (or I'm totally >> wrong with my handover theory). > > I was incorrect about the above, I have already seen it happening both ways. > >>> Weird... >> >> Yes, sounds like or it's probably easily explainable ;) > > > -- > Andriy Gapon > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" > Some bioses have a list of MBR partition id's and use that to determine what to do with the USB keyboard. One of my ol older amd64 motherboards worked but would always disable the usb keyboard right as loader started. I discovered the following: * If I put the freebsd bootblocks and loader on a floppy drive (no MBR), then the bios did not turn off the keyboard. It always continued to work for loader. * If i hacked the boot bootblocks and loader and kernel to recognize different MBR slice id nubmers as "ours", then changing the freebsd MBR to be "msdos" or "linux" also worked for that BIOS. It would no longer turn off the USB keyboard. I don't recall which Id number I used instead of 165 - it was about 4 years ago. * There were other consequences of using the partition ID hack - I think I remember it turning off the apic for msdos mode. Your problems may be different, but mine were caused by a BIOS whitelist of MBR partition id's. What a stupid problem. On that motherboard I ended up taking the path of least resistance and using the PS/2 adapter plug on the keyboard. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV "All of this is for nothing if we don't go to the stars" - JMS/B5 "If Java had true garbage collection, most programs would delete themselves upon execution." -- Robert Sewell