h6. [[SATADriver]] h6(. » [[SATADriver SWI Calls|SWI Calls]] h6((. » ATA_Op h2. ATA_Op h5. (SWI &59783) |_<^{width:4em}. Entry | | |<^. R0 |<^. "Flag bits":#flagbits | |<^. 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":#parameterblock 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":#flagbits | |<^. R5 |<^. Timeout in centiseconds if bit 29 of the "Flag bits":#flagbits is set | |<^. R6 |<^. Address of callback routine, if bit 26 of the "Flag bits":#flagbits is set | |<^. R7 |<^. Value to pass in R12 to the callback routine, if bit 26 of the "Flag bits":#flagbits is set | |_<^{width:4em}. Exit | | |<^. R0 |<^. Pointer to error block, or 0 if successful | |<^. R4 |<^. Bytes not transferred, or 0 if transfer complete | h4(#flagbits). Flag bits |/2<^{width:4em}. 0 |<^. 1 = don't wait for DRDY before issuing command | |/4<^{width:4em}. 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) | |/2<^{width:4em}. 12 - 15 |<^. device ID | |/2<^{width:4em}. 16 - 23 |<^. controller/port ID | |/4<^{width:4em}. 24 - 25 |<^. 00 = no transfer | |<^. 01 = read (bit 24 set) | |<^. 10 = write (bit 25 set) | |/4<^{width:4em}. 26 |<^. 1 = scatter list transfer | |<^{width:4em}. 27 |<^. 1 = don't poll for escape during foreground transfers | |<^{width:4em}. 28 | reserved | |<^{width:4em}. 29 | 1 = background transfer (not supported initially) | h4(#parameterblock). Parameter block Device control form: |<^{width:4em}. +0 | Features/Error | |<^. +0 | Device control | 28-bit LBA form: |<^{width:4em}. +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: |<^{width:4em}. +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: |<^{width:4em}. +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 | h4. Use The purpose of this call is to perform low-level ATA commands. h4. Notes If a scatter list is used, it is not updated. h4. See also * [[SATADriver]]