Linux Kernel Architecture

(Jacob Rumans) #1

Chapter 6: Device Drivers


not attached directly to the CPU; instead, they are connected via abusthat is responsible for communica-
tion between the device and the CPU and also between the individual devices. There are numerous ways
of implementing buses,^1 most of which are supported by Linux. We list a representative selection below.


❑ Peripheral Component Interconnect(PCI) — The main system bus used on many architectures.
As such, we will take a closer look at its special features and its implementation in the kernel
in the further course of this chapter. PCI devices are placed in slots on the motherboard of the
system. Modern versions of the bus also support hotplugging so that devices can be connected
and disconnected while the system is running (although this option is rarely used, it is supported
in the kernel sources). PCI achieves maximum transfer speeds of a few hundred megabytes per
second and thus covers a wide range of application.
❑ Industrial Standard Architecture(ISA) — An older bus that (unfortunately) is still in
widespread use. Because it is very simple in terms of its electronics, it is easy for electronics
enthusiasts or small companies to design and manufacture additional hardware. This was
indeed the intention when IBM introduced this bus in the early days of PCs. However, over time
it gave rise to more and more problems and has now finally been replaced in more advanced
systems. ISA is tied very closely to the particular features of the IA-32 architecture (and to those
of its predecessors) but may also be used with other processors.
❑ SBus— This is a very advanced bus but already has quite a few years under its belt. It was
designed by SUN as a non-proprietary or open bus but was unable to establish a position for
itself on other architectures. Even though more recent UltraSparc-based models by SUN are
moving more in the direction of PCI, the SBus still plays an important role on older SparcStations
and is supported by Linux for this reason.
❑ IEEE1394— This is obviously not an easy name to market. This bus is therefore referred to as
FireWireby some manufacturers and asI.linkby others. It has several very interesting techni-
cal features including planned hotplug capability and the potential for very high transfer rates.
IEEE1394 is an external bus used predominantly in laptops of the higher price range to provide
a high-speed expansion option.
❑ Universal Serial Bus(USB) — This is also an external bus in widespread use and with very
high market acceptance. The main features of this bus are its hotplug capability and its ability
to detect new hardware automatically. Its maximum speed is only moderate but sufficient for
devices such as CD writer, keyboard, and mouse. A new version of the bus (2.0) delivers much
faster maximum speeds but is practically unchanged in terms of software (the differences on the
hardware level are much more dramatic, but fortunately we needn’t bother with them here).
The topology of USB systems is unusual because the devices are not arranged in a single chain
but in a tree structure; this fact is noticeable in the way the devices are addressed in the ker-
nel.USB hubsare used as nodes to which further devices (and further hubs) can be connected.
Another unusual feature of USB is the option of reserving a fixed bandwidth for individual
devices; this is an important factor when it is necessary to implement a uniform data stream.
❑ Small Computer System Interface(SCSI) — This bus used to be called thebus for professionals
because of the high cost of the associated peripherals. Because SCSI supports high data through-
put, it is used mainly to address hard disks in server systems based on the most varied of

(^1) To be strictly accurate, buses are used not only to communicate with peripherals but also to exchange data with basic system com-
ponents such as RAM memory. However, because buses have more to do with hardware and electronics and present no problems
to the software and the kernel, I don’t discuss them in detail here.

Free download pdf