avibag wrote:
1: I was sure that the difference between PCI native mode and compatibility mode is that PCI mode uses PCI for determining the ports, and compatibility mode uses fixed ports.. From your reply I understand that I was wrong. So what's exactly the difference between them?
In compatibility mode, the PCI IDE controller uses fixed legacy ports, so ancient software that doesn't support PCI will be able to use the PCI IDE controller. Your OS will support PCI, so you should use PCI to detect the ports. The PCI IDE controller specification explains how to detect which mode the controller is in, and how to detect which ports it's using in both modes.
avibag wrote:
2. What's the difference between the ATA specification and the ATA command set?
The ATA command set is a subset of the ATA specification. No one uses the hardware part of the ATA specification anymore, so they split it into separate hardware and command set specifications, and periodically release updates to the command set specification.
nexos wrote:
In PCI mode, there are an arbitrary number of drives, and IRQ mapping is obtained via the MP tables or ACPI. Personally, if you don't plan on writing an ACPI implementation, I would use ISA mode, as most ATA disks that use PCI mode probably will use different IRQs in that mode.
You only need MP tables or ACPI if you're using the APIC. The PCI configuration registers will include the PIC IRQ mapping. Some controllers won't support ISA mode anyway.
avibag wrote:
2. So should I use the command spec?
Use whichever spec the drive says it supports.