New HOWTO: Plug-and-Play-HOWTO - page 8
Table of Contents
7. What Is My Current Configuration? Here "configuration" means the assignment of PnP bus-resources (addresses, IRQs, and DMAs). There are two parts to this question for each device. Each part should have the same answer. 1. What is the configuration of the device driver software? I.e.: What does the driver think the hardware configuration is? 2. What configuration (if any) is set in the device hardware? Of course the configuration of the device hardware and its driver should be the same (and it normally is). But if things are not working right, it could be because there's a difference. This means the the driver has incorrect information about the actual configuration of the hardware. This spells trouble. If the software you use doesn't adequately tell you what's wrong (or automatically configure it correctly) then you need to investigate how your hardware devices and their drivers are configured. While Linux device drivers should "tell all" in some cases it's not easy to determine what has been set in the hardware. Another problem is that when you view configuration messages on the screen, it's sometimes not clear whether the reported configuration is that of the device driver, the device hardware, or both. If the device driver is assigned a configuration and then checks the hardware out to see if it's configured the same, then the configuration reported by the driver should be that of both the hardware and the driver. But some drivers which don't do this may accept a configuration that doesn't check out. For example, "setserial" will accept a configuration that doesn't check out and thus may only be telling you the configuration of the driver and not the hardware. 7.1. Boot-time Messages Some info on configuration may be obtained by reading the messages from the BIOS and Linux that appear on the screen when you first start the computer. These messages often flash by too fast to read but once they stop type Shift-PageUp a few times to scroll back to them. To scroll forward thru them type Shift-PageDown. Typing "dmesg" at any time to the shell prompt will show only the Linux kernel messages and miss some of the most important ones (including ones from the BIOS). The messages from Linux may sometimes only show what the device driver thinks the configuration is, perhaps as told it via an incorrect configuration file. The BIOS messages will show the actual hardware configuration at that time, but isapnp, or pci utilities, or device drivers may change it later. The BIOS messages are displayed first before the ones from Linux. As an alternative to eventually using Shift-PageUp to read them, try freezing them by hitting the "Pause" key. Press any key to resume. But once the messages from Linux start to appear, it's too late to use "Pause" since it will not freeze the messages from Linux. 7.2. How Are My Device Drivers Configured? There may be a programs you can run from the command line (such as "setserial" for serial ports) to determine this. The /proc directory tree is useful. It seems that there are many files buried deep in this tree that contain bus-resource info. Only a couple of them will be mentioned here. /proc/ioports shows the I/O addresses that the drivers use (or try if it's wrong). They might not be set this way in hardware. /proc/interrupts shows only interrupts currently in use. Many interrupts that have been allocated to drivers don't show at all since they're not currently being used. For example, even though your floppy drive has a floppy disk in it and is ready to use, the interrupt for it will not show unless its in use. Again, just because an interrupt shows up here doesn't mean that it exists in the hardware. A clue that it doesn't exist in hardware will be if it shows that 0 interrupts have been issued by this interrupt. Even if it shows some interrupts have been issued there is no guarantee that they came from the device shown. It could be that some other device which is not currently in use has issued them. A device not in use (per the kernel) may still issue some interrupts for various reasons. 7.3. How Are My Hardware Devices Configured? It's easy to find out what bus-resources have been assigned to devices on the PCI bus with the "lspci" or "scanpci" commands. For for kernels < 2.2: see /proc/pci or /proc/bus/pci for later kernels. Note that IRQs for /proc/pci are in hexadecimal. Don't bother trying to decipher /proc/bus/pci/devices since "lspci" will do that for you. For the ISA bus you may try running pnpdump --dumpregs but it's not a sure thing. The results may be seem cryptic but they can be deciphered. Don't confuse the read-port address which pnpdump "tries" (and finds something there) with the I/O address of the found device. They are not the same. To try to find missing hardware on the ISA bus (both PnP and legacy) try the program "scanport" but be warned that it might hang your PC. It will not show the IRQ nor will it positively identify the hardware. Messages from the BIOS at boot-time tell you how the hardware configuration was then. If only the BIOS does the configuring, then it should still be the same. Messages from Linux may be from drivers that used kernel PnP functions to inspect and/or set bus-resources. These should be correct, but beware of messages that only show what is in some configuration file (what the driver thinks). Of course, if the device works fine, then it's likely configured the same as the driver. Some people use Windows to see how bus-resources have be set up. Unfortunately, since the hardware forgets its bus-resource configuration when powered down, the configuration may not be the same under Linux. It sometimes turns out the same, but Windows and Linux do not necessarily use the same logic in configuring. Many devices have bus-resource preferences that are often adhered to by both Linux and Windows. But don't count on devices being configured the same.
Solid state disks (SSDs) made a splash in consumer technology, and now the technology has its eyes on the enterprise storage market. Download this eBook to see what SSDs can do for your infrastructure and review the pros and cons of this potentially game-changing storage technology.
- 1Linux Top 3: GNOME 3.12 and New Betas for Ubuntu 14.04 and OpenMandriva Lx 2014.0
- 2Linux Top 3: Linux 3.10 Goes Long, Linux 3.11 Advances as LXDE Merges
- 3Linux Top 3: Linus Lashes out, Linux 3.14 Gets PIE and Ubuntu One is Done.
- 4Why Linux is Super (Computing)
- 5Linux Top 3: Ubuntu 14.04, Debian Gives Squeeze More Life and Red Hat Goes Atomic