Next Previous Contents

3. The Plug-and-Play (PnP) Solution

3.1 Introduction

Plug-and_Play (PnP) is a way to automate the assignment of PnP resources to hardware and the corresponding software. That is, to match up devices and their device drivers and specify their communication "channels". Before Plug-and-Play the resources were set on hardware devices by jumpers and software drivers were assigned resources by configuration files (or the like) or by probing the for the device (which didn't always work right).

With full PnP (which doesn't always work right either), both a PnP BIOS and the operating system participate. When the computer is first turned on the BIOS chip runs its program to get the computer started. If the operating system is stored on the hard-drive (as it normally is) then the BIOS must know about the hard-drive. If the hard-drive is PnP then the BIOS may use PnP methods to find it. Also, in order to configure the BIOS when the computer starts up, a screen (video card) and keyboard is required so the BIOS must PnP-configure these devices if needed.

Once the BIOS has identified the hard-drive, the video card, and the keyboard it is ready to "boot" (load the operating system from the hard-disk). If you've told the BIOS that you have a PnP operating system, it should do this and let the operating system finish the PnP configuring. Otherwise, a PnP-BIOS will likely try to do the rest of the PnP configuring itself.

3.2 Linux Needs PnP

PnP was invented by Wintel (Microsoft and Intel). Partly for this reason (perhaps partly due to the "not invented here" syndrome), and partly due to dislike of the way it was implemented, there has been some justified prejudice against PnP in the Linux community. But like it or not, most all hardware today is PnP and Linux has no choice but to deal effectively with PnP.

3.3 Buses

PnP is intended to work on any bus such as ISA and PCI. ISA is the old bus of the old IBM PC's while PCI is a newer and faster bus from Intel. Eventually, the ISA bus should become extinct. The PCI bus reserved many configuration addresses on the bus for PnP configuring. Linux uses some of these addresses to find out what PCI devices you have that are PnP (what about non-PnP devices on the PCI bus ??) and puts information about them in the /proc/pci "file".

For the ISA bus there is a real problem since unlike the PCI bus which was designed for PnP, no one had PnP in mind when the ISA bus was designed and there are almost no I/O addresses available for PnP to use. As a result, the way PnP is handled on the ISA bus is complicated and requires that each PnP device be assigned a temporary "handle" by the PnP program so that one may address it for PnP configuring. Assigning these "handles" is call "isolation". See Isolation in the Appendix for the complex details.

3.4 Configuring a PnP BIOS

When the computer is first turned on, the BIOS runs before the operating system is loaded. Newer BIOSs are PnP and will configure some or all of the PnP devices. For most PnP BIOSs there is no way to disable PnP so you have to live with it. Here are some of the choices which may exist in your BIOS (sometimes called CMOS) menu:

Do you have a PnP operating system?

If you say yes, then the PnP BIOS will start to PnP-configure the hard-drive, etc., but leave it up to the operating system to finish the configuration job. It may do an Isolation on the ISA bus leaving the devices ready to be configured by the operating system. If your operating system doesn't do configuring (some Linux patched version do), you probably should not say yes since the BIOS might leave the ISA devices in a disabled state ??

If you say no, then the BIOS will do the configuring itself. Unless you have added new PnP devices, it should use the previous configuration which it has stored in non-volatile memory. If the last session on your computer was with Linux, then there should be no change in configuration. But if the last session was with Windows 95 or 98 (which are PnP) then Windows may have set up the configuration differently than what you want under Linux. You can always have isapnp run at the startup of Linux to change the ISA configuration to what you want under Linux. This is of no help for PCI cards but you can always check how they are configured by looking at /proc/pci. Then you need to make sure that this matches your Linux configuration files ("setserial", lilo.conf, etc.) for the driver being used. See BIOS Configures PnP for more info.

How are resources to be controlled?

This may involve just deciding how to allocate IRQ's and DMA's. It set to "auto", the bios will do the allocation. If set to manual, you enter another menu and are able to reserve some IRQ's for use on "legacy" (non-pnp) cards. Now the BIOS may or may not know about your legacy cards. If it knows about them, then try using "auto". If it doesn't know about them then manually reserve the IRQ's needed for the legacy ISA cards and let the rest be for the BIOS PnP to allocate. The BIOS will only know about your legacy cards if you ran ICU (or the like) under Windows to tell the BIOS about them. The BIOS will then store this information in its non-volatile data-base.

Reset the configuration?

This will erase the BIOSs data-base of how your PnP devices should be configured as well as the list of how legacy (non-PnP) devices are configured. Never do this unless you are convinced that this data- base is wrong and needs to be remade. It was stated somewhere that you should do this only if you can't get your computer to boot. If the BIOS loses the data on legacy devices, then you'll need to run ICA again under windows to reestablish this data.


Next Previous Contents