Coming Back to Driver Development

I totally appreciate Mr. @Doron_Holan’s wisdom here. FactDef was in XP?? I didn’t know that!

how often do we see ISA style serial ports anymore

Hmmmm… in industrial PCs? Every day. In embedded systems? All the time. Shocking, I know… but it’s true.

It LOOKS like LogConfig is, in fact, dead… see this page, where it says among other things:

I don’t really understand… and I definitely don’t understand how FactDef is different from LogConfig.

Peter

Does your driver load and does your driver get assigned the required ISA ports? The logfile indicates ‘success’ at the end, which is where, unless there is other evidence of failure, I would conclude that the inf was in fact processed.

As usual that document might or might not mean it doesn’t work for all driver inf files, not just universal inf files. It clearly says it won’t work for universal. It does not clearly state that for non-universal.

msports.inf still refers to LogConfig, so I have some doubt that support has been removed, but how often do we see ISA style serial ports anymore ;).

Hmmmm… in industrial PCs? Every day. In embedded systems? All the time. Shocking, I know… but it’s true.

Apologies if the snark did not translate in my response. I know they are everywhere and will outlive us all, I guess at this point windows only supports 165550 serial ports that are fully described by the bus or ACPI and can no longer force a hw config on them.

I guess at this point windows only supports 165550 serial ports that are fully described by the bus or ACPI and can no longer force a hw config on them.

I’m almost curious enough to spin up a vm and test this out.

I guess at this point windows only supports 165550 serial ports that are fully described by the bus or ACPI and can no longer force a hw config on them.

Hmmmm… yeah… hmmm… Good point… I have a file named “msports.inf” on my Windows 11 system:

[LptPort.NT]
CopyFiles=LptPort.NT.Copy
AddReg=LptPort.AddReg,LptPort.NT.AddReg

LogConfig=lsnn,lsan,lann,laan
...
[lsnn]
ConfigPriority=HARDRECONFIG
IOConfig=3bc-3be(3ff::),378-37a(3ff::),278-27a(3ff::)

[lsan]
ConfigPriority=HARDRECONFIG
IOConfig=3bc-3be(3ff::),378-37a(3ff::),278-27a(3ff::)
IRQConfig=3,4,5,6,7,8,9,10,11,12,13,14,15

[lann]
ConfigPriority=HARDRECONFIG
IOConfig=8@100-3ff%fff8(3ff::)

[laan]
ConfigPriority=HARDRECONFIG
IOConfig=8@100-3ff%fff8(3ff::)
IRQConfig=3,4,5,6,7,8,9,10,11,12,13,14,15

This isn’t an ISA serial device. It’s an ISA industrial device doing direct I/O with external test hardware. I had come across FactDef and briefly tried to compile with it, but I believe that was before I switched from Universal to Desktop driver.

I tried FactDef again and it looks like it installed OK. Log section at the bottom. There is one warning that I don’t quite follow:
“Selected driver node does not match this device (force-install)”

When I installed with LogConfig, the driver installed, but Device Manager said it was using no resources. With FactDef Device Manager reports that the driver is using ports 300-302, which is correct.

I guess FactDef is the way to go now with Win 10.

