9.12 48-bit Address Feature Set
10 Command Protocol
The commands are grouped into different classes according to the protocols followed for command execution. The command classes with their associated protocols are defined below.
Please refer to Serial ATA Revision 3.0 about each protocol.
For all commands, the host must first check if BSY=1, and should proceed no further unless and until BSY=0. For all commands, the host must also wait for RDY=1 before proceeding.
A device must maintain either BSY=1 or DRQ=1 at all times until the command is completed. The INTRQ signal is used by the device to signal most, but not all, times when the BSY bit is changed from 1 to 0 during command execution.
A command shall only be interrupted with a COMRESET or software reset. The result of writing to the Command register while BSY=1 or DRQ=1 is unpredictable and may result in data corruption. A command should only be interrupted by a reset at times when the host thinks there may be a problem, such as a device that is no longer responding.
Interrupts are cleared when the host reads the Status Register, issues a reset, or writes to the Command Register.
10.1 PIO Data In commands
These commands are:
Device Configuration Identify
Identify Device
Read Buffer
Read Log Ext
Read Multiple
Read Multiple Ext
Read Sector(s)
Read Sector(s) Ext
Read Stream Ext
SMART Read Attribute Values
SMART Read Attribute Thresholds
SMART Read Log Sector
HGST hard disk drive specifications
9510.2 PIO Data Out commands
These commands are:
Device Configuration Set
Download Microcode
Format Track
Security Disable Password
Security Erase Unit
Security Set Password
Security Unlock
Set Max Set Password command
Set Max Unlock command
SMART Write Log Sector
Write Buffer
Write Log Ext
Write Multiple
Write Multiple Ext
Write Multiple FUA Ext
Write Sector(s)
Write Sector(s) Ext
Write Stream Ext
Execution includes the transfer of one or more 512 byte sectors of data from the host to the device. In case of 4K bytes/sector format (512 bytes/sector emulation) drives, the start LBA and the sector length of write commands (Write Multiple, Write Multiple Ext, Write Multiple FUA Ext, Write Sector(s), Write Sector(s) Ext, Write Stream Ext) should be aligned to multiple of 8 as much as possible to avoid the potential performance loss due to the internal read operation.
10.3 Non-Data commands
These commands are:
Check Power Mode
Configure Stream
Device Configuration Freeze Lock
Device Configuration Restore
Execute Device Diagnostic
Flush Cache
Flush Cache Ext
Idle
Idle Immediate
Initialize Device Parameters
NOP
Read Native Max Address
Read Native Max Address Ext
Read Verify Sector(s)
Read Verify Sector(s) Ext
Recalibrate
Security Erase Prepare
Security Freeze Lock
Seek
Set Features
Set Max Address
Set Max Address Ext
Set Max Lock command
Set Max Freeze Lock command
Set Multiple Mode
SMART Disable Operations
SMART Enable/Disable Attribute Autosave
SMART Enable Operations
SMART Execute Off-line Data Collection
SMART Return Status
SMART Save Attribute Values
SMART Enable/Disable Automatic Off-Line
Standby
Standby Immediate
Write Uncorrectable Ext
Execution of these commands involves no data transfer.
10.4 DMA Data In commands and DMA Data Out commands
These commands are:
Read DMA
Read DMA Ext
Read Stream DMA Ext
Write DMA
Write DMA Ext
Write DMA FUA Ext
Write Stream DMA Ext
Execution of this class of command includes the transfer of one or more blocks of data between the device and the host using DMA transfer. In case of 4K bytes/sector format (512 bytes/sector emulation) drives, the start LBA and the sector length of write commands (Write DMA, Write DMA Ext, Write DMA FUA Ext, and Write Stream DMA Ext) should be aligned to multiple of 8 as much as possible to avoid the potential performance loss due to the internal read operation.
10.5 First-party DMA commands
These commands are:
Read FPDMA Queued
Write FPDMA Queued
Execution of this class of commands includes command queuing and the transfer of one or more blocks of data between the device and the host. The protocol is described in the section 13.6 “Native Command Queuing” of “Serial ATA Revision 3.0”.
Host knowledge of I/O priority may be transmitted to the device as part of the command. There are two priority classes for NCQ command as high priority, the host is requesting a better quality of service for that command than the commands issued with normal priority.
The classes are forms of soft priority. The device may choose to complete a normal priority command before an outstanding high priority command, although preference shall be given to the high priority commands. The priority class is indicated in bit 7 (Priority Information) in the Sector Count register for NCQ commands (READ FPDMA QUEUED and WRITE FPDMA QUEUED). This bit can indicate either the normal priority or high priority class. If a command is marked by the host as high priority, the device shall attempt to provide better quality of service for the command. It is not required that devices process all high priority requests before satisfying normal priority requests. In case of 4K bytes/sector format (512 bytes/sector emulation) drives, the start LBA and the sector length of Write FPDMA Queued command should be aligned to multiple of 8 as much as possible to avoid the potential performance loss due to the internal read operation.