Avoiding PCI Resource allocation and PCI Bus filter driver

Discussion in 'Windows Vista Drivers' started by Vasudevan Srinivasan, Jun 22, 2008.

  1. 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
    EvtDeviceResourceRequirementsQuery in WDF?) and alter the resource

    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

    Vasudevan Srinivasan, Jun 22, 2008
    1. Advertisements

  2. Vasudevan Srinivasan

    Pavel A. Guest

    Have you tried to specify a resources override in your INF?

    Pavel A., Jun 22, 2008
    1. Advertisements

  3. Then PCI.SYS seems to check that it's getting correct number of BARs in
    Alexander Grigoriev, Jun 22, 2008
  4. 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...

    Vasudevan Srinivasan, Jun 22, 2008
  5. if you want to modify the resource list back to its original form, you can
    do so in EvtDeviceFilterAddResourceRequirements

    Doron Holan [MSFT], Jun 23, 2008
  6. Vasudevan Srinivasan

    Tim Roberts Guest

    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, Jun 24, 2008
  7. 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.

    Vasudevan Srinivasan, Jun 24, 2008
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.