KMDF driver install issue

Hi,

I’ve been asked to re-visit a driver I wrote in 2004. It’s a filter driver for the ICH6/7 chipset and I need to add support for ICH9, which simply involves adding another PCI vendor/device ID to the INF file - or so I thought!

This driver simply refuses to load on Windows Embedded SP3 with an ICH9 chipset. I’ve searched the net for similar issues but the only mention I’ve found doesn’t appear to be a solution to my particular problem.

During installation it reports an error. An excerpt from the setupact.log file is as follows:

WdfCoInstaller: [11/05/2013 05:10.43.343] DIF_INSTALLDEVICE: Pre-Processing  
WdfCoInstaller: [11/05/2013 05:10.43.421] ReadComponents: WdfSection for Driver Service tcowdog using KMDF lib version Major 0x1, minor 0x7   
WdfCoInstaller: [11/05/2013 05:10.43.531] DIF_INSTALLDEVICE: Coinstaller version: 1.7.6001  
WdfCoInstaller: [11/05/2013 05:10.43.562] DIF_INSTALLDEVICE: KMDF in-memory version: 1.9.7600  
WdfCoInstaller: [11/05/2013 05:10.43.625] DIF_INSTALLDEVICE: KMDF on-disk version: 1.9.7600  
WdfCoInstaller: [11/05/2013 05:10.43.671] Service Wdf01000 is running  
WdfCoInstaller: [11/05/2013 05:10.43.750] DIF_INSTALLDEVICE: On-disk KMDF version is newer than or same as the version of the coinstaller. Update is not required  
WdfCoInstaller: [11/05/2013 05:10.44.812] DIF_INSTALLDEVICE: Post-Processing  
WdfCoInstaller: [11/05/2013 05:10.44.859] BootApplication: could not open service tcowdog, error error(1060) The specified service does not exist as an installed service.  
WdfCoInstaller: [11/05/2013 05:10.44.890] BootApplication: GetStartType error error(87) The parameter is incorrect.  
 Driver Service name tcowdog  
WdfCoInstaller: [11/05/2013 05:10.45.406] GetServiceKeyHandle: RegOpenKeyEx(HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\tcowdog)  
WdfCoInstaller: [11/05/2013 05:10.45.437] GetServiceKeyHandle failed: error(2) The system cannot find the file specified.  
WdfCoInstaller: [11/05/2013 05:10.45.484] GetDriverImageNameFromServiceName : GetServiceKeyHandle failed error: error(87) The parameter is incorrect.  
 serviceName tcowdog  
WdfCoInstaller: [11/05/2013 05:10.45.515] GenerateDriverServiceMarker: GetDriverImageNameFromServiceName failed: error(87) The parameter is incorrect.  
for service tcowdog  
WdfCoInstaller: [11/05/2013 05:10.45.765] GetServiceKeyHandle: RegOpenKeyEx(HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\tcowdog)  
WdfCoInstaller: [11/05/2013 05:10.45.843] GetServiceKeyHandle failed: error(2) The system cannot find the file specified.  
WdfCoInstaller: [11/05/2013 05:10.45.875] SetCoinstallerVersion: GetServiceKeyHandle failed: for service tcowdog  

And here is the INF file I’m using (which passes INFCHK with warnings about WDF sections not being checked):

;/\*++  
;  
;Copyright (c) 1990-1999 Microsoft Corporation All rights Reserved  
;  
;Module Name:  
;  
; tcowdog.INF  
;  
;Abstract:  
; INF file for installing ICH6/7/9 Watchdog  
; This file is dependant on tcowdog.inf  
;  
;--\*/  
  
[Version]  
Signature="$WINDOWS NT$"  
Class=  
ClassGuid={A73594DC-065A-409b-ACD1-246512C85CFD}  
Provider=%ATA%  
DriverVer=06/16/1999,5.00.2064  
CatalogFile=tcowdog.cat  
  
[DestinationDirs]  
DefaultDestDir = 12  
  
; ================= Class section =====================  
  
[ClassInstall32]  
Addreg=  
  
