摘要 |
A method and system for configuring and executing device drivers in a computer system. In a preferred embodiment, a device driver comprises a plurality of component drivers. Each component driver performs a function that may be used in accessing a device. The component drivers of a device driver are ordered from a top layer to a bottom layer. When accessing a device, the top layer component driver of the device driver is first invoked. Each component driver performs its function and invokes the next lower layer component driver to the bottom layer component driver, which interacts directly with the device. An operating system dynamically configures the device drivers at computer system startup. The operating system invokes each of a plurality of component drivers to determine based on device-specific information and configuration requirements of previously included component drivers whether the component driver should be selected to be included as a layer in a particular device driver. If selected, the component driver stores a reference to itself in a call-down table for the device driver and stores its configuration requirements with the unsatisfied configuration requirements of previously included component drivers. When accessing the device, if all configuration requirements for the device driver have been satisfied, the operating system first invokes the component driver referenced by the top reference in the call-down table. Each component driver in turn invokes the component driver referenced by the next lower reference in the call-down table.
|