Page 1 of 1

Two IDE compatibility controllers, which is which?

Posted: Thu Sep 06, 2007 8:01 am
by Candy
When I detect two PCI 1/1/128 devices they're two IDE controllers that only do compatibility mode. They include a BAR4 each. Which of the BAR4's maps to which set of registers and how do I find out?

Posted: Fri Sep 07, 2007 3:20 am
by Combuster
I'm stabbing at the dark here since I have no experience with harddisks, but some ideas:

1:
Since they are PCI devices, you should be able to disable one and then probe which legacy range goes down with it.

2:
They probaby come in some order. One could expect that the device with the lowest slot number is the master and the second one the slave?

Posted: Fri Sep 07, 2007 12:11 pm
by exkor
BAR4 points to memory. There are 16 bytes in the memory that tell you which registers to use.
Description of 16 bytes can be found in 'ATA Host Adapter Standart" rev 1.0 (dated Jan 2003, its not proposal), section 6.7.
These are bus mastering registers, for DMA.

I got a question of my own. Got Intel P965 board and got BAR5 present - whats its purpose?

Posted: Sat Sep 08, 2007 9:44 am
by Candy
exkor wrote:BAR4 points to memory. There are 16 bytes in the memory that tell you which registers to use.
Description of 16 bytes can be found in 'ATA Host Adapter Standart" rev 1.0 (dated Jan 2003, its not proposal), section 6.7.
These are bus mastering registers, for DMA.

I got a question of my own. Got Intel P965 board and got BAR5 present - whats its purpose?
Probably SATA. Just read the AHCI docs and the BAR5 is used for SATA.