Loading Drivers on the PCI Bus (Windows CE 5.0)

Send Feedback

The PCI bus driver is responsible for enumerating the PCI bus and then loading device drivers for any of the devices it finds. The PCI bus driver follows these steps to load drivers:

  1. Enumerates the PCI bus by scanning for devices and enumerating the resources required by the devices. These resources include memory base addresses, I/O base addresses, and IRQ numbers.

  2. Uses, if applicable, a configuration routine provided by the device driver to configure resources that are not PCI compliant and extension ROM resources.

  3. Assigns resources to each of the devices.

  4. Runs a second enumeration pass to match the devices with registry entries found under the PCI\Template key.

  5. Looks for exact matches under the PCI\Instance key.

    For more information, see Loading Device Drivers.

  6. Matches the device to a registry entry by applying a best-fit algorithm to the registry entries.

    The following table shows registry entries.

    Entry Description
    Class Basic function of a device, for example, a mass storage controller.
    SubClass Specific sub-class of a basic function, for example, an Integrated Device Electronics (IDE) controller.
    ProgIF Register-specific programming interface, for example, USB open host controller interface (OHCI) or USB universal host controller interface (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.

    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.

    Entry Descriptions
    Class Value for simple communications controllers.
    SubClass Value for serial.
    ProgIF Value for 16550-compatible serial controllers.

    If a particular serial driver was configured for 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 the same Class, SubClass, ProgIF, VendorID and DeviceID. The VendorID, DeviceID, SubsystemVendorID and SubsystemID can have a list of values associated so the driver can be matched with a subset of devices. If lists are used, they must all be of the same length.

  7. Copies the template information to a PCI\Instance key when a match is found, along with the additional resource information such as MemBase, MemLen, IoBase, IoLen and Irq.

    An IRQ-to-SYSINTR mapping is requested at this time from the OAL, and the SYSINTR is written to the registry key SysIntr.

  8. Loads the driver with its newly created instance key.

    Because the driver now has all of its configuration information contained in the registry, it no longer needs to enumerate the bus to discover its corresponding device. For more information about driver loading, see Bus Enumerator.

See Also

Example: Loading Drivers on the PCI Bus

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.