[[removed[]  
HKR,,,0,%ClassName%  
HKR,,Icon,,-5  
HKR,,DeviceCharacteristics,0x10001,0x100 ;Use same security checks on relative opens  
HKR,,Security,,"D:P(A;;GA;;;SY)(A;;GA;;;BA)" ;Allow generic all access to system and built-in Admin.   
  
;\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
; ICH6 Device Filter Install Section  
;\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
  
[Manufacturer]  
%ATA%=ATA,NT$ARCH$  
  
; For Win2K  
[ATA]  
; DisplayName Section DeviceId  
; ----------- ------- --------  
%Ich6Wdog.DeviceDesc%=TCOWdog, PCI\VEN_8086&DEV_2640  
%Ich7Wdog.DeviceDesc%=TCOWdog, PCI\VEN_8086&DEV_27B9  
%Ich9Wdog.DeviceDesc%=TCOWdog, PCI\VEN_8086&DEV_2930  
  
; For XP and later  
[ATA.NT$ARCH$]  
%Ich6Wdog.DeviceDesc%=TCOWdog, PCI\VEN_8086&DEV_2640  
%Ich7Wdog.DeviceDesc%=TCOWdog, PCI\VEN_8086&DEV_27B9  
%Ich9Wdog.DeviceDesc%=TCOWdog, PCI\VEN_8086&DEV_2930  
  
[TCOWdog.NT]   
CopyFiles=TCOWdog.NT.Copy  
  
[TCOWdog.NT.Copy]  
tcowdog.sys  
  
[TCOWdog.NT.HW]  
AddReg = TCOWdog.NT.HW.AddReg  
  
[TCOWdog.NT.HW.AddReg]   
HKR,,"UpperFilters",0x00010000,"tcowdog"  
  
;\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
; TCOWDOG Filter Service Section  
;\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
  
[TCOWdog.NT.Services]  
;Do not specify SPSVCINST_ASSOCSERVICE on filter drivers.   
AddService = tcowdog,, tcowdog_Service_Inst   
  
[tcowdog_Service_Inst]  
DisplayName = %tcowdog.SvcDesc%   
ServiceType = 1 ; SERVICE_KERNEL_DRIVER  
StartType = 3 ; SERVICE_DEMAND_START  
ErrorControl = 1 ; SERVICE_ERROR_NORMAL  
ServiceBinary = %12%\tcowdog.sys   
  
;\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
; Source file information  
;\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
  
[SourceDisksNames]  
1 = %DiskId1%,,,""  
  
[SourceDisksFiles]  
tcowdog.sys = 1,,  
  
;  
;--- ToasterFilter Coinstaller installation ------  
;  
[DestinationDirs]  
TCOWdog_CoInstaller_CopyFiles = 11  
  
[TCOWdog.NT.CoInstallers]  
AddReg=TCOWdog_CoInstaller_AddReg  
CopyFiles=TCOWdog_CoInstaller_CopyFiles  
  
[TCOWdog_CoInstaller_AddReg]  
HKR,,CoInstallers32,0x00010000, "WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll,WdfCoInstaller"  
  
[TCOWdog_CoInstaller_CopyFiles]  
WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll  
  
[SourceDisksFiles]  
WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll=1 ; make sure the number matches with SourceDisksNames  
  
[TCOWdog.NT.Wdf]  
KmdfService = tcowdog, tcowdog_wdfsect  
[tcowdog_wdfsect]  
KmdfLibraryVersion = $KMDFVERSION$  
  
[Strings]  
SPSVCINST_ASSOCSERVICE= 0x00000002  
ATA = ""  
ClassName = ""  
  
DiskId1 = " Install Disk"  
Ich6Wdog.DeviceDesc = "(ICH6) TCO Watchdog"  
Ich7Wdog.DeviceDesc = "(ICH7) TCO Watchdog"  
Ich9Wdog.DeviceDesc = "(ICH9) TCO Watchdog"  
tcowdog.SvcDesc = "TCO Watchdog Driver"  

Any hints would be greatly appreciated!?! I’m at my wits end!

Nothing in the posted log is an error. Look at setupapi.act.log to see the real error

d

Bent from my phone


From: markm@vl.com.aumailto:markm
Sent: ?11/?4/?2013 9:26 PM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: [ntdev] KMDF driver install issue

Hi,

I’ve been asked to re-visit a driver I wrote in 2004. It’s a filter driver for the ICH6/7 chipset and I need to add support for ICH9, which simply involves adding another PCI vendor/device ID to the INF file - or so I thought!

This driver simply refuses to load on Windows Embedded SP3 with an ICH9 chipset. I’ve searched the net for similar issues but the only mention I’ve found doesn’t appear to be a solution to my particular problem.

During installation it reports an error. An excerpt from the setupact.log file is as follows:

<br>WdfCoInstaller: [11/05/2013 05:10.43.343] DIF_INSTALLDEVICE: Pre-Processing<br>WdfCoInstaller: [11/05/2013 05:10.43.421] ReadComponents: WdfSection for Driver Service tcowdog using KMDF lib version Major 0x1, minor 0x7<br>WdfCoInstaller: [11/05/2013 05:10.43.531] DIF_INSTALLDEVICE: Coinstaller version: 1.7.6001<br>WdfCoInstaller: [11/05/2013 05:10.43.562] DIF_INSTALLDEVICE: KMDF in-memory version: 1.9.7600<br>WdfCoInstaller: [11/05/2013 05:10.43.625] DIF_INSTALLDEVICE: KMDF on-disk version: 1.9.7600<br>WdfCoInstaller: [11/05/2013 05:10.43.671] Service Wdf01000 is running<br>WdfCoInstaller: [11/05/2013 05:10.43.750] DIF_INSTALLDEVICE: On-disk KMDF version is newer than or same as the version of the coinstaller. Update is not required<br>WdfCoInstaller: [11/05/2013 05:10.44.812] DIF_INSTALLDEVICE: Post-Processing<br>WdfCoInstaller: [11/05/2013 05:10.44.859] BootApplication: could not open service tcowdog, error error(1060) The specified service does not exist as an installed service.<br>WdfCoInstaller: [11/05/2013 05:10.44.890] BootApplication: GetStartType error error(87) The parameter is incorrect.<br> Driver Service name tcowdog<br>WdfCoInstaller: [11/05/2013 05:10.45.406] GetServiceKeyHandle: RegOpenKeyEx(HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\tcowdog)<br>WdfCoInstaller: [11/05/2013 05:10.45.437] GetServiceKeyHandle failed: error(2) The system cannot find the file specified.<br>WdfCoInstaller: [11/05/2013 05:10.45.484] GetDriverImageNameFromServiceName : GetServiceKeyHandle failed error: error(87) The parameter is incorrect.<br> serviceName tcowdog<br>WdfCoInstaller: [11/05/2013 05:10.45.515] GenerateDriverServiceMarker: GetDriverImageNameFromServiceName failed: error(87) The parameter is incorrect.<br>for service tcowdog<br>WdfCoInstaller: [11/05/2013 05:10.45.765] GetServiceKeyHandle: RegOpenKeyEx(HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\tcowdog)<br>WdfCoInstaller: [11/05/2013 05:10.45.843] GetServiceKeyHandle failed: error(2) The system cannot find the file specified.<br>WdfCoInstaller: [11/05/2013 05:10.45.875] SetCoinstallerVersion: GetServiceKeyHandle failed: for service tcowdog<br>

And here is the INF file I’m using (which passes INFCHK with warnings about WDF sections not being checked):

<br>;/*++<br>;<br>;Copyright (c) 1990-1999 Microsoft Corporation All rights Reserved<br>;<br>;Module Name:<br>;<br>; tcowdog.INF<br>;<br>;Abstract:<br>; INF file for installing ICH6/7/9 Watchdog<br>; This file is dependant on tcowdog.inf<br>;<br>;--*/<br><br>[Version]<br>Signature="$WINDOWS NT$"<br>Class=<br>ClassGuid={A73594DC-065A-409b-ACD1-246512C85CFD}<br>Provider=%ATA%<br>DriverVer=06/16/1999,5.00.2064<br>CatalogFile=tcowdog.cat<br><br>[DestinationDirs]<br>DefaultDestDir = 12<br><br>; ================= Class section =====================<br><br>[ClassInstall32]<br>Addreg=<br><br>[[removed[]<br>HKR,,,0,%ClassName%<br>HKR,,Icon,,-5<br>HKR,,DeviceCharacteristics,0x10001,0x100 ;Use same security checks on relative opens<br>HKR,,Security,,"D:P(A;;GA;;;SY)(A;;GA;;;BA)" ;Allow generic all access to system and built-in Admin.<br><br>; *****************************************<br>; ICH6 Device Filter Install Section<br>;***************************************** <br><br>[Manufacturer]<br>%ATA%=ATA,NT$ARCH$<br><br>; For Win2K<br>[ATA]<br>; DisplayName Section DeviceId<br>; ----------- ------- --------<br>%Ich6Wdog.DeviceDesc%=TCOWdog, PCI\VEN_8086&amp;DEV_2640<br>%Ich7Wdog.DeviceDesc%=TCOWdog, PCI\VEN_8086&amp;DEV_27B9<br>%Ich9Wdog.DeviceDesc%=TCOWdog, PCI\VEN_8086&amp;DEV_2930<br><br>; For XP and later<br>[ATA.NT$ARCH$]<br>%Ich6Wdog.DeviceDesc%=TCOWdog, PCI\VEN_8086&amp;DEV_2640<br>%Ich7Wdog.DeviceDesc%=TCOWdog, PCI\VEN_8086&amp;DEV_27B9<br>%Ich9Wdog.DeviceDesc%=TCOWdog, PCI\VEN_8086&amp;DEV_2930<br><br>[TCOWdog.NT]<br>CopyFiles=TCOWdog.NT.Copy<br><br>[TCOWdog.NT.Copy]<br>tcowdog.sys<br><br>[TCOWdog.NT.HW]<br>AddReg = TCOWdog.NT.HW.AddReg<br><br>[TCOWdog.NT.HW.AddReg]<br>HKR,,"UpperFilters",0x00010000,"tcowdog"<br><br>; *****************************************<br>; TCOWDOG Filter Service Section<br>;***************************************** <br><br>[TCOWdog.NT.Services]<br>;Do not specify SPSVCINST_ASSOCSERVICE on filter drivers.<br>AddService = tcowdog,, tcowdog_Service_Inst<br><br>[tcowdog_Service_Inst]<br>DisplayName = %tcowdog.SvcDesc%<br>ServiceType = 1 ; SERVICE_KERNEL_DRIVER<br>StartType = 3 ; SERVICE_DEMAND_START<br>ErrorControl = 1 ; SERVICE_ERROR_NORMAL<br>ServiceBinary = %12%\tcowdog.sys<br><br>; *************************<br>; Source file information<br>;************************* <br><br>[SourceDisksNames]<br>1 = %DiskId1%,,,""<br><br>[SourceDisksFiles]<br>tcowdog.sys = 1,,<br><br>;<br>;--- ToasterFilter Coinstaller installation ------<br>;<br>[DestinationDirs]<br>TCOWdog_CoInstaller_CopyFiles = 11<br><br>[TCOWdog.NT.CoInstallers]<br>AddReg=TCOWdog_CoInstaller_AddReg<br>CopyFiles=TCOWdog_CoInstaller_CopyFiles<br><br>[TCOWdog_CoInstaller_AddReg]<br>HKR,,CoInstallers32,0x00010000, "WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll,WdfCoInstaller"<br><br>[TCOWdog_CoInstaller_CopyFiles]<br>WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll<br><br>[SourceDisksFiles]<br>WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll=1 ; make sure the number matches with SourceDisksNames<br><br>[TCOWdog.NT.Wdf]<br>KmdfService = tcowdog, tcowdog_wdfsect<br>[tcowdog_wdfsect]<br>KmdfLibraryVersion = $KMDFVERSION$<br><br>[Strings]<br>SPSVCINST_ASSOCSERVICE= 0x00000002<br>ATA = ""<br>ClassName = ""<br><br>DiskId1 = " Install Disk"<br>Ich6Wdog.DeviceDesc = "(ICH6) TCO Watchdog"<br>Ich7Wdog.DeviceDesc = "(ICH7) TCO Watchdog"<br>Ich9Wdog.DeviceDesc = "(ICH9) TCO Watchdog"<br>tcowdog.SvcDesc = "TCO Watchdog Driver"<br>

Any hints would be greatly appreciated!?! I’m at my wits end!


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx></mailto:markm>

Thanks (once again) Doran!

I’m not clear on the actual error that’s causing the issue:

E360 (Error 0xe000022f) is ambiguous - is it ignored or failing?

Here’s an excerpt from the setupapi.log:

#E360 An unsigned or incorrectly signed file “p:\m7i\so\amigo\tcowdog.inf” for driver “(ICH9) TCO Watchdog” will be installed (Policy=Ignore). Error 0xe000022f: The third-party INF does not contain digital signature information.
#W187 Install failed, attempting to restore original files.
#E360 An unsigned or incorrectly signed file “p:\m7i\so\amigo\tcowdog.inf” for driver “(ICH9) TCO Watchdog” will be installed (Policy=Ignore). Error 0xe000022f: The third-party INF does not contain digital signature information.
#-166 Device install function: DIF_REGISTER_COINSTALLERS.
#I056 Coinstallers registered.
#-166 Device install function: DIF_INSTALLINTERFACES.
#-011 Installing section [DriverInstall.NTx86.Interfaces] from “p:\m7i\so\amigo\tcowdog.inf”.
#I054 Interfaces installed.
#-166 Device install function: DIF_INSTALLDEVICE.
#I123 Doing full install of “PCI\VEN_8086&DEV_2930&SUBSYS_29308086&REV_03\3&11583659&0&FB”.
#E360 An unsigned or incorrectly signed file “p:\m7i\so\amigo\tcowdog.inf” for driver “(ICH9) TCO Watchdog” will be installed (Policy=Ignore). Error 0xe000022f: The third-party INF does not contain digital signature information.
#-035 Processing service Add/Delete section [DriverInstall.NTx86.Services].
#E275 Error while installing services. Error 0xe0000219: The installation failed because a function driver was not specified for this device instance.
#E122 Device install failed. Error 0xe0000219: The installation failed because a function driver was not specified for this device instance.
#E157 Default installer failed. Error 0xe0000219: The installation failed because a function driver was not specified for this device instance.
#W422 Coinstaller 1 (Post Processing) modified status. No Error.

It would appear that the signing is a red herring (I’ve signed it and the error goes away).

The remaining error in setupapi.log appears to be:

#E275 Error while installing services. Error 0xe0000219: The installation failed because a function driver was not specified for this device instance.
#E122 Device install failed. Error 0xe0000219: The installation failed because a function driver was not specified for this device instance.
#E157 Default installer failed. Error 0xe0000219: The installation failed because a function driver was not specified for this device instance.

What does this mean? This is a filter driver, and has been used successfully when attached to ICH7 chipsets (Intel 82801 GBM LPC Interface Controller). The ICH9 chipset (Intel ICH9 Family SMBus Controller) should be compatible with this filter driver as well, as the driver (only) gives access to the TCO Watchdog in the chipset.

markm@vl.com.au wrote:

What does this mean? This is a filter driver, and has been used successfully when attached to ICH7 chipsets (Intel 82801 GBM LPC Interface Controller). The ICH9 chipset (Intel ICH9 Family SMBus Controller) should be compatible with this filter driver as well, as the driver (only) gives access to the TCO Watchdog in the chipset.

I find your description hard to believe. It has never been possible to
add a device filter driver in this way. When you have a PnP INF where
the hardware ID matches a piece of hardware, it REPLACES the previous
INF. It does not ADD ON to the previous INF. Thus, Device Manager
expects your INF to provide ALL of the drivers for the device, including
the main controlling service. Your INF does not provide a controlling
service. Thus, it is erroneous.

You can do class filters in this way, but not device filters. To add a
device filter, you HAVE to use an installer application.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Tim Roberts wrote:

Thus, Device Manager
expects your INF to provide ALL of the drivers for the device, including
the main controlling service. Your INF does not provide a controlling
service. Thus, it is erroneous.

If the base device doesn’t need a driver, then you can install a null
driver as the “controlling service”. There are web articles that
describe how to do that.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

> If the base device doesn’t need a driver, then you can install a null

driver as the “controlling service”. There are web articles that
describe how to do that.

%SystemRoot%\inf\volsnap.inf is the sample.


Maxim S. Shatskih
Microsoft MVP on File System And Storage
xxxxx@storagecraft.com
http://www.storagecraft.com

On 6/11/2013 5:03 AM, Tim Roberts wrote:

I find your description hard to believe. It has never been possible
to add a device filter driver in this way. When you have a PnP INF
where the hardware ID matches a piece of hardware, it REPLACES the
previous INF. It does not ADD ON to the previous INF. Thus, Device
Manager expects your INF to provide ALL of the drivers for the device,
including the main controlling service. Your INF does not provide a
controlling service. Thus, it is erroneous.

Kosher or not, that’s how it has been working for the last 9 years. IIRC
the driver that *was* bound to the ICH7 LPC device was ISAPNP.SYS (I’ll
have to try and confirm that). That may well have been ‘replaced’ by my
driver in this case.

For the ICH9, there are no drivers installed.

This may well be the root of my problem.

Thanks & regards,


Mark McDougall, Engineer
Virtual Logic Pty Ltd, http:
21-25 King St, Rockdale, 2216
Ph: +612-9599-3255 Fax: +612-9599-3266</http:>