没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
Serial ATA AHCI 1.3 Specification
i
S
S
e
e
r
r
i
i
a
a
l
l
A
A
T
T
A
A
A
A
d
d
v
v
a
a
n
n
c
c
e
e
d
d
H
H
o
o
s
s
t
t
C
C
o
o
n
n
t
t
r
r
o
o
l
l
l
l
e
e
r
r
I
I
n
n
t
t
e
e
r
r
f
f
a
a
c
c
e
e
(
(
A
A
H
H
C
C
I
I
)
)
1
1
.
.
3
3
AHCI 1_3.doc
Please send comments to James Boyd
james.a.boyd@intel.com
Serial ATA AHCI 1.3 Specification
ii
Advanced Host Controller Interface revision 1.3 specification available for download at
http://developer.intel.com. Ratified on June 26, 2008.
SPECIFICATION DISCLAIMER
THIS SPECIFICATION IS PROVIDED TO YOU “AS IS” WITH NO WARRANTIES WHATSOEVER,
INCLUDING ANY WARRANTY OF MERCHANTABILITY, NON-INFRINGEMENT, OR FITNESS FOR
ANY PARTICULAR PURPOSE. THE AUTHORS OF THIS SPECIFICATION DISCLAIM ALL LIABILITY,
INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PROPRIETARY RIGHTS, RELATING TO USE
OR IMPLEMENTATION OF INFORMATION IN THIS SPECIFICATION. THE AUTHORS DO NOT
WARRANT OR REPRESENT THAT SUCH USE WILL NOT INFRINGE ANY SUCH RIGHTS. THE
PROVISION OF THIS SPECIFICATION TO YOU DOES NOT PROVIDE YOU WITH ANY LICENSE,
EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY
RIGHTS.
Copyright 2003-2008, Intel Corporation. All rights reserved.
All product names, trademarks, registered trademarks, and/or servicemarks may be claimed as the
property of their respective owners.
AHCI Editor:
James Boyd
Intel Corporation
MS: JF2-53
2111 NE 25
th
Avenue
Hillsboro, OR 97124
james.a.boyd@intel.com
Serial ATA AHCI 1.3 Specification
iii
Table of Contents
1 I
NTRODUCTION ............................................................................................................. 1
1.1 Overview.........................................................................................................................................1
1.2 Scope.............................................................................................................................................. 1
1.3 Outside of Scope ............................................................................................................................ 1
1.4 Block Diagram ................................................................................................................................ 1
1.5 Conventions.................................................................................................................................... 3
1.6 Definitions ....................................................................................................................................... 4
1.6.1 command list ..........................................................................................................................................4
1.6.2 command slot.........................................................................................................................................4
1.6.3 cs............................................................................................................................................................4
1.6.4 D2H ........................................................................................................................................................4
1.6.5 device.....................................................................................................................................................4
1.6.6 FIS..........................................................................................................................................................4
1.6.7 H2D ........................................................................................................................................................4
1.6.8 HBA........................................................................................................................................................4
1.6.9 n/a ..........................................................................................................................................................4
1.6.10 port.........................................................................................................................................................4
1.6.11 PRD........................................................................................................................................................4
1.6.12 queue .....................................................................................................................................................4
1.6.13 register memory .....................................................................................................................................4
1.6.14 Task File.................................................................................................................................................5
1.6.15 system memory......................................................................................................................................5
1.7 Theory of Operation........................................................................................................................5
1.8 Interaction with Legacy Software....................................................................................................5
1.9 References ..................................................................................................................................... 6
2 HBA CONFIGURATION REGISTERS................................................................................... 7
2.1 PCI Header ..................................................................................................................................... 7
2.1.1 Offset 00h: ID - Identifiers ......................................................................................................................7
2.1.2 Offset 04h: CMD - Command.................................................................................................................7
2.1.3 Offset 06h: STS - Device Status.............................................................................................................8
2.1.4 Offset 08h: RID - Revision ID .................................................................................................................8
2.1.5 Offset 09h: CC - Class Code..................................................................................................................8
2.1.6 Offset 0Ch: CLS – Cache Line Size .......................................................................................................8
2.1.7 Offset 0Dh: MLT – Master Latency Timer ..............................................................................................9
2.1.8 Offset 0Eh: HTYPE – Header Type........................................................................................................9
2.1.9 Offset 0Fh: BIST – Built In Self Test (Optional)......................................................................................9
2.1.10 Offset 10h – 20h: BARS – Other Base Addresses (Optional) ................................................................9
2.1.11 Offset 24h: ABAR – AHCI Base Address ...............................................................................................9
2.1.12 Offset 2Ch: SS - Sub System Identifiers ................................................................................................9
2.1.13 Offset 30h: EROM – Expansion ROM (Optional) ...................................................................................9
2.1.14 Offset 34h: CAP – Capabilities Pointer.................................................................................................10
2.1.15 Offset 3Ch: INTR - Interrupt Information ..............................................................................................10
2.1.16 Offset 3Eh: MGNT – Minimum Grant (Optional)...................................................................................10
2.1.17 Offset 3Fh: MLAT – Maximum Latency (Optional) ...............................................................................10
2.2 PCI Power Management Capabilities........................................................................................... 10
2.2.1 Offset PMCAP: PID - PCI Power Management Capability ID...............................................................10
2.2.2 Offset PMCAP + 2h: PC – PCI Power Management Capabilities.........................................................10
2.2.3 Offset PMCAP + 4h: PMCS – PCI Power Management Control And Status........................................11
2.3 Message Signaled Interrupt Capability (Optional)........................................................................ 11
2.3.1 Offset MSICAP: MID – Message Signaled Interrupt Identifiers ............................................................11
2.3.2 Offset MSICAP + 2h: MC – Message Signaled Interrupt Message Control..........................................11
2.3.3 Offset MSICAP + 4h: MA – Message Signaled Interrupt Message Address ........................................12
2.3.4 Offset MSICAP + (8h or Ch): MD – Message Signaled Interrupt Message Data..................................12
2.3.5 Offset MSICAP + 8h: MUA – Message Signaled Interrupt Upper Address (Optional)..........................12
2.4 Serial ATA Capability (Optional)................................................................................................... 12
2.4.1 Offset SATACAP: SATACR0 – Serial ATA Capability Register 0 ........................................................12
Serial ATA AHCI 1.3 Specification
iv
2.4.2 Offset SATACAP + 4h: SATACR1 – Serial ATA Capability Register 1 ................................................12
2.5 Other Capability Pointers.............................................................................................................. 13
3 HBA MEMORY REGISTERS ........................................................................................... 14
3.1 Generic Host Control .................................................................................................................... 14
3.1.1 Offset 00h: CAP – HBA Capabilities.....................................................................................................14
3.1.2 Offset 04h: GHC – Global HBA Control................................................................................................16
3.1.3 Offset 08h: IS – Interrupt Status Register.............................................................................................17
3.1.4 Offset 0Ch: PI – Ports Implemented.....................................................................................................17
3.1.5 Offset 10h: VS – AHCI Version ............................................................................................................18
3.1.6 Offset 14h: CCC_CTL – Command Completion Coalescing Control....................................................18
3.1.7 Offset 18h: CCC_PORTS – Command Completion Coalescing Ports .................................................19
3.1.8 Offset 1Ch: EM_LOC – Enclosure Management Location ...................................................................19
3.1.9 Offset 20h: EM_CTL – Enclosure Management Control ......................................................................19
3.1.10 Offset 24h: CAP2 – HBA Capabilities Extended...................................................................................20
3.1.11 Offset 28h: BOHC – BIOS/OS Handoff Control and Status..................................................................20
3.2 Vendor Specific Registers ............................................................................................................ 21
3.3 Port Registers (one set per port) .................................................................................................. 21
3.3.1 Offset 00h: PxCLB – Port x Command List Base Address...................................................................21
3.3.2 Offset 04h: PxCLBU – Port x Command List Base Address Upper 32-bits..........................................21
3.3.3 Offset 08h: PxFB – Port x FIS Base Address.......................................................................................22
3.3.4 Offset 0Ch: PxFBU – Port x FIS Base Address Upper 32-bits .............................................................22
3.3.5 Offset 10h: PxIS – Port x Interrupt Status ............................................................................................22
3.3.6 Offset 14h: PxIE – Port x Interrupt Enable ...........................................................................................23
3.3.7 Offset 18h: PxCMD – Port x Command and Status..............................................................................25
3.3.8 Offset 20h: PxTFD – Port x Task File Data ..........................................................................................27
3.3.9 Offset 24h: PxSIG – Port x Signature...................................................................................................27
3.3.10 Offset 28h: PxSSTS – Port x Serial ATA Status (SCR0: SStatus) .......................................................28
3.3.11 Offset 2Ch: PxSCTL – Port x Serial ATA Control (SCR2: SControl) ....................................................28
3.3.12 Offset 30h: PxSERR – Port x Serial ATA Error (SCR1: SError) ...........................................................30
3.3.13 Offset 34h: PxSACT – Port x Serial ATA Active (SCR3: SActive)........................................................31
3.3.14 Offset 38h: PxCI – Port x Command Issue...........................................................................................31
3.3.15 Offset 3Ch: PxSNTF – Port x Serial ATA Notification (SCR4: SNotification)........................................32
3.3.16 Offset 40h: PxFBS: Port x FIS-based Switching Control......................................................................32
3.3.17 Offset 70h to 7Fh: PxVS – Vendor Specific..........................................................................................32
4 SYSTEM MEMORY STRUCTURES .................................................................................... 33
4.1 HBA Memory Space Usage.......................................................................................................... 33
4.2 Port Memory Usage...................................................................................................................... 34
4.2.1 Received FIS Structure ........................................................................................................................35
4.2.2 Command List Structure.......................................................................................................................36
4.2.3 Command Table...................................................................................................................................39
5 DATA TRANSFER OPERATION ........................................................................................ 41
5.1 Introduction ................................................................................................................................... 41
5.2 HBA Controller State Machine (Normative).................................................................................. 41
5.2.1 Variables ..............................................................................................................................................41
5.2.2 HBA Idle States....................................................................................................................................41
5.3 HBA Port State Machine (Normative)........................................................................................... 43
5.3.1 Variables ..............................................................................................................................................43
5.3.2 Port Idle States.....................................................................................................................................45
5.3.3 FIS-based Switching Specific States....................................................................................................49
5.3.4 Power Management States..................................................................................................................50
5.3.5 Non-Data FIS Receive States ..............................................................................................................51
5.3.6 Command Transfer States ...................................................................................................................52
5.3.7 ATAPI Command Transfer States........................................................................................................54
5.3.8 D2H Register FIS Receive States ........................................................................................................54
5.3.9 PIO Setup Receive States....................................................................................................................56
5.3.10 Data Transmit States............................................................................................................................57
5.3.11 Data Receive States.............................................................................................................................58
Serial ATA AHCI 1.3 Specification
v
5.3.12 DMA Setup Receive States..................................................................................................................59
5.3.13 Set Device Bits States..........................................................................................................................60
5.3.14 Unknown FIS Receive States...............................................................................................................61
5.3.15 BIST States ..........................................................................................................................................62
5.3.16 Error States ..........................................................................................................................................62
5.4 HBA Rules (Normative) ................................................................................................................ 64
5.4.1 PRD Byte Count Updates.....................................................................................................................64
5.4.2 PRD Interrupt .......................................................................................................................................64
5.5 System Software Rules (Normative) ............................................................................................ 65
5.5.1 Basic Steps when Building a Command...............................................................................................65
5.5.2 Setting CH(pFreeSlot).P.......................................................................................................................65
5.5.3 Processing Completed Commands......................................................................................................66
5.6 Transfer Examples (Informative) .................................................................................................. 66
5.6.1 Macro States ........................................................................................................................................66
5.6.2 DMA Data Transfers.............................................................................................................................67
5.6.3 PIO Data Transfers ..............................................................................................................................69
5.6.4 Native Queued Command Transfers....................................................................................................71
5.6.5 FIS-based Switching Command Transfers...........................................................................................74
6 ERROR REPORTING AND RECOVERY ............................................................................... 78
6.1 Error Types ................................................................................................................................... 78
6.1.1 System Memory Errors.........................................................................................................................78
6.1.2 Interface Errors.....................................................................................................................................78
6.1.3 Port Multiplier Errors.............................................................................................................................79
6.1.4 Taskfile Errors ......................................................................................................................................79
6.1.5 Command List Overflow .......................................................................................................................80
6.1.6 Command List Underflow .....................................................................................................................80
6.1.7 Native Command Queuing Tag Errors .................................................................................................80
6.1.8 PIO Data Transfer Errors .....................................................................................................................80
6.1.9 SYNC Escape by device ......................................................................................................................81
6.1.10 Device responds to FIS with R_ERR....................................................................................................81
6.1.11 CRC error in received FIS ....................................................................................................................81
6.1.12 D2H FIS received without active command slot ...................................................................................81
6.2 Error Recovery.............................................................................................................................. 82
6.2.1 HBA Aborting a Transfer ......................................................................................................................82
6.2.2 Software Error Recovery ......................................................................................................................82
7 HOT PLUG OPERATION ................................................................................................ 84
7.1 Platforms that Support Cold Presence Detect.............................................................................. 84
7.1.1 Device Hot Unplugged .........................................................................................................................84
7.1.2 Device Hot Plugged..............................................................................................................................84
7.2 Platforms that Support Mechanical Presence Switches............................................................... 84
7.3 Native Hot Plug Support ............................................................................................................... 84
7.3.1 Hot Plug Removal Detection and Power Management Interaction (Informative)..................................84
7.4 Interaction of the Command List and Port Change Status ........................................................... 85
8 POWER MANAGEMENT OPERATION ................................................................................ 86
8.1 Introduction ................................................................................................................................... 86
8.2 Power State Mappings..................................................................................................................86
8.3 Power State Transitions ............................................................................................................... 87
8.3.1 Interface Power Management ..............................................................................................................87
8.3.2 Device D1, D2, and D3 States .............................................................................................................88
8.3.3 HBA D3 state........................................................................................................................................88
8.4 PME .............................................................................................................................................. 89
9 PORT MULTIPLIER SUPPORT ......................................................................................... 90
9.1 Command Based Switching ......................................................................................................... 90
9.1.1 Non-Queued Operation........................................................................................................................90
剩余130页未读,继续阅读
资源评论
- qqxlt2018-09-26收藏资料,还未来得及看
- brianwen2013-09-04Good reference for SATA interface
IamGooday
- 粉丝: 12
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功