Entry | |
---|---|
R0 | Flag bits |
R1 | Length of parameter block, must be 1 (for device control), 7 (for 28-bit LBA), 11 (for 48-bit LBA) or 12 (for wide features) |
R2 | Pointer to Parameter block for command and results |
R3 | Pointer to buffer or scatter list |
R4 | Length to transfer. Must be 0 if no data transfer is specified in the Flag bits |
R5 | Timeout in centiseconds if bit 29 of the Flag bits is set |
R6 | Address of callback routine, if bit 26 of the Flag bits is set |
R7 | Value to pass in R12 to the callback routine, if bit 26 of the Flag bits is set |
Exit | |
---|---|
R0 | Pointer to error block, or 0 if successful |
R4 | Bytes not transferred, or 0 if transfer complete |
0 | 1 = don’t wait for DRDY before issuing command |
2 | 1 = data transfer uses multiword DMA or UDMA from device’s perspective (note that the host controller may actually use bus mastering even for PIO transfers) |
12 – 15 | device ID |
16 – 23 | controller/port ID |
24 – 25 | 00 = no transfer |
01 = read (bit 24 set) | |
10 = write (bit 25 set) |
26 | 1 = scatter list transfer |
27 | 1 = don’t poll for escape during foreground transfers |
28 | reserved |
29 | 1 = background transfer (not supported initially) |
Device control form:
+0 | Features/Error |
+0 | Device control |
28-bit LBA form:
+0 | Features/Error |
+1 | Sector Count |
+2 | LBA bits 0-7/Sector No |
+3 | LBA bits 8-15/Cylinder Low |
+4 | LBA bits 16-23/Cylinder High |
+5 | Device: |
bits 0-3 – LBA bits 24-27/Head | |
bit 4 – 0=master, 1=slave | |
bit 6 – 0=CHS mode, 1=LBA mode | |
+6 | Command/Status |
48-bit LBA form:
+0 | Features/Error |
+1 | 16-bit Sector Count |
+3 | 48-bit LBA |
+9 | Device: |
bit 4 – 0=master, 1=slave | |
bit 6 – 0=CHS mode, 1=LBA mode | |
+10 | Command/Status |
Wide features form:
+0 | Features bits 0-7/Error |
+1 | Features bits 8-15 |
+2 | 16-bit Sector Count |
+4 | 48-bit LBA |
+10 | Device: |
bit 6 – 0=CHS mode, 1=LBA mode | |
+11 | Command/Status |
The purpose of this call is to perform low-level ATA commands.
If a scatter list is used, it is not updated.