Resource Rebalancing

Hi,

We are writing a WDM driver on Windows Server 2008 for our PCI device. Our device has a 64 bit BAR whose size is a multiple of 32GB. The BIOS doesn’t enable this BAR by default and we’ll have to enable it dynamically by setting a particular bit in the PCI config space.
We are doing this in the AddDevice routine of our driver. Please let me know what is the procedure to get this BAR recognized by Windows.

I tried the following approach:
After the AddDevice routine completes, the PNP manager sends IRP_MN_FILTER_RESOURCE_REQUIREMENTS Irp. Here, I appended another resource
descriptor to the resource list which describes my new BAR. After completing this Irp, the PNP manager sends IRP_MN_START_DEVICE. While handling this Irp, I could see a resource descriptor for my new BAR using which I did MmMapIoSpace on the address range. When I tried installing the driver, Windows asked for a restart and when it came back up, the driver installation failed saying that there are no free resources available.
Can I know what the problem is?

I read about the resource rebalancing sequence and implemented the IRPs required to handle it. I know that to intiate the resource rebalancing sequence, I need to call IoInvalidateDeviceState routine. But where do I call this routine from?

Can somebody please help me solve this problem?

Regards,
AY

> We are writing a WDM driver on Windows Server 2008 for our PCI device.

Our device has a 64 bit BAR whose size is a multiple of 32GB. The BIOS
doesn’t enable this BAR by default and we’ll have to enable it
dynamically by setting a particular bit in the PCI config space.

We are doing this in the AddDevice routine of our driver. Please let
me know what is the procedure to get this BAR recognized by Windows.

Read this thread:

http://www.osronline.com/showThread.cfm?link=125433

A 32GB PCI BAR is probably not going to work.

Thanks Glen.

We are implementing a WDM driver on a 64-bit Windows Server 2008 machine. Hence physical address range (40 bit) should not be an issue and we are not bound by the Storport architecture.
Will Windows dynamic resource rebalancing solve this problem as the BIOS is not publishing the address range for this 32GB BAR? This dynamic publishing of 32GB BAR works fine on Linux with the same BIOS on the same hardware. Is there any way in which we can dynamically inform the PCI root bus driver about the new BAR so that the PNP manager detects the resource?

Also, please let me know when to call IoInvalidateDeviceState to initiate the resource rebalancing.

Thanks in advance,
AY

You’re still confusing 40-bit processor address space and the
chipset’s ability to forward cycles to the I/O busses.

The BIOS is the bottom line. It says which of those addresses get
forwarded. If you’ve tweaked the system to configure your device and
it actually worked, then you’ve got a busted BIOS. Windows isn’t
going to second-guess it, though.

  • Jake Oshins

wrote in message news:xxxxx@ntdev…
> Thanks Glen.
>
> We are implementing a WDM driver on a 64-bit Windows Server 2008
> machine. Hence physical address range (40 bit) should not be an
> issue and we are not bound by the Storport architecture.
> Will Windows dynamic resource rebalancing solve this problem as the
> BIOS is not publishing the address range for this 32GB BAR? This
> dynamic publishing of 32GB BAR works fine on Linux with the same
> BIOS on the same hardware. Is there any way in which we can
> dynamically inform the PCI root bus driver about the new BAR so that
> the PNP manager detects the resource?
>
> Also, please let me know when to call IoInvalidateDeviceState to
> initiate the resource rebalancing.
>
> Thanks in advance,
> AY
>