Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Avoiding PCI Resource allocation and PCI Bus filter driver

2 views
Skip to first unread message

Vasudevan Srinivasan

unread,
Jun 22, 2008, 3:27:12 AM6/22/08
to
I'm trying to avoid the pnp manager from allocating an MMIO resource for a
pci device even though the device has that resource available (There is no
IOBAR equivalent to this MMIO bar, but, I do not want this MMIO bar for the
device to be functional and this MMIO is not functioning as expected and
hence this requirement).

I tried handling the EvtDeviceFilterRemoveResourceRequirements in the
function driver and tried to remove the memory resource, but, the device
yellow banged in device manager.

I also read from the forums and WDK documentation that a bus filter driver
could handle the IRP_MN_QUERY_RESOURCE_REQUIREMENTS (
EvtDeviceResourceRequirementsQuery in WDF?) and alter the resource
requirements.

Question 1: Since my device is a PCI device (Bus X, Dev Y, Fn Z) that has
pci.sys as the bus driver, how do I install a bus filter driver for this
device? I need my function driver to install as well so would greatly
appreciate any pointers on how to setup the inf file for this filter driver
(I would prefer a separate inf file for this filter driver if possible, so I
can choose to install this filter or not). I'm assuming writing this filter
driver itself shouldn't be a big deal as it could be a regular WDF driver
that adds the specific PNP event handler that I need.

Question 2: Can I add this PDO event handler in my function driver itself?
If so, will it automatically get tied to the PDO that my function driver is
connecting to?

Appreciate any help/pointers that would allow me to remove the Memory BAR
allocation by the PNP Manager and still allow my function driver to load
fine.

Thanks,
Vasu.

Pavel A.

unread,
Jun 22, 2008, 6:15:11 AM6/22/08
to
Have you tried to specify a resources override in your INF?

--PA


"Vasudevan Srinivasan" <vas...@gmail.com> wrote in message
news:C4834CE0.2A19%vas...@gmail.com...

Alexander Grigoriev

unread,
Jun 22, 2008, 9:12:32 AM6/22/08
to
Then PCI.SYS seems to check that it's getting correct number of BARs in
START_DEVICE.

"Vasudevan Srinivasan" <vas...@gmail.com> wrote in message
news:C4834CE0.2A19%vas...@gmail.com...

Vasudevan Srinivasan

unread,
Jun 22, 2008, 4:31:25 PM6/22/08
to
How can I specify a resource override to avoid allocating a resource? I
thought you can specify a resource override to shrink or specify legacy
addresses and such only...

Thanks,
Vasu.


On 6/22/08 3:15 AM, in article #5OriEF1...@TK2MSFTNGP04.phx.gbl, "Pavel

Doron Holan [MSFT]

unread,
Jun 23, 2008, 2:23:36 PM6/23/08
to
if you want to modify the resource list back to its original form, you can
do so in EvtDeviceFilterAddResourceRequirements

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"Alexander Grigoriev" <al...@earthlink.net> wrote in message
news:%23RyohmG...@TK2MSFTNGP06.phx.gbl...

Tim Roberts

unread,
Jun 23, 2008, 11:57:11 PM6/23/08
to
Vasudevan Srinivasan <vas...@gmail.com> wrote:
>
>I'm trying to avoid the pnp manager from allocating an MMIO resource for a
>pci device even though the device has that resource available (There is no
>IOBAR equivalent to this MMIO bar, but, I do not want this MMIO bar for the
>device to be functional and this MMIO is not functioning as expected and
>hence this requirement).
>
>I tried handling the EvtDeviceFilterRemoveResourceRequirements in the
>function driver and tried to remove the memory resource, but, the device
>yellow banged in device manager.

If you own the function driver, as the last sentence implies, then why
can't you just modify the driver to ignore the resource? No one else is
going to try to access your memory space.
--
Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.

Vasudevan Srinivasan

unread,
Jun 24, 2008, 12:05:31 AM6/24/08
to
Well, I'm trying to workaround a hardware issue and I cannot ignore the
resource per se.. I'll have to prevent the OS from allocating it.

Thanks,
Vasu.


On 6/23/08 8:57 PM, in article s1s064d7mhp3gr30i...@4ax.com,

0 new messages