SCT LBA Segment Access Command Extension Proposal October 06 2005 Revision 1 Proposers: Randeep Sidhu Dan Colegrove David McDougall Bill Martin Sierra Logic Inc. Hitachi Global Storage 9083 Foothills Blvd 2903 Carmelo Dr Suite 300 Roseville, CA 95747 Henderson, NV 89052 Phone: (916) 772-1234 (702) 614-6119 12/8/2005 Page 1
1. Introduction...3 2. Overview...3 12/8/2005 Page 2
Revision History Revision 0: Initial Revision Revision 1: Added Dan Colegrove to list of proposers Changed from blocking to foreground Added new extended status code for Foreground SCT operation was terminated because of unrecoverable error. 1. Introduction This proposal discusses the extension of the existing SCT implementation for the LBA Segment Access command defined in DT1701r5-SCT. The current functionality does not allow for a blocking interface which has implications when the performance characteristics of the command are considered. Introducing the capability to block on this command would allow time sensitive hosts a performance path not present in the non blocking instantiation of the command. 2. Overview The new proposal would add two new function codes to the existing LBA Segment Access command. 0101h Repeat Write Pattern Foreground. 0102h Repeat Write Sector Foreground Deleted: Blocking Deleted: Blocking For these new function codes the following modifications need to be made to DT1701r5-SCT. 12/8/2005 Page 3
4.2 Command Transport Change table 6 as follows: Table 1 Extended Status Codes Deleted: 6 Status Code 0000h 0001h 0002h 0003h 0004h 0005h 0006h 0007h 0008h 0009h 000Ah 000Bh 000Ch 000Dh 000Eh 000Fh 0010h 0011h 0012h 0013h????h 0014h-BFFFh C000h-FFEFh FFF0h-FFFEh FFFFh Command complete without error Invalid Function Code Input LBA out of range Definition Request sector count overflow. The number of sectors requested to transfer (Sector Count register) in the read or write log command is larger than required by SCT command Invalid Function code in Error Recovery command Invalid Selection code in Error Recovery command Host read command timer is less than minimum value Host write command timer is less than minimum value Background SCT command was aborted because of an interrupting host command Background SCT command was terminated because of unrecoverable error Invalid Function code in Long Sector Access command SCT data transfer command was issued without first issuing an SCT command Invalid Function code in Feature Control command Invalid Feature code in Feature Control command Invalid New State value in Feature Control command Invalid Option Flags value in Feature Control command Invalid SCT Action code Invalid Table ID (table not supported) Command was aborted due to drive security being locked Invalid revision code Foreground SCT operation was terminated because of unrecoverable error Vendor specific SCT command executing in background 12/8/2005 Page 4
4.4 SCT Request Once an SCT command has been issued, a status is reported in the ATA registers. This status indicates that the command was accepted or that an error occurred. This ATA status return does not indicate successful completion of the SCT actions, except Foreground LBA Segment Access commands that require the completion of the SCT action (e.g., LBA Segment Access with function code 0101h and 0102h). Some commands can take several minutes or even hours to execute. In this case, the host can determine execution progress by requesting SCT status. Some commands may need setup time before they are ready to receive data. SCT status is also used to determine when the device is read to receive data. Deleted: Status 4.5 How to use SCT Commands Add the following two figures Host Device Write Log Address E0h Key Sector LBA Segment Access Command Completion Figure X 0101h Repeat Write Pattern Foreground (No background activity) 12/8/2005 Page 5
Host Device Write Log Address E0h Key Sector Command Completion Write Log Address E1h Data LBA Segment Access Command Completion Figure Y 0102h Repeat Write Sector Foreground (No background activity) 5.2 LBA Segment Access command Inputs: Word Name Value Description 0 Action Code 0002h 0001h This action writes a pattern or sector of data repeatedly to the media. This capability could also be referred to as Write All or Write Same. Repeat Write Pattern 1 Function Code 0002h Repeat Write Sector 0101h Repeat Write Pattern Foreground 0102h Repeat Write Sector Foreground 5:2 Start QWord First LBA 9:6 Count QWord Number of sectors to fill 11:10 Pattern Outputs: DWord If the Function Code is 0001h, this field contains a 32-bit pattern that is written on the media starting at the location specified in words two through five. Deleted: 0101h Deleted: Repeat Write Pattern Blocking Deleted: 0102h Deleted: Repeat Write Sector Blocking 12/8/2005 Page 6
Field Name Error Sector Count LBA Low LBA Mid LBA High Device Status Value See ATA/ATAPI-7 Low 8 bits of number of sectors requested (Normally this will be one) High 8 bits of number of sectors requested (Normally this will be zero) See ATA/ATAPI-7 The LBA Segment Access command will begin writing sectors from Start in incrementing order until Count sectors have been written. A Count of zero means apply operation from Start until the last user LBA on the drive is reached. The HPA feature determines the last user LBA. This command will not write over a hidden partition when hidden partitions are enabled using the Host Protected Area drive capabilities. Automatic sector reassignment is permitted during the operation of this function. If Start or Start+Count go beyond the last user LBA then an error is reported and the SCT command is not executed. Issuing this command with a value of zero for Start LBA and Sector Count will cause all LBAs of the drive to be written with the specified pattern. Any command, including IDENTIFY DEVICE, other than SCT status, issued to the drive while this command is in progress will terminate the Long Segment Access command. The incoming command is executed. Use the SCT Status command to retrieve status information about the current background SCT command. Example status information includes: command active or complete, current LBA, and errors. While this command is in progress, the SCT status error code will be FFFFh, and set to 0000h if the command completes without error. It will be less than FFFFh and greater than 0000h if the command terminated prematurely for any reason. Once the key sector has been issued, if the Function Code was 0002h and the TF Data indicates that the drive is ready to receive data, log page E1h should be written to transfer the data. For the Foreground SCT LBA Segment Access command with function code 0101h the Command Completion Status of the Write Log Address E0h shall indicate the success or failure of the LBA Segment Access command. For the Foreground SCT LBA Segment Access command with function Code 0102h the Command Completion Status of the Write Log Address E1h shall indicate the success or failure of the LBA Segment Access command. The Status and Error registers of the Output indicate the relevant status/error values as defined in ATA/ATAPI-7 specification. In the case of an error an SCT Status Request can be made using a Smart Read Log page E0h to obtain a more detailed analysis of the error. This command can change the Segment Initialized Flag. If the command writes all the user addressable sectors and completes without encountering an error or being aborted, 12/8/2005 Page 7
then the Segment Initialized Flag (bit 0 of the Status Flags in the SCT status. See Error! Reference source not found.) shall be set to 1. A write to any user addressable sector on the drive (except another complete write all), shall cause the Segment Initialized Flag to be cleared. Reallocations as a result of reading data (foreground or background) do not clear the drive zeroed flag. Deleted: Table 11 Deleted: Once the key sector has been issued, if the Function Code was 0002h and the TF Data indicates that the drive is ready to receive data, log page E1h should be written to transfer the data. 12/8/2005 Page 8