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?
It looks like you're new here. If you want to get involved, click one of these buttons!
|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 Mar 2020||OSR Seminar Space|
|Developing Minifilters||20 Apr 2020||LIVE ONLINE|
|Writing WDF Drivers||11 May 2020||LIVE ONLINE|
|Internals & Software Drivers||28 Sept 2020||Dulles, VA|