In-depth technology research: finding new ways to recover data, accessing firmware, writing programs, reading bits off the platter, recovering data from dust.

Forum rules

Please do not post questions about data recovery cases here (use this forum instead). This forum is for topics on finding new ways to recover data. Accessing firmware, writing programs, reading bits off the platter, recovering data from dust...
Post a reply

Help about the understanding of SATA and hard drive

April 28th, 2015, 22:36

Recently I was curious about the data transfer procedure between the hard drive and os(just take windows xp as an instance). And the following is my understanding of this so far and there may be a lot of misunderstanding. Please point them out and thanks.
The data was transferred between windows xp and hard drive through the SATA interface. The SATA interface was made up of the SATA controller on the motherboard of PC, the 40-pin SATA cable, and the hard drive. There are many registers related to the SATA interface, such as Command Register, Data Port/Data Register, Device Register, Features Register, Device Control Register, Sector Count Register, Status Register which Contains the hard drives current status which includes the Busy bit(BSY), Device Ready bit (DRDY), and Error bit (ERR). Here I am not sure about this. Does both the hard drive inside and the SATA controller have these registers? Just like two computers which communicate through a network cable, the TCP/IP protocol is as the SATA protocol, the SATA controller and the hard drive is responsible for decomposing, packaging the SATA protocol like network cards.
The SATA controller receives a Device Identify command EC from the windows xp, then it selects the target hard drive, sends EC command to the hard drive's Command Register. The hard drive recognizes this request by some interrupt notification and then it finds out the request is to gather parameters about this drive itself. So it collects the requested info from the cache buffer or from the SA on the platters by reading and transfers it back to the SATA controller. Here is the question, the 512 bytes parameter is transferred directly from the memory in the hard drive to the SATA controller DATA Register, or the 512 bytes parameter is first transferred from the memory in the hard drive to the Data Register in hard drive, and then to the Data Register in the SATA controller on the motherboard?

Re: Help about the understanding of SATA and hard drive

April 30th, 2015, 15:56

Here, you can buy the full official SATA spec book here: http://www.sata-io.org/purchase-spec

Have fun, I'm sure it's an interesting read. :lol:

Re: Help about the understanding of SATA and hard drive

April 30th, 2015, 22:03

data-medics wrote:Here, you can buy the full official SATA spec book here: http://www.sata-io.org/purchase-spec

Have fun, I'm sure it's an interesting read. :lol:


thanks, data-medics. I have already started to read and have to admit that it is really interesting to read this spec book. Enjoy it and have fun. Maybe u also will like reading it. :D :)
Post a reply