Newsgroups: comp.os.linux
Subject: Re: Linux 0.97 PL 6 detecting bogus bus mice
From: Greg Wettstein <NU013809@NDSUVM1.BITNET>
Date: Monday, 28 Sep 1992 09:40:41 CDT
Organization: North Dakota Higher Education Computer Network

With everyone talking about problems with mice under LINUX(c) I thought
that it would be an appropriate time for a few comments from my own
investigations.

The problem our research group is faced with is the support of the mouse
which is supplied with Gatewayy 2000's, specifically the 80386sx's with
the TI motherboards.  These machines come with a Microsoft mouse which is
labelled on the bottom as: 'PS/2 compatible mouse'.  I was overjoyed
when 0.97-pL4 came out purporting to have support for PS/2 mice.
Unfortunately these machines do not recognize these mice at bootup.

I looked into the source code of the kernel to determine what is happening.
The detection of the PS/2 is attempted in the init.s code.  Anybody who
is interested can find the assembly code all in one block with an
appropriate comment on what is being attempted.

In a nutshell here is what is happening.  In init.s the machine is still
running in real mode so access to the BIOS is available.  The first thing
that the code does is execute a BIOS 0x11 interrupt which is a get
equipment list call.  Bit two of the returned value is examined which is
set if a PS/2 mouse is detected.  On these machines the failure occurs
at this point because the BIOS does not know that a PS/2 mouse is
installed.  In order to get this functionality the DOS program mouse.com
(or some such name) must be installed.  This program is one of the things
that typically get supplied by the vendor for a particular computer.

What happens from this point forward is not critical.  Without the mouse
support loaded the init code will not be able to perform various
initialization procedures conducted from that point forward.  The upshot
of all this is that a global kernel variable does not get set.  When
the ps2_mouse_init (or some such thing) gets called as part of the driver
initialization the abscence of this variable getting set causes the kernel
not to recognize the mouse.

I have to get off this machine because it does not recognize any type of
backspace key.  If someone wants to pursue this through e-mail lets
continue there.

Before I leave I should mention that someone was kind enough to send me
an excerpt from the Mach code which knows how to handle PS/2 style mice.
This week I hope to spend some time figuring out how to write to the
appropriate registers to detect and initialize these rascals.  By
dropping this code into the init.s code we should be able to get support
for these mice up and running.

There may be an additiona l problem however.  These mice (even though
they are labelled Microsoft) may be speaking a different protocol than
serial Microsoft mice.  Zorst mayde a reference to the Xfree version of
the server providing support for the PS/2 mouse protocol in an upcoming
release.  Since I cannot talk to these things yet I have no idea what
the ramifications will be in this area.  God I hate mainframes.....

                            As always,
                            Dr. G.W. Wettstein
                            Oncology Research Division Computing Facility
                            Fargo Clinic / MeritCare

                            UUCP: uunet!plains!wind!greg
                            INTERNET: greg%wind.uucp@plains.nodak.edu
                            Phone: 7001-234-2833

`The truest mark of a man's wisdom is his ability to listen to other
 men expound their wisdom.'