0% found this document useful (0 votes)
314 views

Sata Commands

Sata commands

Uploaded by

virtualkiranraj
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF or read online on Scribd
0% found this document useful (0 votes)
314 views

Sata Commands

Sata commands

Uploaded by

virtualkiranraj
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF or read online on Scribd
You are on page 1/ 3
Example Non-Data Command SATA supports over 30 different non-data commands. However, all non-data commands use the same FIS sequence as illustrated in Figure 3-16 on page 62. ‘As with all commands, host software must initialize the registers (by perform- ing, a series of IO write operations) as required for a given command and then issue the command by writing the specific command value into the command register. Recall that in SATA implementations only the shadow registers are accessed by system software. The normal command sequence is as follows: 1. The write to the command register causes the HBA to send the contents of the shadow registers to the drive via a Register FIS. 2. The drive updates its ATA registers with the Register FIS contents. 3. The drive parses the command and performs the requested operation. 4. The drive updates the ATA registers to report completion status and deliv- ers their content to the HBA via a Register FIS. 5. The HBA updates the shadow register contents and generates an interrupt to notify system software of command completion. 6. System software reads successful command completion status from the shadow registers. Non-Data Command Sequence SATAHBA ‘SATA device ‘Software delivers command to Shadow Registers & HBA Update sends Peni FS register FIS ATA Register Process Command, Shadow Registers Updated & Update task file interrupt sent to eystem to errs rosiané oud report command completion Register FIS Example DMA Read Command ‘This example describes a typical DMA read command sequence involving a single data transfer between the drive and HBA. However, several data trans- fers may be required. Figure 3-17 illustrates a normal DMA Read command sequence. Once the shadow registers have been initialized to specify the start sector address, sector count, etc. the sequence is as follows: 1 aoe oN N A.write to the command register causes the HBA to send the contents of the shadow registers to the drive via a Register FIS. The drive updates its ATA registers with the Register FIS contents. The drive parses the command and reads the requested data from disc. Data is delivered to the HBA via a DATA FIS. The HBA’s DMA engine delivers the data to system memory. The drive ‘updates the ATA registers to report completion status and delv- ers their content to the HBA via a Register FS. The HBA updates the shadow register contents and generates an interrupt to notify system software of command completion. System software reads successful command completion status from the shadow registers. Sample DMA Data Read Command Sequence SATAHBA SATA device Software delivers commend |__Host-to-device | Update to Shadow Registers & HBA Ragister FIS ATA Register ssencs Register FIS Data read from disk Data sent to Memory eae ene 2 ‘Shadow Registers Updated & igen Diverneeal interrupt sent to system to Davie =to-Host | completion status report command completion Example DMA Write Command This example describes a typical DMA Write command sequence involving a single data transfer between the HBA and drive. Several data transfers may be required but a single transfer completes the command in this example. Figure 3-18 illustrates a normal DMA Write command sequence. Once the shadow reg- isters have been initialized to specify the start sector address, sector count, etc. the sequence is as follows: 1. Awrite to the command register causes the HBA to send the contents of the shadow registers to the drive via a Register FIS. 2. The drive updates its ATA registers with the Register FIS contents. 3. The drive parses the command and seeks the dise’s target sector. 4. When the drive is ready to receive the data it delivers a DMA Activate FIS to the HBA. The DMA Activate FIS notifies the HBA’s DMA engine to fetch the data. Data is delivered to the drive via a DATA FIS and is written to disc. The drive updates the ATA registers to report completion status and deliv- ers their content to the HBA via a Register FIS. 8. The HBA updates the shadow register contents and generates an interrupt to notify system software of command completion. 9. System software reads successful command completion status from the shadow registers. now Sample DMA Write Command Sequence SATAHBA SATA device Software delivers command Hott gave to Shadow Registers & HBA | — ‘RegisterFis >| Update ATA Register sends Register FIS ‘ Device Notifies Host HBA fetches data from memory }¢ ——ACH¥2'®_ tna i's ready to receive data + pia ees Data Data accepted by Se ae FIS >| device & written to disk Shedow Registers Undated Register FIS Completion Siatus andintertupt sentto system [Device -to-Hort | feponed to host to report command complete

You might also like