There is a reg setting to tell i8042pr to ignore all device errors and
succeed a start, this allows you to do ps2 hotplug headless support for
servers etc. Note that this must be tested out ahead of time and can’t
be used for all hardware, the hardware must support it. Don’t ask me
why the d*mn server doesn’t have USB to fix this, that’s another story
:).
Anyways, if it can’t be detected as ps2 device (which is only a problem
on legacy non ACPI machines b/c ACPI machines pretty much hardcode the
devices into existence), it has no business being a ps2 device to begin
with.
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ray Trent
Sent: Monday, September 22, 2003 5:35 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: Load order problems with a legacy keyboard driver
I could be wrong, but it sounds like he’s saying that this keyboard
doesn’t get enumerated (strange, that). And that, therefore, i8042
doesn’t ever get an AddDevice for the keyboard.
It would be interesting to hear if there’s a way to cause i8042 to
pretend there’s a keyboard even when there “isn’t”, but on the other
hand, it’s also slightly terrifying to contemplate…
Doron Holan wrote:
On win2k and forward, you can’t rely on load order between a legacy
port
driver and kbdclass seeing it after it loads. You must either make
your
driver a boot driver or convert it into a pnp driver.
It sounds like your device is a ps2 device though; have you looked at
the kbdfiltr example in the ddk? That demonstrates how to create a
device upper filter which would allow you to filter that particular
device and not race with i8042prt as to who controls the registers and
the communication with the device.
D
This posting is provided “AS IS” with no warranties, and confers no
rights
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Trevor Bimler
Sent: Monday, September 22, 2003 5:27 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Load order problems with a legacy keyboard driver
A client recently asked me to write a device driver for W2K/WXP for an
application-specific keyboard which has the particularity of being
uni-directional, as a consequence of which it doesn’t get seen by the
PnP
enumerator, and i8042prt doesn’t get loaded to drive it.
As this was to be a quick-and-dirty job, I wrote a legacy driver which
is
installed as a keyboard port driver, as follows:
\Registry\Machine\System\CurrentControlSet\Services\CONSOLE
Type = REG_DWORD 0x00000001
Start = REG_DWORD 0x00000001
ErrorControl = REG_DWORD 0x00000001
Group = Keyboard Port
ImagePath=SYSTEM32\DRIVERS\CONSOLE.SYS
In its DriverEntry routine it creates an entry under
HKLM/HARDWARE/DEVICEMAP/KeyboardPort/KeyboardPort0
to let the keyboard class driver, KbdClass, know that there’s a legacy
keyboard driver to handle, after which it creates a device object and
registers a reinitialisation routine with .
>
> In the reinitialisation routine, which in theory is run after all
other
> drivers in the system load group have been loaded, I just try to
> register
> an interrupt handler for IRQ1 (the I8042 interrupt): if this succeeds
> then
> I know that i8042prt has not loaded - because the uni-directional
> keyboard
> is connected - and I manage the keyboard and send data off to
KbdClass.
> If
> it doesn’t succeed then i8042prt IS loaded so the device
autodestructs.
>
> So far so good, and it works on some installations on W2K. Following
> traces in the system log, I find that i8042prt gets loaded, then
> KbdClass,
> then - eventually - my driver. Then the reinitialisation routine in
> KbdClass gets called, it scans HKLM/HARDWARE/DEVICEMAP looking for any
> legacy devices, finds mine, and passes an
> IOCTL_INTERNAL_KEYBOARD_CONNECT
> IRP, from which point on all goes well.
>
> Unfortunately, on other installations, the above is NOT what happens.
> What
> does happen is that the reinitialisation routine in KbdClass gets
called
> before my driver is loaded, and so of course it never sees my driver.
> Which is a great shame.
>
> Does anyone have any ideas on this? I don’t really want to install my
> driver as a boot-load driver.
>
> Thanks in advance
> Trevor Bimler
> Upstart Ingenierie
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
–
…/ray..
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com