Pregunta

I've read some articles about PCI and IDE/ATA, and I'm a bit confused now. The PCI class 0x01 (mass storage controllers) contains an IDE (0x01) and an ATA (0x05) subclass. However, from https://superuser.com/questions/341452/whats-the-difference-between-ata-pata-and-ide:

the standard was named "AT Attachment" for the IBM PC/AT (which in turn meant Advanced Technology, but ATA is not Advanced Technology Attachment). But IDE and ATA are synonymous. ATA is a better term.

So, if they are the same, why is there 2 different subclasses for them? Also, in this post it is mentioned that

Both types of drives (SATA and PATA) are IDE devices.

...but when I config a Virtual Machine in oracle VM, there are different: IDE, SATA, ect... controllers.

Also, this post: https://sg.answers.yahoo.com/question/index?qid=20090723091840AA40xd6 tells that the IDE and PCI are used for different connections, but I tought that the ATA 'controllers' are connected to the PCI bus, that's why I have to check them there.

They are way different... PCI is used for soundcards video card etc... IDE is used for CD ROMS hard drives floppy drives etc..

In VirtualBox, when I attach an IDE, floppy controller, SCSI or any storage device, it appears on the PCI bus, just like sound cards and network cards.

The more articles I read, the more confused I become. It would be good to get some clear description of them.

¿Fue útil?

Solución

The terms "IDE", "ATA", and "PATA" get used interchangeably. They generally all refer to a traditional 40/44pin ribbon wire HDD interface. Note that a PCI or PCI Express IDE/ATA/PATA controller can operate in one of two modes:

  1. Legacy Mode - Emulates a legacy ISA bus IDE controller from the original PC. Uses IRQs 14 and 15. IRQs cannot be shared/remapped like a normal PCI device. Only supports a limited number of IDE channels (primary/secondary). Backwards compatible with every Operating System since the dawn of the PC.

  2. Native Mode - Acts like a traditional PCI device. IRQ number is not fixed and may be shared with other PCI devices. Supports an arbitrarty number of controllers in the system. Requires Windows 2000 or later.

With the introduction of SATA, we have another layer of compatibility. SATA controllers can typically be configured for one of two modes:

  1. IDE Mode - Works like a traditional IDE/ATA/PATA controller. Allows backwards compatibility with older operating systems (Windows XP and earlier). Note that in IDE mode, you still might have the choice of Legacy vs Native Mode, listed above.

  2. AHCI Mode - A modern programming interface for SATA controllers. Natively supported by Windows Vista and later.

So, a SATA controller can be:

  • AHCI Mode
  • IDE Mode -> Native
  • IDE Mode -> Legacy

To make things confusing, some BIOSes will refer to IDE mode as "Legacy", and AHCI mode as "Native". Also, not all of the modes listed above will necessarily be available for your chipset/BIOS. Older chipsets may not support AHCI. Some newer chipsets drop support for the older modes. Also, on a motherboard with several SATA ports, there may be a limitation on which ports can be in which mode.

Clear as mud? Great! Now, how does this map to PCI class codes? Under PCI base class 01h (Mass Storage), there are several sub classes defined in the PCI Spec. There are three that are relevant to your question.

  • Sub-class 01h = IDE Controller

    • Most IDE/ATA/PATA controllers will use this subclass

    • So will a SATA controller in IDE Mode

    • Both Legacy and Native Mode IDE controller will use this subclass. You query other bits in the register map to determine which mode you are in.

  • Sub-class 05h = ATA Controller with ADMA

    • This is a special case IDE/ATA controller with special DMA capabilities.

    • I have never seen an Intel or AMD chipset that uses this sub-class.

  • Sub-class 06h = SATA Controller

    • Typically this means a SATA controller in AHCI mode.

    • However, some early SATA controllers had a proprietary interface.

    • The Programming Interface register will tell you what mode it is in.

As for Oracle VM, it probably gives you a choice of which mode the "virtual" HDD is presented to the guest Operating System. I do not have a copy in front of me though. Just glancing at the documentation, it looks like there are choices for IDE (not clear if Native/Legacy/AHCI) or SCSI.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top