Difference of IDE controller and ATA controller
-
- Member
- Posts: 70
- Joined: Tue Jul 14, 2020 4:01 am
- Libera.chat IRC: clementttttttttt
Difference of IDE controller and ATA controller
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.
-
- Member
- Posts: 5568
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Difference of IDE controller and ATA controller
Not if you're an OS developer.clementttttttttt wrote:Isn't ATA=IDE?
"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.)