次の方法で共有


Step 1: Loading the PCI Bus Driver (Windows Embedded CE 6.0)

1/6/2010

In this step of the driver loading process, the PCI bus driver loads.

The following list shows an example of the Device Manager examining the Drivers registry key.

  • Drivers\RootKey
    As the Device Manager loads, it examines the HKEY_LOCAL_MACHINE\Drivers registry key for the RootKey value. It then examines the key pointed to by RootKey, in this case Drivers, for a DLL to load. In this example, it is the bus enumerator, BusEnum.dll. BusEnum.dll's entry point, Init, is called with the HKEY_LOCAL_MACHINE\Drivers key. BusEnum.dll examines the first level of keys just below the key passed to it according to Order. For more information about the Order registry subkey, see Device Manager Registry Keys.
  • Drivers\Debug
    Because, in this example, this registry key has an Order equal to 0, it is examined first. BusEnum.dll is re-entrant. The Flags value is set to 0x0001 or DEVFLAGS_UNLOAD. This means that BusEnum.dll is either unloaded or its reference count is decremented. In this example, its reference count is decremented. Init is called with the Drivers\Debug key. It examines the immediate subkeys for ordering information. In this example, Drivers\Debug\KITL has the lowest and only Order key. The Flags value for Drivers\Debug\KITL is 0x0004, or DEVFLAGS_LOAD, which indicates that the DLL is not loaded because the Ethernet debugging adapter driver has already been loaded by the OAL. Any resources used by this device, and any other devices not loaded by a bus driver, should be excluded from the list of available resources used by the I/O Resource Manager.
  • Drivers\Virtual
    This registry key has an Order equal to 1 in this example. BusEnum.dll is activated through a call to its Init function with the parameter Drivers\Virtual. Init examines the immediate subkeys for ordering information. In this example, Drivers\Virtual\NDIS has the lowest and only Order key. The Dll value is examined and NDIS.dll is loaded. The entry point, NDS_Init, is called with driver's Active key due the properties of the stream interface, which contains a Key value equal to Drivers\Virtual\NDIS. Because there are no more keys under Drivers\Virtual, the BusEnum.dll's Init function returns.
  • Drivers\CSP
    This registry key has an Order equal to 2 in this example. BusEnum.dll is activated through a call to Init with parameter Drivers\CSP. Init scans the registry for subkeys of Drivers\CSP. In this case, the first and only key is Drivers\CSP\Serial. Com16550.dll, which is indicated, is loaded and the entry point, COM_Init, is called with the Active key, which contains a Key value of Drivers\CSP\Serial. The Unimodem subkey is then available to the serial driver.
  • Drivers\ISA
    This registry key has an Order equal to 3 in this example. The bus enumerator is used in place of an ISA bus driver. You can also use a Plug and Play ISA bus driver. If you do not use a Plug and Play ISA bus driver to configure and allocate ISA resources, the ISA resources must be allocated through the registry. In this case, BusEnum.dll can be used again to enumerate the registry for ISA devices. The use of the ISA subkey, as well as the CSP subkey, is optional. You can choose any registry structure, including hierarchical. For example, ISA can be a subkey of PCI, which can be a subkey of BuiltIn.
    In this example, the first key by Order under Drivers\ISA is Drivers\ISA\Serial. The DLL is loaded. In this case, because Com16550.dll is already loaded from a previous key, nothing happens other than a reference count increment, and the default entry point is called. The next key by Order is Drivers\ISA\PCMCIA.
  • Drivers\PCI
    This registry has an Order equal to 4 in this example. The DLL is PCIbus.dll, a PCI bus driver and enumerator. This driver configures and enumerates the PCI bus, allocates resources to the devices it finds on the bus, and populates the registry with device instances. It does this in conjunction with the I/O Resource Manager. When the PCI bus driver's Init function is called, it examines the values under Drivers\PCI for information about the resources available to the PCI bus. These values include MemBase and MemLen, which specify the ranges of memory-mapped I/O, and IoBase and IoLen, which specify the ranges of port I/O.

See Also

Concepts

Example: Loading Drivers on the PCI Bus
Step 2: Enumerating Devices on the PCI Bus