Intel 8237 DMA Controller

The Intel 8237 DMA (Direct Memory Access) Controller enables efficient data transfers between memory and I/O devices without CPU intervention. In the IBM PC, it coordinates data transfer to and from floppy and hard drives, as well as performing DRAM refresh cycles.

Overview

The 8237 provides four independent DMA channels, each capable of transferring data between memory and peripherals. In theory, the 8237 is capable of performing memory-to-memory transfers as well, but its implementation in the IBM PC prevents it from doing so.

IBM PC DMA Configuration

ChannelPurposeDevice
0Memory RefreshDRAM
1Unused-
2Floppy DiskFDC
3Hard Disk*HDC

Note: Not all hard disk controllers use DMA. Notably, most models of the XTIDE do not.

Hardware Interface

I/O Ports (8237A-5)

PortRegisterAccess
0x00Channel 0 AddressR/W
0x01Channel 0 CountR/W
0x02Channel 1 AddressR/W
0x03Channel 1 CountR/W
0x04Channel 2 AddressR/W
0x05Channel 2 CountR/W
0x06Channel 3 AddressR/W
0x07Channel 3 CountR/W
0x08Status RegisterR
0x08Command RegisterW
0x09Request RegisterW
0x0AMask RegisterW
0x0BMode RegisterW
0x0CClear Flip-FlopW
0x0DMaster ClearW
0x0EClear Mask RegisterW
0x0FWrite All Mask BitsW

Page Registers

The DMA page registers are not part of the 8237 itself, but are implemented on the motherboard. They are provided here for convenience.

Note: The page register addresses are mapped out of order from their respective channels. Take note of the assignments.

  • 0x81: Channel 2 Page Register (Address bits 16-19)
  • 0x82: Channel 3 Page Register (Address bits 16-19)
  • 0x83: Channel 1 Page Register (Address bits 16-19)

The IBM AT added a page register for Channel 0, but this is not implemented on the PC/XT:

  • 0x87: Channel 0 Page (bits 16-19)