PLxPrepareHardware is failing due to unrecognized memory resource

Hi All,

I am newbie in Windows driver development. I am trying to write a KMDF driver for my custom PCIe FPGA hardware. I chosen PLX9x5x project as a reference.
When I try to install the driver it fails at **PLxPrepareHardware **function as the **CmResourceTypeMemory **length is not matching.

There are 3 memory resourced found in my PCIe hardware but no one is getting recognized.
Below are messages from trace event log.

00000014 PCIComm 4 124 2 14 12\26\2022-17:18:17:61 - Memory Resource [FE4F0000-FE500000]
00000016 PCIComm 4 124 2 16 12\26\2022-17:18:17:61 - Memory Resource [FE4E0000-FE4F0000]
00000018 PCIComm 4 124 2 18 12\26\2022-17:18:17:61 - Memory Resource [FE4D0000-FE4E0000]
00000019 PCIComm 4 124 2 19 12\26\2022-17:18:17:61 PLxMapResources: Missing resources

Basically PLX driver is looking for the (desc->u.Memory.Length == 0x200) condition to proceed further. But my device is returning the length 0x10000 which is the reason for driver failure.

** 00000017 PCIComm 4 124 2 17 12\26\2022-17:18:17:61 - Memory Resource length = [10000]**

I know this is very basic thing to ask but as I am totally new in windows driver development, please guide me how to proceed further.

Best
Lakshmi

Well, yes. The PLX9x5x driver is just a sample, showing how to handle one specific configuration of one specific chip. Your job is to modify the sample to drive your hardware, which is obviously different… The PLX9x5x they were using has 2 BARs of 128k bytes and 1 BAR of 512 bytes for the registers. Your chip has three BARS of 64k.

By the way, you have to KNOW what those 3 BARs are for. Are those three different sets of registers? Is it memory space? Every PCI device is different. Your hardware guys have to tell you what the BARs are for.