Difference of IDE controller and ATA controller

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
clementttttttttt
Member
Member
Posts: 70
Joined: Tue Jul 14, 2020 4:01 am
Libera.chat IRC: clementttttttttt

Difference of IDE controller and ATA controller

Post 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.
Octocontrabass
Member
Member
Posts: 5568
Joined: Mon Mar 25, 2013 7:01 pm

Re: Difference of IDE controller and ATA controller

Post 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.)
Post Reply