Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Home NTDEV

Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


PLxPrepareHardware is failing due to unrecognized memory resource

siriembeddedsiriembedded Member Posts: 1

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

Comments

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 14,445

    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.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Kernel Debugging 30 January 2023 Live, Online
Developing Minifilters 20 March 2023 Live, Online
Internals & Software Drivers 17 April 2023 Live, Online
Writing WDF Drivers 22 May 2023 Live, Online