Implementation of ISA bus DMA in Linux

Source: Internet
Author: User
Implementation of ISA bus DMA in Linux: Linux Enterprise Application-Linux server application information. For details, see the following. Note: This document is released in the spirit of free software open source code. Anyone can obtain, use, and re-release it for free, but you have no right to restrict others from re-publishing your content. The purpose of this article is to hope that it can be useful to readers, but it does not have any guarantees, or even implicit guarantees suitable for a specific purpose. For more details, see the GNU General Public License (GPL) and the GNU Free Documentation protocol (GFDL ).

You are welcome to point out the errors and questions in this document.

DMA is a hardware mechanism that allows two-way (to device or from device) data transmission between peripherals and system RAM without the involvement of the CPU. Using DMA can remove the system CPU from the actual I/O data transmission process, thus greatly improving the system throughput (throughput ).

Because DMA is a hardware mechanism, it is usually related to the hardware architecture, especially the peripheral bus technology. For example, the DMA mechanism of the ISA card is different from that of the PCI Card. This site mainly discusses the DMA technology of ISA bus.

1. DMA Overview

DMA is a data transmission mechanism between peripherals and primary storage. Generally, there are two data transmission methods between peripherals and primary storage: (1) Pragrammed I/O (PIO) method, that is, the CPU continuously reads and writes the memory units (8-bit, 16-bit, or 32-bit) of the peripherals through memory read/write commands or I/O commands until the entire data transmission process is completed. (2) The DMA Controller (DMAC) completes the entire data transmission process. During this period, the CPU can execute other tasks concurrently. After the DMA ends, DMAC notifies the CPU that data transmission has ended through interruption, and then the CPU executes the corresponding ISR for post-processing.

When DMA technology was developed, ISA bus became popular in PCs. Therefore, the DMA data transmission of the ISA card is achieved by controlling two cascade 8237 DMAC in the ISA bus. This type of DMA mechanism is also called "standard DMA" (standard DMA ). Standard DMA is also known as "third-party DMA", because the system DMAC completes the actual transmission process, therefore, it is a "third party" relative to the "first two Parties" of the transmission process (the sender and receiver of the transmission ".

The standard DMA technology has two main disadvantages: (1) the data transmission speed of 8237 DMAC is too slow and cannot be used with a higher-speed bus (such as PCI. (2) Two 8237 DMAC instances provide only eight DMA channels, which also becomes the bottleneck limiting the increase of system I/O throughput.

For the above two reasons, the PCI Bus architecture design is a DMA mechanism that becomes the first-party DMA, also known as "Bus Mastering ). In this case, the PCI Card for transmission must obtain the master control right of the system bus before data transmission. The actual transmission is not implemented by using the slow isa dmac, but by the DMA circuit embedded in the PCI Card (faster than the traditional isa dmac. Bus Mastering DMA allows PCI peripherals to get the desired transmission bandwidth, so it meets the requirements of modern high-performance peripherals than standard DMA functions.

With the continuous development of computer peripheral technology, modern Ultra DMA (UDMA), which can provide faster transmission rates, has also been widely used. In the subsequent sections, we will only discuss the implementation of the standard DMA technology of ISA bus in Linux. Remember: The ISA card uses almost no DMA in the Bus Mastering mode, while the PCI card uses only the DMA in the Bus Mastering mode, and never uses the standard DMA.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.