Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

errors porting a KMDF WinXP driver (6000) to Win7 (Win7 RC WDK)

7 views
Skip to first unread message

BryanBu

unread,
Jul 1, 2009, 6:56:01 PM7/1/09
to

I have a WDK KMDF that works fine in WinXP. Built using WDK 6000. Since Win7
is coming out I tested the driver in Win7 RC and the device manager reported
a code 10 start error.

So I updated my WDK to the Win7 WDK and edited all of my builds, inf files,
etc. to reflect the kmdf 1.9, paths, and all of that jazz. The driver builds
okay now. However, it is still reporting the same error in Win 7 RC.

Using DbgView and WinDbg I have found that the driver in Win7 has a long
delay after the fdoCallbacks.EvtDeviceRemoveAddedResources and then goes into
fdoAttributes.EvtCleanupCallback. I don't have much of an idea of what is
going on in the WDF outside of my driver there...

In WinXP after the fdoCallbacks.EvtDeviceRemoveAddedResources, the WDF calls
my pnpPowerCallbacks.EvtDevicePrepareHardware right away and everything goes
swimmingly.

Any ideas? I am installing a checked Win7 RC right now... all my tests have
been on a free build kernel.

Brandon Wilson [MSFT]

unread,
Jul 1, 2009, 7:40:06 PM7/1/09
to

Is your driver returning an error from it's EvtDeviceRemoveAddedResources?

In general it is a good idea to run "!wdflogdump <your driver name>" in
windbg at the latest point you know your driver is loaded and look for
anything suspicious in the log. Running this command from
EvtCleanupCallback should be late enough in the sequence that the relevant
errors will have already occurred and will appear in the log.

Brandon

"BryanBu" <Bry...@discussions.microsoft.com> wrote in message
news:4E0F55E4-2E29-4C7A...@microsoft.com...

BryanBu

unread,
Jul 2, 2009, 5:01:03 PM7/2/09
to

Vary helpful. Thanks. Now using the wdfkd extension win windbg. Checked build
helped out a bunch too as it broke on the assert. Will post my final issue,
but the error is an INVALID_PARAMETER (CmResourceTypeMemory for
descriptor.Type, got to go make sure and gather more info)... so hopefully I
should track it down soon.

Any more thoughts on the issue would be helpful, but I will continue
pursuing. Thanks so far.

BryanBu

unread,
Jul 9, 2009, 11:58:01 AM7/9/09
to

Heres the driver windbg stuff on a checked win7.

0: kd> g
Assertion: (startResource->Type == CmResourceTypeNull) ||
(startResource->Type == Device->Requirements.ByIndex[index].Type) ||
((startResource->Type == CmResourceTypeMemoryLarge) &&
(Device->Requirements.ByIndex[index].Type == CmResourceTypeMemory)) ||
((startResource->Type == CmResourceTypeMemory) &&
(Device->Requirements.ByIndex[index].Type == CmResourceTypeMemoryLarge))
pci!PciProcessStartResources+0x1fc:
8937dd4e cd2c int 2Ch
.
0: kd> !wdflogdump gefvmedrv
...
--- start of log ---
1: FxPkgPnp::PnpEnterNewState - WDFDEVICE 0x78D57B30 !devobj 0x872C6EB0
entering PnP State WdfDevStatePnpInit from WdfDevStatePnpObjectCreated
2: FxIoTargetRemote::Open - ZwCreateFile for WDFIOTARGET 78D394D8 returned
status STATUS_SUCCESS, info 0x0
3: FxDevice::_AllocAndQueryProperty - Could not retrieve property 3 length,
0xc0000034(STATUS_OBJECT_NAME_NOT_FOUND)
4: FxPkgPnp::Dispatch - WDFDEVICE 0x78D57B30 !devobj 0x872C6EB0, IRP_MJ_PNP,
0x00000000(IRP_MN_START_DEVICE) IRP 0x88F691B8
5: FxPkgPnp::PnpEnterNewState - WDFDEVICE 0x78D57B30 !devobj 0x872C6EB0
entering PnP State WdfDevStatePnpInitStarting from WdfDevStatePnpInit
---- end of log ----
0: kd> g
BugCheck 7E, {c0000420, 8937dd4e, 8c323630, 8c323160}

