Page 1 of 1

Difference of IDE controller and ATA controller

Posted: Sun Sep 13, 2020 6:38 pm
by clementttttttttt
There is "IDE controller" which have pci class code 1 and subclass code 1, and "ATA controller" which have pci class code 1 and subclass code 5. Isn't ATA=IDE? I'm so confused.

Re: Difference of IDE controller and ATA controller

Posted: Sun Sep 13, 2020 9:00 pm
by Octocontrabass
clementttttttttt wrote:Isn't ATA=IDE?
Not if you're an OS developer.

"IDE" refers to a specific programming interface where the ATA registers are mapped to a set of nine I/O ports shared between two devices. Both the PCI IDE controller and the PCI ATA controller provide this programming interface, but that's where the similarities end.

The PCI IDE controller may map the IDE I/O ports either to legacy addresses or according to BARs. The PCI ATA controller always maps the IDE I/O ports according to BARs, and additionally maps the ATA registers to MMIO.

The PCI IDE controller may optionally implement a DMA controller that, if present, is used alongside the IDE I/O ports. The PCI ATA controller always implements a DMA controller, and in order to use the DMA controller you must access the ATA registers through MMIO instead of using the IDE I/O ports.

The PCI ATA controller supports a handful of ATA commands that don't work on the PCI IDE controller. (They may not be useful commands.)