cvs commit: src/sys/dev/kbd kbd.c src/sys/dev/syscons syscons.c

Scott Long scottl at samsco.org
Tue Feb 28 18:48:15 PST 2006


Maksim Yevmenkin wrote:
> On 2/28/06, Scott Long <scottl at samsco.org> wrote:
> 
>>Maksim Yevmenkin wrote:
>>
>>>emax        2006-02-28 23:46:23 UTC
>>>
>>>  FreeBSD src repository
>>>
>>>  Modified files:
>>>    sys/dev/kbd          kbd.c
>>>    sys/dev/syscons      syscons.c
>>>  Log:
>>>  Integrate kbdmux(4) into syscons(4) and kbd code.
>>>
>>>  By default syscons(4) will look for the kbdmux(4) keyboard first, and then,
>>>  if not found, look for any keyboard.
>>>
>>>  Current kbd code is modified so if kbdmux(4) is the current keyboard, all
>>>  new keyboards are automatically added to the kbdmux(4).
>>>
>>>  Switch to kbdmux(4) can be done at boot time, by loading kbdmux module at
>>>  the loader prompt, or at runtime, by kldload'ing the kbdmux module and
>>>  releasing current active keyboard.
>>>
>>>  If, for whatever reason, kbdmux(4) is not required/desired then just do
>>>  not load it and everything should work as before. It is also possible to
>>>  kldunload kbdmux at runtime and syscons(4) will automatically switch to
>>>  the first available keyboard.
>>>
>>>  No response from:       freebsd-current@
>>>  MFC after:              1 day
>>>
>>>  Revision  Changes    Path
>>>  1.45      +24 -0     src/sys/dev/kbd/kbd.c
>>>  1.442     +42 -4     src/sys/dev/syscons/syscons.c
>>
>>Ultimately I would like to see this enabled by default so that
>>everything 'just works', but with a way to easily disable it in case
>>something goes wrong.  Would that be possible?
> 
> 
> right now i can think of two ways to make it enabled by default:
> 
> 1) add 'device kbdmux' to the kernel config (or even make it required)

Could you add a check to the probe/attach routines of kbdmux so that it
could be disabled via a loader hint?  I assume that there will only be
one instance of the kbdmux device, so this should be easy to do. 
Something similar is possible with acpi, fwiw.

> 
> 2) set kbdmux_load to "YES" somewhere in loader.* files (somewhat
> similar to acpi).

Actually, acpi is much more evil.  The loader probes the BIOS to see if
ACPI tables are present, and then sets the acpi_load variable based on 
that.  So no variables in loader.* are present in the default install.
If we wanted to add the kbdmux_load variable in the default system then
we will need to add /usr/src/sys/boot/forth/loader.conf, or add magic
to the installkernel target to handle it similar to device.hints.

> 
> with option (2) above it would be easy to disable, i.e. just do
> 
> unset kdbmux_load
> 
> at loader command prompt or loader.rc
> 
> thanks,
> max
> 

Scott


More information about the cvs-all mailing list