OK, we did that, and it worked, in as much as we got the IO addresses and
the interrupts that we forced in the inf in the resource list passed into
EvtDevicePrepareHardware. The trouble we're seeing now is that the BAR for
the Bus Master registers, which is programmed by the OS before the call,
isn't part of that resource list.
So the generic question is, how can I handle mixed PnP/Lgacy resources
without stepping outside of the KMDF model? If I were to dive into WDM, I'd
just allow the OS to pass me the single BAR for the BM registers, then claim
the IO ranges using IoReportResourceForDetection, and attach to the
interrupts using IoConnectInterrupt for vectors 14 and 15.
Is there a way to approximate the same process in KMDF? Is it a valid
pattern for a driver that isn't technically a bus driver (we don't expose
any child devices to the OS, each HBA is one monolithic dev to the OS) to
use the EvtDeviceResourceYYY routines to accomplish this? Is there a
callback that has the existing resources (the BM BAR) to which I can add the
additional legacy IO ranges and interrupts that I'm currently specifying in
the inf?
Thanks,
Phil
Philip D. Barila
Seagate Technology LLC
(720) 684-1842
As if I need to say it: Not speaking for Seagate.
"Doron Holan" wrote in message
news:xxxxx@ntdev...
You create a WDFINTERRUPT per hw interrupt you will be assigned. On the
start device irp processing (before EvtDevicePrepareHardware is called),
KMDF walks the list of assigned resources (the cm resource list) and
pairs up each created WDFINTERRUPT to a hw interrupt in the list. This
will automatically assign vector, etc based on the assigned resources.
KMDF doesn't care how the hw resources were assigned, if you forced them
through an INF, so be it.
d
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@seagate.com
Sent: Monday, May 14, 2007 12:33 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Is it possible to assign multiple interrupts to the
same WDFDEVICE?
We're doing a test/diag driver for legacy PCI-IDE hardware, which uses
the well known legacy IDE IO ranges and interrupts. Those of you
familiar with those animals know that they use IRQ 14 for the primary
IDE channel, and IRQ 15 for the secondary, even though they are one PCI
function.
I see that the WdfInterruptCreate() doc says that I should call it twice
for this hardware, I'm not sure I understand how that's going to get
hooked up to the interrupts I want, since I can't actually indicate
which interrupt vectors I want to grab. Is this the part that the PnP
manager just does automagically because I've put the required resources
in the INF?
Thanks,
Phil
Philip D. Barila
Seagate Technology LLC
(720) 684-1842