I/O Ports

An I/O port is usually used as a technical term for a specific address on the x86's IO bus. This bus provides communication with devices in a fixed order and size, and was used as an alternative to memory access. On many other architectures, there is no predefined bus for such communication and all communication with hardware is done via memory-mapped IO. This also increasingly happens on modern x86 hardware.

Contents

Looking for a list of ports

As an operating system developer, you should not be looking for this. There are few devices that are fairly consistent on PC based hardware, but most ports are claimed by plugin cards you might not have and some are even assigned via PNP which means that any port could be used for the device in question. If you want access to a device, you will need to look up the details for the device in question, and if some fixed port is involved, it will tell you. It is not technically feasible to have a complete mapping of ports to devices as you won't get access to it.

Port abuse

A few devices were made cheap and don't decode all address bits of the I/O port in question (only the bottom 12 or 14). That means that there are up to sixteen port addresses mapping to the same device.
Similarly, some devices have chosen to avoid conflict with such devices by using a sparse register file. The bottom bits would be defined as constant, and the top bits would instead be used for the index. You'd get ports number 0x82E8, 0x84E8, 0x86E8 and so on. Such ISA devices are typically prone to interfering with PCI assigned IO addresses due to their spread.

Modern implementations of old devices (typically IDE and VGA controllers) have an implementation that is mentioned to be plug-and-play with moving registers, but they are still able to listen to legacy ports and respond accordingly.

The list

If you've found a port number and you are still wondering what it's meant to do, here's a list of the most common ports:

Port range

Summary

0x0000-0x001F

The first legacy DMA controller, often used for transfers to floppies.