linux-mips
[Top] [All Lists]

Re: Keyboard/Mouse drivers on SGI

To: Miguel de Icaza <miguel@nuclecu.unam.mx>
Subject: Re: Keyboard/Mouse drivers on SGI
From: Steve Alexander <sca@refugee.engr.sgi.com>
Date: Mon, 23 Jun 1997 21:15:29 -0700
Cc: linux@cthulhu.engr.sgi.com
In-reply-to: Message from miguel@nuclecu.unam.mx of 23 Jun 1997 20:20:03 CDT
Sender: owner-linux@cthulhu.engr.sgi.com
Miguel de Icaza <miguel@nuclecu.unam.mx> writes:
>   I see that the Xsgi server uses /dev/input/mouse and
>/dev/output/keyboard.  I can see from par's output that it does some
>STREAMS ioctls it I_PUSH'es something (I am not even remotely familiar
>to STREAMS, so I dunno what those I_PUSHes do).

I am not the best person to explain this, but my understanding is that the
keyboard and mouse (or spaceball, etc...) are linked (I_LINKed) under a driver
called 'shmiq,' which is the shared-memory event queue driver.  This driver
takes STREAMS data from the underlying devices and converts it into some sort
of standard event queue.  This allows events to be given to the X server in a
standard format, and I believe that this is done by pinning memory in the
X server and then copying events into this memory; I have no idea what happens
if the server doesn't respond fast enough.

My guess is that /dev/input/{keyboard,mouse} are both some sort of standard
serial port driver and that the modules I_PUSHed on top are what interpret the
low-level keyboard/mouse protocols.

SCO use a similar approach; their driver is called 'ev' if I remember
correctly.

So, if my theory is correct, what I'd expect to see is:

        mfd = open /dev/input/mouse
        I_PUSH mfd "mouse"
        kfd = open /dev/input/keyboard
        I_PUSH kfd "keyboard"

        sfd = open /dev/shmiq
        I_LINK sfd mfd
        I_LINK sfd kfd

More than that, I don't know.

-- Steve

<Prev in Thread] Current Thread [Next in Thread>