Page 1 of 1

something weird to send identify coomand to SATA Controller

Posted: Sun Apr 27, 2014 11:27 am
by nerdboy69
Why when I try to send a identify command to a SATA Controller with this code:

Code: Select all

mov dx,BAR
mov ax,ech
add dx,7
out dx,ax
sub dx,7
mov cx,256
lea di,[buf]
rep insw
this code return the bytes ffh into the buf. Why?

Re: something weird to send identify coomand to SATA Control

Posted: Sun Apr 27, 2014 11:45 am
by Combuster
You are not using IDE controller code to program AHCI here? :shock:

Re: something weird to send identify coomand to SATA Control

Posted: Sun Apr 27, 2014 11:51 am
by nerdboy69
Combuster wrote:You are not using IDE controller code to program AHCI here? :shock:
NO!
The controller is in AHCI mode and the BAR is thet true base address register of SATA Controller.

Re: something weird to send identify coomand to SATA Control

Posted: Sun Apr 27, 2014 1:55 pm
by sortie
Is the problem that you are sending PATA commands to an AHCI device?

Re: something weird to send identify coomand to SATA Control

Posted: Sun Apr 27, 2014 2:49 pm
by neon
NO!
You seem to have a habit of not providing enough code or debugging information from your efforts and then resort to attacking the community for not helping and/or ignoring the help that you get. It would appear that you still have not learned from this.