Next Previous Contents

4. How To Deal With PnP Cards

4.1 Introduction

Today most all new internal boards (cards) are Plug-and-Play (PnP). Some of these have jumpers (or this like) which may be changed to disable PnP. Since software exists in Linux (and Dos/Windows) to handle PnP, it is sometimes best to keep PnP enabled even when you have the option of disabling it. If you patch the kernel for Plug-and-Play it not only configures the hardware by putting resource information into its registers but it also tries to provides this information to the driver software so that you may not need to configure it. For example, for a serial port you may not need to use "setserial". Unfortunately, most drivers don't yet support it.

If you have a PnP card, then your have one or more of the following options for configuring it:

4.2 Disable PnP ?

Many devices are PnP only with no option for disabling it. If possible, it may be a lot simpler to just disable PnP but 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 under MS Windows to configure your devices differently.
  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 configure a non-PnP configuration, then someday you might not have Dos/Windows around anymore and will thus have difficulty changing the configuration.
  4. You have (or will have) other PnP devices that need configuring so that you'll need to provide for 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 to enable PnP).

4.3 BIOS Configures PnP

Your BIOS must obviously support PnP to do this. To find out more about your BIOS, look on the Web. Some BIOS may have minimal PnP capabilities and try to turn over the difficult parts of the configuration task to Window utilities (which can't happen under Linux). In this case if the BIOS does maintain a configuration data base (in non-volatile memory), you might try to help set up this data base by using the ICU under DOS/Windows or if you have Windows9x (which are PnP OS's) you could just let Windows do it without using ICU.

Before you run Linux you set up the BIOS for "Not a PnP Operating System" (or the like). See Configuring a PnP BIOS This will make the BIOS do the configuring instead of leaving it to the operating system.

The BIOS's non-volatile data-base is called the ESCD (Extended System Configuration Data). The ESCD not only stores the configuration of PnP devices but stores configuration information of non-PnP devices so as to avoid conflicts. When you install a new non-PnP device you are supposed to tell the BIOS's ESCD about it by running the Dos/Windows ICU (Intel Configuration Utility) program prior to installation. You will also need to run this to tell the ESCD about the existing non-PnP devices on the PC (unless someone else has already done so).

The non-volatile ESCD configuration is usually saved on a chip and remains intact when the power is off, but sometimes it's put on a hard-drive?? Each time the BIOS starts up under Linux it should configure things this way. You may want to take notes on how ICU (and the BIOS) has configured things (or print them out). However, if you add a new non-PnP device you need to run the ICU program again to let the BIOS put that info into it's data base. If it's PnP then the BIOS will automatically configure it and hopefully not change the configuration on any of the other existing devices on your PC. But it might have to reconfigure some of the existing devices in order to allocate the required resources to the new device.

How has the BIOS configured it? To determine this under Linux may not be easy. But it is easy for the PCI bus: just look at /proc/pci. For the ISA bus it's not so easy. Using pnpdump one may find PnP cards on the ISA bus and also how they would like to be configured but there is no guarantee that they have been actually configured like this. One may run some isapnp commands using the PEEK keyword to find out what the I/O address and IRQ is but this is complicated. Don't confuse the read-port address which pnpdump "trys" (and finds something there) with the I/O address of the found device. They are not the same.

Note that under Dos/Windows the configuration used is also put in a Windows file on the hard disk so the the operating system knows where everything is. This doesn't happen in Linux which usually auto-detects devices.

4.4 Isapnp

Unfortunately, the documentation for isapnp was difficult to understand unless you knew the basics of PnP. This HOWTO should help you understand 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. You need the package isapnptools, available in many distributions of Linux. Type "locate pnp" to see what you may already have available for isapnp. 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, should you tell the BIOS (when you set it up) that you have a PnP operating system ??

If you only ran isapnp once to configure ISA-PnP devices but failed to run isapnp each time the computer starts up then if you have Windows 9x on the same PC the following problem might occur: When you use Windows 9x, Windows may configure your PnP cards differently in such a way that it doesn't work right (if at all) when you go back to use Linux.

4.5 Patch the Kernel to Make Linux PnP

David Howells has created a patch to do this called "Linux Kernel Configuration/Resource Manager. 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://lucifer.hemmet.s-hem.chalmers.se/~dwh

4.6 PnP Software and Documents


Next Previous Contents