wire / wire-format / ata-command

ATA (IDE) command block

ATA (Advanced Technology Attachment) command block: 8 registers (Data, Error/Features, Sector Count, LBA Low/Mid/High, Device/Head, Command/Status). Commands: 0x20 READ SECTORS, 0x24 READ SECTORS EXT (48-bit), 0x30 WRITE SECTORS, 0x34 WRITE SECTORS EXT, 0xEC IDENTIFY DEVICE, 0xEF SET FEATURES, 0xE0 STANDBY IMMEDIATE, 0xE1 IDLE IMMEDIATE, 0xE3 IDLE, 0xE5 CHECK POWER MODE, 0xF8 READ NATIVE MAX ADDRESS EXT, 0x27 READ NATIVE MAX ADDRESS.

wire-format kind wire-format status standard verification verified tier B wire-format@1

aka: ATA (IDE) command block

wire format

spec: ATA/ATAPI specification

ATA (Advanced Technology Attachment) command block: 8 registers (Data, Error/Features, Sector Count, LBA Low/Mid/High, Device/Head, Command/Status). Commands: 0x20 READ SECTORS, 0x24 READ SECTORS EXT (48-bit), 0x30 WRITE SECTORS, 0x34 WRITE SECTORS EXT, 0xEC IDENTIFY DEVICE, 0xEF SET FEATURES, 0xE0 STANDBY IMMEDIATE, 0xE1 IDLE IMMEDIATE, 0xE3 IDLE, 0xE5 CHECK POWER MODE, 0xF8 READ NATIVE MAX ADDRESS EXT, 0x27 READ NATIVE MAX ADDRESS.

fieldsizemeaning
Data register2 bytes (16-bit)Data transfer (read/write 16-bit words).
Error/Features1 byteError (read) / Features (write): 0x02 (enable write cache), 0x03 (set transfer mode), 0x82 (disable write cache), 0x85 (disable APM), 0x86 (disable AAM).
Sector Count1 byte (8-bit) or 2 bytes (48-bit)Number of sectors to transfer (0 = 256 for 8-bit, 0 = 65536 for 48-bit).
LBA Low/Mid/High3 bytes (28-bit) or 6 bytes (48-bit)Logical Block Address. 28-bit LBA = 2^28 sectors = 128GB. 48-bit LBA = 2^48 sectors = 128PB.
Device/Head1 byteBit 4 = device (0=master, 1=slave). Bit 6 = LBA mode. Bits 0-3 = head (CHS mode).
Command/Status1 byteCommand (write): 0x20 READ, 0x24 READ EXT, 0x30 WRITE, 0x34 WRITE EXT, 0xEC IDENTIFY, 0xEF SET FEATURES. Status (read): BSY (busy), DRDY (ready), DRQ (data request), ERR (error), etc.
IDENTIFY DEVICEcommand 0xECReturns 256 words (512 bytes) of device info: model, serial, capacity, supported features, etc.

example:

ec 00 00 00 00 00 00 00

ATA: IDENTIFY DEVICE command (0xEC)


provenance

agent: curl -H 'accept: application/json' wire.phall.io/wire-format/ata-command or /wire-format/ata-command.json