|
|
|
|
IRQs, DMAs, and so on We should start with the basics. Since were going to be installing a bunch of cards in PCs in the next few columns, we need to understand the way in which a PC communicates with cards in expansion slots. A PC talks to expansion cards through a set of addresses. The ones we use are the IRQ (Interrupt Request), I/O (input/output) port address, base address, and DMA (Direct Memory Address). Every card has a particular combination of IRQ, I/O and base address, and DMA that the PC uses to talk to that card alone, and which all other cards ignore. Having two cards share the same settings can lead to one card being ignored, or worse, intermittent performance from both. While IRQs, DMAs, base addresses, and I/O addresses are routine for many VARs, some do not understand what they do and which settings are routinely used by PCs. The IRQ is used by a card to tell the CPU to pay attention to it. The IRQ interrupts the CPUs normal processing in order to take care of some urgent issue the card has. In general, each card in the PC has a different IRQ. Some components on the motherboard have pre-assigned IRQs that cannot be used by new cards. Some IRQs can be shared by several cards. DOS does this quite well, while some operating systems like Windows NT forbid it. In general all cards should have a unique IRQ. There are 16 IRQs on a system, numbered 0 to 15. Some peripherals can only use a limited set of these IRQs, which can make configuring them a chore, as many other IRQs have predetermined values and are difficult (if not impossible) to modify. IRQs 0 and 1 are reserved for the system and are never available. A run-of-the-mill PC will have the following IRQs assigned: IRQ 2 and IRQ 9 are used by EGA and VGA and are seldom available for anything else. IRQ 3 is used by COM 2 and COM 4 (second and fourth serial ports) and are unavailable if those ports are installed in the PC. IRQ 4 is for COM 1 and COM 3 and the same comment applies. IRQ 5 is for LPT2, the second parallel port, and is often available as few PCs have two parallel ports. Bus mice often use IRQ 5. (Some older SCSI cards used IRQ 5 and could not be changed, but these are rare.) IRQ 6 is the floppy controller and is almost never available, IRQ 7 is for LPT 1 (the first parallel port), while IRQ 8 is the system clock and cant be used. IRQ 11 is often used by SCSI cards but is available in non-SCSI systems. IRQ 13 is the math co-processor circuitry and almost never available, while IRQ 14 is used by IDE and EIDE hard disk controller (and is not available if those drive types are used). That leaves IRQs 10, 12 and 15 available for most systems, although IRQ 12 is used on PS/2 systems for the mouse. DMA channels are easier to find, and they are numbered 0 through 7. DMA 0 is almost never available as its a RAM refresh assignment. DMA 2 is the floppy controller, but the rest of the DMAs are usually available for cards (except under Windows NT, in which case DMA 4 is often used). DMAs should never be shared, although some cards will tolerate it. A few cards (notably sound cards) take two DMAs, although they can get by with one if you dont need digital audio as well as sound effects. I/O addresses are the most common mess-ups in computer card installations. There are no real rules as to where some I/O ranges are assigned, although the system does reserve a few. In general, I/O addresses are assigned in banks of 16, 32 or 64kB. I/O addresses are numbered from A000 to FFFF (from 640K to 1MB in real RAM terms) for most ISA cards, but some PCI cards use address space above the 1MB barrier (FFFF). Many cards have recommended ranges. SCSI controllers use C800-CFFF, for example, while multiport cards use a variety of ranges, such as A000-A800 or E000-EFFF. The trick with assigning I/O addresses is to make sure the same range is not used by more than one card, otherwise corruption is almost sure to occur. Many cards dont need I/O addresses as they load into standard RAM and are handled by the operating system dynamically (thats the case with many plug-and-play cards). Some I/O addresses ranges are reserved for video BIOS and shadowing. You can find which addresses are assigned by looking at the computers BIOS. The advanced BIOS pages will list which RAM shadow banks are enabled and hence unavailable. Finally, base addresses are used by some cards to send and receive data instead of using DMAs. There are a bunch of base addresses available, and they are all mapped to memory addresses by the system. These are often called base I/O ports and should not be confused with the I/O addresses just mentioned. Base I/O ports range from 200 to 3FF and quite a few are reserved by the system. Base address 200-20F is for game ports, 230-23F is for bus mice, 270-27F is for LPT 3 (if installed), 2F0-2FF is COM 2 (ditto), 3B0-3BF is for LPT 1, 3CO-3CF and 3D0-3DF is for EGA and VGA graphics, and 3F0 to 3FF is for COM 1 and the floppy controller. Some base addresses are not available as they are used for system purposes. These include all the addresses from 300-31F, 330-36F, 380-3AF, and 3E0-3EF (some of these include multiple banks and cant be configured for cards). Most cards you install with have preferred ranges, such as sound cards which like 220-22F. All of this may sound confusing, but knowing which IRQs, DMAs, base addresses, and I/O addresses are available and which are reserved is important when you install cards. And thats what well start to do next column when we look at setting up a peer-to-peer network. |
|
Send mail to
tparker@tpci.com with
questions or comments about this web site.
|