Top Banner
Jin-Soo Kim ([email protected]) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Serial ATA (SATA) Interface
41

Serial ATA (SATA) Interface

Dec 18, 2021

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Serial ATA (SATA) Interface

Jin-Soo Kim ([email protected])

Computer Systems Laboratory

Sungkyunkwan University

http://csl.skku.edu

Serial ATA

(SATA) Interface

Page 2: Serial ATA (SATA) Interface

Solid State Drive (SSD)

Page 3: Serial ATA (SATA) Interface

3ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

Commercial SSDs

Source: http://www.enuri.com (As of March 4, 2016)

Page 4: Serial ATA (SATA) Interface

4ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

Anatomy of an SSD

▪ Samsung 850 Evo

SSD Controller

NAND Flash

DRAM

http://www.anandtech.com/show/9451/the-2tb-samsung-850-pro-evo-ssd-review

Page 5: Serial ATA (SATA) Interface

5ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

HDDs vs. SSDs

http://www.samsung.com/global/business/semiconductor/minisite/SSD/global/html/whitepaper/whitepaper01.html

Page 6: Serial ATA (SATA) Interface

6ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

State of the Art

▪ World’s first 2.5” SAS 16TB SSD @ FMS 2015

Page 7: Serial ATA (SATA) Interface

7ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

(Messy) Storage Interfaces

J. Pappas, Annual Update on Interfaces, FMS, 2015.

Page 8: Serial ATA (SATA) Interface

8ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

Moving Closer to the Processor

P. Wassenberg, SSD Connectivity – Exploring the Options, FMS, 2014.

Page 9: Serial ATA (SATA) Interface

9ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

ST-506 Interface

▪ ST-506: The first 5.25” HDD from Seagate

▪ 1980, up to 5MB at $1500

Page 10: Serial ATA (SATA) Interface

10ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

(Parallel) ATA Interface

▪ IDE (Integrated Disc Electronics) drives

▪ Support for two drives (master/slave)

▪ Standardized in 1994 as ANSI X3.221:

AT Attachment Interface for Disk Drives

Page 11: Serial ATA (SATA) Interface

11ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

Serial ATA (SATA)

▪ Primary internal storage interconnect for desktop

and mobile PCs

• HDDs, SSDs, optical drives, removable disks, ..

▪ More than 1.1 billion SATA drives shipped during

2001-2008

▪ Market share (as of 2008):

• Desktop PC market: 99%

• Mobile PC market: 97.7%

• Enterprise market: 27.6%

▪ Serial, point-to-point, half duplex

Page 12: Serial ATA (SATA) Interface

12ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

Why SATA?

▪ Lower pin count (cost, space, …)

▪ Lower voltage support (5V 0.7V)

▪ Higher performance:

• SATA 1: 150MB/s @ 1.5Gb/s

• SATA 2: 300MB/s @ 3Gb/s

• SATA 3: 600MB/s @ 6Gb/s

▪ Simple drive configuration (no slave)

▪ Greater reliability (CRC/packet)

▪ Migration to servers (hot plug, NCQ, …)

Page 13: Serial ATA (SATA) Interface

13ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

SCSI

▪ Small Computer System Interface

• SASI (Shugart Associates System Interface), 1981

• SASI was adopted as a standard and named SCSI in 1986

▪ A set of standards for physically transferring data

between computers and peripherals

• Parallel, shared bus

• Hard disk drives, tape drives, scanners, CD drivers, ...

▪ SCSI evolution

• SCSI-1: 8-bit, 5MB/s,1986

• SCSI-2: 16-bit, 10MB/s, 1989

• SCSI-3: 16-bit, up to 320MB/s (Ultra-320), 1992-2001

Page 14: Serial ATA (SATA) Interface

14ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

SAS

▪ Serial Attached SCSI

• Serial, point-to-point, full-duplex interconnect for SCSI

• Backward compatible with SATA 2 and later: SATA drives

can be connected to SAS backplanes

▪ SAS evolution

• SAS-1: 3Gbps, 2005

• SAS-2: 6Gbps, 2009

• SAS-3: 12Gbps, 2013

▪ Being used for server storage applications

• Performance, reliability, sophisticated software control, and

extensive error reporting

Page 15: Serial ATA (SATA) Interface

15ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

NVMe (NVM Express)

▪ The industry standard interface for high-performance

NVM storage

• NVMHCI 1.0 in 2008 (led by Intel)

• NVMe 1.0 in 2011 by NVM Express Workgroup

• NVMe 1.2 in 2014

