How do Windows 2000 / XP handle non-PNP storage device drivers?

Discuss Windows 2000, NT, XP and Windows Server 2000, 2003, SBS 2003.
Post Reply
roytam1
Posts: 739
Joined: Mon Nov 03, 2008 6:15 am

How do Windows 2000 / XP handle non-PNP storage device drivers?

Post by roytam1 »

I wonder how do Windows 2000 / XP handle non-PNP storage device drivers and how they map driver to actual device?

Hyoenmadan86
Posts: 234
Joined: Fri Sep 07, 2012 6:45 pm

Re: How do Windows 2000 / XP handle non-PNP storage device drivers?

Post by Hyoenmadan86 »

Can you elaborate?

If you mean how the WDM PnP Manager handles them, it does just as with PnP devices, via a Root Bus entry at the registry with an specific hardware ID which then can be used by UPNPMGR module to process the rest of the class install step... Except in this case, the root bus entry isn't created by the automatic enumeration process done by Bus Drivers like PCI.sys, ACPI.sys or ISAPNP.sys, but you create it manually in registry and assign it a fake HWID. How you do this? In windows you use the "Add non-PnP hardware wizard " and INF files with special sections for Non-PNP hardware data like IO/MEMORY/IRQ values (The DDInstall.LogConfigOverride and LogConfigSection directives), or you can create it manually via a registry edit (not recommended). This page has more details how this actually works.

https://reactos.org/wiki/How_PnP_Works_in_ReactOS (Valid for windows ofc)

Also, Win2k and XP still support NT4 style "service" drivers linked against SCSIPORT. These appear in the device manager under [ROOT\SERVICE\*name] directory. Them generally have a custom control panel and custom registry entries under their service registry key to input the IO/IRQ/DMA parameters needed by the card, or do their custom in-driver enumeration using SCSIPORT facilities. These drivers disable Windows NT5+ characteristics as Hibernation or ACPI S3 mode. This page has more detais about how these work.

http://alter.org.ua/en/soft/win/uni_ata/uniata_pnp.php

Finally, NT5+ support the so called "logical volumes" via FLTMGR, characteristic used by stuff like ImDisk. These don't exist in any part of the Storage Stack, thus Windows and utilities which use STPI/DeviceIoControl IOCTRLs don't recognize them as "hardware". You also can't "partition" them.

roytam1
Posts: 739
Joined: Mon Nov 03, 2008 6:15 am

Re: How do Windows 2000 / XP handle non-PNP storage device drivers?

Post by roytam1 »

Hyoenmadan86 wrote:
Mon May 06, 2024 10:55 pm
Can you elaborate?
I'm trying to solve the problem of moving a XP installation from motherboard B to motherboard A (both socket 3 ISA/PCI), one has award PNP BIOS and another one has AMI BIOS but only 1 IDE channel and runs XT-IDE for 2nd IDE channel.

in motherboard B, i.e. the one having XT-IDE, ENUM registry shows it runs on Legacy/ATAPI/0 and Legacy/ATAPI/1 and in motherboard A ENUM registry shows it runs on *pnp0600/0 and *pnp0600/1.

when I try to exchange harddisk of them, they both get stop 0x7B, while they have atapi.sys loaded.

so I wonder how windows handle device path in boot time for showing/not showing stop 0x7B.

Hyoenmadan86
Posts: 234
Joined: Fri Sep 07, 2012 6:45 pm

Re: How do Windows 2000 / XP handle non-PNP storage device drivers?

Post by Hyoenmadan86 »

roytam1 wrote:
Tue May 07, 2024 12:09 am
in motherboard B, i.e. the one having XT-IDE, ENUM registry shows it runs on Legacy/ATAPI/0 and Legacy/ATAPI/1 and in motherboard A ENUM registry shows it runs on *pnp0600/0 and *pnp0600/1.
Yeah, this happens because the XT IDE is not even a dummy device, literally. As such, isn't even mapped into the PnP ESCD space. While your motherboard controller in mobo A is probably a chipset device and is properly described in the BIOS with the [*pnp0600] HWID, and possibly mapped into the ESCD.

Anyways, your boot problem isn't a PnP vs non-PnP, but lies in how the volumes are being mapped into your [HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices] registry key.

https://www.prime-expert.com/articles/a ... ot-device/ <<< It applies for every NT windows up to Win12

In resume, you have to manually edit the [C:] key there, into your current boot volume as recognized in your current motherboard (A or B). I guess some tools like BOOTICE can do this for free. Some people recommends deleting all the values in the [MountedDevices] key, but sometimes NTLDR doesn't want to regenerate the values there, thus the BSoD isn't fixed. Check that SETUPLDR, the loader for the Text Mode setup phase in NT5.x generates a new MoutedDevices key in each boot, but NTLDR has that codepath disabled, so your installed applications and settings don't get screwed by a moved Drive Letter. Someone needs to study the leaked Windows code to check when NTLDR attempts to regenerate that value, and when it doesn't.

roytam1
Posts: 739
Joined: Mon Nov 03, 2008 6:15 am

Re: How do Windows 2000 / XP handle non-PNP storage device drivers?

Post by roytam1 »