`>>> [Device Install (DiInstallDevice) - ROOT\UNKNOWN\0000]

Section start 2022/03/03 19:31:32.732
cmd: “C:\WINDOWS\system32\mmc.exe” C:\WINDOWS\system32\devmgmt.msc
ndv: Flags: 0x00000002
dvi: Class GUID of device changed to: {abdaddaf-39a2-47f2-9ebd-1d0e7395d706}.
ndv: Driver package ‘C:\WINDOWS\System32\DriverStore\FileRepository\mtisadrv.inf_x86_92df085dc7c330ed\mtisadrv.inf’ is already imported.
sto: {Setup Import Driver Package: c:\target\mtisadrv.inf} 19:31:32.758
sto: Driver package already imported as ‘oem8.inf’.
sto: {Setup Import Driver Package - exit (0x00000000)} 19:31:32.774
dvi: Class GUID of device changed to: {abdaddaf-39a2-47f2-9ebd-1d0e7395d706}.
ump: {Plug and Play Service: Device Install for ROOT\UNKNOWN\0000}
dvi: Class GUID of device changed to: {abdaddaf-39a2-47f2-9ebd-1d0e7395d706}.
ndv: {Core Device Install} 19:31:33.180
! pol: Selected driver node does not match this device (force-install)
dvi: {Install Device - ROOT\UNKNOWN\0000} 19:31:33.194
dvi: Device Status: 0x01802001
dvi: Parent Device: HTREE\ROOT\0
dvi: {DIF_ALLOW_INSTALL} 19:31:33.212
dvi: Default installer: Enter 19:31:33.220
dvi: Default installer: Exit
dvi: {DIF_ALLOW_INSTALL - exit(0xe000020e)} 19:31:33.230
dvi: {DIF_INSTALLDEVICEFILES} 19:31:33.238
dvi: Default installer: Enter 19:31:33.244
dvi: Default installer: Exit
dvi: {DIF_INSTALLDEVICEFILES - exit(0x00000000)} 19:31:33.256
dvi: {_SCAN_FILE_QUEUE} 19:31:33.262
flq: File ‘C:\WINDOWS\system32\DRIVERS\MTIsaDrv.sys’ pruned from copy.
dvi: {_SCAN_FILE_QUEUE - exit(0x00000000)} 19:31:33.296
flq: {FILE_QUEUE_COMMIT} 19:31:33.306
flq: {FILE_QUEUE_COMMIT - exit(0x00000000)} 19:31:33.312
dvi: {DIF_REGISTER_COINSTALLERS} 19:31:33.318
dvi: Reset Device: Resetting device configuration. 19:31:33.324
dvi: Reset Device: Resetting device configuration completed. 19:31:33.330
dvi: Default installer: Enter 19:31:33.336
inf: {Install from INF Section - MTIsaDrv_Device.NT.CoInstallers} 19:31:33.342
inf: Flags - 0x001001ee
inf: {Install from INF Section - exit(0x00000000)} 19:31:33.354
dvi: Default installer: Exit
dvi: {DIF_REGISTER_COINSTALLERS - exit(0x00000000)} 19:31:33.366
dvi: {DIF_INSTALLINTERFACES} 19:31:33.372
dvi: Default installer: Enter 19:31:33.378
dvi: Default installer: Exit
dvi: {DIF_INSTALLINTERFACES - exit(0x00000000)} 19:31:33.390
dvi: {DIF_INSTALLDEVICE} 19:31:33.396
dvi: Default installer: Enter 19:31:33.402
dvi: {Install DEVICE}
inf: {Install from INF Section - MTIsaDrv_Device.NT} 19:31:33.414
inf: Flags - 0x00000001
inf: {Install from INF Section - exit(0x00000000)} 19:31:33.426
inf: {Install from INF Section - MTIsaDrv_Device.NT} 19:31:33.432
inf: Flags - 0x001005ee
inf: {Install from INF Section - exit(0x00000000)} 19:31:33.444
dvi: {Writing Device Properties}
dvi: HardwareID=root\mtisadrv
dvi: Strong Name=oem8.inf:e1fec0c324801fcd:MTIsaDrv_Device:1.47.2.886:root\mtisadrv
dvi: {Writing Device Properties - Complete}
inf: AddService=MTIsaDrv,0x00000002,MTIsaDrv_Service_Inst (mtisadrv.inf line 70)
dvi: Add Service: Modified existing service ‘MTIsaDrv’.
inf: {Install from INF Section - MTIsaDrv_Service_Inst} 19:31:33.490
inf: Flags - 0x00100004
inf: {Install from INF Section - exit(0x00000000)} 19:31:33.502
dvi: {Install DEVICE exit (0x00000000)}
dvi: Install Device: Configuring device class. 19:31:33.516
dvi: Install Device: Configuring device class completed. 19:31:33.522
dvi: Device Status: 0x01802001
dvi: Install Device: Starting device ‘ROOT\UNKNOWN\0000’. 19:31:33.534
dvi: Install Device: Starting device completed. 19:31:33.648
dvi: Default installer: Exit
dvi: {DIF_INSTALLDEVICE - exit(0x00000000)} 19:31:33.662
dvi: {DIF_NEWDEVICEWIZARD_FINISHINSTALL} 19:31:33.746
dvi: Default installer: Enter 19:31:33.752
dvi: Default installer: Exit
dvi: {DIF_NEWDEVICEWIZARD_FINISHINSTALL - exit(0xe000020e)} 19:31:33.764
dvi: {Install Device - exit(0x00000000)} 19:31:33.772
dvi: {Core Device Install - exit(0x00000000)} 19:31:33.778
ump: {Plug and Play Service: Device Install exit(00000000)}
<<< Section end 2022/03/03 19:31:33.794
`

I am also facing the same issue.

I have been developing an ISA device driver for Windows 10. For my device, I need to list out the available resources, IRQ, IO ports, and memory ranges for the driver that we are supporting.

With reference to the conversation, I also tried using the FactDef section in my inf file, which is resulting in Found Legacy Operation FactDef.

Microsoft has deprecated FactDef section support.
https://learn.microsoft.com/en-us/windows-hardware/drivers/install/inf-ddinstall-factdef-section

What is the alternate way to list the IRQs for my driver?

Found Legacy Operation FactDef

Is that a problem?? Does it WORK?

Peter