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/
I am trying to write my first driver for a PCI device using WDF.
I took the basic kmdf project template from Visual Studio, added a few relevant empty PNP callbacks, debug tracing and edited the .inf file to include the hardware id for the connected PCI device.
From the .inf file:
[Standard.NT$ARCH$] %cvbkmd.DeviceDesc%=cvbkmd_Device, PCI\VEN_1172&DEV_424F; hw-id
Once I install the driver via the devcon tool, I can see something weird happening:
After a few hiccups in device manager, I can see 2 device instances under the same device class. one is a software driver (sits under ROOT) and the other is a proper PCI device.
Watching the driver debug traces in TraceView, I can see that all device event callbacks are called twice. once for each enumerator. when they are called with by the PCI enumerator, I get the parameters I expect from the PCI device. For example EVT_WDF_DEVICE_PREPARE_HARDWARE callback is called once with an empty TranlatedResources list and once with the PCI device resources as I would expect.
I tried to perform a windows restore and re-install the driver, but the problem still exists.
So what can cause my device being installed under ROOT?
|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!|
|Developing Minifilters||24 May 2021||Live, Online|
|Writing WDF Drivers||14 June 2021||Live, Online|
|Internals & Software Drivers||27 September 2021||Live, Online|
|Kernel Debugging||TBD 2021||Live, Online|