Also, here is an earlier run in the same environment. I dont think it BSODed
this time...
--- start of log ---
1: FxPkgPnp::PnpEnterNewState - WDFDEVICE 0x78CBCFE8 !devobj 0x87345030
entering PnP State WdfDevStatePnpInit from WdfDevStatePnpObjectCreated
2: FxIoTargetRemote::Open - ZwCreateFile for WDFIOTARGET 78CC6138 returned
status 0xc0000034(STATUS_OBJECT_NAME_NOT_FOUND), info 0x8928f5b8
3: FxIoTargetRemote::ClearTargetPointers - WDFIOTARGET 78CC6138 cleared
pointers 8C30F318 state WdfIoTargetClosed, open state 1, pdo 00000000,
fileobj 00000000, handle 00000000
4: FxIoTargetRemote::ClearTargetPointers - WDFIOTARGET 78CC6138 cleared
pointers 8C30F36C state WdfIoTargetDeleted, open state 1, pdo 00000000,
fileobj 00000000, handle 00000000
5: FxIoTarget::WaitForDisposeEvent - WDFIOTARGET 78CC6138, Waiting on
Dispose event 8C30F340
6: FxPkgPnp::Dispatch - WDFDEVICE 0x78CBCFE8 !devobj 0x87345030, IRP_MJ_PNP,
0x00000000(IRP_MN_START_DEVICE) IRP 0x88A555E8
7: FxPkgPnp::PnpEnterNewState - WDFDEVICE 0x78CBCFE8 !devobj 0x87345030
entering PnP State WdfDevStatePnpInitStarting from WdfDevStatePnpInit
8: FxPkgFdo::_PnpStartDeviceCompletionRoutine - PNP start failed with
0xc000000d(STATUS_INVALID_PARAMETER)
9: FxPkgPnp::PnpEnterNewState - WDFDEVICE 0x78CBCFE8 !devobj 0x87345030
entering PnP State WdfDevStatePnpInit from WdfDevStatePnpInitStarting
10: FxPkgPnp::Dispatch - WDFDEVICE 0x78CBCFE8 !devobj 0x87345030,
IRP_MJ_PNP, 0x00000002(IRP_MN_REMOVE_DEVICE) IRP 0x88A555E8
11: FxPkgPnp::PnpEnterNewState - WDFDEVICE 0x78CBCFE8 !devobj 0x87345030
entering PnP State WdfDevStatePnpRemoved from WdfDevStatePnpInit
12: FxChildList::NotifyDeviceRemove - WDFCHILDLIST 7332D540: removing
children
13: FxPkgPnp::PnpEnterNewState - WDFDEVICE 0x78CBCFE8 !devobj 0x87345030
entering PnP State WdfDevStatePnpRemovedChildrenRemoved from
WdfDevStatePnpRemoved
14: FxPkgPnp::PnpEnterNewState - WDFDEVICE 0x78CBCFE8 !devobj 0x87345030
entering PnP State WdfDevStatePnpFdoRemoved from
WdfDevStatePnpRemovedChildrenRemoved
15: FxPkgIo::StopProcessingForPower - Perform
FxIoStopProcessingForPowerPurgeNonManaged for all queues of WDFDEIVCE
0x78CBCFE8
16: FxSelfManagedIoMachine::ProcessEvent - WDFDEVICE 0x78CBCFE8 !devobj
0x87345030 entering self managed io state FxSelfManagedIoFinal from
FxSelfManagedIoCreated
17: FxIoTarget::WaitForDisposeEvent - WDFIOTARGET 78DD89E0, Waiting on
Dispose event 8C32777C
18: FxPkgPnp::PnpEnterNewState - WDFDEVICE 0x78CBCFE8 !devobj 0x87345030
entering PnP State WdfDevStatePnpFinal from WdfDevStatePnpFdoRemoved
19: FxPkgPnp::_PnpRemoveDevice - WDFDEVICE 78CBCFE8, !devobj 87345030
waiting for remove event to finish processing
20: FxDevice::Destroy - Deleting !devobj 87345030, WDFDEVICE 78CBCFE8,
attached to !devobj 87DF3B18
21: FxDriver::Unload - WDFDRIVER 733B86E0, PDRIVER_OBJECT 8CD3A158
---- end of log ----

0 new messages