Plug-and-Play

From OSDev Wiki
Jump to navigation Jump to search

This article is a stub! This page or section is a stub. You can help the wiki by accurately contributing to it.

Plug-and-play is a set of hardware and software specifications designed to reduce or eliminate user configuration for PC hardware by facilitating the discovery of devices and matching drivers as well as resource management (DMA, IRQ, etc.). As of 2001, ACPI has assumed the role of PnP BIOS and APM, and PCI has inherent plug-and-play functionality through the configuration space.

There is a PnP specification for the following:

Goal of Plug-and-Play

In the early days of the IBM PC platform, IRQs, DMA channels, ports, and memory addresses had to be manually configured by flipping DIP switches and jumping pins on the main board. Conflicts always caused errors because the ISA bus did not have any way of arbitrating shared resources (e.g. there was no way to know where an IRQ came from). Drivers would have to be set up manually. Plug-and-play ISA was developed for the standard 16-bit PC bus as a hardware extension. It did not allow for IRQ sharing but did allow resources to be reallocated through a configuration space to avoid conflicts.

To assist the OS in hardware configuration, the PnP BIOS specification was published. It provides a 16-bit protected and real mode interface with various functions like obtaining extended system configuration data and the number of ISA PnP cards, amongst other features.

Resources

You can get the official Plug-and-Play documentation from an archive of the Microsoft FTP site (The original has been down since late 2015):

https://web.archive.org/web/20180116205211/http://ftpmirror.your.org/pub/misc/ftp.microsoft.com/developr/drg/Plug-and-Play/Pnpspecs/

These documents are self-extracting MS-Word files describing the industry (MS) specifications for PNP on BIOS, SCSI, Peripherals, etc...

You can combine that with the links on this page from Microsoft circa 2003: https://web.archive.org/web/20030207142304/http://www.microsoft.com:80/hwdev/tech/PnP/default.asp

Craig Hart has a good page on PNP programming at http://web.archive.org/web/20080829130750/http://members.datafast.net.au/dft0802 (archive of http://members.datafast.net.au/dft0802/)

You could also check out http://linux-sxs.org/programming/interfac.html