Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > errors porting a KMDF WinXP driver (6000) to Win7 (Win7 RC WDK)

Reply
Thread Tools Display Modes

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

 
 
BryanBu
Guest
Posts: n/a

 
      07-01-2009

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.
 
Reply With Quote
 
 
 
 
Brandon Wilson [MSFT]
Guest
Posts: n/a

 
      07-01-2009

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" <> wrote in message
news:4E0F55E4-2E29-4C7A-AB75-...
> 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.


 
Reply With Quote
 
BryanBu
Guest
Posts: n/a

 
      07-02-2009

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.

"Brandon Wilson [MSFT]" wrote:

> 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" <> wrote in message
> news:4E0F55E4-2E29-4C7A-AB75-...
> > 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.

>
>

 
Reply With Quote
 
BryanBu
Guest
Posts: n/a

 
      07-09-2009

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:ispatch - 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:ispatch - 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:ispatch - 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:estroy - Deleting !devobj 87345030, WDFDEVICE 78CBCFE8,
attached to !devobj 87DF3B18
21: FxDriver::Unload - WDFDRIVER 733B86E0, PDRIVER_OBJECT 8CD3A158
---- end of log ----
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiboot Win7, uninstall later? DesoShade Windows Vista Installation 8 05-13-2009 11:34 PM
WinMail under Win7 RC Rainald Taesler Windows Vista Mail 1 05-13-2009 08:30 PM
1394 driver installation problem on Win7 Devan Stormont Windows Vista Drivers 0 03-31-2009 05:05 PM
POP3 email in Win7 rickkar Windows Vista Mail 5 03-29-2009 02:19 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59