Hyoenmadan86 wrote:
Tue May 07, 2024 1:59 am
roytam1 wrote:
Tue May 07, 2024 12:09 am
in motherboard B, i.e. the one having XT-IDE, ENUM registry shows it runs on Legacy/ATAPI/0 and Legacy/ATAPI/1 and in motherboard A ENUM registry shows it runs on *pnp0600/0 and *pnp0600/1.
Yeah, this happens because the XT IDE is not even a dummy device, literally. As such, isn't even mapped into the PnP ESCD space. While your motherboard controller in mobo A is probably a chipset device and is properly described in the BIOS with the [*pnp0600] HWID, and possibly mapped into the ESCD.

Anyways, your boot problem isn't a PnP vs non-PnP, but lies in how the volumes are being mapped into your [HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices] registry key.
I doubt this guess as I booted PE on mobo A with HD originally in mobo B, and C: value is same in installed SYSTEM MountedDevices and PE's MountedDevices.

Hyoenmadan86
Posts: 234
Joined: Fri Sep 07, 2012 6:45 pm

Re: How do Windows 2000 / XP handle non-PNP storage device drivers?

Post by Hyoenmadan86 »

Maybe the mapped volume isn't present or is only present when booting from WinPE?

Since the problem seem a bit insidious, probably would be faster to just attach a WinDBG session to the machine via serial port.
You also can attempt to sysprep your moving install, and check how it behaves, to discard any problem in the upper layers of the stack.

Beta12
User avatar
Posts: 278
Joined: Sat Sep 21, 2013 11:19 am
Location: Poland

Re: How do Windows 2000 / XP handle non-PNP storage device drivers?

Post by Beta12 »

roytam1 wrote:
Tue May 07, 2024 12:09 am
I'm trying to solve the problem of moving a XP installation from motherboard B to motherboard A (both socket 3 ISA/PCI), one has award PNP BIOS and another one has AMI BIOS but only 1 IDE channel and runs XT-IDE for 2nd IDE channel.

in motherboard B, i.e. the one having XT-IDE, ENUM registry shows it runs on Legacy/ATAPI/0 and Legacy/ATAPI/1 and in motherboard A ENUM registry shows it runs on *pnp0600/0 and *pnp0600/1.

when I try to exchange harddisk of them, they both get stop 0x7B, while they have atapi.sys loaded.
I have BSOD 7B when I try to deploy WinXP 64-bit on QEMU when OS is syspreped in VMware. After deploy in registry PCIIde service has no driver .sys ImagePath system32\DRIVERS\pciide.sys . To fix BSOD 7B I need update registry:

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PCIIde]
"ErrorControl"=dword:00000001
"Group"="System Bus Extender"
"Start"=dword:00000000
"Tag"=dword:00000003
"Type"=dword:00000001
"ImagePath"=hex(2):73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,44,00,\
  52,00,49,00,56,00,45,00,52,00,53,00,5c,00,70,00,63,00,69,00,69,00,64,00,65,\
  00,2e,00,73,00,79,00,73,00,00,00
There may be no critical devices e.g *pnp0600, pci#cc_0101 - then you need to use fix mergeide.reg

mergeide keyword

Helpful pages:
http://www.geocities.ws/kilian0072002/s ... sprep.html
https://web.archive.org/web/20041020044 ... /kb/314082
https://pve.proxmox.com/wiki/Additional ... E#mergeide
https://forum.proxmox.com/threads/migra ... sod.95595/

roytam1
Posts: 739
Joined: Mon Nov 03, 2008 6:15 am

Re: How do Windows 2000 / XP handle non-PNP storage device drivers?

Post by roytam1 »

Beta12 wrote:
Sat May 11, 2024 3:13 pm
roytam1 wrote:
Tue May 07, 2024 12:09 am
I'm trying to solve the problem of moving a XP installation from motherboard B to motherboard A (both socket 3 ISA/PCI), one has award PNP BIOS and another one has AMI BIOS but only 1 IDE channel and runs XT-IDE for 2nd IDE channel.

in motherboard B, i.e. the one having XT-IDE, ENUM registry shows it runs on Legacy/ATAPI/0 and Legacy/ATAPI/1 and in motherboard A ENUM registry shows it runs on *pnp0600/0 and *pnp0600/1.

when I try to exchange harddisk of them, they both get stop 0x7B, while they have atapi.sys loaded.
I have BSOD 7B when I try to deploy WinXP 64-bit on QEMU when OS is syspreped in VMware. After deploy in registry PCIIde service has no driver .sys ImagePath system32\DRIVERS\pciide.sys . To fix BSOD 7B I need update registry:

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PCIIde]
"ErrorControl"=dword:00000001
"Group"="System Bus Extender"
"Start"=dword:00000000
"Tag"=dword:00000003
"Type"=dword:00000001
"ImagePath"=hex(2):73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,44,00,\
  52,00,49,00,56,00,45,00,52,00,53,00,5c,00,70,00,63,00,69,00,69,00,64,00,65,\
  00,2e,00,73,00,79,00,73,00,00,00
There may be no critical devices e.g *pnp0600, pci#cc_0101 - then you need to use fix mergeide.reg

mergeide keyword

Helpful pages:
http://www.geocities.ws/kilian0072002/s ... sprep.html
https://web.archive.org/web/20041020044 ... /kb/314082
https://pve.proxmox.com/wiki/Additional ... E#mergeide
https://forum.proxmox.com/threads/migra ... sod.95595/
as I said before, those ancient machines' IDE controller runs on non-PCI, and even non-PNP, so adding/enabling PCIIDE.SYS doesn't help here.

Post Reply