Hello,
The Realtek 8139 Nic driver fails to boot as indicated in the debug messages .
The hivesys registry used is ne2000 and the rtl3139.sys has been renamed to ne2000.sys + amd pcnet disabled
Note : this driver file is working fine with WinXP
Any idea ?
Regards Gerard
----------------------------------------------------------------------
(ke/main.c:586) Module: 'ndis.sys' at c01b1000, length 0x00020db6 (ke/main.c:610) Process system hive registry chunk at c00fd000 (ke/main.c:625) Process hardware hive registry chunk at c010f000 (mm/ppool.c:317) Trying to allocate 116396032 bytes from paged pool - nothing suitable found, returning NULL (io/create.c:90) Parent is a Directory which is neither a file type nor a device type (ldr/loader.c:623) LdrGetModuleObject(\SystemRoot\system32\drivers\ne2000.sys) called (ldr/loader.c:634) Comparing ntoskrnl.exe and \SystemRoot\system32\drivers\ne2000.sys (ldr/loader.c:634) Comparing hal.dll and \SystemRoot\system32\drivers\ne2000.sys (ldr/loader.c:648) Could not find module '\SystemRoot\system32\drivers\ne2000.sys' (ldr/loader.c:301) Loading Module \SystemRoot\system32\drivers\ne2000.sys... ldr/loader.c:309 (io/create.c:90) Parent is a Directory which is neither a file type nor a device type ldr/loader.c:316 (ldr/loader.c:319) Could not open module file: \SystemRoot\system32\drivers\ne2000.sys (io/pnpmgr.c:1444) Initialization of service Ne2000 failed (Status c0000001) (ldr/loader.c:623) LdrGetModuleObject(\SystemRoot\system32\drivers\pci.sys) called
For whatever reason, 'ne200.sys' can't be located. Make sure it's in the correct directory for one.
Gge wrote:
Hello,
The Realtek 8139 Nic driver fails to boot as indicated in the debug messages .
The hivesys registry used is ne2000 and the rtl3139.sys has been renamed to ne2000.sys + amd pcnet disabled
Note : this driver file is working fine with WinXP
Any idea ?
Regards Gerard
(ke/main.c:586) Module: 'ndis.sys' at c01b1000, length 0x00020db6 (ke/main.c:610) Process system hive registry chunk at c00fd000 (ke/main.c:625) Process hardware hive registry chunk at c010f000 (mm/ppool.c:317) Trying to allocate 116396032 bytes from paged pool - nothing suitable found, returning NULL (io/create.c:90) Parent is a Directory which is neither a file type nor a device type (ldr/loader.c:623) LdrGetModuleObject(\SystemRoot\system32\drivers\ne2000.sys) called (ldr/loader.c:634) Comparing ntoskrnl.exe and \SystemRoot\system32\drivers\ne2000.sys (ldr/loader.c:634) Comparing hal.dll and \SystemRoot\system32\drivers\ne2000.sys (ldr/loader.c:648) Could not find module '\SystemRoot\system32\drivers\ne2000.sys' (ldr/loader.c:301) Loading Module \SystemRoot\system32\drivers\ne2000.sys... ldr/loader.c:309 (io/create.c:90) Parent is a Directory which is neither a file type nor a device type ldr/loader.c:316 (ldr/loader.c:319) Could not open module file: \SystemRoot\system32\drivers\ne2000.sys (io/pnpmgr.c:1444) Initialization of service Ne2000 failed (Status c0000001) (ldr/loader.c:623) LdrGetModuleObject(\SystemRoot\system32\drivers\pci.sys) called _______________________________________________ Ros-dev mailing list Ros-dev@reactos.com http://reactos.com:8080/mailman/listinfo/ros-dev
Richard Campbell wrote:
For whatever reason, 'ne200.sys' can't be located. Make sure it's in the correct directory for one.
Gge wrote:
Hello,
The Realtek 8139 Nic driver fails to boot as indicated in the debug messages .
The hivesys registry used is ne2000 and the rtl3139.sys has been renamed to ne2000.sys + amd pcnet disabled
Note : this driver file is working fine with WinXP
Any idea ?
Regards Gerard
(ke/main.c:586) Module: 'ndis.sys' at c01b1000, length 0x00020db6 (ke/main.c:610) Process system hive registry chunk at c00fd000 (ke/main.c:625) Process hardware hive registry chunk at c010f000 (mm/ppool.c:317) Trying to allocate 116396032 bytes from paged pool - nothing suitable found, returning NULL (io/create.c:90) Parent is a Directory which is neither a file type nor a device type (ldr/loader.c:623) LdrGetModuleObject(\SystemRoot\system32\drivers\ne2000.sys) called (ldr/loader.c:634) Comparing ntoskrnl.exe and \SystemRoot\system32\drivers\ne2000.sys (ldr/loader.c:634) Comparing hal.dll and \SystemRoot\system32\drivers\ne2000.sys (ldr/loader.c:648) Could not find module '\SystemRoot\system32\drivers\ne2000.sys' (ldr/loader.c:301) Loading Module \SystemRoot\system32\drivers\ne2000.sys... ldr/loader.c:309 (io/create.c:90) Parent is a Directory which is neither a file type nor a device type ldr/loader.c:316 (ldr/loader.c:319) Could not open module file: \SystemRoot\system32\drivers\ne2000.sys (io/pnpmgr.c:1444) Initialization of service Ne2000 failed (Status c0000001) (ldr/loader.c:623) LdrGetModuleObject(\SystemRoot\system32\drivers\pci.sys) called
Everything looks ok for me. I forgot to mention that Reactos is booted from real hardware + freeldr diskette. The native ne2000.sys driver from Reactos has also the same problem . this can be simulted as follows :
- Build a ntoskrnl.exe with NDEBUG commented in ldr.c - Disable Amd Pcnet entry and enable Ne2000 entry in hivesys.inf file - Make registry - Boot Reactos and check the debug traces for loading of ne2000.sys driver
Regards Gerard
Hi,
the rtl8139 driver is a pci based driver. This driver needs more registry keys. A half year ago, I've used this registry entries for a realtec 8139 based nic:
; D-Link DRN-32TX PCI NIC Driver HKLM,"SYSTEM\CurrentControlSet\Services\DLKRTS","ErrorControl",0x00010001,0x 00000000 HKLM,"SYSTEM\CurrentControlSet\Services\DLKRTS","Group",0x00000000,"NDIS" HKLM,"SYSTEM\CurrentControlSet\Services\DLKRTS","ImagePath",0x00020000,"syst em32\drivers\DLKRTS.SYS" HKLM,"SYSTEM\CurrentControlSet\Services\DLKRTS","Start",0x00010001,0x0000000 4 HKLM,"SYSTEM\CurrentControlSet\Services\DLKRTS","Type",0x00010001,0x00000001 HKLM,"SYSTEM\CurrentControlSet\Services\DLKRTS\Linkage","Bind",0x00010000,"\ Device\DLKRTS1" HKLM,"SYSTEM\CurrentControlSet\Services\DLKRTS\Linkage","Export",0x00010000, "\Device\DLKRTS1" HKLM,"SYSTEM\CurrentControlSet\Services\DLKRTS\Linkage","Route",0x00010000," DLKRTS1" HKLM,"SYSTEM\CurrentControlSet\Services\DLKRTS\Enum","0",0x00000000,"PCI\VEN _10EC&DEV_8139&SUBSYS_81391186&REV_10\0815" HKLM,"SYSTEM\CurrentControlSet\Services\DLKRTS\Enum","Count",0x00010001,0x00 000001 HKLM,"SYSTEM\CurrentControlSet\Services\DLKRTS\Enum","NextInstance",0x000100 01,0x00000001 HKLM,"SYSTEM\CurrentControlSet\Enum\PCI\VEN_10EC&DEV_8139&SUBSYS_81391186&RE V_10\0815","Service",0x00000000,"DLKRTS" HKLM,"SYSTEM\CurrentControlSet\Enum\PCI\VEN_10EC&DEV_8139&SUBSYS_81391186&RE V_10\0815","Class",0x00000000,"Net" HKLM,"SYSTEM\CurrentControlSet\Enum\PCI\VEN_10EC&DEV_8139&SUBSYS_81391186&RE V_10\0815","ClassGUID",0x00000000,"{4D36E972-E325-11CE-BFC1-08002BE10318}"
; D-Link DRN-32TX PCI Adapter 1 HKLM,"SYSTEM\CurrentControlSet\Services\DLKRTS1","ErrorControl",0x00010001,0 x00000001 HKLM,"SYSTEM\CurrentControlSet\Services\DLKRTS1","Start",0x00010001,0x000000 04 HKLM,"SYSTEM\CurrentControlSet\Services\DLKRTS1","Type",0x00010001,0x0000000 4 HKLM,"SYSTEM\CurrentControlSet\Services\DLKRTS1\Linkage","Bind",0x00010000," \Device\DLKRTS1" HKLM,"SYSTEM\CurrentControlSet\Services\DLKRTS1\Linkage","Export",0x00010000 ,"\Device\DLKRTS1" HKLM,"SYSTEM\CurrentControlSet\Services\DLKRTS1\Linkage","Route",0x00010000, "DLKRTS1" HKLM,"SYSTEM\CurrentControlSet\Services\DLKRTS1\Parameters","SlotNumber",0x0 0000000,"9" HKLM,"SYSTEM\CurrentControlSet\Services\DLKRTS1\Parameters\Tcpip","DefaultGa teway",0x00010000,"192.168.1.0" HKLM,"SYSTEM\CurrentControlSet\Services\DLKRTS1\Parameters\Tcpip","IPAddress ",0x00010000,"192.168.1.5" HKLM,"SYSTEM\CurrentControlSet\Services\DLKRTS1\Parameters\Tcpip","SubnetMas k",0x00010000,"255.255.255.0"
It doesn't work with the current cvs. The start and type values are possible also incorrect. The value "9" from the key "SlotNumber" is a hex value which must point to the correct pci slot. The best way to get all this informations is a NT 4.0 or W2K installation.
An other problem is the loading of the real ne2000.sys driver. This is not a boot load driver but ros trys to load it like a boot load driver (after pci.sys). Ros trys it a second time after loading ndis. The start value of ne2000 is 4, this means do not load. if I change this value to 3, driver is loaded at the second point successful, but it doesn't find a nic.
- Hartmut
-----Original Message----- From: ros-dev-bounces@reactos.com [mailto:ros-dev-bounces@reactos.com] On Behalf Of Gge Sent: Sunday, October 17, 2004 10:34 PM To: ReactOS Development List Subject: [ros-dev] Loading failure of rtl8139.sys driver.
Hello,
The Realtek 8139 Nic driver fails to boot as indicated in the debug messages .
The hivesys registry used is ne2000 and the rtl3139.sys has been renamed to ne2000.sys + amd pcnet disabled
Note : this driver file is working fine with WinXP
Any idea ?
Regards Gerard
Hartmut Birr wrote:
Hi,
the rtl8139 driver is a pci based driver. This driver needs more registry keys. A half year ago, I've used this registry entries for a realtec 8139 based nic:
[snip]
It doesn't work with the current cvs. The start and type values are possible also incorrect. The value "9" from the key "SlotNumber" is a hex value which must point to the correct pci slot. The best way to get all this informations is a NT 4.0 or W2K installation.
It doesn't work anymore because I changed the registry layout to match the one of W2K. There must be a "Driver" value under the Enum key pointing to "{4D36E972-E325-11CE-BFC1-08002BE10318}\xxxx" (where xxxx is unique number for the network adapter; for now 0000 is used for PCnet and 0001 for NE2K, but later this should be assigned by class installer). The "Parameters" key (without subkeys!) is moved to "SYSTEM\CurrentControlSet\Control\Class{4D36E972-E325-11CE-BFC1-08002BE10318}\xxxx" and "Linkage" key is moved to "SYSTEM\CurrentControlSet\Control\Class{4D36E972-E325-11CE-BFC1-08002BE10318}\xxxx\Linkage". Finally the SlotNumber needn't be changed because NDIS uses the value obtained from PCI bus driver.
An other problem is the loading of the real ne2000.sys driver. This is not a boot load driver but ros trys to load it like a boot load driver (after pci.sys).
Every enumerated driver is first tried to load when it's found (typically before \SystemRoot exists) and then retried after "\SystemRoot" is created. It's not really optimal, but it works.
Ros trys it a second time after loading ndis. The start value of ne2000 is 4, this means do not load. if I change this value to 3, driver is loaded at the second point successful, but it doesn't find a nic.
It's intentionally marked as DON'T LOAD in the registry because it would be loaded on every computer even when no NE2K card is present. The only way to address it is to get ISAPNP bus driver working, but that will still not help us on non-PNP ISA...
Regards, Filip
Filip Navara wrote:
Hartmut Birr wrote:
Hi,
the rtl8139 driver is a pci based driver. This driver needs more registry keys. A half year ago, I've used this registry entries for a realtec 8139 based nic:
It doesn't work with the current cvs. The start and type values are possible also incorrect. The value "9" from the key "SlotNumber" is a hex value which must point to the correct pci slot. The best way to get all this informations is a NT 4.0 or W2K installation.
It doesn't work anymore because I changed the registry layout to match the one of W2K. There must be a "Driver" value under the Enum key pointing to "{4D36E972-E325-11CE-BFC1-08002BE10318}\xxxx" (where xxxx is unique number for the network adapter; for now 0000 is used for PCnet and 0001 for NE2K, but later this should be assigned by class installer). The "Parameters" key (without subkeys!) is moved to "SYSTEM\CurrentControlSet\Control\Class{4D36E972-E325-11CE-BFC1-08002BE10318}\xxxx" and "Linkage" key is moved to "SYSTEM\CurrentControlSet\Control\Class{4D36E972-E325-11CE-BFC1-08002BE10318}\xxxx\Linkage". Finally the SlotNumber needn't be changed because NDIS uses the value obtained from PCI bus driver.
An other problem is the loading of the real ne2000.sys driver. This is not a boot load driver but ros trys to load it like a boot load driver (after pci.sys).
Every enumerated driver is first tried to load when it's found (typically before \SystemRoot exists) and then retried after "\SystemRoot" is created. It's not really optimal, but it works.
Ros trys it a second time after loading ndis. The start value of ne2000 is 4, this means do not load. if I change this value to 3, driver is loaded at the second point successful, but it doesn't find a nic.
It's intentionally marked as DON'T LOAD in the registry because it would be loaded on every computer even when no NE2K card is present. The only way to address it is to get ISAPNP bus driver working, but that will still not help us on non-PNP ISA...
Regards, Filip _______________________________________________
Hi Filip ,
I have updated the Relatek8138 Nic entry of the hivesys.inf file according your indications (I hope !)
; RTL8139 PCI NIC Driver HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139","ErrorControl",0x00010001,0x00000000 HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139","Group",0x00000000,"NDIS" HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139","ImagePath",0x00020000,"system32\drivers\RTL8139.SYS" HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139","Start",0x00010001,0x00000003 HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139","Type",0x00010001,0x00000001 HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139\Linkage","Bind",0x00010000,"\Device\Rtl81391" HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139\Linkage","Export",0x00010000,"\Device\Rtl81391" HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139\Linkage","Route",0x00010000,"Rtl81391" HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139\Enum","0",0x00000000,"PCI\VEN_10EC&DEV_8139&SUBSYS_81391186&REV_10\0815" HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139\Enum","Count",0x00010001,0x00000001 HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139\Enum","NextInstance",0x00010001,0x00000001 HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139\Enum\0002","Driver",0x00000000,"{4D36E972-E325-11CE-BFC1-08002BE10318}\0001" HKLM,"SYSTEM\CurrentControlSet\Enum\PCI\VEN_10EC&DEV_8139&SUBSYS_81391186&REV_10\0815","Service",0x00000000,"Rtl8139" HKLM,"SYSTEM\CurrentControlSet\Enum\PCI\VEN_10EC&DEV_8139&SUBSYS_81391186&REV_10\0815","Class",0x00000000,"Net" HKLM,"SYSTEM\CurrentControlSet\Enum\PCI\VEN_10EC&DEV_8139&SUBSYS_81391186&REV_10\0815","ClassGUID",0x00000000,"{4D36E972-E325-11CE-BFC1-08002BE10318}"
; RTL8139 PCI NIC PCI Adapter 1 HKLM,"SYSTEM\CurrentControlSet\Services\Rtl81391","ErrorControl",0x00010001,0x00000001 HKLM,"SYSTEM\CurrentControlSet\Services\Rtl81391","Start",0x00010001,0x00000003 HKLM,"SYSTEM\CurrentControlSet\Services\Rtl81391","Type",0x00010001,0x00000004 HKLM,"SYSTEM\CurrentControlSet\Services\Rtl81391\Linkage","Bind",0x00010000,"\Device\Rtl81391" HKLM,"SYSTEM\CurrentControlSet\Services\Rtl81391\Linkage","Export",0x00010000,"\Device\Rtl81391" HKLM,"SYSTEM\CurrentControlSet\Services\Rtl81391\Linkage","Route",0x00010000,"Rtl81391" HKLM,"SYSTEM\CurrentControlSet\Control\Class{4D36E972-E325-11CE-BFC1-08002BE10318}\0002,"SlotNumber",0x00000000,"9" HKLM,"SYSTEM\CurrentControlSet\Control\Class{4D36E972-E325-11CE-BFC1-08002BE10318}\0002"Parameters\Tcpip","DefaultGateway",0x00010000,"192.168.1.0" HKLM,"SYSTEM\CurrentControlSet\Control\Class{4D36E972-E325-11CE-BFC1-08002BE10318}\0002"Parameters\Tcpip","IPAddress",0x00010000,"192.168.1.5" HKLM,"SYSTEM\CurrentControlSet\Control\Class{4D36E972-E325-11CE-BFC1-08002BE10318}\0002"Parameters\Tcpip","SubnetMask",0x00010000,"255.255.255.0"
The RTL8139.SYS driver does not load as indicated in the attached debug traces . The hivesys entry is attached also with the nic driver.
May be the hivesys entry is not correct . I would be pleased if you can have a look (or somebody else) ?
Best regards Gerard
Gge wrote:
Hi Filip ,
I have updated the Relatek8138 Nic entry of the hivesys.inf file according your indications (I hope !)
[snip]
Try the attached registry entries (I haven't tested it). You _might_ need to replace the "VEN_10EC&DEV_8139&SUBSYS_81391186&REV_10" part with something specific to your card (you can get this from existing Windows installation or from debug messages of drivers/bus/pci/fdo.c).
Regards, Filip
; RTL8139 PCI NIC Driver HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139","ErrorControl",0x00010001,0x00000000 HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139","Group",0x00000000,"NDIS" HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139","ImagePath",0x00020000,"system32\drivers\RTL8139.SYS" HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139","Start",0x00010001,0x00000003 HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139","Type",0x00010001,0x00000001 HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139\Enum","0",0x00000000,"PCI\VEN_10EC&DEV_8139&SUBSYS_81391186&REV_10\0815" HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139\Enum","Count",0x00010001,0x00000001 HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139\Enum","NextInstance",0x00010001,0x00000001 HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139\Enum\0002","Driver",0x00000000,"{4D36E972-E325-11CE-BFC1-08002BE10318}\0001" HKLM,"SYSTEM\CurrentControlSet\Enum\PCI\VEN_10EC&DEV_8139&SUBSYS_81391186&REV_10\0815","Service",0x00000000,"Rtl8139" HKLM,"SYSTEM\CurrentControlSet\Enum\PCI\VEN_10EC&DEV_8139&SUBSYS_81391186&REV_10\0815","Class",0x00000000,"Net" HKLM,"SYSTEM\CurrentControlSet\Enum\PCI\VEN_10EC&DEV_8139&SUBSYS_81391186&REV_10\0815","ClassGUID",0x00000000,"{4D36E972-E325-11CE-BFC1-08002BE10318}" HKLM,"SYSTEM\CurrentControlSet\Enum\PCI\VEN_10EC&DEV_8139&SUBSYS_81391186&REV_10\0815","Driver",0x00000000,"{4D36E972-E325-11CE-BFC1-08002BE10318}\0002"
; RTL8139 PCI NIC PCI Adapter 1 HKLM,"SYSTEM\CurrentControlSet\Control\Class{4D36E972-E325-11CE-BFC1-08002BE10318}\0002","SlotNumber",0x00000000,"9" HKLM,"SYSTEM\CurrentControlSet\Control\Class{4D36E972-E325-11CE-BFC1-08002BE10318}\0002\Linkage","Bind",0x00010000,"\Device\Rtl81391" HKLM,"SYSTEM\CurrentControlSet\Control\Class{4D36E972-E325-11CE-BFC1-08002BE10318}\0002\Linkage","Export",0x00010000,"\Device\Rtl81391" HKLM,"SYSTEM\CurrentControlSet\Control\Class{4D36E972-E325-11CE-BFC1-08002BE10318}\0002\Linkage","Route",0x00010000,"Rtl81391" HKLM,"SYSTEM\CurrentControlSet\Services\Rtl81391\Parameters\Tcpip","DefaultGateway",0x00010000,"192.168.1.0" HKLM,"SYSTEM\CurrentControlSet\Services\Rtl81391\Parameters\Tcpip","IPAddress",0x00010000,"192.168.1.5" HKLM,"SYSTEM\CurrentControlSet\Services\Rtl81391\Parameters\Tcpip","SubnetMask",0x00010000,"255.255.255.0"
Filip Navara wrote:
Gge wrote:
Hi Filip ,
I have updated the Relatek8138 Nic entry of the hivesys.inf file according your indications (I hope !)
[snip]
Try the attached registry entries (I haven't tested it). You _might_ need to replace the "VEN_10EC&DEV_8139&SUBSYS_81391186&REV_10" part with something specific to your card (you can get this from existing Windows installation or from debug messages of drivers/bus/pci/fdo.c).
Oops, sorry, I attched old version.
- Filip
; RTL8139 PCI NIC Driver HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139","ErrorControl",0x00010001,0x00000000 HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139","Group",0x00000000,"NDIS" HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139","ImagePath",0x00020000,"system32\drivers\RTL8139.SYS" HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139","Start",0x00010001,0x00000003 HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139","Type",0x00010001,0x00000001 HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139\Enum","0",0x00000000,"PCI\VEN_10EC&DEV_8139&SUBSYS_81391186&REV_10\0000" HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139\Enum","Count",0x00010001,0x00000001 HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139\Enum","NextInstance",0x00010001,0x00000001 HKLM,"SYSTEM\CurrentControlSet\Enum\PCI\VEN_10EC&DEV_8139&SUBSYS_81391186&REV_10\0000","Service",0x00000000,"Rtl8139" HKLM,"SYSTEM\CurrentControlSet\Enum\PCI\VEN_10EC&DEV_8139&SUBSYS_81391186&REV_10\0000","Class",0x00000000,"Net" HKLM,"SYSTEM\CurrentControlSet\Enum\PCI\VEN_10EC&DEV_8139&SUBSYS_81391186&REV_10\0000","ClassGUID",0x00000000,"{4D36E972-E325-11CE-BFC1-08002BE10318}" HKLM,"SYSTEM\CurrentControlSet\Enum\PCI\VEN_10EC&DEV_8139&SUBSYS_81391186&REV_10\0000","Driver",0x00000000,"{4D36E972-E325-11CE-BFC1-08002BE10318}\0002"
; RTL8139 PCI NIC PCI Adapter 1 HKLM,"SYSTEM\CurrentControlSet\Control\Class{4D36E972-E325-11CE-BFC1-08002BE10318}\0002","SlotNumber",0x00000000,"9" HKLM,"SYSTEM\CurrentControlSet\Control\Class{4D36E972-E325-11CE-BFC1-08002BE10318}\0002\Linkage","Bind",0x00010000,"\Device\Rtl81391" HKLM,"SYSTEM\CurrentControlSet\Control\Class{4D36E972-E325-11CE-BFC1-08002BE10318}\0002\Linkage","Export",0x00010000,"\Device\Rtl81391" HKLM,"SYSTEM\CurrentControlSet\Control\Class{4D36E972-E325-11CE-BFC1-08002BE10318}\0002\Linkage","Route",0x00010000,"Rtl81391" HKLM,"SYSTEM\CurrentControlSet\Services\Rtl81391\Parameters\Tcpip","DefaultGateway",0x00010000,"192.168.1.0" HKLM,"SYSTEM\CurrentControlSet\Services\Rtl81391\Parameters\Tcpip","IPAddress",0x00010000,"192.168.1.5" HKLM,"SYSTEM\CurrentControlSet\Services\Rtl81391\Parameters\Tcpip","SubnetMask",0x00010000,"255.255.255.0"
Filip Navara wrote:
Filip Navara wrote:
Gge wrote:
Hi Filip ,
I have updated the Relatek8138 Nic entry of the hivesys.inf file according your indications
Try the attached registry entries (I haven't tested it). You _might_ need to replace the "VEN_10EC&DEV_8139&SUBSYS_81391186&REV_10" part with something specific to your card (you can get this from existing Windows installation or from debug messages of drivers/bus/pci/fdo.c).
Thanks Filip
I tested the driver loading with your registry but the driver still does not load
1) The RTL8139 PCI NIC Driver informations are supposed to be "PCI\VEN_10EC&DEV_8139&SUBSYS_D0101429&REV_10" as per PCI utility
Vendor 10ECh Realtek Semiconductor Device 8139h RT8139 (A/B/C/813x) Fast Ethernet Adapter Revision 10h, Header Type 00h, Bus Latency 80h PCI Class Network, type Ethernet Subsystem ID D0101429h ND010 Fast Ethernet Adapter Subsystem Vendor 1429h UNEX Technology Corp Address 0 is an I/O Port : 0000D800h Address 1 is a Memory Address (anywhere in 0-4Gb) : FEAFFC00h System IRQ 11, INT# A
2) In the registry of wibndows XP , as per REGEDIT the nic location information id PCI BUD 2 DEVICE 8 FUNCTION 0
The FDO debug says :
fdo.c:99) Bus 2 Device 7 Func 0 (fdo.c:109) Size 0 (fdo.c:99) Bus 2 Device 8 Func 0 (fdo.c:109) Size 0 (fdo.c:99) Bus 2 Device 9 Func 0 (fdo.c:109) Size 0
fdo.c:173) Done (fdo.c:280) DeviceID: PCI\VEN_8086&DEV_2501&SUBSYS_00000000&REV_03 (fdo.c:280) DeviceID: PCI\VEN_8086&DEV_250F&SUBSYS_00000000&REV_03 (fdo.c:280) DeviceID: PCI\VEN_8086&DEV_2418&SUBSYS_00000000&REV_02 (fdo.c:280) DeviceID: PCI\VEN_8086&DEV_2410&SUBSYS_00000000&REV_02 (fdo.c:280) DeviceID: PCI\VEN_8086&DEV_2411&SUBSYS_24118086&REV_02 (fdo.c:280) DeviceID: PCI\VEN_8086&DEV_2412&SUBSYS_24128086&REV_02 (fdo.c:280) DeviceID: PCI\VEN_8086&DEV_2413&SUBSYS_24138086&REV_02 (fdo.c:280) DeviceID: PCI\VEN_10DE&DEV_0111&SUBSYS_00000000&REV_B2 (fdo.c:355) Done
3) Conclusion -------------
Sounds like the Nic is not recognized by Reactos/PCI
Regards Gerard
Annexure : Hivesys entry
Note : I have added the enum key "driver"
; RTL8139 PCI NIC Driver HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139","ErrorControl",0x00010001,0x00000000 HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139","Group",0x00000000,"NDIS" HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139","ImagePath",0x00020000,"system32\drivers\RTL8139.SYS" HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139","Start",0x00010001,0x00000003 HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139","Type",0x00010001,0x00000001 HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139\Enum","0",0x00000000,"PCI\VEN_10EC&DEV_8139&SUBSYS_D0101429&REV_10\0002" HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139\Enum","Count",0x00010001,0x00000001 HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139\Enum","NextInstance",0x00010001,0x00000001 HKLM,"SYSTEM\CurrentControlSet\Services\Rtl8139\Enum\0002","Driver",0x00000000,"{4D36E972-E325-11CE-BFC1-08002BE10318}\0002" HKLM,"SYSTEM\CurrentControlSet\Enum\PCI\VEN_10EC&DEV_8139&SUBSYS_81391186&REV_10\0000","Service",0x00000000,"Rtl8139" HKLM,"SYSTEM\CurrentControlSet\Enum\PCI\VEN_10EC&DEV_8139&SUBSYS_81391186&REV_10\0000","Class",0x00000000,"Net" HKLM,"SYSTEM\CurrentControlSet\Enum\PCI\VEN_10EC&DEV_8139&SUBSYS_81391186&REV_10\0000","ClassGUID",0x00000000,"{4D36E972-E325-11CE-BFC1-08002BE10318}" HKLM,"SYSTEM\CurrentControlSet\Enum\PCI\VEN_10EC&DEV_8139&SUBSYS_81391186&REV_10\0000","Driver",0x00000000,"{4D36E972-E325-11CE-BFC1-08002BE10318}\0002"
; RTL8139 PCI NIC PCI Adapter 1 HKLM,"SYSTEM\CurrentControlSet\Control\Class{4D36E972-E325-11CE-BFC1-08002BE10318}\0002","SlotNumber",0x00000000,"9" HKLM,"SYSTEM\CurrentControlSet\Control\Class{4D36E972-E325-11CE-BFC1-08002BE10318}\0002\Linkage","Bind",0x00010000,"\Device\Rtl81391" HKLM,"SYSTEM\CurrentControlSet\Control\Class{4D36E972-E325-11CE-BFC1-08002BE10318}\0002\Linkage","Export",0x00010000,"\Device\Rtl81391" HKLM,"SYSTEM\CurrentControlSet\Control\Class{4D36E972-E325-11CE-BFC1-08002BE10318}\0002\Linkage","Route",0x00010000,"Rtl81391" HKLM,"SYSTEM\CurrentControlSet\Services\Rtl81391\Parameters\Tcpip","DefaultGateway",0x00010000,"192.168.1.0" HKLM,"SYSTEM\CurrentControlSet\Services\Rtl81391\Parameters\Tcpip","IPAddress",0x00010000,"192.168.1.5" HKLM,"SYSTEM\CurrentControlSet\Services\Rtl81391\Parameters\Tcpip","SubnetMask",0x00010000,"255.255.255.0"
Hi,
I've add/changed the following additionally lines and the realtec driver is loaded. DLKRTS, DLKRTS1 and \0002 should be replaced with the correct values. The driver fails later because one of the ndis function is not implemented.
- Hartmut
HKLM,"SYSTEM\CurrentControlSet\Enum\Root\DLKRTS\0000","Service",0x00000000," DLKRTS" HKLM,"SYSTEM\CurrentControlSet\Enum\Root\DLKRTS\0000","Class",0x00000000,"Ne t" HKLM,"SYSTEM\CurrentControlSet\Enum\Root\DLKRTS\0000","ClassGUID",0x00000000 ,"{4D36E972-E325-11CE-BFC1-08002BE10318}" HKLM,"SYSTEM\CurrentControlSet\Enum\Root\DLKRTS\0000","Driver",0x00000000,"{ 4D36E972-E325-11CE-BFC1-08002BE10318}\0002"
HKLM,"SYSTEM\CurrentControlSet\Services\Tcpip\Linkage","Bind",0x00010000,"\D evice\PCNet1", "\Device\Ne20001", "\Device\DLKRTS1" HKLM,"SYSTEM\CurrentControlSet\Services\Tcpip\Linkage","Export",0x00010000," \Device\Tcpip_PCNet1", "\Device\Tcpip_Ne20001", "\Device\Tcpip_DLKRTS1" HKLM,"SYSTEM\CurrentControlSet\Services\Tcpip\Linkage","Route",0x00010000,"P CNet1", "Ne20001", "DLKRTS1"
Hartmut Birr wrote:
I've add/changed the following additionally lines and the realtec driver is loaded. DLKRTS, DLKRTS1 and \0002 should be replaced with the correct values. The driver fails later because one of the ndis function is not implemented.
- Hartmut
Yes , with your registry changes , now the Realtek Nic driver loads As you indicated , the adapter fails to initialize due to Ndis function which is unimplemented , as per Debug message
Ndis/hardware.c:119 (NdisMQueyAdapterResources) unimplemented
Regards Gerard
"Gge" gerard.gatineau@laposte.net wrote:
Yes , with your registry changes , now the Realtek Nic driver loads As you indicated , the adapter fails to initialize due to Ndis function which is unimplemented , as per Debug message
Ndis/hardware.c:119 (NdisMQueyAdapterResources) unimplemented
Wouldn't it be better if WrapperConfigurationContext in the call to NdisMQueryAdapterResources was a pointer to the physical device objects device node rather than a handle to the miniport drivers registry key?
In this case NdisMQueryAdapterResource could retrieve the current resource list from the device node and other information, like the device instance id, are eaily accessible too.
Regards, Eric
Eric Kohl wrote:
Wouldn't it be better if WrapperConfigurationContext in the call to NdisMQueryAdapterResources was a pointer to the physical device objects device node rather than a handle to the miniport drivers registry key?
No. In fact it was registry handle till NDIS4 and since NDIS5 it's a structure. I have this part partly rewritten in my tree.
In this case NdisMQueryAdapterResource could retrieve the current resource list from the device node and other information, like the device instance id, are eaily accessible too.
Incidentally I have NdisMQueryAdapterResource implemented in my local tree. It gets the resources from the AllocatedResources field in the NDIS_MINIPORT_BLOCK structure which is itself filled in the IRP_MN_START_DEVICE dispatch code. There are two problems with this: 1) The PnP resource assigning in kernel isn't implemented yet (only the untraslated boot configuration is reported to device now, but it might be enough for this case) We need to assign the resources to each device based on the resource requirements (see IRP_MN_QUERY_RESOURCE_REQUIREMENTS, IRP_MN_FILTER_RESOURCE_REQUIREMENTS and _DEVICE_NODE) and then translate them to bus neutral form. (I've written the translation code, but I seriously doubt it's correct.) 2) Currently the RTL8193 card isn't found by our PCI driver (which reports the resources) and so we need this too to proceed further. (Gerard/Hartmut, if you want to help me with this problem, please run http://www.volny.cz/xnavara/devcon.zip on your system under Windows and send me the results back).
Regards, Filip
-----Original Message----- From: ros-dev-bounces@reactos.com [mailto:ros-dev-bounces@reactos.com] On Behalf Of Filip Navara Sent: Wednesday, October 20, 2004 7:58 PM To: ReactOS Development List Subject: Re: [ros-dev] Loading failure of rtl8139.sys driver = OK+ Ndisfunction unimplemented
Are your sure, that you have upload this file?
- Hartmut
Hartmut Birr wrote:
-----Original Message----- From: ros-dev-bounces@reactos.com [mailto:ros-dev-bounces@reactos.com] On Behalf Of Filip Navara Sent: Wednesday, October 20, 2004 7:58 PM To: ReactOS Development List Subject: Re: [ros-dev] Loading failure of rtl8139.sys driver = OK+ Ndisfunction unimplemented
Are your sure, that you have upload this file?
Oops, sorry. I accidently run over the quota and missed the message. Now it should be fine.
Regards, Filip
Filip Navara wrote:
Hartmut Birr wrote:
-----Original Message----- From: ros-dev-bounces@reactos.com [mailto:ros-dev-bounces@reactos.com] On Behalf Of Filip Navara Sent: Wednesday, October 20, 2004 7:58 PM To: ReactOS Development List Subject: Re: [ros-dev] Loading failure of rtl8139.sys driver = OK+ Ndisfunction unimplemented
Are your sure, that you have upload this file?
Oops, sorry. I accidently run over the quota and missed the message. Now it should be fine.
Regards, Filip
Filip,
Here are the results for resources results of Devcon on my Windows machine Let me know if you need moore informations
Regards Gerard
ACPI\FIXEDBUTTON\2&DABA3FF&0 Name: ACPI Fixed Feature Button Device is not using any resources. ACPI\GENUINEINTEL_-_X86_FAMILY_6_MODEL_8_0 Name: Intel(r) Pentium(r)III Processor Device is not using any resources. ACPI\PNP0100\4&264480D3&0 Name: System timer Device has the following resources reserved: IO : 0040-0043 IRQ : 0 ACPI\PNP0200\4&264480D3&0 Name: Direct memory access controller Device has the following resources reserved: IO : 0000-000f IO : 0081-0083 IO : 0087-0087 IO : 0089-008b IO : 008f-008f IO : 00c0-00df DMA : 4 ACPI\PNP0303\4&264480D3&0 Name: Standard 101/102-Key or Microsoft Natural PS/2 Keyboard Device is currently using the following resources: IO : 0060-0060 IO : 0064-0064 IRQ : 1 ACPI\PNP0400\4&264480D3&0 Name: Printer Port (LPT1) Device is currently using the following resources: IO : 0378-037f ACPI\PNP0501\1 Name: Communications Port (COM1) Device is currently using the following resources: IO : 03f8-03ff IRQ : 4 ACPI\PNP0700\4&264480D3&0 Name: Standard floppy disk controller Device is currently using the following resources: IO : 03f0-03f1 IO : 03f2-03f3 IO : 03f4-03f5 IO : 03f7-03f7 DMA : 2 IRQ : 6 ACPI\PNP0800\4&264480D3&0 Name: System speaker Device has the following resources reserved: IO : 0061-0061 ACPI\PNP0A03\2&DABA3FF&0 Name: PCI bus Device is currently using the following resources: MEM : 000a0000-000bffff MEM : 000c0000-000cbfff MEM : 08000000-ffefffff IO : 0000-0cf7 IO : 0d00-ffff ACPI\PNP0B00\4&264480D3&0 Name: System CMOS/real time clock Device is currently using the following resources: IO : 0070-0071 IRQ : 8 ACPI\PNP0C01\1 Name: System board Device has the following resources reserved: MEM : 00000000-0009ffff MEM : 000e0000-000fffff MEM : 00100000-07ffffff ACPI\PNP0C01\2 Name: System board Device has no resources reserved. ACPI\PNP0C04\4&264480D3&0 Name: Numeric data processor Device has the following resources reserved: IO : 00f0-00ff IRQ : 13 ACPI\PNP0F03\4&264480D3&0 Name: Microsoft PS/2 Mouse Device is currently using the following resources: IRQ : 12 ACPI_HAL\PNP0C08\0 Name: Microsoft ACPI-Compliant System Device is currently using the following resources: IRQ : 9 DISPLAY\DEL708A\5&1F682D15&0&22446688&01&00 Name: Dell M990 Device is not using any resources. FDC\GENERIC_FLOPPY_DRIVE\5&7FAD87F&0&0 Name: Floppy disk drive Device is not using any resources. IDE\CDROMSONY_CD-RW__CRX140E_____________________1.0N____\5&18BEF761&0&0.0.0 Name: SONY CD-RW CRX140E Device is not using any resources. IDE\CDROMTOSHIBA_DVD-ROM_SD-M1612________________1004____\5&18BEF761&0&0.1.0 Name: TOSHIBA DVD-ROM SD-M1612 Device is not using any resources. IDE\DISKSAMSUNG_SP0802N_________________________TK100-24\30534A30324A5830323238393633202020202020 Name: SAMSUNG SP0802N Device is not using any resources. ISAPNP\READDATAPORT\0 Name: ISAPNP Read Data Port Device is currently using the following resources: IO : 0a79-0a79 IO : 0279-0279 IO : 0274-0277 LPTENUM\MICROSOFTRAWPORT\5&32FD8942&0&LPT1 Name: Printer Port Logical Interface Device is not using any resources. PCI\VEN_109E&DEV_036E&SUBSYS_1200BD11&REV_11\4&24AB0D93&0&60F0 Name: Pinnacle WDM PCTV Video Capture Device is currently using the following resources: MEM : f47fe000-f47fefff IRQ : 3 PCI\VEN_109E&DEV_0878&SUBSYS_1200BD11&REV_11\4&24AB0D93&0&61F0 Name: Pinnacle WDM PCTV Audio Capture Device is currently using the following resources: MEM : f47ff000-f47fffff IRQ : 3 PCI\VEN_10DE&DEV_0111&SUBSYS_00000000&REV_B2\4&389A186F&0&0008 Name: NVIDIA GeForce2 MX 100/200 Device is currently using the following resources: MEM : fd000000-fdffffff MEM : e8000000-efffffff MEM : 000a0000-000bffff IO : 03b0-03bb IO : 03c0-03df IRQ : 11 PCI\VEN_10EC&DEV_8139&SUBSYS_D0101429&REV_10\4&24AB0D93&0&40F0 Name: Realtek RTL8139 Family PCI Fast Ethernet NIC Device is currently using the following resources: MEM : feaffc00-feaffcff IO : d800-d8ff IRQ : 11 PCI\VEN_1102&DEV_0002&SUBSYS_80221102&REV_07\4&24AB0D93&0&50F0 Name: Creative SB Live! Value (WDM) Device is currently using the following resources: IO : df80-df9f IRQ : 3 PCI\VEN_1102&DEV_7002&SUBSYS_00201102&REV_07\4&24AB0D93&0&51F0 Name: Creative SBLive! Gameport Device is currently using the following resources: IO : dff0-dff7 PCI\VEN_14F1&DEV_1033&SUBSYS_4027122D&REV_08\4&24AB0D93&0&58F0 Name: Dell Data Fax Modem Device is currently using the following resources: MEM : fead0000-feadffff IO : dfe0-dfe7 IRQ : 9 PCI\VEN_8086&DEV_2410&SUBSYS_00000000&REV_02\3&61AAA01&0&F8 Name: Intel(r) 82801AA LPC Interface Controller Device is not using any resources. PCI\VEN_8086&DEV_2411&SUBSYS_24118086&REV_02\3&61AAA01&0&F9 Name: Intel(r) 82801AA Bus Master IDE Controller Device is currently using the following resources: IO : ffa0-ffaf PCI\VEN_8086&DEV_2412&SUBSYS_24128086&REV_02\3&61AAA01&0&FA Name: Intel(r) 82801AA USB Universal Host Controller Device is currently using the following resources: IO : ef80-ef9f IRQ : 9 PCI\VEN_8086&DEV_2413&SUBSYS_24138086&REV_02\3&61AAA01&0&FB Name: Intel(r) 82801AA SMBus Controller Device has the following resources reserved: IO : efa0-efaf IRQ : 10 PCI\VEN_8086&DEV_2418&SUBSYS_00000000&REV_02\3&61AAA01&0&F0 Name: Intel(r) 82801AA PCI Bridge Device is not using any resources. PCI\VEN_8086&DEV_2501&SUBSYS_00000000&REV_03\3&61AAA01&0&00 Name: Intel(r) 82820 Processor to I/O Controller Device is not using any resources. PCI\VEN_8086&DEV_250F&SUBSYS_00000000&REV_03\3&61AAA01&0&08 Name: Intel(r) 82820 Processor to AGP Controller Device is currently using the following resources: MEM : fc900000-fe9fffff MEM : e4600000-f46fffff MEM : 000a0000-000bffff MEM : f8000000-fbffffff IO : 03b0-03bb IO : 03c0-03df PCIIDE\IDECHANNEL\4&109F19AA&0&0 Name: Primary IDE Channel Device is currently using the following resources: IO : 01f0-01f7 IO : 03f6-03f6 IRQ : 14 PCIIDE\IDECHANNEL\4&109F19AA&0&1 Name: Secondary IDE Channel Device is currently using the following resources: IO : 0170-0177 IO : 0376-0376 IRQ : 15 ROOT\ACPI_HAL\0000 Name: Advanced Configuration and Power Interface (ACPI) PC Device is not using any resources. ROOT\DMIO\0000 Name: Logical Disk Manager Device is not using any resources. ROOT\FTDISK\0000 Name: Volume Manager Device is not using any resources. ROOT\LEGACY_AFD\0000 Name: AFD Networking Support Environment Device is not using any resources. ROOT\LEGACY_AVGNTDD\0000 Name: avgntdd Device is not using any resources. ROOT\LEGACY_BEEP\0000 Name: Beep Device is not using any resources. ROOT\LEGACY_COLINUXDRIVER\0000 Name: CoLinuxDriver Device is not using any resources. ROOT\LEGACY_DMBOOT\0000 Name: dmboot Device is not using any resources. ROOT\LEGACY_DMLOAD\0000 Name: dmload Device is not using any resources. ROOT\LEGACY_EMU10K1\0000 Name: Creative Interface Manager Driver (WDM) Device is not using any resources. ROOT\LEGACY_FIPS\0000 Name: Fips Device is not using any resources. ROOT\LEGACY_GPC\0000 Name: Generic Packet Classifier Device is not using any resources. ROOT\LEGACY_IPNAT\0000 Name: IP Network Address Translator Device is not using any resources. ROOT\LEGACY_IPSEC\0000 Name: IPSEC driver Device is not using any resources. ROOT\LEGACY_KSECDD\0000 Name: ksecdd Device is not using any resources. ROOT\LEGACY_MASPINT\0000 Name: MASPINT Device is not using any resources. ROOT\LEGACY_MNMDD\0000 Name: mnmdd Device is not using any resources. ROOT\LEGACY_MOUNTMGR\0000 Name: mountmgr Device is not using any resources. ROOT\LEGACY_NDIS\0000 Name: NDIS System Driver Device is not using any resources. ROOT\LEGACY_NDISTAPI\0000 Name: Remote Access NDIS TAPI Driver Device is not using any resources. ROOT\LEGACY_NDISUIO\0000 Name: NDIS Usermode I/O Protocol Device is not using any resources. ROOT\LEGACY_NDPROXY\0000 Name: NDProxy Device is not using any resources. ROOT\LEGACY_NETBT\0000 Name: NetBios over Tcpip Device is not using any resources. ROOT\LEGACY_NM\0000 Name: Network Monitor Driver Device is not using any resources. ROOT\LEGACY_NPF\0000 Name: NetGroup Packet Filter Driver Device is not using any resources. ROOT\LEGACY_NULL\0000 Name: Null Device is not using any resources. ROOT\LEGACY_PARTMGR\0000 Name: PartMgr Device is not using any resources. ROOT\LEGACY_PARVDM\0000 Name: ParVdm Device is not using any resources. ROOT\LEGACY_RASACD\0000 Name: Remote Access Auto Connection Driver Device is not using any resources. ROOT\LEGACY_RDPCDD\0000 Name: RDPCDD Device is not using any resources. ROOT\LEGACY_SFMAN\0000 Name: Creative SoundFont Manager Driver (WDM) Device is not using any resources. ROOT\LEGACY_TCPIP\0000 Name: TCP/IP Protocol Driver Device is not using any resources. ROOT\LEGACY_VGASAVE\0000 Name: VgaSave Device is not using any resources. ROOT\LEGACY_VOLSNAP\0000 Name: VolSnap Device is not using any resources. ROOT\LEGACY_WANARP\0000 Name: Remote Access IP ARP Driver Device is not using any resources. ROOT\MEDIA\0000 Name: Pinnacle PCTV Data Service Device is not using any resources. ROOT\MEDIA\MS_MMACM Name: Audio Codecs Device is not using any resources. ROOT\MEDIA\MS_MMDRV Name: Legacy Audio Drivers Device is not using any resources. ROOT\MEDIA\MS_MMMCI Name: Media Control Devices Device is not using any resources. ROOT\MEDIA\MS_MMVCD Name: Legacy Video Capture Devices Device is not using any resources. ROOT\MEDIA\MS_MMVID Name: Video Codecs Device is not using any resources. ROOT\MS_L2TPMINIPORT\0000 Name: WAN Miniport (L2TP) Device is not using any resources. ROOT\MS_NDISWANBH\0000 Name: WAN Miniport (Network Monitor) Device is not using any resources. ROOT\MS_NDISWANIP\0000 Name: WAN Miniport (IP) Device is not using any resources. ROOT\MS_PPPOEMINIPORT\0000 Name: WAN Miniport (PPPOE) Device is not using any resources. ROOT\MS_PPTPMINIPORT\0000 Name: WAN Miniport (PPTP) Device is not using any resources. ROOT\MS_PSCHEDMP\0000 Name: WAN Miniport (Network Monitor) - Packet Scheduler Miniport Device is not using any resources. ROOT\MS_PSCHEDMP\0001 Name: WAN Miniport (IP) - Packet Scheduler Miniport Device is not using any resources. ROOT\MS_PSCHEDMP\0002 Name: D-Link DFE-530TX PCI Fast Ethernet Adapter (rev.A) - Packet Scheduler Miniport Device is not using any resources. ROOT\MS_PSCHEDMP\0003 Name: Realtek RTL8139 Family PCI Fast Ethernet NIC - Packet Scheduler Miniport Device is not using any resources. ROOT\MS_PTIMINIPORT\0000 Name: Direct Parallel Device is not using any resources. ROOT\RDPDR\0000 Name: Terminal Server Device Redirector Device is not using any resources. ROOT\RDP_KBD\0000 Name: Terminal Server Keyboard Driver Device is not using any resources. ROOT\RDP_MOU\0000 Name: Terminal Server Mouse Driver Device is not using any resources. ROOT\SYSTEM\0000 Name: Plug and Play Software Device Enumerator Device is not using any resources. ROOT\SYSTEM\0001 Name: Microcode Update Device Device is not using any resources. STORAGE\VOLUME\1&30A96598&0&SIGNATUREB6B5B6B5OFFSET2EE1B7200LENGTHFB5269600 Name: Generic volume Device is not using any resources. STORAGE\VOLUME\1&30A96598&0&SIGNATUREB6B5B6B5OFFSET7E00LENGTH2EE1A7600 Name: Generic volume Device is not using any resources. SW{A7C7A5B0-5AF3-11D1-9CED-00A024BF0407}{9B365890-165F-11D0-A195-0020AFD156E4} Name: Microsoft Kernel System Audio Device Device is not using any resources. SW{B7EAFDC0-A680-11D0-96D8-00AA0051E51D}{9B365890-165F-11D0-A195-0020AFD156E4} Name: Microsoft Kernel Wave Audio Mixer Device is not using any resources. SW{CD171DE3-69E5-11D2-B56D-0000F8754380}{9B365890-165F-11D0-A195-0020AFD156E4} Name: Microsoft WINMM WDM Audio Compatibility Driver Device is not using any resources. USB\ROOT_HUB\4&12F0DD96&0 Name: USB Root Hub Device is not using any resources. 101 matching device(s) found.
"Filip Navara" xnavara@volny.cz wrote:
No. In fact it was registry handle till NDIS4 and since NDIS5 it's a structure. I have this part partly rewritten in my tree.
Ah, I see!
Incidentally I have NdisMQueryAdapterResource implemented in my local tree. It gets the resources from the AllocatedResources field in the NDIS_MINIPORT_BLOCK structure which is itself filled in the IRP_MN_START_DEVICE dispatch code. There are two problems with this:
- The PnP resource assigning in kernel isn't implemented yet (only the
untraslated boot configuration is reported to device now, but it might be enough for this case) We need to assign the resources to each device based on the resource requirements (see IRP_MN_QUERY_RESOURCE_REQUIREMENTS, IRP_MN_FILTER_RESOURCE_REQUIREMENTS and _DEVICE_NODE) and then translate them to bus neutral form. (I've written the translation code, but I seriously doubt it's correct.)
Yep! That's where I got stuck because the hardware I have needed more work on other places. Could you commit your experimental code? Maybe it is a usable foundation.
Btw, I am removing variables like HardwareId from DEVICE_NODE (everything below the '/* Not NT's */' comment) and store it in the registry instead. IoGetDeviceProperty will read them from the registry.
- Currently the RTL8193 card isn't found by our PCI driver (which
reports the resources) and so we need this too to proceed further. (Gerard/Hartmut, if you want to help me with this problem, please run http://www.volny.cz/xnavara/devcon.zip on your system under Windows and send me the results back).
An RTL8193 is enumerated properly on one of my machines but it freezes on the other one.
Regards, Eric
Eric Kohl wrote:
"Filip Navara" xnavara@volny.cz wrote:
No. In fact it was registry handle till NDIS4 and since NDIS5 it's a structure. I have this part partly rewritten in my tree.
Ah, I see!
In fact I forgot to tell that this structure actually contains the pointer to the DeviceObject you were talking about. I'm currently using it just to get access to NDIS_MINIPORT_BLOCK which is located in the DeviceExtension...
Incidentally I have NdisMQueryAdapterResource implemented in my local tree. It gets the resources from the AllocatedResources field in the NDIS_MINIPORT_BLOCK structure which is itself filled in the IRP_MN_START_DEVICE dispatch code. There are two problems with this:
- The PnP resource assigning in kernel isn't implemented yet (only the
untraslated boot configuration is reported to device now, but it might be enough for this case) We need to assign the resources to each device based on the resource requirements (see IRP_MN_QUERY_RESOURCE_REQUIREMENTS, IRP_MN_FILTER_RESOURCE_REQUIREMENTS and _DEVICE_NODE) and then translate them to bus neutral form. (I've written the translation code, but I seriously doubt it's correct.)
Yep! That's where I got stuck because the hardware I have needed more work on other places. Could you commit your experimental code? Maybe it is a usable foundation.
Not yet, maybe in three days or so. I'm currently heavily lifting the NDIS code to get it working the right way again (I messed up few things while moving the stuff to PnP handlers) and in the same time I'm creating "hacks" and fixes on the needed kernel PnP parts.
Btw, I am removing variables like HardwareId from DEVICE_NODE (everything below the '/* Not NT's */' comment) and store it in the registry instead. IoGetDeviceProperty will read them from the registry.
Great! I thought about doing that too :-) I have made some changes to the _DEVICE_NODE structure too, but it shouldn't be hard to sync.
An RTL8193 is enumerated properly on one of my machines but it freezes on the other one.
Ok. So far I had only the report from Gerard who told that it wasn't enumerated. Now I've got access to a computer lab with 10 PCs with RTL8193 so I might give it a try myself...
Regards, Filip
"Filip Navara" xnavara@volny.cz wrote:
In fact I forgot to tell that this structure actually contains the pointer to the DeviceObject you were talking about. I'm currently using it just to get access to NDIS_MINIPORT_BLOCK which is located in the DeviceExtension...
Okay, that's another sollution to the problem.
Great! I thought about doing that too :-) I have made some changes to the _DEVICE_NODE structure too, but it shouldn't be hard to sync.
Do you have an official definition of the _DEVICE_NODE structure? I am asking because I don't know whether I should keep the BusInformation component in _DEVICE_NODE or remove it. I am pretty sure we need the BusNumber and InterfaceType in _DEVICE_NODE but I am not sure about BusTypeGuid?
Ok. So far I had only the report from Gerard who told that it wasn't enumerated. Now I've got access to a computer lab with 10 PCs with RTL8193 so I might give it a try myself...
Ooops, I forgot to mention that one of my machines freezes while pci.sys enumerates devices on the pci bus. This has nothing to do with the RTL8139 driver.
Regards, Eric
Eric Kohl wrote:
"Filip Navara" xnavara@volny.cz wrote:
In fact I forgot to tell that this structure actually contains the pointer to the DeviceObject you were talking about. I'm currently using it just to get access to NDIS_MINIPORT_BLOCK which is located in the DeviceExtension...
Okay, that's another sollution to the problem.
Great! I thought about doing that too :-) I have made some changes to the _DEVICE_NODE structure too, but it shouldn't be hard to sync.
Do you have an official definition of the _DEVICE_NODE structure? I am asking because I don't know whether I should keep the BusInformation component in _DEVICE_NODE or remove it. I am pretty sure we need the BusNumber and InterfaceType in _DEVICE_NODE but I am not sure about BusTypeGuid?
Eric,
Here you go:
struct _DEVICE_NODE, 44 elements, 0x114 bytes +0x000 Sibling : Ptr32 to struct _DEVICE_NODE, 44 elements, 0x114 bytes +0x004 Child : Ptr32 to struct _DEVICE_NODE, 44 elements, 0x114 bytes +0x008 Parent : Ptr32 to struct _DEVICE_NODE, 44 elements, 0x114 bytes +0x00c LastChild : Ptr32 to struct _DEVICE_NODE, 44 elements, 0x114 bytes +0x010 Level : Uint4B +0x014 Notify : Ptr32 to struct _PO_DEVICE_NOTIFY, 10 elements, 0x28 bytes +0x018 State : Enum _PNP_DEVNODE_STATE, 22 total enums
+0x01c PreviousState : Enum _PNP_DEVNODE_STATE, 22 total enums
+0x020 StateHistory : [20] Enum _PNP_DEVNODE_STATE, 22 total enums
+0x070 StateHistoryEntry : Uint4B +0x074 CompletionStatus : Int4B +0x078 PendingIrp : Ptr32 to struct _IRP, 21 elements, 0x70 bytes +0x07c Flags : Uint4B +0x080 UserFlags : Uint4B +0x084 Problem : Uint4B +0x088 PhysicalDeviceObject : Ptr32 to struct _DEVICE_OBJECT, 25 elements, 0xb8 bytes +0x08c ResourceList : Ptr32 to struct _CM_RESOURCE_LIST, 2 elements, 0x24 bytes +0x090 ResourceListTranslated : Ptr32 to struct _CM_RESOURCE_LIST, 2 elements, 0x24 bytes +0x094 InstancePath : struct _UNICODE_STRING, 3 elements, 0x8 bytes +0x09c ServiceName : struct _UNICODE_STRING, 3 elements, 0x8 bytes +0x0a4 DuplicatePDO : Ptr32 to struct _DEVICE_OBJECT, 25 elements, 0xb8 bytes +0x0a8 ResourceRequirements : Ptr32 to struct _IO_RESOURCE_REQUIREMENTS_LIST, 7 elements, 0x48 bytes +0x0ac InterfaceType : Enum _INTERFACE_TYPE, 18 total enums
+0x0b0 BusNumber : Uint4B +0x0b4 ChildInterfaceType : Enum _INTERFACE_TYPE, 18 total enums
+0x0b8 ChildBusNumber : Uint4B +0x0bc ChildBusTypeIndex : Uint2B +0x0be RemovalPolicy : UChar +0x0bf HardwareRemovalPolicy : UChar +0x0c0 TargetDeviceNotify : struct _LIST_ENTRY, 2 elements, 0x8 bytes +0x0c8 DeviceArbiterList : struct _LIST_ENTRY, 2 elements, 0x8 bytes +0x0d0 DeviceTranslatorList : struct _LIST_ENTRY, 2 elements, 0x8 bytes +0x0d8 NoTranslatorMask : Uint2B +0x0da QueryTranslatorMask : Uint2B +0x0dc NoArbiterMask : Uint2B +0x0de QueryArbiterMask : Uint2B +0x0e0 OverUsed1 : union __unnamed, 2 elements, 0x4 bytes +0x0e4 OverUsed2 : union __unnamed, 1 elements, 0x4 bytes +0x0e8 BootResources : Ptr32 to struct _CM_RESOURCE_LIST, 2 elements, 0x24 bytes +0x0ec CapabilityFlags : Uint4B +0x0f0 DockInfo : struct __unnamed, 3 elements, 0x10 bytes +0x100 DisableableDepends : Uint4B +0x104 PendedSetInterfaceState : struct _LIST_ENTRY, 2 elements, 0x8 bytes +0x10c LegacyBusListEntry : struct _LIST_ENTRY, 2 elements, 0x8 bytes
struct _PO_DEVICE_NOTIFY, 10 elements, 0x28 bytes +0x000 Link : struct _LIST_ENTRY, 2 elements, 0x8 bytes +0x008 TargetDevice : Ptr32 to struct _DEVICE_OBJECT, 25 elements, 0xb8 bytes +0x00c WakeNeeded : UChar +0x00d OrderLevel : UChar +0x010 DeviceObject : Ptr32 to struct _DEVICE_OBJECT, 25 elements, 0xb8 bytes +0x014 Node : Ptr32 to Void +0x018 DeviceName : Ptr32 to Uint2B +0x01c DriverName : Ptr32 to Uint2B +0x020 ChildCount : Uint4B +0x024 ActiveChild : Uint4B
Enum _PNP_DEVNODE_STATE, 22 total enums DeviceNodeUnspecified = 768 DeviceNodeUninitialized = 769 DeviceNodeInitialized = 770 DeviceNodeDriversAdded = 771 DeviceNodeResourcesAssigned = 772 DeviceNodeStartPending = 773 DeviceNodeStartCompletion = 774 DeviceNodeStartPostWork = 775 DeviceNodeStarted = 776 DeviceNodeQueryStopped = 777 DeviceNodeStopped = 778 DeviceNodeRestartCompletion = 779 DeviceNodeEnumeratePending = 780 DeviceNodeEnumerateCompletion = 781 DeviceNodeAwaitingQueuedDeletion = 782 DeviceNodeAwaitingQueuedRemoval = 783 DeviceNodeQueryRemoved = 784 DeviceNodeRemovePendingCloses = 785 DeviceNodeRemoved = 786 DeviceNodeDeletePendingCloses = 787 DeviceNodeDeleted = 788 MaxDeviceNodeState = 789
struct _IO_RESOURCE_REQUIREMENTS_LIST, 7 elements, 0x48 bytes +0x000 ListSize : Uint4B +0x004 InterfaceType : Enum _INTERFACE_TYPE, 18 total enums +0x008 BusNumber : Uint4B +0x00c SlotNumber : Uint4B +0x010 Reserved : [3] Uint4B +0x01c AlternativeLists : Uint4B +0x020 List : [1] struct _IO_RESOURCE_LIST, 4 elements, 0x28 bytes
I think IO_RESOURCE_LIST is already in the headers, same for CM_RESOURCE_LIST, if not, let me know.
Best regards, Alex Ionescu
Ok. So far I had only the report from Gerard who told that it wasn't enumerated. Now I've got access to a computer lab with 10 PCs with RTL8193 so I might give it a try myself...
Ooops, I forgot to mention that one of my machines freezes while pci.sys enumerates devices on the pci bus. This has nothing to do with the RTL8139 driver.
Regards, Eric
Ros-dev mailing list Ros-dev@reactos.com http://reactos.com:8080/mailman/listinfo/ros-dev
Eric Kohl wrote:
Do you have an official definition of the _DEVICE_NODE structure? I am asking because I don't know whether I should keep the BusInformation component in _DEVICE_NODE or remove it. I am pretty sure we need the BusNumber and InterfaceType in _DEVICE_NODE but I am not sure about BusTypeGuid?
See the attached file (at the end). It's taken from my notes and contains a _DEVICE_NODE definition with some minor annotations.
Ooops, I forgot to mention that one of my machines freezes while pci.sys enumerates devices on the pci bus. This has nothing to do with the RTL8139 driver.
Reminds me we need implement support for PCI-to-PCI bridges (by stacking another instance of pci.sys on top of the corresponding PDO) so that we can enumerate the RTL card on Gerard's computer.
Regards, Filip
Plug & Play Device Nodes ------------------------
One of the main structures in PnP is the device node. Each device (or virtual device) present in the system has it's corresponding device node which stores all information about the device it belongs to including it's state, resource requirements, currently assigned resources and device objects (it directly refers only to PDO, but other device objects are accessible too). These device nodes are grouped together in a tree which stores all the devices in the system. On the top of the tree sits the virtual root device node that groups together legacy device drivers, bus drivers and drivers that don't control any physical device. The virtual root bus is implemented in the kernel itself and enumerates it's children based on the settings present in the registry (HKLM\System\ CurrentControlSet\Enum). Let's look at a portion of typical device node tree:
/--------\ | TCP/IP | --------/ - ... | / /----------\ /----------\ /---------\ / /-------------\ | Root Bus |--| ACPI HAL |--| PCI Bus |----| Display Card | ----------/ ----------/ ---------/ \ -------------/ | \ /---------\ \ /---------------\ \ ... -| ISA Bus | -| USB Controller |-- ... ---------/ ---------------/
In this example you can see that there is a TCP/IP service and ACPI bus enumerated by the root bus. The ACPI HAL is a virtual bus driver which is located in the HAL and might not be present depending on computer and Windows configuration. Down the stack we can see the PCI and ISA bus drivers which were itself enumerated by the ACPI HAL and that enumerate other devices connected to them.
Plug & Play Enumeration -----------------------
<!!!nonsense!!!> During the system start all the drivers must be loaded. This is accomplished by recursively iterating through the device node tree. At first the root bus device node is created and it's called to enumerate it's children. Then all the children drivers are loaded and called to enumerate their children and so one. For each enumerated device a physical device object (PDO) is created and if everything goes right an functional device object (FDO) is attached on top of it. The parent bus drivers supply the PDOs for their devices and the drivers corresponding to these devices attach their FDOs. </!!!nonsense!!!>
* IoInvalidateDeviceRelations
typedef struct _PO_DEVICE_NOTIFY { LIST_ENTRY Link; PDEVICE_OBJECT TargetDevice; UCHAR WakeNeeded; UCHAR OrderLevel; PDEVICE_OBJECT DeviceObject; struct _DEVICE_NODE *Node; WCHAR *DeviceName; WCHAR *DriverName; ULONG ChildCount; ULONG ActiveChild; } PO_DEVICE_NOTIFY, *PPO_DEVICE_NOTIFY;
typedef enum _PNP_DEVNODE_STATE { DeviceNodeUnspecified = 0x300 DeviceNodeUninitialized, DeviceNodeInitialized, DeviceNodeDriversAdded, DeviceNodeResourcesAssigned, DeviceNodeStartPending, DeviceNodeStartCompletion, DeviceNodeStartPostWork, DeviceNodeStarted, DeviceNodeQueryStopped, DeviceNodeStopped, DeviceNodeRestartCompletion, DeviceNodeEnumeratePending, DeviceNodeEnumerateCompletion, DeviceNodeAwaitingQueuedDeletion, DeviceNodeAwaitingQueuedRemoval, DeviceNodeQueryRemoved, DeviceNodeRemovePendingCloses, DeviceNodeRemoved, DeviceNodeDeletePendingCloses, DeviceNodeDeleted } PNP_DEVNODE_STATE, *PPNP_DEVNODE_STATE;
typedef enum { DOCK_NOTDOCKDEVICE = 0, DOCK_QUIESCENT, DOCK_ARRIVING, DOCK_DEPARTING, DOCK_EJECTIRP_COMPLETED } PNP_DOCK_STATUS;
typedef struct _DEVICE_NODE { /* A tree structure. */ struct _DEVICE_NODE *Sibling; struct _DEVICE_NODE *Child; struct _DEVICE_NODE *Parent; struct _DEVICE_NODE *LastChild; /* The level of deepness in the tree. */ UINT Level; /* */ PPO_DEVICE_NOTIFY Notify; /* State machine. */ PNP_DEVNODE_STATE State; PNP_DEVNODE_STATE PreviousState; PNP_DEVNODE_STATE StateHistory[20]; UINT StateHistoryEntry; /* ? */ INT CompletionStatus; /* ? */ PIRP PendingIrp; /* See DNF_* flags below (WinDBG documentation has WRONG values) */ ULONG Flags; /* See DNUF_* flags below */ ULONG UserFlags; /* See CM_PROB_* values are defined in cfg.h */ ULONG Problem; /* Pointer to the PDO corresponding to the device node. */ PDEVICE_OBJECT PhysicalDeviceObject; /* Resource list as assigned by the PnP arbiter. See IRP_MN_START_DEVICE and ARBITER_INTERFACE (not documented in DDK, but present in headers). */ PCM_RESOURCE_LIST ResourceList; /* Resource list as assigned by the PnP arbiter (translated version). */ PCM_RESOURCE_LIST ResourceListTranslated; /* Instance path relative to the Enum key in registry. */ UNICODE_STRING InstancePath; /* Name of the driver service. */ UNICODE_STRING ServiceName; /* ? */ PDEVICE_OBJECT DuplicatePDO; /* See IRP_MN_QUERY_RESOURCE_REQUIREMENTS. */ PIO_RESOURCE_REQUIREMENTS_LIST ResourceRequirements; /* Information about bus for bus drivers. */ INTERFACE_TYPE InterfaceType; ULONG BusNumber; /* Information about underlying bus for child devices. */ INTERFACE_TYPE ChildInterfaceType; ULONG ChildBusNumber; USHORT ChildBusTypeIndex; /* ? */ UCHAR RemovalPolicy; UCHAR HardwareRemovalPolicy; LIST_ENTRY TargetDeviceNotify; LIST_ENTRY DeviceArbiterList; LIST_ENTRY DeviceTranslatorList; USHORT NoTranslatorMask; USHORT QueryTranslatorMask; USHORT NoArbiterMask; USHORT QueryArbiterMask; ULONG OverUsed1; ULONG OverUsed2; /* See IRP_MN_QUERY_RESOURCES. */ PCM_RESOURCE_LIST BootResources; /* See the bitfields in DEVICE_CAPABILITIES structure. */ ULONG CapabilityFlags; struct { ULONG DockStatus; LIST_ENTRY ListEntry; WCHAR *SerialNumber; } DockInfo; ULONG DisableableDepends; LIST_ENTRY PendedSetInterfaceState; LIST_ENTRY LegacyBusListEntry; ULONG DriverUnloadRetryCount; } DEVICE_NODE, *PDEVICE_NODE;
#ifdef _W2K_ #define DNF_MADEUP 1 #define DNF_HAL_NODE 4 #define DNF_PROCESSED 8 #define DNF_ENUMERATED 0x10 #define DNF_ADDED 0x40 #define DNF_HAS_BOOT_CONFIG 0x80 #define DNF_BOOT_CONFIG_RESERVED 0x100 #define DNF_NO_RESOURCE_REQUIRED 0x400 #define DNF_STARTED 0x40000 #else #define DNF_MADEUP 1 #define DNF_HAL_NODE 4 #define DNF_ENUMERATED 0x10 #define DNF_IDS_QUERIED 0x20 #define DNF_HAS_BOOT_CONFIG 0x40 #define DNF_BOOT_CONFIG_RESERVED 0x80 #define DNF_NO_RESOURCE_REQUIRED 0x100 #define DNF_RESOURCE_REQUIREMENTS_NEED_FILTERED 0x200 #endif
#define DNUF_DONT_SHOW_IN_UI 2 #define DNUF_NOT_DISABLEABLE 8
/* CM_PROB_* values are defined in cfg.h */
Since Filip posted his in C format, it slightly varies a bit from mine, here's the modifications:
typedef struct _DEVICE_NODE { /* A tree structure. */ struct _DEVICE_NODE *Sibling; struct _DEVICE_NODE *Child; struct _DEVICE_NODE *Parent; struct _DEVICE_NODE *LastChild; /* The level of deepness in the tree. */ UINT Level; /* */ PPO_DEVICE_NOTIFY Notify; /* State machine. */ PNP_DEVNODE_STATE State; PNP_DEVNODE_STATE PreviousState; PNP_DEVNODE_STATE StateHistory[20]; UINT StateHistoryEntry; /* ? */ INT CompletionStatus; /* ? */ PIRP PendingIrp; /* See DNF_* flags below (WinDBG documentation has WRONG values) */ ULONG Flags; /* See DNUF_* flags below */ ULONG UserFlags; /* See CM_PROB_* values are defined in cfg.h */ ULONG Problem; /* Pointer to the PDO corresponding to the device node. */ PDEVICE_OBJECT PhysicalDeviceObject; /* Resource list as assigned by the PnP arbiter. See IRP_MN_START_DEVICE and ARBITER_INTERFACE (not documented in DDK, but present in headers). */ PCM_RESOURCE_LIST ResourceList; /* Resource list as assigned by the PnP arbiter (translated version). */ PCM_RESOURCE_LIST ResourceListTranslated; /* Instance path relative to the Enum key in registry. */ UNICODE_STRING InstancePath; /* Name of the driver service. */ UNICODE_STRING ServiceName; /* ? */ PDEVICE_OBJECT DuplicatePDO; /* See IRP_MN_QUERY_RESOURCE_REQUIREMENTS. */ PIO_RESOURCE_REQUIREMENTS_LIST ResourceRequirements; /* Information about bus for bus drivers. */ INTERFACE_TYPE InterfaceType; ULONG BusNumber; /* Information about underlying bus for child devices. */ INTERFACE_TYPE ChildInterfaceType; ULONG ChildBusNumber; USHORT ChildBusTypeIndex; /* ? */ UCHAR RemovalPolicy; UCHAR HardwareRemovalPolicy; LIST_ENTRY TargetDeviceNotify; LIST_ENTRY DeviceArbiterList; LIST_ENTRY DeviceTranslatorList; USHORT NoTranslatorMask; USHORT QueryTranslatorMask; USHORT NoArbiterMask; USHORT QueryArbiterMask; union { struct _DEVICE_NODE *LegacyDeviceNode; PVOID PendingDeviceRelations } OverUsed1; union { struct _DEVICE_NODE *NextResourceDeviceNode; } OverUsed2; /* See IRP_MN_QUERY_RESOURCES. */ PCM_RESOURCE_LIST BootResources; /* See the bitfields in DEVICE_CAPABILITIES structure. */ ULONG CapabilityFlags; struct { ULONG DockStatus; /* See Dock Flags */ LIST_ENTRY ListEntry; WCHAR *SerialNumber; } DockInfo; ULONG DisableableDepends; LIST_ENTRY PendedSetInterfaceState; LIST_ENTRY LegacyBusListEntry; ULONG DriverUnloadRetryCount; } DEVICE_NODE, *PDEVICE_NODE;
Dock Flags: DOCK_NOTDOCKDEVICE = 0 DOCK_QUIESCENT = 1 DOCK_ARRIVING = 2 DOCK_DEPARTING = 3 DOCK_EJECTIRP_COMPLETED = 4
Filip Navara wrote:
Eric Kohl wrote:
Do you have an official definition of the _DEVICE_NODE structure? I am asking because I don't know whether I should keep the BusInformation component in _DEVICE_NODE or remove it. I am pretty sure we need the BusNumber and InterfaceType in _DEVICE_NODE but I am not sure about BusTypeGuid?
See the attached file (at the end). It's taken from my notes and contains a _DEVICE_NODE definition with some minor annotations.
Ooops, I forgot to mention that one of my machines freezes while pci.sys enumerates devices on the pci bus. This has nothing to do with the RTL8139 driver.
Reminds me we need implement support for PCI-to-PCI bridges (by stacking another instance of pci.sys on top of the corresponding PDO) so that we can enumerate the RTL card on Gerard's computer.
Regards, Filip
Plug & Play Device Nodes
One of the main structures in PnP is the device node. Each device (or virtual device) present in the system has it's corresponding device node which stores all information about the device it belongs to including it's state, resource requirements, currently assigned resources and device objects (it directly refers only to PDO, but other device objects are accessible too). These device nodes are grouped together in a tree which stores all the devices in the system. On the top of the tree sits the virtual root device node that groups together legacy device drivers, bus drivers and drivers that don't control any physical device. The virtual root bus is implemented in the kernel itself and enumerates it's children based on the settings present in the registry (HKLM\System\ CurrentControlSet\Enum). Let's look at a portion of typical device node tree:
/--------\ | TCP/IP | --------/ - ... | / /----------\ /----------\ /---------\ / /-------------\ | Root Bus |--| ACPI HAL |--| PCI Bus |----| Display Card | ----------/ ----------/ ---------/ \ -------------/ | \ /---------\ \ /---------------\ \ ... -| ISA Bus | -| USB Controller |-- ... ---------/ ---------------/
In this example you can see that there is a TCP/IP service and ACPI bus enumerated by the root bus. The ACPI HAL is a virtual bus driver which is located in the HAL and might not be present depending on computer and Windows configuration. Down the stack we can see the PCI and ISA bus drivers which were itself enumerated by the ACPI HAL and that enumerate other devices connected to them.
Plug & Play Enumeration
<!!!nonsense!!!> During the system start all the drivers must be loaded. This is accomplished by recursively iterating through the device node tree. At first the root bus device node is created and it's called to enumerate it's children. Then all the children drivers are loaded and called to enumerate their children and so one. For each enumerated device a physical device object (PDO) is created and if everything goes right an functional device object (FDO) is attached on top of it. The parent bus drivers supply the PDOs for their devices and the drivers corresponding to these devices attach their FDOs. </!!!nonsense!!!>
- IoInvalidateDeviceRelations
typedef struct _PO_DEVICE_NOTIFY { LIST_ENTRY Link; PDEVICE_OBJECT TargetDevice; UCHAR WakeNeeded; UCHAR OrderLevel; PDEVICE_OBJECT DeviceObject; struct _DEVICE_NODE *Node; WCHAR *DeviceName; WCHAR *DriverName; ULONG ChildCount; ULONG ActiveChild; } PO_DEVICE_NOTIFY, *PPO_DEVICE_NOTIFY;
typedef enum _PNP_DEVNODE_STATE { DeviceNodeUnspecified = 0x300 DeviceNodeUninitialized, DeviceNodeInitialized, DeviceNodeDriversAdded, DeviceNodeResourcesAssigned, DeviceNodeStartPending, DeviceNodeStartCompletion, DeviceNodeStartPostWork, DeviceNodeStarted, DeviceNodeQueryStopped, DeviceNodeStopped, DeviceNodeRestartCompletion, DeviceNodeEnumeratePending, DeviceNodeEnumerateCompletion, DeviceNodeAwaitingQueuedDeletion, DeviceNodeAwaitingQueuedRemoval, DeviceNodeQueryRemoved, DeviceNodeRemovePendingCloses, DeviceNodeRemoved, DeviceNodeDeletePendingCloses, DeviceNodeDeleted } PNP_DEVNODE_STATE, *PPNP_DEVNODE_STATE;
typedef enum { DOCK_NOTDOCKDEVICE = 0, DOCK_QUIESCENT, DOCK_ARRIVING, DOCK_DEPARTING, DOCK_EJECTIRP_COMPLETED } PNP_DOCK_STATUS;
typedef struct _DEVICE_NODE { /* A tree structure. */ struct _DEVICE_NODE *Sibling; struct _DEVICE_NODE *Child; struct _DEVICE_NODE *Parent; struct _DEVICE_NODE *LastChild; /* The level of deepness in the tree. */ UINT Level; /* */ PPO_DEVICE_NOTIFY Notify; /* State machine. */ PNP_DEVNODE_STATE State; PNP_DEVNODE_STATE PreviousState; PNP_DEVNODE_STATE StateHistory[20]; UINT StateHistoryEntry; /* ? */ INT CompletionStatus; /* ? */ PIRP PendingIrp; /* See DNF_* flags below (WinDBG documentation has WRONG values) */ ULONG Flags; /* See DNUF_* flags below */ ULONG UserFlags; /* See CM_PROB_* values are defined in cfg.h */ ULONG Problem; /* Pointer to the PDO corresponding to the device node. */ PDEVICE_OBJECT PhysicalDeviceObject; /* Resource list as assigned by the PnP arbiter. See IRP_MN_START_DEVICE and ARBITER_INTERFACE (not documented in DDK, but present in headers). */ PCM_RESOURCE_LIST ResourceList; /* Resource list as assigned by the PnP arbiter (translated version). */ PCM_RESOURCE_LIST ResourceListTranslated; /* Instance path relative to the Enum key in registry. */ UNICODE_STRING InstancePath; /* Name of the driver service. */ UNICODE_STRING ServiceName; /* ? */ PDEVICE_OBJECT DuplicatePDO; /* See IRP_MN_QUERY_RESOURCE_REQUIREMENTS. */ PIO_RESOURCE_REQUIREMENTS_LIST ResourceRequirements; /* Information about bus for bus drivers. */ INTERFACE_TYPE InterfaceType; ULONG BusNumber; /* Information about underlying bus for child devices. */ INTERFACE_TYPE ChildInterfaceType; ULONG ChildBusNumber; USHORT ChildBusTypeIndex; /* ? */ UCHAR RemovalPolicy; UCHAR HardwareRemovalPolicy; LIST_ENTRY TargetDeviceNotify; LIST_ENTRY DeviceArbiterList; LIST_ENTRY DeviceTranslatorList; USHORT NoTranslatorMask; USHORT QueryTranslatorMask; USHORT NoArbiterMask; USHORT QueryArbiterMask; ULONG OverUsed1; ULONG OverUsed2; /* See IRP_MN_QUERY_RESOURCES. */ PCM_RESOURCE_LIST BootResources; /* See the bitfields in DEVICE_CAPABILITIES structure. */ ULONG CapabilityFlags; struct { ULONG DockStatus; LIST_ENTRY ListEntry; WCHAR *SerialNumber; } DockInfo; ULONG DisableableDepends; LIST_ENTRY PendedSetInterfaceState; LIST_ENTRY LegacyBusListEntry; ULONG DriverUnloadRetryCount; } DEVICE_NODE, *PDEVICE_NODE;
#ifdef _W2K_ #define DNF_MADEUP 1 #define DNF_HAL_NODE 4 #define DNF_PROCESSED 8 #define DNF_ENUMERATED 0x10 #define DNF_ADDED 0x40 #define DNF_HAS_BOOT_CONFIG 0x80 #define DNF_BOOT_CONFIG_RESERVED 0x100 #define DNF_NO_RESOURCE_REQUIRED 0x400 #define DNF_STARTED 0x40000 #else #define DNF_MADEUP 1 #define DNF_HAL_NODE 4 #define DNF_ENUMERATED 0x10 #define DNF_IDS_QUERIED 0x20 #define DNF_HAS_BOOT_CONFIG 0x40 #define DNF_BOOT_CONFIG_RESERVED 0x80 #define DNF_NO_RESOURCE_REQUIRED 0x100 #define DNF_RESOURCE_REQUIREMENTS_NEED_FILTERED 0x200 #endif
#define DNUF_DONT_SHOW_IN_UI 2 #define DNUF_NOT_DISABLEABLE 8
/* CM_PROB_* values are defined in cfg.h */
Ros-dev mailing list Ros-dev@reactos.com http://reactos.com:8080/mailman/listinfo/ros-dev
One last fix included below
Alex Ionescu wrote:
Since Filip posted his in C format, it slightly varies a bit from mine, here's the modifications:
typedef struct _DEVICE_NODE { /* A tree structure. */ struct _DEVICE_NODE *Sibling; struct _DEVICE_NODE *Child; struct _DEVICE_NODE *Parent; struct _DEVICE_NODE *LastChild; /* The level of deepness in the tree. */ UINT Level; /* */ PPO_DEVICE_NOTIFY Notify; /* State machine. */ PNP_DEVNODE_STATE State; PNP_DEVNODE_STATE PreviousState; PNP_DEVNODE_STATE StateHistory[20]; UINT StateHistoryEntry; /* ? */ INT CompletionStatus; /* ? */ PIRP PendingIrp; /* See DNF_* flags below (WinDBG documentation has WRONG values) */ ULONG Flags; /* See DNUF_* flags below */ ULONG UserFlags; /* See CM_PROB_* values are defined in cfg.h */ ULONG Problem; /* Pointer to the PDO corresponding to the device node. */ PDEVICE_OBJECT PhysicalDeviceObject; /* Resource list as assigned by the PnP arbiter. See IRP_MN_START_DEVICE and ARBITER_INTERFACE (not documented in DDK, but present in headers). */ PCM_RESOURCE_LIST ResourceList; /* Resource list as assigned by the PnP arbiter (translated version). */ PCM_RESOURCE_LIST ResourceListTranslated; /* Instance path relative to the Enum key in registry. */ UNICODE_STRING InstancePath; /* Name of the driver service. */ UNICODE_STRING ServiceName; /* ? */ PDEVICE_OBJECT DuplicatePDO; /* See IRP_MN_QUERY_RESOURCE_REQUIREMENTS. */ PIO_RESOURCE_REQUIREMENTS_LIST ResourceRequirements; /* Information about bus for bus drivers. */ INTERFACE_TYPE InterfaceType; ULONG BusNumber; /* Information about underlying bus for child devices. */ INTERFACE_TYPE ChildInterfaceType; ULONG ChildBusNumber; USHORT ChildBusTypeIndex; /* ? */ UCHAR RemovalPolicy; UCHAR HardwareRemovalPolicy; LIST_ENTRY TargetDeviceNotify; LIST_ENTRY DeviceArbiterList; LIST_ENTRY DeviceTranslatorList; USHORT NoTranslatorMask; USHORT QueryTranslatorMask; USHORT NoArbiterMask; USHORT QueryArbiterMask; union { struct _DEVICE_NODE *LegacyDeviceNode; PDEVICE_RELATIONS PendingDeviceRelations; } OverUsed1; union { struct _DEVICE_NODE *NextResourceDeviceNode; } OverUsed2; /* See IRP_MN_QUERY_RESOURCES. */ PCM_RESOURCE_LIST BootResources; /* See the bitfields in DEVICE_CAPABILITIES structure. */ ULONG CapabilityFlags; struct { ULONG DockStatus; /* See Dock Flags */ LIST_ENTRY ListEntry; WCHAR *SerialNumber; } DockInfo; ULONG DisableableDepends; LIST_ENTRY PendedSetInterfaceState; LIST_ENTRY LegacyBusListEntry; ULONG DriverUnloadRetryCount; } DEVICE_NODE, *PDEVICE_NODE;
Dock Flags: DOCK_NOTDOCKDEVICE = 0 DOCK_QUIESCENT = 1 DOCK_ARRIVING = 2 DOCK_DEPARTING = 3 DOCK_EJECTIRP_COMPLETED = 4
Filip Navara wrote:
Eric Kohl wrote:
Do you have an official definition of the _DEVICE_NODE structure? I am asking because I don't know whether I should keep the BusInformation component in _DEVICE_NODE or remove it. I am pretty sure we need the BusNumber and InterfaceType in _DEVICE_NODE but I am not sure about BusTypeGuid?
See the attached file (at the end). It's taken from my notes and contains a _DEVICE_NODE definition with some minor annotations.
Ooops, I forgot to mention that one of my machines freezes while pci.sys enumerates devices on the pci bus. This has nothing to do with the RTL8139 driver.
Reminds me we need implement support for PCI-to-PCI bridges (by stacking another instance of pci.sys on top of the corresponding PDO) so that we can enumerate the RTL card on Gerard's computer.
Regards, Filip
Plug & Play Device Nodes
One of the main structures in PnP is the device node. Each device (or virtual device) present in the system has it's corresponding device node which stores all information about the device it belongs to including it's state, resource requirements, currently assigned resources and device objects (it directly refers only to PDO, but other device objects are accessible too). These device nodes are grouped together in a tree which stores all the devices in the system. On the top of the tree sits the virtual root device node that groups together legacy device drivers, bus drivers and drivers that don't control any physical device. The virtual root bus is implemented in the kernel itself and enumerates it's children based on the settings present in the registry (HKLM\System\ CurrentControlSet\Enum). Let's look at a portion of typical device node tree:
/--------\ | TCP/IP | --------/ - ... | / /----------\ /----------\ /---------\ / /-------------\ | Root Bus |--| ACPI HAL |--| PCI Bus |----| Display Card | ----------/ ----------/ ---------/ \ -------------/ | \ /---------\ \ /---------------\ \ ... -| ISA Bus | -| USB Controller |-- ... ---------/ ---------------/ In this example you can see that there is a TCP/IP service and ACPI bus enumerated by the root bus. The ACPI HAL is a virtual bus driver which is located in the HAL and might not be present depending on computer and Windows configuration. Down the stack we can see the PCI and ISA bus drivers which were itself enumerated by the ACPI HAL and that enumerate other devices connected to them.
Plug & Play Enumeration
<!!!nonsense!!!> During the system start all the drivers must be loaded. This is accomplished by recursively iterating through the device node tree. At first the root bus device node is created and it's called to enumerate it's children. Then all the children drivers are loaded and called to enumerate their children and so one. For each enumerated device a physical device object (PDO) is created and if everything goes right an functional device object (FDO) is attached on top of it. The parent bus drivers supply the PDOs for their devices and the drivers corresponding to these devices attach their FDOs. </!!!nonsense!!!>
- IoInvalidateDeviceRelations
typedef struct _PO_DEVICE_NOTIFY { LIST_ENTRY Link; PDEVICE_OBJECT TargetDevice; UCHAR WakeNeeded; UCHAR OrderLevel; PDEVICE_OBJECT DeviceObject; struct _DEVICE_NODE *Node; WCHAR *DeviceName; WCHAR *DriverName; ULONG ChildCount; ULONG ActiveChild; } PO_DEVICE_NOTIFY, *PPO_DEVICE_NOTIFY;
typedef enum _PNP_DEVNODE_STATE { DeviceNodeUnspecified = 0x300 DeviceNodeUninitialized, DeviceNodeInitialized, DeviceNodeDriversAdded, DeviceNodeResourcesAssigned, DeviceNodeStartPending, DeviceNodeStartCompletion, DeviceNodeStartPostWork, DeviceNodeStarted, DeviceNodeQueryStopped, DeviceNodeStopped, DeviceNodeRestartCompletion, DeviceNodeEnumeratePending, DeviceNodeEnumerateCompletion, DeviceNodeAwaitingQueuedDeletion, DeviceNodeAwaitingQueuedRemoval, DeviceNodeQueryRemoved, DeviceNodeRemovePendingCloses, DeviceNodeRemoved, DeviceNodeDeletePendingCloses, DeviceNodeDeleted } PNP_DEVNODE_STATE, *PPNP_DEVNODE_STATE;
typedef enum { DOCK_NOTDOCKDEVICE = 0, DOCK_QUIESCENT, DOCK_ARRIVING, DOCK_DEPARTING, DOCK_EJECTIRP_COMPLETED } PNP_DOCK_STATUS;
typedef struct _DEVICE_NODE { /* A tree structure. */ struct _DEVICE_NODE *Sibling; struct _DEVICE_NODE *Child; struct _DEVICE_NODE *Parent; struct _DEVICE_NODE *LastChild; /* The level of deepness in the tree. */ UINT Level; /* */ PPO_DEVICE_NOTIFY Notify; /* State machine. */ PNP_DEVNODE_STATE State; PNP_DEVNODE_STATE PreviousState; PNP_DEVNODE_STATE StateHistory[20]; UINT StateHistoryEntry; /* ? */ INT CompletionStatus; /* ? */ PIRP PendingIrp; /* See DNF_* flags below (WinDBG documentation has WRONG values) */ ULONG Flags; /* See DNUF_* flags below */ ULONG UserFlags; /* See CM_PROB_* values are defined in cfg.h */ ULONG Problem; /* Pointer to the PDO corresponding to the device node. */ PDEVICE_OBJECT PhysicalDeviceObject; /* Resource list as assigned by the PnP arbiter. See IRP_MN_START_DEVICE and ARBITER_INTERFACE (not documented in DDK, but present in headers). */ PCM_RESOURCE_LIST ResourceList; /* Resource list as assigned by the PnP arbiter (translated version). */ PCM_RESOURCE_LIST ResourceListTranslated; /* Instance path relative to the Enum key in registry. */ UNICODE_STRING InstancePath; /* Name of the driver service. */ UNICODE_STRING ServiceName; /* ? */ PDEVICE_OBJECT DuplicatePDO; /* See IRP_MN_QUERY_RESOURCE_REQUIREMENTS. */ PIO_RESOURCE_REQUIREMENTS_LIST ResourceRequirements; /* Information about bus for bus drivers. */ INTERFACE_TYPE InterfaceType; ULONG BusNumber; /* Information about underlying bus for child devices. */ INTERFACE_TYPE ChildInterfaceType; ULONG ChildBusNumber; USHORT ChildBusTypeIndex; /* ? */ UCHAR RemovalPolicy; UCHAR HardwareRemovalPolicy; LIST_ENTRY TargetDeviceNotify; LIST_ENTRY DeviceArbiterList; LIST_ENTRY DeviceTranslatorList; USHORT NoTranslatorMask; USHORT QueryTranslatorMask; USHORT NoArbiterMask; USHORT QueryArbiterMask; ULONG OverUsed1; ULONG OverUsed2; /* See IRP_MN_QUERY_RESOURCES. */ PCM_RESOURCE_LIST BootResources; /* See the bitfields in DEVICE_CAPABILITIES structure. */ ULONG CapabilityFlags; struct { ULONG DockStatus; LIST_ENTRY ListEntry; WCHAR *SerialNumber; } DockInfo; ULONG DisableableDepends; LIST_ENTRY PendedSetInterfaceState; LIST_ENTRY LegacyBusListEntry; ULONG DriverUnloadRetryCount; } DEVICE_NODE, *PDEVICE_NODE; #ifdef _W2K_ #define DNF_MADEUP 1 #define DNF_HAL_NODE 4 #define DNF_PROCESSED 8 #define DNF_ENUMERATED 0x10 #define DNF_ADDED 0x40 #define DNF_HAS_BOOT_CONFIG 0x80 #define DNF_BOOT_CONFIG_RESERVED 0x100 #define DNF_NO_RESOURCE_REQUIRED 0x400 #define DNF_STARTED 0x40000 #else #define DNF_MADEUP 1 #define DNF_HAL_NODE 4 #define DNF_ENUMERATED 0x10 #define DNF_IDS_QUERIED 0x20 #define DNF_HAS_BOOT_CONFIG 0x40 #define DNF_BOOT_CONFIG_RESERVED 0x80 #define DNF_NO_RESOURCE_REQUIRED 0x100 #define DNF_RESOURCE_REQUIREMENTS_NEED_FILTERED 0x200 #endif
#define DNUF_DONT_SHOW_IN_UI 2 #define DNUF_NOT_DISABLEABLE 8
/* CM_PROB_* values are defined in cfg.h */
Ros-dev mailing list Ros-dev@reactos.com http://reactos.com:8080/mailman/listinfo/ros-dev
Ros-dev mailing list Ros-dev@reactos.com http://reactos.com:8080/mailman/listinfo/ros-dev
<>Hi, can somebody tell me where in the CVS the SkyOS API wrapper is located? I’m having trouble finding it.
Thanks for the help,
John T. Daly
-----Original Message----- From: ros-dev-bounces@reactos.com [mailto:ros-dev-bounces@reactos.com] On Behalf Of Gge Sent: Sunday, October 17, 2004 10:34 PM To: ReactOS Development List Subject: [ros-dev] Loading failure of rtl8139.sys driver.
(ke/main.c:586) Module: 'ndis.sys' at c01b1000, length 0x00020db6 (ke/main.c:610) Process system hive registry chunk at c00fd000 (ke/main.c:625) Process hardware hive registry chunk at c010f000 (mm/ppool.c:317) Trying to allocate 116396032 bytes from paged pool - nothing suitable found, returning NULL
Nice, someone does try to allocate 116MB of paged pool space.
- Hartmut