hi,
I now have a flawed PCIe card, which has its BAR in PCI
configuration space write-only( what a stupid mistake ) while other
parts function well. The new one will only be ready months away. And I
have to live with the bug sometimes. The bug causes windows fail to
configure and allocate resources for the device. So I want to resume
the configuration and allocate the resources in my WDM function
driver. Is it OK to respond IRP_MN_QUERY_RESOURCE_REQUIREMENTS or use
the legacy IoAssignResource? Since this is for demo usage, and we can
tolerate most unstable, buggy or any other noises. Any wild ideas?
woodhead

Re: workaround for flawed PCIe device by Maxim

Maxim
Tue Aug 28 03:27:41 CDT 2007

Try MN_FILTER_RESOURCE_REQUIREMENTS

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com

"woodhead99" <woodhead99@gmail.com> wrote in message
news:1188280680.327018.9590@i13g2000prf.googlegroups.com...
> hi,
> I now have a flawed PCIe card, which has its BAR in PCI
> configuration space write-only( what a stupid mistake ) while other
> parts function well. The new one will only be ready months away. And I
> have to live with the bug sometimes. The bug causes windows fail to
> configure and allocate resources for the device. So I want to resume
> the configuration and allocate the resources in my WDM function
> driver. Is it OK to respond IRP_MN_QUERY_RESOURCE_REQUIREMENTS or use
> the legacy IoAssignResource? Since this is for demo usage, and we can
> tolerate most unstable, buggy or any other noises. Any wild ideas?
> woodhead
>


Re: workaround for flawed PCIe device by woodhead99

woodhead99
Fri Aug 31 07:48:03 PDT 2007

hi, max,
After some investigations into the PCI specs and MS white papers,
i learned that there are some memory window should be set in the pci
bridge where my device is attached. Fortunately the BIOS supports to
pre-allocate some memory resource even no device on that bus. More
exactly, the bridge is allocated a 4M memory space though my device
not configured. So i tried the following steps when winxp starts up:
1. look through the device manager for resources occupied by
the pci bridges, and locate the bridge my device connects to. i
determine the bridge of mine by connecting a card of an older workable
version and finding the bridge with the smallest memory window and
fully covering the memory resource assigned to the card.
2. find a physical address hole in the bridge memory window
that not used by other device, actually only my own device on the PCIe
link.
3. Configure-write to my device's BAR.
4. MmMapIoSpace to get a virtual address to that physical
address.
5. do some memory R/W at the address.

And finally endup with 0XFFFFFFFF. With CATC PCIe sniffer, no
memory-read/write signal reaches the card.
Somewhere must be blocked along the path from CPU to the device.
Any ideas?
woodhead


On 8 28 , 4 27 , "Maxim S. Shatskih" <ma...@storagecraft.com> wrote:
> Try MN_FILTER_RESOURCE_REQUIREMENTS
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> ma...@storagecraft.comhttp://www.storagecraft.com
>
> "woodhead99" <woodhea...@gmail.com> wrote in message

>
> news:1188280680.327018.9590@i13g2000prf.googlegroups.com...
>
> > hi,
> > I now have a flawed PCIe card, which has its BAR in PCI
> > configuration space write-only( what a stupid mistake ) while other
> > parts function well. The new one will only be ready months away. And I
> > have to live with the bug sometimes. The bug causes windows fail to
> > configure and allocate resources for the device. So I want to resume
> > the configuration and allocate the resources in my WDM function
> > driver. Is it OK to respond IRP_MN_QUERY_RESOURCE_REQUIREMENTS or use
> > the legacy IoAssignResource? Since this is for demo usage, and we can
> > tolerate most unstable, buggy or any other noises. Any wild ideas?
> > woodhead