* AT keyboard optional on i386?
@ 2001-05-26 0:21 Pavel Roskin
2001-05-29 4:11 ` James Simmons
0 siblings, 1 reply; 5+ messages in thread
From: Pavel Roskin @ 2001-05-26 0:21 UTC (permalink / raw)
To: linux-kernel
Hello!
I'm trying to run Linux on a broken motherboard that is constantly
producing random noice on the AT keyboard port. I'm going to use a USB
keyboard, but I cannot get Linux to ignore the AT keyboard port.
Is there any way to disable the AT keyboard? I think the best solution
would be to make it optional, just like almost everything in the kernel,
e.g. PS/2 mouse. Some embedded i386 systems could save a few kilobytes of
RAM by disabling the AT keyboard.
It looks like that other architectures (arm and mips) already have an
option CONFIG_PC_KEYB exactly for that. However, it's a dependent variable
- it's set based on the machine type.
Does anybody have a patch for making AT keyboard optional on i386 or
should I make it myself?
--
Regards,
Pavel Roskin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: AT keyboard optional on i386?
2001-05-26 0:21 AT keyboard optional on i386? Pavel Roskin
@ 2001-05-29 4:11 ` James Simmons
2001-05-29 4:50 ` Pavel Roskin
0 siblings, 1 reply; 5+ messages in thread
From: James Simmons @ 2001-05-29 4:11 UTC (permalink / raw)
To: Pavel Roskin; +Cc: linux-kernel
> I'm trying to run Linux on a broken motherboard that is constantly
> producing random noice on the AT keyboard port. I'm going to use a USB
> keyboard, but I cannot get Linux to ignore the AT keyboard port.
Not that I know. The current way it works is:
1) Current 2.4 way for AT keyboards:
pc_keyb.c -(raw)-> keyboard.c -(raw)-> pc_keyb.c -->
>--(cooked)-> keyboard.c -(chars)-> tty
2) Current 2.4 way for USB keyboards (uses keybdev):
usb.c -(usb)-> hid.c -(events)-> input.c -(events)-> keybdev.c -->
>--(raw)-> keyboard.c -(raw)-> pc_keyb.c -(cooked)-> keyboard.c -->
>--(chars)-> tty
So as you can see even USB keyboards depend on pc_keyb.c. So their is no
way around this.
> Is there any way to disable the AT keyboard? I think the best solution
> would be to make it optional, just like almost everything in the kernel,
> e.g. PS/2 mouse. Some embedded i386 systems could save a few kilobytes of
> RAM by disabling the AT keyboard.
This is a 2.5.X issue since changing the current pc_keyb.c keyboard
driver would break many drivers which like the USB keybaords fake they are
PS/2 keyboards.
BTW I already have a kernel tree that does allow the AT keyboard to be
optional. The AT keyboard has been ported to the linux input api and it
has been working very well for along time. In this kernel tree you have:
3) Ruby (my tree's name) way for AT keyboards:
i8042.c -(raw)-> atkbd.c -(events)-> input.c -->
>--(events)-> keyboard.c -(chars)-> tty
4) Ruby way for USB keyboards:
usb.c -(usb)-> hid.c -(events)-> input.c -->
>--(events)-> keyboard.c -(chars)-> tty
You can a few nice tricks with it like plug in two PS/2 keyboards. I have
this for my home setup. The only thing is make sure you don't have both
keyboards plugged in when you turn your PC on. I found BIOS get confussed
by two PS/2 keyboards. As you can it is very easy to multiplex many
keyboards with the above design. I have had 4 different keyboards hooked
up to my system and functioning at the same time. We even got a Sun
keyboard to work on a intel box :-) Another nice feature is event numbers
from the input api can be used in the keymap. This has a nice effect that
keymaps will be architecture independent, too. The only mess is raw mode
which /dev/event makes obsolute.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: AT keyboard optional on i386?
2001-05-29 4:11 ` James Simmons
@ 2001-05-29 4:50 ` Pavel Roskin
2001-05-29 8:00 ` Vojtech Pavlik
2001-05-31 22:52 ` Ricky Beam
0 siblings, 2 replies; 5+ messages in thread
From: Pavel Roskin @ 2001-05-29 4:50 UTC (permalink / raw)
To: James Simmons; +Cc: linux-kernel
Hi, James!
> So as you can see even USB keyboards depend on pc_keyb.c. So their is
> no way around this.
Perhaps redefining kbd_read_input() will help. It's cruel, I know :-)
> You can a few nice tricks with it like plug in two PS/2 keyboards. I
> have this for my home setup. The only thing is make sure you don't
> have both keyboards plugged in when you turn your PC on. I found BIOS
> get confused by two PS/2 keyboards. As you can it is very easy to
> multiplex many keyboards with the above design. I have had 4 different
> keyboards hooked up to my system and functioning at the same time. We
> even got a Sun keyboard to work on a intel box :-)
That's what we like Linux for. It doesn't get confused when everything
else does :-)
Thanks for your very interesting reply.
--
Regards,
Pavel Roskin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: AT keyboard optional on i386?
2001-05-29 4:50 ` Pavel Roskin
@ 2001-05-29 8:00 ` Vojtech Pavlik
2001-05-31 22:52 ` Ricky Beam
1 sibling, 0 replies; 5+ messages in thread
From: Vojtech Pavlik @ 2001-05-29 8:00 UTC (permalink / raw)
To: Pavel Roskin; +Cc: James Simmons, linux-kernel
On Tue, May 29, 2001 at 12:50:59AM -0400, Pavel Roskin wrote:
> Hi, James!
>
> > So as you can see even USB keyboards depend on pc_keyb.c. So their is
> > no way around this.
>
> Perhaps redefining kbd_read_input() will help. It's cruel, I know :-)
Or just kill allocating the IRQ in the pc_keyb.c file. It worked for me.
> > You can a few nice tricks with it like plug in two PS/2 keyboards. I
> > have this for my home setup. The only thing is make sure you don't
> > have both keyboards plugged in when you turn your PC on. I found BIOS
> > get confused by two PS/2 keyboards. As you can it is very easy to
> > multiplex many keyboards with the above design. I have had 4 different
> > keyboards hooked up to my system and functioning at the same time. We
> > even got a Sun keyboard to work on a intel box :-)
>
> That's what we like Linux for. It doesn't get confused when everything
> else does :-)
>
> Thanks for your very interesting reply.
--
Vojtech Pavlik
SuSE Labs
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: AT keyboard optional on i386?
2001-05-29 4:50 ` Pavel Roskin
2001-05-29 8:00 ` Vojtech Pavlik
@ 2001-05-31 22:52 ` Ricky Beam
1 sibling, 0 replies; 5+ messages in thread
From: Ricky Beam @ 2001-05-31 22:52 UTC (permalink / raw)
To: Pavel Roskin; +Cc: James Simmons, linux-kernel
On Tue, 29 May 2001, Pavel Roskin wrote:
>> You can a few nice tricks with it like plug in two PS/2 keyboards. I
>> have this for my home setup. The only thing is make sure you don't
>> have both keyboards plugged in when you turn your PC on. I found BIOS
>> get confused by two PS/2 keyboards. As you can it is very easy to
>> multiplex many keyboards with the above design. I have had 4 different
>> keyboards hooked up to my system and functioning at the same time. We
>> even got a Sun keyboard to work on a intel box :-)
>
>That's what we like Linux for. It doesn't get confused when everything
>else does :-)
Heh, that's funny. I must admit I'd never thought of that.
Anyway, the bios gets confused because it's trying to figure out (in a very
simple way) where the keyboard and mouse are. It's true there's lots of
voodoo in PC BIOSes; keyboard/mouse detection isn't one of them.
(As I recall, I have to have something in the port to get it enabled. Linux
doesn't seem to know how to enable it.)
--Ricky
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2001-05-31 22:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-26 0:21 AT keyboard optional on i386? Pavel Roskin
2001-05-29 4:11 ` James Simmons
2001-05-29 4:50 ` Pavel Roskin
2001-05-29 8:00 ` Vojtech Pavlik
2001-05-31 22:52 ` Ricky Beam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox