次の方法で共有


Step 2: Enumerating Devices on the PCI Bus (Windows Embedded CE 6.0)

1/6/2010

After configuring the PCI bus, the PCI bus driver scans the PCI bus again to enumerate devices and match them with registry entries. When the driver enumerates a device, it searches the registry using the device's identifiers.

The following table shows the device identifiers.

Subkey Description

Class

Basic function of a device, for example, a mass storage controller.

SubClass

Specific subclass of a basic function, for example, an IDE controller.

ProgIF

Register-specific programming interface, for example, USB OHCI or UHCI.

VendorID

Manufacturer of the device.

DeviceID

Type of device.

SubsystemVendorID

Vendor of a card or subsystem that uses a device.

SubsystemID

Type of card or subsystem that uses a device.

RevisionID

Revision number of a device.

The identifiers are listed in order of increasing specificity. When matching a found device with a registry entry, all of the values that are listed in the registry must match the found device. For example, the following table shows the registry entries for a driver that works with all 16550-compatible serial controllers.

Subkey Value Description

Class

7

Simple communications controllers

SubClass

0

Serial

ProgIF

2

16550-compatible serial controller

Note

These values are part of the PCI Revision 2.2 Specification.

If a particular serial driver were tailored to a particular vendor's device, then the VendorID and DeviceID values would be listed as well. The registry entry for this driver would only match a device that contains exactly same Class, SubClass, ProgIF, VendorID and DeviceID. The VendorID, DeviceID, SubsystemVendorID, SubsystemID and RevisionID can have a list of values associated so the driver can be matched with a subset of cards.

Registry Keys Before Enumeration

The following registry example shows the state of the registry before the drivers are enumerated.

[HKEY_LOCAL_MACHINE\Drivers]
    "RootKey"="Drivers"
    "Dll"="BusEnum.dll"

[HKEY_LOCAL_MACHINE\Drivers\Debug]
    "Dll"="BusEnum.dll"
    "Order"=dword:0
    "Flags"=dword:1

[HKEY_LOCAL_MACHINE\Drivers\Debug\KITL]
    "Flags"=dword:4
    "Irq"=dword:1
    "MemBase"=dword:FFBFA000
    "MemLen"=dword:1000
    "SysIntr"=dword:11

[HKEY_LOCAL_MACHINE\Drivers\Virtual]
    "Dll"="BusEnum.dll"
    "Order"=dword:1
    "Flags"=dword:1

[HKEY_LOCAL_MACHINE\Drivers\Virtual\NDIS]
    "Dll"="NDIS.dll"
    "Order"=dword:1
    "Prefix"="NDS"
    "Index"=dword:0

[HKEY_LOCAL_MACHINE\Drivers\CSP]
    "Dll"="BusEnum.dll"
    "Order"=dword:2
    "Flags"=dword:1

[HKEY_LOCAL_MACHINE\Drivers\CSP\Serial]
    "Dll"="Com16550.Dll"
    "Order"=dword:0
    "Irq"=dword:3
    "MemBase"=dword:FFBFC000
    "MemLen"=dword:8
    "SysIntr"=dword:13
    "Prefix"="COM"
    "DeviceArrayIndex"=dword:0
    "Priority"=dword:0

[HKEY_LOCAL_MACHINE\Drivers\CSP\Serial\Unimodem]
    "Tsp"="Unimodem.dll"
    "DeviceType"=dword:0
    "FriendlyName"="Serial Cable on COM1:"
    "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00

[HKEY_LOCAL_MACHINE\Drivers\ISA]
    "Dll"="BusEnum.dll"
    "Order"=dword:3
    "Flags"=dword:1

[HKEY_LOCAL_MACHINE\Drivers\ISA\Serial]
    "Dll"="Com16550.Dll"
    "Order"=dword:0
    "Irq"=dword:4
    "IoBase"=dword:02F8
    "IoLen"=dword:8
    "SysIntr"=dword:14
    "Prefix"="COM"
    "DeviceArrayIndex"=dword:1

[HKEY_LOCAL_MACHINE\Drivers\ISA\Serial\Unimodem]
    "Tsp"="Unimodem.dll"
    "DeviceType"=dword:0
    "FriendlyName"="Serial Cable on COM2:"
    "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00

[HKEY_LOCAL_MACHINE\Drivers\ISA\PCMCIA]
    "Dll"="PCMCIA.dll"
    "Order"=dword:1
    "Irq"=dword:B
    "SysIntr"=dword:1B
    "IoBase"=dword:03e0
    "IoLen"=dword:2

[HKEY_LOCAL_MACHINE\Drivers\PCI]
    "Dll"="PCIbus.dll"
    "Order"=dword:4
    "Flags"=dword:1
    "MemBase"=dword:FFC00000
    "MemLen"=dword:100000
    "IoBase"=dword:D000
    "IoLen"=dword:3000    

[HKEY_LOCAL_MACHINE\Drivers\PCI\Template\Serial]
    "Dll"="Com16550.Dll"
    "Class"=dword:07
    "SubClass"=dword:00
    "ProgIF"=dword:02
    "VendorID"=multi_sz:"0AF0","B320","B320"
    "DeviceID"=multi_sz:"0020","0300","0302"
    "Prefix"="COM"

[HKEY_LOCAL_MACHINE\Drivers\PCI\Template\Serial\Unimodem]
    "Tsp"="Unimodem.dll"
    "DeviceType"=dword:0
    "FriendlyName"="Serial Cable on PCI"
    "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00

[HKEY_LOCAL_MACHINE\Drivers\PCI\Instance\Serial1\Unimodem]
    "FriendlyName"="Serial Cable on COM1:"

[HKEY_LOCAL_MACHINE\Drivers\PCI\Template\NE2000]
    "Dll"="NDIS.dll"
    "ConfigDll"="NE2000cfg.dll"
    "ConfigEntry"="DeviceConfig"
    "Class"=dword:02
    "SubClass"=dword:00
    "ProgIF"=dword:00
    "MiniPort"="NE2000"

; NE2000 common and instance specific information     
[HKEY_LOCAL_MACHINE\Comm\NE2000]
    "DisplayName"="NE2000 Compatible Ethernet Driver"
    "Group"="NDIS"
    "ImagePath"="NE2000.dll"

[HKEY_LOCAL_MACHINE\Comm\NE20001]
    "DisplayName"="NE2000 Compatible Ethernet Driver 1"

[HKEY_LOCAL_MACHINE\Comm\NE20001\Parms]
    "Transceiver"=dword:3

[HKEY_LOCAL_MACHINE\Comm\NE20001\Parms\TcpIp]
    "EnableDHCP"=dword:1
    "DefaultGateway"=""
    "UseZeroBroadcast"=dword:0
    "IpAddress"="0.0.0.0"
    "Subnetmask"="0.0.0.0"

[HKEY_LOCAL_MACHINE\Comm\NE20002]
    "DisplayName"="NE2000 Compatible Ethernet Driver 2"

[HKEY_LOCAL_MACHINE\Comm\NE20002\Parms]
    "Transceiver"=dword:2

[HKEY_LOCAL_MACHINE\Comm\NE20002\Parms\TcpIp]
    "EnableDHCP"=dword:0
    "DefaultGateway"=""
    "UseZeroBroadcast"=dword:0
    "IpAddress"="157.56.148.128"
    "Subnetmask"="255.255.252.0"

See Also

Concepts

Example: Loading Drivers on the PCI Bus
Step 3: Enumerating a PCI Serial Driver