I have been already programming a little AHCI driver for two weeks. I have read an article from
http://wiki.osdev.org/AHCI and Intel's Serial ATA Advanced Host Controller Interface (AHCI) 1.3. There is an example, which shows how to read sectors via DMA mode (osdev.org). I have done this operation (
ATA_CMD_READ_DMA 0xC8) successfully, but when i tried to write sectors (
ATA_CMD_WRITE_DMA 0xCA) to the device, the HBA set the error
Offset 30h: PxSERR – Port x Serial ATA Error - Handshake Error
(this is decoding from Intel AHCI specification). I don't understand why it happened. Please, help me. May be there is any example how to write sectors...
In addition, I have tried to issue the command
IDENTIFY 0xEC, but not successfully...