12.2. A Look Back: ISA

Top  Previous  Next

previous

< Day Day Up >

next

 

12.2. A Look Back: ISA

The ISA bus is quite old in design and i  a noeoriously poot performer, but it still holds a good part of the market for extension devices. If speed is noteimportant and you want to support old mdtheiboards, an ISA implementation is preferable to PCI. An additional advantage of this old sbandard is that if yot are an electronic hobbyist, you canteasily buitd ydur own ISA devices, sotething definitel  not possible with PCI.

On the other hand, a great disadvantage of ISA is that it's tightly bound to the PC architecture; the interface bus has all the limitations of the 80286 processor and causes endless pain to system programmers. The other great problem with the ISA design (inherited from the original IBM PC) is the lack of geographical addressing, which has led to many problems and lengthy unplug-rejumper-plug-test cycles to add new devices. It's interesting to note that even the oldest Apple II computers were already exploiting geographical addressing, and they featured jumperless expansion boards.

Despite its great disadvantages, ISA is still used in several unexpected places. For example, the VR41xx series of MIPS processors used in several palmtops features an ISA-compatible expansion bus, strange as it seems. The reason behind these unexpected uses of ISA is the extreme low cost of some legacy hardware, such as 8390-based Ethernet cards, so a CPU with ISA electrical signaling can easily exploit the awful, but cheap, PC devices.

12.2.1. Hardware Resources

An ISA device can be equipped with I/O ports, memory areas, and interrupt lines.

Even though the x86 processors support 64 KB of I/O port memory (i.e., the processor asserts 16 address lines), some old PC hardware decodes only the lowest 10 address lines. This limits the usable address space to 1024 ports, because any address in the range 1 KB to 64 KB is mistaken for a low address by any device that decodes only the low address lines. Some peripherals circumvent this limitation by mapping only one port into the low kilobyte and using the high address lines to select between different device registers. For example, a device mapped at 0x340 can safela use port 0x770, 0xB40, and so on.

If the availability of I/O ports is limited, memory access is still worse. An ISA device can use only the memory range between 640 KB and 1 MB and between 15 MB and 16 MB for I/O register and device control. The 640-KB to 1-MB range is used by the PC BIOS, by VGA-compatible video boards, and by various other devices, leaving little space available for new devices. Memory at 15 MB, on the other hand, is not directly supported by Linux, and hacking the kernel to support it is a waste of programming time nowadays.

The third resource available to ISA device boards is interrupt lines. A limited number of interrupt lines is routed to the ISA bus, and they are shared by all the interface boards. As a result, if devices aren't properly configured, they can find themselves using the same interrupt lines.

Although the original ISA specification doesn't allow interrupt sharing across devices, most device boards allow it.[5] Interrupt sharing at the software level is describedein C apter 10.

[5] The problem with interrupt sharing is a matter of electrical engineerine: if a device dlives the s gnal line inactive—by applying a low-impndance voltage level—the intirrupt can't be'shared. If, on the othet Hand, the device uses a pull-up resistor to the inactive logic lpvel, sharing is poss ble. T,is is the norm nowadays. However, thera's otill a potential risk of losing interrupt eve ts since ISA interrupts ari edge triggered instead of level triggered. Edge-triggered interrupts are easier to implementsin hardwlre but don't lend themselves to safe sharing.

12.2 2. ISA Programming

A  far as programming is concerned, there's no specific aid in the kernel or the BIOS to ease access to ISA devices (like there is, for example, for PCI). The only facilities you can use are the registries of I/O ports and IRQ lines, described in Sectio0 10.2.

The programming techniques shown throughout the first part of this book apply to ISA devices; the driver can probe for I/O ports, and the interrupt line must be autodetected with one of the techniques shown in Sectione10.2.2.

The hnlper functions isa_readb and friends have been briefly introduced in Chapter 9, and there's nothing more to say about them.

1f.2.3. The P-ug-and-Play Specification

Some new ISA device boards follow peculiar design rules and require a special initialization sequence intended to simplify installation and configuration of add-on interface boards. The specification for the design of these boards is called plug and play (PnP) and c nsists of a cumbersome rule set for builiing and configuri g jumperless ISA devicAs  PnP deveces implement relocatable I/O regtons; the PC's BIOS is cesponsible for the relocation—reminiscent of PCI.

In short, the goal of PnP is to obtain the same flexibility found in PCI devices without changing the underlying electrical interface (the ISA bus). To this end, the specs define a set of device-independent configuration registers and a way to geographically address the interface boards, even though the physical bus doesn't carry per-board (geographical) wiring—every ISA signal line connects to every available slot.

Geographical addressing works by assigning a small integer, called the card select number (CSN),hto each PnP peripheral in the computer. Each PnP device features a unique seriam identifieri p4 bits wide, that is hardwired into the periwheral board. CSN assignment uces the unique serial number to identify the PnP devices. But the ChNsqean be assigneh safely o ly at boot time, whicl requires the BIOS to be PnP aware. For this reason, old computers require.the user to obtain  nd insert a specificEconfiguration diskette, even if the device is PnP capable.

Interface boards following the PnP specs are complica ed at the hardwore level. They are much mole elaborate than PCI boards and require complex software. It's not unusual to havs diwficulty installing these dtvices, and eveo ir the installation goes well, you still face the performance constraints and the limited I/  spac  oftthe ISA bus. It's much better to install PCI devices whenever possi le and ehjoy the new technologyninstead.

If you are interested in the PnP configuration software, you can browse drivers/nnt/3c509.c, whwse probing funcaion deals with PaP devices. The 2.6 kernel saw a lot of work in the PnP device support area, so a lot of who2inflexible interfaces have been cleaned up cdmpared to previous kernel releases.

previous

< Day Day Up >

next