atadef.bi

Definitions for ATA controllers

Author

Marcel Sondaar

License

Public Domain

Summary
atadef.biDefinitions for ATA controllers
Constants
ATA_ISABASE_1The base register offset for the primary IDE bus on legacy systems
ATA_ISABASE_2The base register offset for the secondary IDE bus on legacy systems
ATA_ALTERNATESTATUS_BASEThe offset of the alternate status register relative to the IO Base on legacy systems For instance ATA_ISABASE_1 + ATA_ALTERNATESTATUS_BASE = &H3F6
ATAREGSLists the registers available in the first IO range
Constants
ATA_RW_DATAThe offset to the data port Data is sent to/from the drive through this port when in PIO mode, and DRQ is set in ATA_R_STATUS The port is 16 bits wide and should normally be accessed with REP INSW/OUTS
ATA_RW_DEVSELContains drive selection as well as some operation features
ATA_W_COMMANDThe offset to the command port.
ATA_R_STATUSContains the status of the drive currently selected in ATA_RW_DEVSEL it holds a bitfield of status flags from ATASTATUS
ATASTATUSHolds the bitfields present in the <ATA_R_STATUS> register
Constants
ATA_STATUS_ERRThe device has aborted the previous command
ATA_STATUS_DRQThe device is waiting for the host to perform data transfer
ATA_STATUS_DFThe device does not operate as expected.
ATA_STATUS_DRDYThe device is ready to accept commands
ATA_STATUS_BUSYThe device is busy executing a command.
ATACOMMANDSLists the possible commands a drive can understand
ATAIDENTIFYThe structure of the data as returned by an IDENTIFY command

Constants

ATA_ISABASE_1

The base register offset for the primary IDE bus on legacy systems

ATA_ISABASE_2

The base register offset for the secondary IDE bus on legacy systems

ATA_ALTERNATESTATUS_BASE

The offset of the alternate status register relative to the IO Base on legacy systems For instance ATA_ISABASE_1 + ATA_ALTERNATESTATUS_BASE = &H3F6

ATAREGS

Lists the registers available in the first IO range

Summary
Constants
ATA_RW_DATAThe offset to the data port Data is sent to/from the drive through this port when in PIO mode, and DRQ is set in ATA_R_STATUS The port is 16 bits wide and should normally be accessed with REP INSW/OUTS
ATA_RW_DEVSELContains drive selection as well as some operation features
ATA_W_COMMANDThe offset to the command port.
ATA_R_STATUSContains the status of the drive currently selected in ATA_RW_DEVSEL it holds a bitfield of status flags from ATASTATUS

Constants

ATA_RW_DATA

The offset to the data port Data is sent to/from the drive through this port when in PIO mode, and DRQ is set in ATA_R_STATUS The port is 16 bits wide and should normally be accessed with REP INSW/OUTS

Size

16 bits

ATA_RW_DEVSEL

Contains drive selection as well as some operation features

Size

8 bits

ATA_W_COMMAND

The offset to the command port.  When a device has DRDY set in ATA_R_STATUS, a command can be sent by writing this port

Size

8 bits

ATA_R_STATUS

Contains the status of the drive currently selected in ATA_RW_DEVSEL it holds a bitfield of status flags from ATASTATUS

Size

8 bits

ATASTATUS

Holds the bitfields present in the <ATA_R_STATUS> register

Summary
Constants
ATA_STATUS_ERRThe device has aborted the previous command
ATA_STATUS_DRQThe device is waiting for the host to perform data transfer
ATA_STATUS_DFThe device does not operate as expected.
ATA_STATUS_DRDYThe device is ready to accept commands
ATA_STATUS_BUSYThe device is busy executing a command.

Constants

ATA_STATUS_ERR

The device has aborted the previous command

ATA_STATUS_DRQ

The device is waiting for the host to perform data transfer

ATA_STATUS_DF

The device does not operate as expected.

ATA_STATUS_DRDY

The device is ready to accept commands

ATA_STATUS_BUSY

The device is busy executing a command.

ATACOMMANDS

Lists the possible commands a drive can understand

ATAIDENTIFY

The structure of the data as returned by an IDENTIFY command

The base register offset for the primary IDE bus on legacy systems
Contains the status of the drive currently selected in ATA_RW_DEVSEL it holds a bitfield of status flags from ATASTATUS
Contains drive selection as well as some operation features
Holds the bitfields present in the ATA_R_STATUS register