Operating System Plug and Play for Windows 2000 White Paper Abstract This paper describes the Microsoft® Windows® 2000 operating system implementation of Plug and Play. Plug and Play is one of a number of enhancements to Windows that will simplify device driver development and device management.
© 1999 Microsoft Corporation. All rights reserved. The information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the date of publication. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information presented after the date of publication. This white paper is for informational purposes only.
&217(176 ,1752'8&7,21 The Evolution of Plug and Play The Windows 2000 Implementation 1 2 3/8* $1' 3/$< 29(59,(: System Support for Plug and Play Device and Driver Support Levels 3 4 :,1'2:6 3/8* $1' 3/$< $5&+,7(&785( Kernel-mode Plug and Play Manager Power Manager and Policy Manager I/O Manager WDM Interface for Plug and Play Types of Drivers
,1752'8&7,21 The Microsoft® Window® 2000 operating system includes enhancements to simplify device driver development and device management. These enhancements include support for low-level instrumentation, power management, and Plug and Play (the subject of this white paper). Plug and Play is a combination of hardware and software support that enables a computer system to recognize and adapt to hardware configuration changes with little or no user intervention.
server computers that include ACPI system boards. In addition, Plug and Play device driver support for many device classes is provided by the Microsoft Win32® Driver Model (WDM), which also supports power management and other new capabilities that can be configured and controlled by the operating system. 7KH :LQGRZV ,PSOHPHQWDWLRQ To incorporate Plug and Play support into Windows 2000, a native Plug and Play implementation was integrated into the existing Windows code base.
3/8* $1' 3/$< 29(59,(: A Plug and Play system requires the combined interaction of the personal computer’s BIOS, hardware components, device drivers, and operating system software. The basic system board implementation and BIOS support required for Plug and Play support under Windows 2000 are defined in the ACPI specification. Both Windows 2000 and Windows 98 use this specification as the basis for their Plug and Play and OnNow architecture.
• or removal of a device is an example of such a dynamic event, as is the ability to awaken a device or put it to sleep. Plug and Play and power management both use WDM-based functions and have similar methods for responding to dynamic events. Registration for device notification events. Plug and Play enables usermode code to register for and be notified of certain Plug and Play events.
Legacy drivers written before Plug and Play was incorporated into the operating system continue to function as they did previously (without any Plug and Play capability). All new drivers should support Plug and Play.
:,1'2:6 3/8* $1' 3/$< $5&+,7(&785( Kernel-mode functionality in Windows 2000 Plug and Play supports boot-time Plug and Play activity and interfaces with the HAL, Executive, and device drivers. Usermode functionality cooperates with kernel-mode components to provide dynamic configuration and interfaces with other components that need to participate in Plug and Play, such as Setup and Control Panel.
request to be turned off, the Power Manager collects those requests, determines which requests must be serialized, and then generates appropriate power management IRPs. The Policy Manager monitors activity in the system and integrates user status, application status, and device driver status into power policy. Under specified circumstances or upon request, the Policy Manager generates IRPs to change device power states. , 2 0DQDJHU The I/O Manager provides core services for device drivers.
Upper-level filter drivers usually provide added-value features for a device. For example, an upper-level device filter driver for a keyboard could enforce additional security checks. 'ULYHU /D\HUV For a given device, there are two or more driver layers: a bus driver for the underlying I/O bus (or the Plug and Play Manager for root-enumerated devices) and a function driver for the device. Optionally, one or more filter drivers can be provided for the bus or device.
A bus driver performs certain operations on behalf of the devices on its bus but usually does not handle reads and writes to the devices on its bus. (A device’s function driver handles reads and writes to a device.) A bus driver acts as a function driver for its controller, adapter, bridge, or other device. Microsoft provides bus drivers for most common buses, including PCI, Plug and Play ISA, SCSI, and USB. Other bus drivers can be provided by IHVs or OEMs.
3/8* $1' 3/$< '(9,&( 75(( The Plug and Play Manager maintains a device tree, viewable through Device Manager, which keeps track of the active devices in the system and information about those devices. The Plug and Play Manager updates the device tree as devices are added and removed or as resources are reallocated. The device tree is hierarchical, with devices on a bus represented as children of the bus adapter or controller. The registry is the central repository for static hardware information.
USB Hub FDO (usbhub.sys) USB Hub PDO (uhcd.sys or openhci.sys) LAN Adapter FDO (LAN adapter driver) LAN Adapter PDO (pci.sys) USB Host Controller FDO (uhcd.sys or openhci.sys) USB Host Controller PDO (pci.sys) PCI Bus FDO (pci.sys) PCI Bus Controller PDO (acpi.sys) ACPI FDO (acpi.sys) ACPI PDO (ACPI HAL) ACPI HAL FDO Attachment (FDO, PDO) Parent-child relationship ACPI HAL PDO (PnP Manager) Logical device instance Figure 2.
driver creates an FDO for ACPI and attaches it to the device stack for ACPI. 3. PCI adapter PDO and FDO. Plug and Play directs the ACPI driver to enumerate ACPI and create a PDO for each device it finds. In Figure 2, a PCI bus controller is found. The Plug and Play Manager identifies the PCI driver (Pci.sys) as the function driver for the PCI controller, loads the PCI driver, and passes the PDO to the PCI driver.
device, providing the signal to the bus driver that it needs to re-enumerate its devices. Good system design provides for selective notification on wake-up rather that requiring the entire system to re-enumerate devices. The PDO created by the underlying bus driver is always at the bottom of the device stack for a particular device. When a driver handles a Plug and Play IRPs, it must pass the IRP all the way down the device stack to the PDO and its associated bus driver.
A major factor in the customer experience for Windows 2000 is the availability of tested, certified Plug and Play device drivers at the time that the operating system ships. The list of supported Windows Plug and Play drivers allows Microsoft to notify customers of hardware issues that they may encounter during the operating system upgrade. This list of supported hardware will also influence the purchasing decisions of both OEMs and enterprise customers.
5()(5(1&(6 Advanced Configuration and Power Interface Specification, Version 1.0 http://www.teleport.com/~acpi/ Microsoft DDKs for Windows operating systems, including NDIS documentation Microsoft Developer Network (MSDN) Professional membership Note: The Windows 2000 Device Driver Kit documents the Plug and Play interfaces and provides background information on Plug and Play, power management, and the Win32 Driver Model.
(or Conclusion) 6800$5< )RU 0RUH ,QIRUPDWLRQ For the latest information on Windows 2000, check out our World Wide Web site at http://www.microsoft.com/ntserver/, the Windows NT Server Forum on MSN™, and The Microsoft Network online service (GO WORD: MSNTS).