Bus Mastering

Bus Mastering

On the high-bandwidth buses, a great deal of data is flowing through the circuitry. In the past the processor was used to control the transfer of this information. In essence, the processor was a middleman, and since it is far more efficient to cut out the middleman, as it were, and perform the transfer directly a system called bus mastering was created. By having capable devices take control, through circuitry and software "drivers", of the bus and do the work themselves, the bus masters free up CPU resources and increase performance. In order to do bus mastering properly, a controller must exist to arbitrate between requests for full bus access; this is provided by the core logic or chipset. Bus mastering is often referred to as "first party" DMA since the work is controlled by the device doing the transfer.

Currently most bus mastering in the Super7 system is done on the PCI bus; in addition, support has been added for IDE/ATA hard disk drives, as well as certain graphics accelerator cards, to do bus mastering on PCI under certain conditions. This has led to some conflicts within the super7 system because these devices were for the most part created against an Intel based platform.  This has created a need for new drivers which, unfortunately, are slower in coming than the products they are intended to support.   This has caused many a headache for the Super7 system owner but, fear not, most companies, albeit slowly, are working toward the release of S7 compatible drivers.

Direct Memory Access (DMA) Modes and IDE Bus Mastering

DMA or Direct Memory Access is the term we use to refer to a transfer method or protocol whereby a device transfers information directly to or from memory, without the assistance of the CPU. DMA channels have been in use by PCs for years. A standard system resource they were generally used for floppy disk drives and ISA sound cards. Now newer hard disks support the use of a different type of DMA modes over the IDE/ATA interface, which means that a built-in controller on the hard disk can transfer data directly to memory without CPU involvement. This is in direct contrast to the more conventional use of PIO modes, which require the CPU to do the work.

The standard ISA bus DMA channels are an old design dating back to the dark ages of the PC. They use the DMA controller built into the system chipset, to perform third-party DMA transfers, third-party refers to the fact that the system DMA controller is actually doing the transfer (the first two parties are the sender and receiver of the transfer). This type of DMA is not used by modern hard disks for performance reasons.

Modern IDE/ATA hard disks use "first party" DMA transfers, where the peripheral device itself does the work of transferring data to and from memory. This is also called bus mastering . Bus mastering allows the hard disk and memory to work without relying on the old DMA controller built into the system, or needing any support from the CPU. It requires the use of the PCI bus.

( Note: There are several different DMA modes that are used to define transfer rates when DMA is used for transfers over the IDE/ATA interface )

Standard DMA Channels

Direct memory access (DMA) channels are system conduits used by many devices to transfer information directly to and from memory. DMA channels are not used nearly as much as IRQs ( interrupt requests - an assigned system resource used by devices to get control of the CPU ). Because there are fewer of them and are used by fewer devices, they usually cause fewer problems with system setup. However, conflicts on DMA channels can cause some very strange system problems that can be very hard to diagnose. DMAs are used most commonly today by floppy disk drives, tape drives and sound cards.

Taking A Load Off

In addition to performing calculations and running programs the CPU used to be completely responsible for transferring data to and from memory and peripherals. With the flow of data so much greater in today's modern PC this process is inefficient and so has been made redundant with the inception of IDE/ATA - PCI DMA and bus mastering.

The invention of DMA enabled the devices to cut out the "middle man", as it were, freeing the processor to focus on  other tasks and the peripherals to transfer data themselves. This has resulted in much higher system performance.  Special control circuitry and channels were created that allowed the transfer of information without the processor controlling every aspect of the transfer. This circuitry is normally part of the core logic (chipset) on the motherboard.  These standard channels are only on the ISA bus. PCI devices do not use standard DMA channels. While the use of DMA provided a major improvement over CPU-governed data transfers, it too eventually reached a point where its performance became a limiting factor.  Bus mastering provides much better performance than regular DMA because modern devices have much smarter and faster DMA circuitry built into them than exists in the old standard ISA DMA controller. Newer DMA modes are now available, such as Ultra DMA (mode 3 or DMA-33) that provide for very high transfer rates.

On super7 systems, disks are controlled using either programmed I/O (PIO) or first-party DMA (bus mastering) on the PCI bus, and not using the standard ISA DMA that is used for devices like sound cards. This type of DMA does not rely on the slow ISA DMA controllers, and allows these high-performance devices the bandwidth they need. In fact, many of the devices that used to use DMA on the ISA bus use bus mastering over the PCI bus for faster performance. This includes many of the next-generation video cards, newer high-end SCSI and even network cards.


Ultra DMA "widens" the path to the hard drive by transferring twice as much data per clock cycle. The net effect is that the maximum burst data transfer rate from the disk drive increases from 16.6 Megabytes per second (MB/s) to 33 MB/s. Hard disk drive manufacturers can now bring higher performance products to market that will scale with the rest of the PC platform (faster hard drives to feed faster processors, memory and graphics).

The Ultra DMA protocol sends and retrieves data faster, removing bottlenecks associated with data transfers -- especially during sequential operations. Users of UDMA capable PCs need less time to boot their systems and open applications, a direct result of the improved throughput provided by Ultra DMA. Current disk drive technology has been optimized to perform within the limits of the legacy protocol (16.6MB/s).

Bus Mastering technology can also be implemented with Ultra DMA disk drives. Similar reductions in CPU utilization will be experienced when Bus Mastering drivers are installed.

In addition to speed improvements, the protocol brings new data integrity capabilities to the ATA/IDE interface. Improved timing margins and the use of Cyclical Redundancy Check (CRC), a process for data protection verification not implemented in legacy ATA modes, helping to ensure the integrity of transferred data.

MediaTek All Rights Reserved