SATA protocol analysis of hard disk data recovery technology (1)

Do data recovery and forensics techniques, and deal with hard drives every day. Whether it is a mechanical hard disk or a solid state hard disk, it is almost a SATA interface. If the PATA protocol used by the IDE interface of the parallel bus is well understood, then the high-speed serial protocol of SATA is more difficult to understand. Fortunately, this kind of high-speed protocol does not pop out from the cracks in the stone. If you understand the network's TCP/IP protocol, you will not be too hard to understand.

With the increase of data transmission rate, various problems of parallel ATA transmission technology, such as signal distortion and crosstalk, and limited device addressing capability, have become the main obstacles to improve the efficiency of protocol data transmission. Therefore, serial transmission of data becomes a kind of select.

In August 2001, Seagate announced the Serial ATA 1.0 standard, and the Serial ATA specification was formally established. The protocol specifies a theoretical data transfer rate of 150 MB/s, which is much higher than the Parallel ATA protocol. With the SATA II and SATAIII protocol standards being developed, the interface data transfer rate can be increased to 300MB/s or even 600MB/s. In 2013, the SerialATA Committee formally approved the SATA 3.2 standard protocol. The most important change in this release is the introduction of a "SATA Express" solution that allows SATA and PCI-E interfaces to coexist. With the advantages of the PCI-E standard interface multi-channel technology, the SATA 3.2 standard protocol provides a maximum transfer rate of up to 2GB/s. New technologies such as M.2 product specifications, micro SSD standards, improved power management (Dev Sleep) and RAID Array Rebuild Assistant (Rebuild Assist) were also introduced.

The SATA standard interface uses Fibre Channel as the physical design blueprint and consists of 7 lines. Among them, 3 are ground lines, which are used to weaken the interference between serial signal lines, and 4 are used as data transmission functions for two pairs of differential lines (1 pair transmission and 1 pair reception). SATA serial transmission uses Low Voltage Differential Signaling (LVDS), which has a peak-to-peak voltage of only 250m V (up to 500m V), which greatly reduces system power consumption and reduces system complexity. In addition, the SATA standard interface power supply consists of 15 wires that provide +3.3V, +5V, and +12V power supplies, respectively. Its pin assignments are shown in Figure 1, Table 1 and Table 2.

硬盘数据恢复技术之SATA协议分析(一)

Figure 1 SATA interface pin diagram

Table 1 Signal pins of the SATA interface

硬盘数据恢复技术之SATA协议分析(一)

Table 2 Power pins of the SATA interface

硬盘数据恢复技术之SATA协议分析(一)

The SATA standard protocol refers to the Open Systems Interconnection (OSI) reference model. The entire SATA system is divided into five layers according to different implementation functions and service objects: physical layer, data link layer (Link Layer), Transport Layer, Command Layer, and Application Layer. It is also possible to incorporate the command layer into the application layer and divide the entire system into 4 layers.

硬盘数据恢复技术之SATA协议分析(一)

Figure 2 SATA architecture

The physical layer consists of two simple high-speed low-voltage differential signal transceiver channels, one for receiving data and the other for data transmission. It also includes a serializer and a deserializer that provides an OOB (OutOf Band) signal check bus. Whether to mount the device and handle the negotiation of the power-on sequence and data transmission speed of the device.

The link layer is mainly responsible for controlling the transmission process of the frame, and ensuring the reliability of data transmission by maintaining the integrity of the transmitted and received data, including error correction check (CRC), 8b/10b codec, signal scrambling and descrambling of the data packet. Wait. The link layer defines a frame start primitive (SOF) and an end primitive (EOF), and the receiver determines the boundary of a frame by discriminating them. The link layer encapsulates the SOF and EOF primitives on the frame information, and the CRC checksum data, and then scrambles the data to be transmitted. After the scrambling is completed, the 8b/10b encoding is performed, and finally, the physical layer sends the data. The processing after the physical layer receives the data is just the opposite. The link layer sends the command signal primitive from the transport layer to the physical layer, receives the original character from the physical layer, converts it into an instruction signal that can be recognized by the transport layer, and sends it to the transport layer.

The transport layer is oriented to the application layer and the link layer to adjust the data format adapted to the two layers of transmission. It starts the data packet transmission according to the read and write request instruction of the application layer and the response information of the link layer, and the transport layer controls the host and the hard disk. The format of the Frame Information Structures (FIS) that transmits control commands and data. The transport layer does not change the content of the transmitted data, only the data to be transmitted to the application layer is packed into the structure of the data frame, and the received data frame is restored to the data transmission to the link layer.

The application layer is the top-level structure of the SATA protocol. It is responsible for the execution and parsing of all ATA commands, reports the current hard disk running status to the processor, generates read and write requests for data, reads and sets the working performance mode of the hard disk, and includes control Access to the instruction module registers. The application layer analyzes the obtained hard disk operation commands and parses them according to the protocol, parses them into corresponding transmission requests, and finally requests the transmission layer to perform data transmission operations according to the data transmission request.

Generally speaking, when sending data, according to the order of application layer->transport layer->link layer->physical layer, the data passes through these four layers first-class, and the data is packaged at each layer. Finally, the physical layer transmits the data through four differential signal lines; when receiving the data, the data is in the order of physical layer->link layer->transport layer->application layer, and the data passes through four layers one by one, at each The layers are “slimming” the data and unpacking it, and finally transferring it to the application layer, which is the logical data we see. This understanding is much easier. Details about the agreement will be introduced in the next article, so stay tuned.

About Darth Technology

Darth Technology, a national high-tech enterprise, the only collaboration unit for the data recovery of the confidentiality of the Tianjin State Secrecy Bureau, the famous brand in the data recovery industry, leading the data recovery technology in China and even in Asia!

Darth Technology China Data Recovery and Forensics Experts! Hotline

More data recovery and forensics cutting-edge technology, please pay attention to WeChat public account: woocs

Micro signal: woocs

硬盘数据恢复技术之SATA协议分析(一)

Long press to identify the QR code

Focus on data recovery and forensics technology, the Internet

Submission:

Stainless Steel Bread Basket

Bread Basket,stainless wire basket,stainless wire bread basket,Metal Wire Bread Basket,steel bread basket,etc. we offered that you can trust. Welcome to do business with us.

Kichen Rack is made of high quality 304 stainless steel, This kind of material steel luxury, never rust, resist corruption, easily clean, safe, healthy and durable. Prevent rust or chemicals from contaminating food and damaging health

Stainless Steel Wire Bread Basket,Metal Wire Bread Basket,Creative Bread Basket,Versatile Bread Basket

Shenzhen Lanejoy Technology Co.,LTD , https://www.szstainlesssteelwiremesh.com