Welcome to Linux Support and Sun Help
Search LinuxSupport
The Linux Plug-and-Play-HOWTO : How to Deal with PnP Cards Next Previous Contents

5. How to Deal with PnP Cards

5.1 Introduction to Dealing with PnP Cards

Today most all new internal boards (cards) are Plug-and-Play (PnP). Although some software exists in Linux to handle PnP, it is not always easy to use. There are 6 different methods listed below to cope with PnP (but some may not be feasible in your situation). Which one(s) you should use depends on your goals. What may be most expedient to do now may not be the easiest and best in the long run. A seemingly simple way is to do nothing and just let a PnP-BIOS configure it but then you may need to do some exploring to to find out what the BIOS has done. A comparison of these methods needs to be written by someone who has tried them all. You may need to use more than one method to do the job.

5.2 Disable PnP ?

Many devices are PnP only with no option for disabling it. But for some, you may be able to disable PnP by jumpers or by running a Windows program that comes with the device (jumperless configuration). This will avoid the often complicated task of configuring PnP. Don't forget to tell the BIOS the resources that it uses. There are also some reasons why you might not want to disable PnP:

  1. If you have MS Windows on the same machine, then you may want to allow PnP to configure devices differently under Windows from what it does under Linux.
  2. The range of selection for IRQ numbers (or port addresses) etc. may be quite limited unless you use PnP.
  3. If it requires the use of Dos/Windows software to disable/enable PnP, then someday you might not have Dos/Windows around anymore and will thus have difficulty changing the configuration.
  4. You may have (or will have) other PnP devices that need configuring so that you'll need to provide for (or learn about) PnP anyway.
Once configured as non-PnP devices, they can't be configured by PnP software or the BIOS (until you move jumpers and/or use the Dos/Windows configuration software again).

5.3 BIOS Configures PnP

Intro to Using the BIOS to Configure PnP

This means that your BIOS reads the resource requirements of all devices and configures them (allocates resources to them). It is a substitute for a PnP OS except that the BIOS doesn't match up the devices with their drivers nor tell the drivers how it has done the configuring. It should give preference to using the configuration it has stored in its non-volatile memory (ESCD).

Your BIOS must support such configuring but there have been cases where it doesn't do it correctly or completely. An advantage of using the BIOS is that it's simple since in most cases there is nothing to set up (except to tell the BIOS's CMOS menu it's not a PnP OS). But it's not always that simple to determine what the BIOS has done. See What Is My Current Configuration? Another advantage is that the BIOS does its work before Linux starts so that all the resources are ready to be used (and found) by the device drivers that start up later.

According to MS it's only optional (not required) that a PnP BIOS be able to PnP-configure the devices (without help from MS Windows). But it seems that most of the ones made after 1996 ?? or so can do it. We should send them thank-you notes if they do it right. They configure both the PCI and ISA buses, but it has been claimed that some older BIOSs can only do the PCI. To try to find out more about your BIOS, look on the Web. Please don't ask me as I don't have data on this. The details of the BIOS that you would like to know about may be hard to find (or not available). Some BIOSs may have minimal PnP capabilities and try to turn over the difficult parts of the configuration task to Window utilities. If this happens you'll either have to find another method (such as isapnptools) or try to set up the ESCD database if the BIOS has one. See the next section.

The BIOS's ESCD Database

The BIOS's maintains a non-volatile database containing a PnP-configuration that it will try to use. It's called the ESCD (Extended System Configuration Data). Again, the provision of ESCD is optional but most PnP-BIOSs have it. The ESCD not only stores the resource-configuration of PnP devices but also stores configuration information of non-PnP devices (and marks them as such) so as to avoid conflicts. The ESCD data is usually saved on a chip and remains intact when the power is off, but sometimes it's put on a hard-drive??

The ESCD is intended to hold the last used configuration, but if you use a program such as Linux's isapnp or pci utilities (which doesn't update the ESCD) then the ESCD will not know about what isapnp has set. A good PnP OS might update the ESCD so you can use it later on for a non-PnP OS (like standard Linux). Windows may do this in some cases. See Using Windows to set ESCD.

To use what's set in ESCD be sure you've set "Not a PnP OS" or the like in the BIOS. Then each time the BIOS starts up (before the Linux OS is loaded) it should configure things this way. If the BIOS detects a new PnP card which is not in the ESCD, then it must then allocate resources to the card and update the ESCD. It may even have to change the resources assigned to existing PnP cards and modify ESCD accordingly.

If devices saved their last configuration in their hardware, hardware configuring wouldn't be needed each time you start your PC. But it doesn't work this way so all the ESCD data needs to be kept correct if you use the BIOS for PnP. There are some BIOSs that don't have an ESCD but do have some non-volatile memory to store info on which resources have been reserved for use by non-PnP cards. Many BIOSs have both.

