Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Mar 2006 10:57:23 -0800
From:      Sam Leffler <sam@errno.com>
To:        "Rick C. Petty" <rick-freebsd@kiwi-computer.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: 6.1-PRE boot locks up, using USB keyboard
Message-ID:  <44186393.8050005@errno.com>
In-Reply-To: <20060315183902.GC37945@megan.kiwi-computer.com>
References:  <20060315005348.GA32144@megan.kiwi-computer.com>	<200603151046.03551.jhb@freebsd.org>	<20060315171154.GA37945@megan.kiwi-computer.com>	<200603151227.10535.jhb@freebsd.org> <20060315183902.GC37945@megan.kiwi-computer.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Rick C. Petty wrote:
> On Wed, Mar 15, 2006 at 12:27:08PM -0500, John Baldwin wrote:
>> On Wednesday 15 March 2006 12:11, Rick C. Petty wrote:
>>> My BIOS (Asus A8N-E rev 1010) has no option for disabling USB keyboard
>>> support, but I can either disable the USB controller or disable the USB
>>> legacy support.  I doubt either of these is desirable.  Fortunately, I
>>> discovered the problem..
>> The "legacy support" option is the one that makes a USB keyboard look like
>> a PS/2 keyboard.
> 
> If I disable legacy support, the USB keyboard is useless until the kernel
> comes up multi-user and usbd is started, as I expected.  Other than that,
> everything behaves identically.
> 
>>> Whenever ukbd is loaded by /boot/loader and that
>>> device already exists in the kernel, the boot locks up after:
>>>
>>> atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
>>>
>>> when using a USB keyboard.  I would think this is a bug.  It is 100%
>>> repeatable for me.  If I comment out the line in /boot/loader.conf, the
>>> system boots nicely.
>> Ok.  There are several edge cases that can blow up if you kldload a module
>> or load a module from the loader that is already present in the kernel.
> 
> I would think the loader or the kernel should be smart enough not to
> break when loading an already-loaded module.  Is there a workaround?
> If not, all kernels must be compiled with ukbd (if they are to support
> USB keyboards in single-user mode, e.g.).  There should also be a
> warning "BEWARE: Do not set ukbd_load in your loader.conf"  :-P
> 
> Seriously, though, the kernel should not break when loading an unloaded
> module.  I first noticed this whenever I had umass(4) in the kernel and
> it wouldn't detect my USB memory stick but then kldload'd it, saw "File
> exists", but then it would be detected.  I remember removing umass from
> my config and it behaving quite differently.  I never had time to pursue
> that problem.  

I've had several loader/kld bugs on my todo list for a while.  For 
example loading a module with undefined references from the loader will 
cause the kernel to panic.  Feel free to dig in and provide patches...

	Sam



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