The Enumeration Process

When the system starts, a bus enumerator for a bus device node (such as the system board BIOS) will enumerate its bus and detect the PCMCIA adapter. The bus enumerator will create an adapter device node for the adapter and add a logical configuration for the adapter at its current configured I/O address. Configuration Manager will load the device loader, based on information in the registry. The device loader for the adapter is contained in the PCMCIA bus enumerator - along with the Card Services component. The device loader is called at its PNP_NEW_DEVNODE control entry point. The device loader loads the Socket Services driver for the adapter device node, based on the Driver= entry in the registry for the adapter device node. The device loader registers an enumerator for the adapter device node.

Configuration Manager calls the Socket Services driver to filter the logical configuration for the adapter. The Socket Services driver will then be called by Configuration Manager to configure the adapter's IRQ, I/O, and a memory window.

Configuration Manager then calls the bus enumerator for the adapter device node to enumerate the devices on the PCMCIA bus. The bus enumerator enumerates each PC card in the sockets on the adapter. A device ID for each PC card is generated from the tuples on the card. The bus enumerator creates the device nodes for the cards in the sockets. Logical configurations will be created based on the configuration tuples on the PC card. If a card does not have configuration tuples, an empty logical configuration is added for the card. Overriding configurations may be defined in the registry to handle this case, or the driver for the card may define the logical configuration during the call to the CONFIG_FILTER configuration handler function. For this to happen, a valid Manufacturer ID tuple must exist on the card.

Setup on First Insertion

The registry is set up when the device is first installed and recognized by the bus enumerator. This is initiated by Configuration Manager when a device node is created for which a device ID is not contained in the registry. If the device has not been previously configured, Configuration Manager calls the Device Manager to set up the registry for the device. The Device Manager will look up the Device ID entry in the appropriate device information (.INF) file and the resource information in the drivers which already exist in the default driver directory. If a default driver is found, its configuration information is copied to the registry and the driver is loaded. If no driver is found the user will be prompted to initiate an installation process.

When the Device Manager has completed the setup of the registry, the Configuration Manager will complete the setup of the device node for the device. If an overriding logical configuration exists in the registry it will be used for the device, and the logical configuration that was defined by the PCMCIA bus enumerator will be discarded.

Configuration Process

Configuration Manager will load the device loader for the card based on information in the registry. The device loader may be a Plug and Play device loader, or, to support Card Services clients, the PCMCIA bus enumerator may be the device loader. If the PCMCIA bus enumerator is the device loader, the driver will be a Card Services client, the device node will be handled specially, and a default device driver will be registered for the card by the device loader.

Configuration Manager calls the CONFIG_FILTER function in the adapter driver where it filters the PC card configurations so that they can be mapped by the adapter for the socket. Any logical configurations that cannot be supported by the adapter will be removed from the filtered logical configuration list.

Finally, when the configuration has been determined by Configuration Manager, the CONFIG_START function will be called and the PCMCIA bus enumerator will map the IRQ, I/O, and memory windows for the PC card by calling the Card Services module. Card Services configures the adapter to support the defined configuration and sets the configuration index in the cards registers.