), also known as Plug and Pray
from its early days, is a design philosophy
for an industry standard
way of configuring devices
in computer architecture
. PnP can theoretically handle changes in the machine's hardware architecture without user
intervention. In a true PnP environment, the system is supposed to detect new hardware and dynamically
load the drivers without restart
ing the computer.
PnP requires additional hardware support from the motherboard. The BIOS, the OS and the PnP hardware must work together.
The BIOS must support the following:
- System Board Device Configuration
The BIOS must configure system board devices during the boot process.
- Configuration Information
The BIOS must maintain the configuration information before relaying it to the operating system.
BIOS must be capable of notifying the OS of changes to the architecture after the OS is running.
The OS must support the following:
- BIOS Information Processing
The OS must communicate with the BIOS and maintain the received list of PnP data.
- Device Drivers
The OS must load device drivers and unload them as needed.
- Backwards Compatability
The OS must be able to configure and use legacy devices.
The system hardware must support the following:
- Self-identification and Specification
Devices must be able to identify themselves and specify their required resources. Devices must also identify their capabilities.
- Dynamic Configuration
A Plug and Play device can theoretically be added to the system at any time. The hardware must support changes to the architecture on the fly.
The PnP system includes the following components:
- Registry Database
During the startup process, all hardware devices are identified, including each bus. This information is read from the HKEY_LOCAL_MACHINE key and the devices themselves. This information is stored under the registry's HKEY_DYN_DATA key.
- Bus Enumerators
The device drivers for all of the busses on the system are part of the PnP components. Busses include the motherboard/BIOS, ISA, PCI and SCSI. The Bus Enumerator assigns each bus a unique identification code, then collects the device configuration from the registry and the devices. The Bus Enumerator also passes on the resources for each bus as received from the Configuration Manager.
- Configuration Manager
The Configuration Manager is responsible for coordinating the flow of information during the device configuration. It informs each device when they can perform an action during configuration.
- Resource Arbitrator
The Resource Arbitrator gathers the information from the Bus Enumerators and assigns IRQs, DMA channels, Base I/O ports and memory allocation to each device. The Resource Arbitrator assigns resources to legacy devices first because they are not dynamically configurable.
When a machine is turned on, the following steps are performed:
- The Configuration Manager tells the Bus Enumerators to place all bus devices into configuration mode.
- The Bus Enumerators gather information from the Registry file and the devices.
- The Configuration Manager passes the information to the Resource Arbitrator.
- The Resource Arbitrator assigns the configuration information to each device and passes this information to the Bus Enumerators.
- The Bus Enumerators pass the configuration informatio to each device.
- The Configuration Manager signals the system that it is ready to start.
- The Bus Enumerators signal all devices to activate with their new settings.
The system completes the start up procedure and you are ready to use Windows