1、 Edition 1.0 2016-03 ISO/IEC 17760-102 INTERNATIONAL STANDARD Information technology AT Attachment Part 102: ATA/ATAPI Command Set - 2 (ACS-2) ISO/IEC 17760-102:2016-03(en) colour inside THIS PUBLICATION IS COPYRIGHT PROTECTED Copyright 2016 ISO/IEC, Geneva, Switzerland All rights reserved. Unless o
2、therwise specified, no part of this publication may be reproduced or utilized in any form or by any means, electronic or mechanical, including photocopying and microfilm, without permission in writing from either IEC or IECs member National Committee in the country of the requester. If you have any
3、questions about ISO/IEC copyright or have an enquiry about obtaining additional rights to this publication, please contact the address below or your local IEC member National Committee for further information. IEC Central Office Tel.: +41 22 919 02 11 3, rue de Varemb Fax: +41 22 919 03 00 CH-1211 G
4、eneva 20 infoiec.ch Switzerland www.iec.ch About the IEC The International Electrotechnical Commission (IEC) is the leading global organization that prepares and publishes International Standards for all electrical, electronic and related technologies. About IEC publications The technical content of
5、 IEC publications is kept under constant review by the IEC. Please make sure that you have the latest edition, a corrigenda or an amendment might have been published. IEC Catalogue - webstore.iec.ch/catalogue The stand-alone application for consulting the entire bibliographical information on IEC In
6、ternational Standards, Technical Specifications, Technical Reports and other documents. Available for PC, Mac OS, Android Tablets and iPad. IEC publications search - www.iec.ch/searchpub The advanced search enables to find IEC publications by a variety of criteria (reference number, text, technical
7、committee,). It also gives information on projects, replaced and withdrawn publications. IEC Just Published - webstore.iec.ch/justpublished Stay up to date on all new IEC publications. Just Published details all new publications released. Available online and also once a month by email. Electropedia
8、 - www.electropedia.org The worlds leading online dictionary of electronic and electrical terms containing 20 000 terms and definitions in English and French, with equivalent terms in 15 additional languages. Also known as the International Electrotechnical Vocabulary (IEV) online. IEC Glossary - st
9、d.iec.ch/glossary 65 000 electrotechnical terminology entries in English and French extracted from the Terms and Definitions clause of IEC publications issued since 2002. Some entries have been collected from earlier publications of IEC TC 37, 77, 86 and CISPR. IEC Customer Service Centre - webstore
10、.iec.ch/csc If you wish to give us your feedback on this publication or need further assistance, please contact the Customer Service Centre: csciec.ch. ISO/IEC 17760-102 Edition 1.0 2016-03 INTERNATIONAL STANDARD Information technology AT Attachment Part 102: ATA/ATAPI Command Set - 2 (ACS-2) INTERN
11、ATIONAL ELECTROTECHNICAL COMMISSION ICS 35.200 ISBN 978-2-8322-3214-9 Warning! Make sure that you obtained this publication from an authorized distributor. colour inside 2 ISO/IEC 17760-102:2016 ISO/IEC 2016 Contents FOREWORD 15 INTRODUCTION . 17 1 Scope . 19 2 Normative references . 19 3 Terms, def
12、initions, abbreviations, and conventions . 20 3.1 Terms and definitions . 20 3.2 Symbols and abbreviations 28 3.2.1 Abbreviations 28 3.2.2 Units 30 3.2.3 Symbols 30 3.2.4 Mathematical operators 30 3.3 Conventions 30 3.3.1 Overview . 30 3.3.2 Precedence .31 3.3.3 Lists . 31 3.3.4 Keywords 32 3.3.5 Nu
13、mbering 33 3.3.6 Bit conventions 33 3.3.7 Number range convention . 34 3.3.8 State diagram conventions . 34 3.3.9 Byte, word, DWord, and QWord Relationships .35 3.3.10 ATA string convention . 36 3.3.11 Offset Convention . 37 4 Feature set definitions 38 4.1 Overview . 38 4.2 General feature set . 38
14、 4.3 The PACKET feature set 39 4.3.1 Overview . 39 4.3.2 Identification of PACKET feature set devices .39 4.3.3 Signature for ATAPI devices . 39 4.3.4 The PACKET command 40 4.4 48-bit Address feature set 40 4.5 Advanced Power Management (APM) feature set . 40 4.6 CompactFlash Association (CFA) featu
15、re set 41 4.7 Device Configuration Overlay (DCO) feature set . 41 4.8 Extended Power Conditions (EPC) feature set 44 4.8.1 Overview . 44 4.8.2 Power conditions . 44 4.8.3 Power condition timers 45 4.8.4 Interaction with resets, commands and other features if the EPC feature set is enabled 45 4.9 Fre
16、e-fall Control feature set 46 4.10 General Purpose Logging (GPL) feature set 47 4.11 Host Protected Area (HPA) feature set 47 4.11.1 HPA overview . 47 4.11.2 HPA security extensions . 47 4.11.3 28-bit and 48-bit HPA commands interactions 48 4.11.4 IDENTIFY DEVICE data . 49 4.11.5 Determination of SE
17、T MAX security extension status 50 4.11.6 HPA State Transition Diagrams 50 4.12 Long Logical Sector (LLS) feature set 66 4.13 Long Physical Sector (LPS) feature set 67ISO/IEC 17760-102:2016 ISO/IEC 2016 3 4.14 Native Command Queuing (NCQ) feature set 69 4.14.1 Overview . 69 4.14.2 Priority . 69 4.14
18、.3 Unload . 69 4.14.4 Command Phases 70 4.15 NV Cache feature set . 70 4.16 NV Cache Power Management feature set 72 4.17 Power Management feature set . 72 4.17.1 Overview . 72 4.17.2 Power management commands . 73 4.17.3 Standby timer 73 4.17.4 Power modes 74 4.18 Power-Up In Standby (PUIS) feature
19、 set 77 4.19 Sanitize Device feature set .77 4.20 Security feature set . 81 4.20.1 Overview . 81 4.20.2 Passwords 81 4.20.3 Master Password Capability .81 4.20.4 Frozen Mode . 82 4.20.5 Commands 82 4.20.6 IDENTIFY DEVICE data . 82 4.20.7 Security initial setting 82 4.20.8 Password Rules 82 4.20.9 Pa
20、ssword attempt counter 82 4.20.10 Security states 84 4.20.11 Master Password Identifier feature . 93 4.21 Self-Monitoring, Analysis, and Reporting Technology (SMART) feature set 94 4.21.1 Overview . 94 4.21.2 Device SMART data structure 94 4.21.3 Background data collection . 94 4.21.4 Off-line/Capti
21、ve mode data collection . 94 4.21.5 Threshold exceeded condition 94 4.21.6 SMART feature set commands .94 4.21.7 SMART operation with power management modes . 94 4.21.8 SMART device error log reporting 95 4.22 Sense Data Reporting feature set 95 4.23 Software Settings Preservation (SSP) feature set
22、95 4.24 Streaming feature set . 96 4.24.1 Streaming feature set overview 96 4.24.2 Streaming commands . 96 4.25 Trusted Computing feature set . 97 4.26 Write-Read-Verify feature set . 98 5 ATA protocols 100 6 Normal and Error Output field descriptions 101 6.1 Overview . 101 6.2 Status field 101 6.2.
23、1 Overview .101 6.2.2 Alignment Error . 101 6.2.3 Busy bit . 102 6.2.4 Check Condition bit . 102 6.2.5 Data Request bit . 102 6.2.6 Deferred Write Error bit . 102 6.2.7 Device Fault bit . 102 6.2.8 Device Ready bit . 102 6.2.9 Error bit . 102 6.2.10 Sense Data Available 102 6.2.11 Stream Error bit .
24、 102 4 ISO/IEC 17760-102:2016 ISO/IEC 2016 6.2.12 Transport Dependent (TD) 103 6.3 Error field 103 6.3.1 Overview .103 6.3.2 Abort bit . 103 6.3.3 Attempted Partial Range Removal bit . 103 6.3.4 Command Completion Time Out bit 103 6.3.5 End of Media bit 103 6.3.6 ID Not Found bit 103 6.3.7 Illegal L
25、ength Indicator bit . 104 6.3.8 Insufficient LBA Range Entries Remaining bit 104 6.3.9 Insufficient NV Cache Space bit . 104 6.3.10 Interface CRC bit 104 6.3.11 Media Error bit 104 6.3.12 Sense Key field . 104 6.3.13 Uncorrectable Error bit 104 6.4 Interrupt Reason field . 104 6.4.1 Overview .104 6.
26、4.2 Command/Data bit 104 6.4.3 Input/Output (I/O) bit . 104 6.5 Count field 105 6.5.1 Overview .105 6.5.2 NCQ Tag field . 105 6.6 SActive field 105 6.7 SATA Status . 105 7 Command descriptions 106 7.1 Command description introduction .106 7.2 CFA ERASE SECTORS - C0h, Non-Data 110 7.3 CFA REQUEST EXT
27、ENDED ERROR CODE - 03h, Non-Data .111 7.4 CFA TRANSLATE SECTOR - 87h, PIO Data-In 113 7.5 CFA WRITE MULTIPLE WITHOUT ERASE - CDh, PIO Data-Out 114 7.6 CFA WRITE SECTORS WITHOUT ERASE - 38h, PIO Data-Out . 115 7.7 CHECK POWER MODE - E5h, Non-Data 116 7.8 CONFIGURE STREAM - 51h, Non-Data . 117 7.9 DAT
28、A SET MANAGEMENT - 06h, DMA 119 7.10 Device Configuration Overlay (DCO) . 121 7.10.1 DCO Overview 121 7.10.2 DEVICE CONFIGURATION FREEZE LOCK - B1h/C1h, Non-Data 122 7.10.3 DEVICE CONFIGURATION IDENTIFY - B1h/C2h, PIO Data-In. 123 7.10.4 DEVICE CONFIGURATION IDENTIFY DMA - B1h/C4h, DMA. 128 7.10.5 D
29、EVICE CONFIGURATION RESTORE - B1h/C0h, Non-Data . 129 7.10.6 DEVICE CONFIGURATION SET - B1h/C3h, PIO Data-Out . 130 7.10.7 DEVICE CONFIGURATION SET DMA - B1h/C5h, DMA 141 7.11 DEVICE RESET - 08h, Device Reset . 142 7.12 DOWNLOAD MICROCODE - 92h, PIO Data-Out/Non-Data 143 7.13 DOWNLOAD MICROCODE DMA
30、- 93h, DMA . 146 7.14 EXECUTE DEVICE DIAGNOSTIC - 90h, Execute Device Diagnostic . 147 7.15 FLUSH CACHE - E7h, Non-Data .149 7.16 FLUSH CACHE EXT - EAh, Non-Data . 150 7.17 IDENTIFY DEVICE - ECh, PIO Data-In 151 7.18 IDENTIFY PACKET DEVICE - A1h, PIO Data-In . 193 7.19 IDLE - E3h, Non-Data . 211 7.2
31、0 IDLE IMMEDIATE - E1h, Non-Data 212 7.21 Non-Volatile Cache . 214 7.21.1 NV Cache Overview 214 7.21.2 NV Cache Power Management Overview 214 7.21.3 ADD LBA(S) TO NV CACHE PINNED SET - B6h/10h, DMA 216 7.21.4 FLUSH NV CACHE - B6h/14h, Non-Data 218 7.21.5 NV CACHE DISABLE - B6h/16h, Non-Data 219ISO/I
32、EC 17760-102:2016 ISO/IEC 2016 5 7.21.6 NV CACHE ENABLE - B6h/15h, Non-Data . 220 7.21.7 QUERY NV CACHE MISSES - B6h/13h, DMA . 221 7.21.8 QUERY NV CACHE PINNED SET - B6h/12h, DMA . 223 7.21.9 REMOVE LBA(S) FROM NV CACHE PINNED SET - B6h/11h, DMA/Non-Data 224 7.21.10 RETURN FROM NV CACHE POWER MODE
33、- B6h/01h, Non-Data. 226 7.21.11 SET NV CACHE POWER MODE - B6h/00h, Non-Data 227 7.22 NOP - 00h, Non-Data . 228 7.23 PACKET - A0h, Packet . 229 7.24 READ BUFFER - E4h, PIO Data-In 232 7.25 READ BUFFER DMA - E9h, DMA 233 7.26 READ DMA - C8h, DMA . 234 7.27 READ DMA EXT - 25h, DMA . 235 7.28 READ FPDM
34、A QUEUED - 60h, DMA Queued . 236 7.29 READ LOG EXT - 2Fh, PIO Data-In . 238 7.30 READ LOG DMA EXT - 47h, DMA . 240 7.31 READ MULTIPLE - C4h, PIO Data-In 241 7.32 READ MULTIPLE EXT - 29h, PIO Data-In . 243 7.33 READ NATIVE MAX ADDRESS - F8h, Non-Data 244 7.34 READ NATIVE MAX ADDRESS EXT - 27h, Non-Da
35、ta 245 7.35 READ SECTOR(S) - 20h, PIO Data-In . 246 7.36 READ SECTOR(S) EXT - 24h, PIO Data-In . 247 7.37 READ STREAM DMA EXT - 2Ah, DMA . 248 7.38 READ STREAM EXT - 2Bh, PIO Data-In . 251 7.39 READ VERIFY SECTOR(S) - 40h, Non-Data 252 7.40 READ VERIFY SECTOR(S) EXT - 42h, Non-Data 253 7.41 REQUEST
36、SENSE DATA EXT - 0Bh, Non-Data .254 7.42 Sanitize Device . 255 7.42.1 Sanitize Device Overview .255 7.42.2 BLOCK ERASE EXT B4h/0012h, Non-Data. 256 7.42.3 CRYPTO SCRAMBLE EXT B4h/0011h, Non-Data 258 7.42.4 OVERWRITE EXT B4h/0014h, Non-Data 260 7.42.5 SANITIZE FREEZE LOCK EXT B4h/0020h, Non-Data 262
37、7.42.6 SANITIZE STATUS EXT B4h/0000h, Non-Data. 263 7.43 SECURITY DISABLE PASSWORD - F6h, PIO Data-Out 265 7.44 SECURITY ERASE PREPARE - F3h, Non-Data .267 7.45 SECURITY ERASE UNIT - F4h, PIO Data-Out 268 7.46 SECURITY FREEZE LOCK - F5h, Non-Data . 270 7.47 SECURITY SET PASSWORD - F1h, PIO Data-Out
38、271 7.48 SECURITY UNLOCK - F2h, PIO Data-Out 273 7.49 SET FEATURES - EFh, Non-Data . 275 7.49.1 Feature Set . 275 7.49.2 Description 275 7.49.3 Enable/disable 8-bit PIO data transfer 277 7.49.4 Enable/disable volatile write cache . 277 7.49.5 Set transfer mode . 278 7.49.6 Enable/disable the APM fea
39、ture set 279 7.49.7 Enable/disable the PUIS feature set . 279 7.49.8 PUIS feature set device spin-up . 279 7.49.9 Enable/disable CFA power mode 1 279 7.49.10 Enable/Disable Write-Read-Verify feature set 280 7.49.11 Set Maximum Host Interface Sector Times 281 7.49.12 Enable/disable read look-ahead .2
40、81 7.49.13 Enable/disable reverting to defaults 281 7.49.14 Enable/Disable the Free-fall Control feature set . 281 7.49.15 Enable/Disable SATA feature .282 7.49.16 Enable/Disable the Sense Data Reporting feature set . 283 7.49.17 Long Physical Sector Alignment Error Reporting Control .283 7.49.18 Ex
41、tended power conditions . 283 7.50 SET MAX 293 6 ISO/IEC 17760-102:2016 ISO/IEC 2016 7.50.2 SET MAX ADDRESS - F9h, Non-Data 294 7.50.3 SET MAX FREEZE LOCK - F9h/04h, Non-Data . 297 7.50.4 SET MAX LOCK - F9h/02h, Non-Data. 298 7.50.5 SET MAX SET PASSWORD - F9h/01h, PIO Data-Out . 299 7.50.6 SET MAX S
42、ET PASSWORD DMA - F9h/05h, DMA 300 7.50.7 SET MAX UNLOCK - F9h/03h, PIO Data-Out . 301 7.50.8 SET MAX UNLOCK DMA - F9h/06h, DMA 303 7.51 SET MAX ADDRESS EXT - 37h, Non-Data . 304 7.52 SET MULTIPLE MODE - C6h, Non-Data . 306 7.53 SLEEP - E6h, Non-Data . 308 7.54 SMART . 309 7.54.1 Overview . 309 7.54
43、.2 SMART DISABLE OPERATIONS - B0h/D9h, Non-Data . 310 7.54.3 SMART ENABLE/DISABLE ATTRIBUTE AUTOSAVE - B0h/D2h, Non-Data. 311 7.54.4 SMART ENABLE OPERATIONS - B0h/D8h, Non-Data 313 7.54.5 SMART EXECUTE OFF-LINE IMMEDIATE - B0h/D4h, Non-Data . 314 7.54.6 SMART READ DATA - B0h/D0h, PIO Data-In. 318 7.
44、54.7 SMART READ LOG - B0h/D5h, PIO Data-In. 323 7.54.8 SMART RETURN STATUS - B0h/DAh, Non-Data 324 7.54.9 SMART WRITE LOG - B0h/D6h, PIO Data-Out 325 7.55 STANDBY - E2h, Non-Data 326 7.56 STANDBY IMMEDIATE - E0h, Non-Data . 327 7.57 TRUSTED NON-DATA - 5Bh, Non-Data 328 7.58 TRUSTED RECEIVE - 5Ch, PI
45、O Data-In . 329 7.59 TRUSTED RECEIVE DMA - 5Dh, DMA . 333 7.60 TRUSTED SEND - 5Eh, PIO Data-Out 334 7.61 TRUSTED SEND DMA - 5Fh, DMA . 336 7.62 WRITE BUFFER - E8h, PIO Data-Out . 337 7.63 WRITE BUFFER DMA - EBh, DMA 338 7.64 WRITE DMA - CAh, DMA . 339 7.65 WRITE DMA EXT - 35h, DMA 340 7.66 WRITE DMA
46、 FUA EXT - 3Dh, DMA . 341 7.67 WRITE FPDMA QUEUED - 61h, DMA Queued . 342 7.68 WRITE LOG EXT - 3Fh, PIO Data-Out 344 7.69 WRITE LOG DMA EXT - 57h, DMA . 346 7.70 WRITE MULTIPLE - C5h, PIO Data-Out 347 7.71 WRITE MULTIPLE EXT - 39h, PIO Data-Out 348 7.72 WRITE MULTIPLE FUA EXT - CEh, PIO Data-Out .35
47、0 7.73 WRITE SECTOR(S) - 30h, PIO Data-Out 352 7.74 WRITE SECTOR(S) EXT - 34h, PIO Data-Out 353 7.75 WRITE STREAM DMA EXT - 3Ah, DMA . 354 7.76 WRITE STREAM EXT - 3Bh, PIO Data-Out . 357 7.77 WRITE UNCORRECTABLE EXT - 45h, Non-Data 358 8 SCT Command Transport 360 8.1 General . 360 8.1.1 Overview .36
48、0 8.1.2 SCT command nesting and interspersing with standard commands 360 8.1.3 Resets . 360 8.2 Processing SCT commands . 361 8.2.1 Processing SCT commands overview 361 8.2.2 SCT capability identification 361 8.2.3 SCT command transfer . 361 8.2.4 SCT data transfer 366 8.2.5 SCT status 367 8.3 SCT C
49、ommand Set 371 8.3.1 Overview .371 8.3.2 SCT Write Same command . 372 8.3.3 SCT Error Recovery Control command . 375ISO/IEC 17760-102:2016 ISO/IEC 2016 7 8.3.4 SCT Feature Control command . 377 8.3.5 SCT Data Table command 380 9 Normal and Error Outputs 384 9.1 Overview . 384 9.2 Normal Outputs 384 9.3 Error Outputs 405 8 ISO/IEC 17760-102:2016 ISO/IEC 2016 Tables Table 1 - Numbering conventions 33 Table 2 - ATA string byte swapping . 37 Table 3 - ATA firmware revision example 37 Table 4 - Feature Set Summary. 38 Table 5 - Block S