Hello,
I am writing an NDIS driver for a PCI NIC (Intel Pro Wireless 2200) on a
CEPC, for CE.net 4.2.
The platform is equiped with another Ethernet chip on the PCI bus. The
driver for this chip comes from Intel (E100CE.DLL, for 8255X network chips.)
Both NICs are wired to the first available PCI interrupt, which is IRQ6
(INTA) in my configuration.
When I enable the E100CE driver in my project, it is initialized before my
IPWL2200 driver and NdisMRegisterInterrupt produces this output:
Loaded 'G:\WINCE420\PUBLIC\EBB615EX\RELDIR\DEBUG\E100CE.DLL', no matching
symbolic information found.
4294778928 ==>NdisInitializeWrapper
4294778929 <==NdisInitializeWrapper
4294778931 ==>NdisMRegisterMiniport: NdisWrapperHandle 0004BBA0
4294778932 ==>ndisRegisterMiniportDriver: NdisWrapperHandle 0004BBA0
4294778933 <==ndisRegisterMiniportDriver: MiniBlock 0004BC10
4294778935 NdisMRegisterMiniport: MiniBlock 0004BC10
4294778936 <==NdisMRegisterMiniport: MiniBlock 0004BC10, Status 0
4294778940
4294778942 ndisMInitializeAdapter: Miniport 0004BE28,
4294778944 ==>ndisQueueMiniportOnDriver: Miniport 0004BE28, MiniBlock
0004BC10
4294778945 <==ndisQueueMiniportOnDriver: Miniport 0004BE28, MiniBlock
0004BC10, rc 1
4294778946 ==>NdisMSetAttributesEx: Miniport 0004BE28
4294778948 ==>NdisMMapIoSpace
4294778950 ***NDIS*** (a, 514)
4294778951 ==>NdisMRegisterInterrupt: Miniport 0004BE28 Vector 6
4294778953 0x8fbadbb8: NDIS:: CeConnectInterrupt() --> IRQ[6] SYSINTR[34]
4294778954 ***NDIS*** (a, 719)
4294778956 <==NdisMRegisterInterrupt: Miniport 0004BE28, Status 0
Then my driver initializes and a DEBUGCHK is issued by
NdisMRegisterInterrupt code:
Loaded symbols for 'G:\WINCE420\PUBLIC\EBB615EX\RELDIR\DEBUG\IPWL2200.DLL'
4294783878 ==>NdisInitializeWrapper
4294783879 <==NdisInitializeWrapper
4294783881 ==>NdisMRegisterMiniport: NdisWrapperHandle 000539A0
4294783882 ==>ndisRegisterMiniportDriver: NdisWrapperHandle 000539A0
4294783883 <==ndisRegisterMiniportDriver: MiniBlock 00053A10
4294783885 NdisMRegisterMiniport: MiniBlock 00053A10
4294783886 <==NdisMRegisterMiniport: MiniBlock 00053A10, Status 0
4294783889
4294783890 ndisMInitializeAdapter: Miniport 00053C28,
4294783892 ==>ndisQueueMiniportOnDriver: Miniport 00053C28, MiniBlock
00053A10
4294783893 <==ndisQueueMiniportOnDriver: Miniport 00053C28, MiniBlock
00053A10, rc 1
4294783899 ==>NdisMSetAttributesEx: Miniport 00053C28
4294783906 ==>NdisMMapIoSpace
4294783951 ***NDIS*** (a, 514)
4294783965 ==>NdisMRegisterInterrupt: Miniport 00053C28 Vector 6
4294784133 0x8fbadbb8: NDIS:: CeConnectInterrupt() --> IRQ[6] SYSINTR[33]
4294784154 0x8fbadbb8: Unknown: DEBUGCHK failed in file
d:\mckendric\private\winceos\comm\ndis51\sys\.\timerm.c at line 688
4294784187 ***NDIS*** (a, 719)
4294784197 <==NdisMRegisterInterrupt: Miniport 00053C28, Status 0
The call to NdisMRegisterInterrupt succeeds but my system hangs when the
2200 fires its first interrupt.
Both drivers use giisr.dll for their interrupt handling:
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\PCI\Template\E100CE]
;PCI Bus Enumeration Information
"Class"=dword:02
"SubClass"=dword:00
"ProgIF"=dword:0
"VendorID"=multi_sz:"8086","8086","8086"
"DeviceID"=multi_sz:"1209","1229","2449"
"Dll"="NDIS.dll"
"Entry"="NdisPCIBusDeviceInit"
"Transceiver"=dword:3
;Installable ISR Handler Information
"IsrDll"="giisr.dll"
"IsrHandler"="ISRHandler"
"PortIsIO"=dword:0
"PortOffset"=dword:0
"PortSize"=dword:4
"PortMask"=dword:20F0
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\PCI\Template\IPWL2200]
"Dll"="NDIS.dll"
"Class"=dword:02
"SubClass"=dword:80
"ProgIF"=dword:0
"VendorID"=multi_sz:"8086"
"DeviceID"=multi_sz:"4220"
"Entry"="NdisPCIBusDeviceInit"
;Installable ISR Handler Information
"IsrDll"="giisr.dll"
"IsrHandler"="ISRHandler"
"PortIsIO"=dword:0
"PortOffset"=dword:8
"PortSize"=dword:4
"PortMask"=dword:C5311832
As far as I could debug, after a sucessful call to CeConnectInterrupt,
NdisMRegisterInterrupt puts in a table indexed by the IRQ Vector
(InterruptVector, i.e. IRQ number) the handle of the calling miniport
(MiniportAdapterHandle).
The first time NdisMRegisterInterrupt is called, this table entry is NULL
upon entry so the first calling MiniportAdapterHandle is written at
Table[InterruptVector]; in addition a variable local to
NdisMRegisterInterrupt ([ebp-228h]) is set to TRUE.
The second time NdisMRegisterInterrupt is called, Table[InterruptVector] is
not NULL anymore so the DEBUGCHK is called, previously-mentionned local
variable is set to FALSE and the new MiniportAdapterHandle overwrites
previous Table[InterruptVector] value.
Please note that the [ebp-228h] variable is no used anymore.
I have 2 questions:
1) Is this DEBUGCHK really useful?
2) Does anybody here have an idea of what happens when the interrupt hangs
the system?
Thanks for your future answers.
--
Remi de Gravelaine
gravelaine at aton dash sys dot fr