HOWTO: Acquire NDIS 4.0 PCI Miniport ResourcesID: Q182329
|
This article describes how to acquire the resources for an NDIS 4.0 PCI miniport driver. This method involves reading the Registry with NdisReadConfiguration for the adapter's BusNumber and SlotNumber during MiniportInitialize. Then you pass the SlotNumber to NdisMPciAssignResources, which returns the adapter's bus-relative resources that are used in subsequent calls to NdisMRegisterInterrupt, NdisMMapIoSpace, or NdisMRegisterIoPortRange as documented. You should not search for you adapter by scanning the PCI bus.
The adapter's BusNumber and SlotNumber are stored in the Registry during
setup through the miniport's OEMSetup.inf install script. The miniport's
OEMSetup.inf should shell out to Utility.inf, which provides the required
PCI bus scanning functionality. Utility.inf resides in
%SystemRoot%\system32 and also in %NTDDK%\src\setup\inf\ndis. Specifically,
you should use:
Shell $(UtilityInf), GetPCIInformation, $(Vendor) $(CFID)
For more information, see Utility.inf.
For additional information about debugging your setup scripts, please see
the following article in the
Microsoft Knowledge Base:
Q126419 HOWTO: Enable Debug Output for OEMSetup.inf Scripts
Additional query words: NDIS OEMSetup.inf Utility.inf MiniportInitialize NdisMPciAssignResources NdisReadConfiguration NdisMRegisterInterrupt NdisMMapIoSpace NdisMRegisterIoPortRange
Keywords : ntddkndis
Version : WINNT:4.0
Platform : winnt
Issue type : kbhowto
Last Reviewed: March 5, 1999