Could someone help me about SATA Programming
Posted: Mon Mar 17, 2014 1:26 am
hi,all
with the code:
At http://wiki.osdev.org/SATASay: On the Primary ATA bus, you get the signature bytes by reading IO ports 0x1F4 and 0x1F5, and you should see values of 0x3C and 0xC3. But I only see the values FFh in that I/O ports. Why?
What's wrong with my code ?(Is teh ports correct(1F0-1F7)?
thx!
with the code:
Code: Select all
mov dx,1F7h
mov ax,ECh
out dx,ax ;Send a standard IDENTIFY command to the drive (0xEC).
in ax,dx ; The drive should respond with an error in the ERR bit of the Status Register, and a pair of "signature bytes".
sub dx,3
in ax,dx ;On the Primary ATA bus, you get the signature bytes by reading IO ports 0x1F4 and 0x1F5, and you should see values of 0x3C and 0xC3.
inc dx
in ax,dx
What's wrong with my code ?(Is teh ports correct(1F0-1F7)?
thx!