Using Windows to set ESCD

If the BIOS doesn't set up the ESCD the way you want it (or the way it should be) then it would be nice to have a Linux utility to set the ESCD. As of early 1999 there isn't any. Thus one may resort to attempting to use Windows (if you have it on the same PC) to do this.

There are two ways to use Windows to try to set/modify the ESCD. One way is to use the ICU utility designed for DOS or Windows 3.x. It should also work OK for Windows 9x/2k ?? Another way is to set up devices manually ("forced") under Windows 9x/2k so that Windows will put this info into the ESCD when Windows is shut down normally. If devices are configured automatically by Windows (without the user telling it to "change setting") the setting will probably not make it into the ESCD ?? Of course Windows may well decide on its own to configure the same as what is set in the ESCD so they could wind up being the same by coincidence.

Windows 9x are PnP operating systems and automatically PnP-configure devices. They maintain their own PnP-database deep down in the Registry (stored in binary Windows files). There is also a lot of other configuration stuff in the Registry besides PnP-resources. There is both a current PnP resource configuration in memory and another (perhaps about the same) stored on the hard disk. To look at (the one in memory?) in Windows98 you use the Device Manager, select a device (sometimes a multi-step process if there are a few devices of the same class), then click on Properties and then on Resources. To change the configuration manually click on Change Setting. This should put your change into the ESCD. In Windows98 There are 2 ways to get to the Device Manager: 1. Control Panel --> System Properties --> Device Manager. 2. My Computer --> Properties --> Device Manager.

Adding a New Device (under Linux or Windows)

If you add a new PnP device and have the BIOS set to "not a PnP OS", then the BIOS should automatically configure it and store the configuration in ESCD. If it's a non-PnP legacy device (or one made that way by jumpers, etc.) then there are a few options to handle it.

You may be able to tell the BIOS directly (via the CMOS setup menus) that certain resources it uses (such as IRQs) are reserved and are not to be allocated by PnP. This does not put this info into the ESCD. But there may be a BIOS menu selection as to whether or not to have these CMOS choices override what may be in the ESCD in case of conflict. Another method is to run ICU under DOS/Windows. Still another is to install it manually under Windows 9x/2k. Since this configuration is "forced" Windows should update the ESCD when you shut down the PC.

5.4 Isapnp (part of isapnptools)

Unfortunately, much of the documentation for isapnp is still difficult to understand unless you know the basics of PnP. This HOWTO should help you understand it as well the FAQ that comes with it. isapnp is only for PnP devices on the ISA bus (non-PCI). Running the Linux program "isapnp" at boot-time will configure such devices to the resource values you set in /etc/isapnp.conf. Its possible to create this configuration file automatically but you then must edit it manually to chose between various options. With isapnp, a device driver which is part of the kernel may run too early before isapnp has set the address, etc. in the hardware. This results in the device driver not being able to find the device. The driver trys the right address but the address hasn't been set yet in the hardware.

If your Linux distribution automatically installed isapnptools, isapnp may already be running at startup. In this case, all you need to do is to edit /etc/isapnp.conf per "man isapnp.conf". Note that this is like manually configuring PnP since you make the decisions as to how to configure as you edit the configuration file. You can use the program "pnpdump" to help create the configuration file. If you use "isapnp" like this and have a PnP BIOS, you should probably tell the BIOS (when you set it up) that you don't have a PnP OS since you still want the BIOS to configure the PCI devices. While the BIOS may also configure the ISA devices, isapnp will redo it.

5.5 PCI Utilities

The new package PCI Utilities (= pciutils, incorrectly called "pcitools"), should let you manually PnP-configure the PCI bus. "lspci" lists resources while "setpci" sets resource allocations in the hardware devices.

5.6 Patch the Kernel to Make Linux PnP

David Howells has created a patch to do this called "Linux Kernel Configuration/Resource Manager" (sometimes just called Configuration Manager). It may be hard to locate and may not be against the most recent kernel. The resulting kernel is is claimed to be stable but bugs have been reported. It includes documentation: serial.txt to show how to deal with the serial port. It provides "files" in the /proc tree so that you can see what is going on and can echo commands into one of these files for custom configuration. One problem is that most device drivers don't know about it so that you still may have to use the traditional configuration files, etc. for configuration. See http://www.astarte.free-online.co.uk

5.7 Windows Configures

If you have Windows9x (or 2k) on the same PC, then just start Windows and let it configure PnP. Then start Linux from Windows (or DOS). It been reported that Windows erased the IRQs from PCI devices registers. Then Linux complained that it found a zero IRQ. Thus you may not be able to use this method.

5.8 PnP Software/Documents


Next Previous Contents
Valid HTML 4.01! Valid CSS!