Hi,
I have a problem with writing a driver for legacy non-PnP ISA board that
would run under Windows 2K. I tried to make it a WDM driver, but I don’t
know how to allocate resources for it and how to properly create the
DEVICE_OBJECT for my device.
-
Negotiating hardware resources (IO port range and an interrupt) - how
(and where in the driver lifecycle) should I report resources used by my
driver to Windows, what to do to assign the resources to my device object?
1.1. How hardware resources get translated in WDM/Win2k - for example in
NT i called the HalGetInterruptVector() routine to map the physical
interrupt info to logical. How is this achieved in Win2k? What should I do
to install ISR and access I/O ports? -
The PnP support in Windows automatically creates PDOs for all devices
it finds when enumerating system buses. But since my hardware is non-PnP,
it doesn’t get enumerated therefore I have no PDO for it. How should I
create the device object (FDO), how to attach it to a PDO?
Currently I’m using IoCreateDevice() call in the DriverEntry routine, but
this is not a WDM-way of creating FDOs. WDM model instructs to create FDO
in DriverAdd() routine, but in my driver this routine gets executed only
after I create the device object by calling IoCreateDevice() from
DriverEntry() (so there is no point in calling IoCreateDevice second time
from the DriverAdd routine)?
Many thanks in advance, any hints will be useful since I have no source of
reliable information on these subjects. Maybe you happen to have some
examples you could share…
Best regards,
Rafal Gwizdala