Page 1 of 1

How to select an ATA drive

Posted: Wed Aug 19, 2015 11:19 am
by drnono
How do I select an ATA device properly? I haven't found it after scanning through the ATAPI-ACS-8 commandset pdf.
I have some code to read the identification space of an ATA device, but it only works properly for the primary channel 0 device.

on the wiki page:
To use the IDENTIFY command, select a target drive by sending 0xA0 for the master drive, or 0xB0 for the slave, to the "drive select" IO port
I tried this and it didn't work, but I did somehow print the vendor id strings from a primary HDD and secondary CD on VMware by sending 0 for master and 1 for slave.

Now, when I tidied up the code a bit I don't get the string from the secondary channel. The actual code checks the four devices but I just have two below:

Re: How to select an ATA drive

Posted: Wed Aug 19, 2015 1:04 pm
by drnono
Aha, it was identify_packet device.