• Supported by major OSes: Windows, Linux, Solaris, ...

▪ PCIe-based

▪ Commercial NVMe SSDs

• Samsung XS1715, Intel DC P3700, HGST SN150, …

• ~ 75% (Client) or 37% (Enterprise) of SSD shipments by

2018

Page 16: Serial ATA (SATA) Interface

16ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

SSD Form Factors

▪ Started with non-HDD form factors

▪ Mass adoption with HDD form factors

1.8” 2.5” 3.5”

Page 17: Serial ATA (SATA) Interface

17ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

SSD Form Factors: SATA

▪ Proliferating in different form factors

Slim SATA MO-297

mSATA MO-300A

mSATA Mini MO-300B

MO-276 µSSD 2242 2260 2280

M.2 (SATA)

Page 18: Serial ATA (SATA) Interface

18ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

SSD Form Factors: PCIe

Add-in-card (AIC)

2242 2260 2280M.2 (PCIe: Up to x4)

U.2(SFF-8639:Up to x4)

SATA

SAS

U.2

Page 19: Serial ATA (SATA) Interface

Serial ATA (SATA) Interface

Page 20: Serial ATA (SATA) Interface

20ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

PATA Block Diagram

Page 21: Serial ATA (SATA) Interface

21ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

PATA Programming Interface

▪ Task file

• A block of registers mapped into the x86 IO address space

• Eight Command Registers (@ 0x01F0) +

One Control Register (@ 0x03F6)

▪ Issuing a command

• Initialize the task file for a particular command

• Write the appropriate value to the Command register @

0x01F7

Page 22: Serial ATA (SATA) Interface

22ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

Physical Drive Geometry

Page 23: Serial ATA (SATA) Interface

23ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

Taskfile (Physical Addressing)

Page 24: Serial ATA (SATA) Interface

24ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

Taskfile (28-bit LBA)

Page 25: Serial ATA (SATA) Interface

25ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

48-bit LBA

▪ 28-bit LBA: up to 128GB

▪ ATA-6 introduced 48-bit LBA: up to 128PB

• Two writes issued to LBA low/middle/high (0x01F3-0x01F5)

and sector count (0x01F2)

• High-order byte is loaded first

• cf. ReadDMAExtended, WriteDMAExtended

Page 26: Serial ATA (SATA) Interface

26ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

PATA Command Sequence

Page 27: Serial ATA (SATA) Interface

27ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

SATA Compatibility with PATA

▪ HBA sends the register contents to the drive via a

packet called a “Frame Information Structure (FIS)”

Page 28: Serial ATA (SATA) Interface

28ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

SATA Block Diagram

SATA 1

SATA 2

FIS

FIS

Page 29: Serial ATA (SATA) Interface

29ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

FIS Types

▪ Each FIS has an 8-bit ID (type)

▪ Size is always multiples of 4 bytes (=1 DW)

Page 30: Serial ATA (SATA) Interface

30ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

Register FIS H2D

Page 31: Serial ATA (SATA) Interface

31ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

Data FIS

Page 32: Serial ATA (SATA) Interface

32ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

Non-Data Commands

Page 33: Serial ATA (SATA) Interface

33ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

DMA Read Command

Page 34: Serial ATA (SATA) Interface

34ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

DMA Write Command

Page 35: Serial ATA (SATA) Interface

35ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

SATA NCQ

▪ Enqueue up to 32 commands in the drive

▪ Process them in an out-of-order fashion

B

D

A

CB

D

A

C

Page 36: Serial ATA (SATA) Interface

36ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

Enabling NCQ

▪ IDENTIFY DEVICE command:

Page 37: Serial ATA (SATA) Interface

37ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

First Party DMA Commands

▪ First Party DMA (FPDMA) Read

▪ First Party DMA (FPDMA) Write

Page 38: Serial ATA (SATA) Interface

38ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

FPDMA Read Command

Page 39: Serial ATA (SATA) Interface

39ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

FPDMA Write Command

Auto-activate

X

Page 40: Serial ATA (SATA) Interface

40ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

AHCI

▪ Advanced Host Controller Interface

• By Intel

• The current version is AHCI v1.3 (Oct. 2010)

• Defines the functional behavior and software interface of the

SATA/AHCI adapters

• AHCI HBAs support from 1 to 32 ports

• An HBA optionally supports SATA NCQ via the FPDMA

Queued Command protocol for each device of up to 32

entries

Page 41: Serial ATA (SATA) Interface

41ICE3028: Embedded Systems Design | Spring 2016 | Jin-Soo Kim ([email protected])

Command Queue in AHCI