Ports for SATA programming
Posted: Tue Feb 02, 2010 11:17 am
Hello,
I have read the article about PATA/SATA and PATAPI/SATAPI and successfully implemented a routine
that opens the tray of a cdrom drive, after detecting all drives. It works on Bochs and on an machine
with an old IDE-Port.
Now I want to access SATA/SATAPI drives, because all my other PCs have only SATA-Ports. Even the
one with one IDE-Port has SATA-HDs and uses the IDE for a cdrom drive.
I read the source of ATADRVR from http://www.ata-atapi.com and from the wiki. But I don't get it to
work. First I check PCI, but only on one computer I find an ATA-Controller. And there I find a SATAPI
Device, but everytime I send IDENTIFY PACKET DEVICE my system waits for BSY to Clear and loops
infinitly. And If I press Open on the drive, nothing happens. It seems that the drive never finishes that
Command.
Next I try to access standard IDE ports and then the alternate IDE ports. On all PCs with only SATA I
find nothing. Only the PC with the IDE port shows his PATAPI device correctly. So neither on PCI nor
on ports I find devices.
The BIOS on all computers is set to configure all PCI devices during boot.
I will post code later, if necessary. I don't think it helps if I post just a bunch of uncommented code.
best regards
sebihepp
I have read the article about PATA/SATA and PATAPI/SATAPI and successfully implemented a routine
that opens the tray of a cdrom drive, after detecting all drives. It works on Bochs and on an machine
with an old IDE-Port.
Now I want to access SATA/SATAPI drives, because all my other PCs have only SATA-Ports. Even the
one with one IDE-Port has SATA-HDs and uses the IDE for a cdrom drive.
I read the source of ATADRVR from http://www.ata-atapi.com and from the wiki. But I don't get it to
work. First I check PCI, but only on one computer I find an ATA-Controller. And there I find a SATAPI
Device, but everytime I send IDENTIFY PACKET DEVICE my system waits for BSY to Clear and loops
infinitly. And If I press Open on the drive, nothing happens. It seems that the drive never finishes that
Command.
Next I try to access standard IDE ports and then the alternate IDE ports. On all PCs with only SATA I
find nothing. Only the PC with the IDE port shows his PATAPI device correctly. So neither on PCI nor
on ports I find devices.
The BIOS on all computers is set to configure all PCI devices during boot.
I will post code later, if necessary. I don't think it helps if I post just a bunch of uncommented code.
best regards
sebihepp