#include <IOKit/storage/ata/IOATAStorageDefines.h>

IOKit/storage/ata/IOATAStorageDefines.h Kernel.framework

Important word offsets in device identify data as defined in ATA-5 standard
includes: Kernel/stdint.h
22 enums · 2 typedefs · 1 macro

enum(anonymous)

underlying type unsigned int
kATAIdentifyConfiguration0
kATAIdentifyLogicalCylinderCount1
kATAIdentifyLogicalHeadCount3
kATAIdentifySectorsPerTrack6
kATAIdentifySerialNumber10
kATAIdentifyFirmwareRevision23
kATAIdentifyModelNumber27
kATAIdentifyMultipleSectorCount47
kATAIdentifyDriveCapabilities49
kATAIdentifyDriveCapabilitiesExtended50
kATAIdentifyPIOTiming51
kATAIdentifyExtendedInfoSupport53
kATAIdentifyCurrentCylinders54
kATAIdentifyCurrentHeads55
kATAIdentifyCurrentSectors56
kATAIdentifyCurrentCapacity57
kATAIdentifyCurrentMultipleSectors59
kATAIdentifyLBACapacity60
kATAIdentifySingleWordDMA62
kATAIdentifyMultiWordDMA63
kATAIdentifyAdvancedPIOModes64
kATAIdentifyMinMultiWordDMATime65
kATAIdentifyRecommendedMultiWordDMATime66
kATAIdentifyMinPIOTime67
kATAIdentifyMinPIOTimeWithIORDY68
kATAIdentifyQueueDepth75
kATAIdentifyMajorVersion80
kATAIdentifyMinorVersion81
kATAIdentifyCommandSetSupported82
kATAIdentifyCommandSetSupported283
kATAIdentifyCommandExtension184
kATAIdentifyCommandExtension285
kATAIdentifyCommandsEnabled86
kATAIdentifyCommandsDefault87
kATAIdentifyUltraDMASupported88
kATAIdentifyPhysicalLogicalSectorSize106
kATAIdentifyWordsPerLogicalSector1117
kATAIdentifyWordsPerLogicalSector2118
kATAIdentifyLogicalSectorAlignment209
kATAIdentifyIntegrity255

enum(anonymous)

underlying type unsigned int
kFixedDeviceBit6Configuration field (word 0) Fixed disk indicator bit
kRemoveableMediaBit7Removable media indicator bit
kNonMagneticDriveBit15Non-magnetic drive indicator bit
kFixedDeviceMask64Mask for fixed disk indicator
kRemoveableMediaMask128Mask for removable media indicator
kNonMagneticDriveMask32768Mask for non-magnetic drive indicator
kDMABit8Capabilities field (word 49) DMA supported bit
kLBABit9LBA supported bit
kIORDYDisableBit10IORDY can be disabled bit
kIORDYBit11IORDY supported bit
kStandbyTimerBit13Standby timer supported bit
kDMASupportedMask256Mask for DMA supported
kLBASupportedMask512Mask for LBA supported
kDMADisableMask1024Mask for DMA supported
kIORDYSupportedMask2048Mask for IORDY supported
kStandbySupportedMask8192Mask for Standby Timer supported
kCurFieldsValidBit0Extensions field (word 53) Bit to show words 54-58 are valid
kExtFieldsValidBit1Bit to show words 64-70 are valid
kCurFieldsValidMask1Mask for current fields valid
kExtFieldsValidMask2Extension word valid
kMode3Bit0Advanced PIO Transfer Modes field (word 64) Bit to indicate mode 3 is supported
kMode3Mask1Mask for mode 3 support
kChecksumValidCookie165Integrity of Identify data (word 255) Bits 7:0 if device supports feature

enum(anonymous)

String size constants
underlying type unsigned int
kSizeOfATAModelString40
kSizeOfATARevisionString8

enum(anonymous)

ATA Command timeout constants ( in milliseconds )
underlying type unsigned int
kATATimeout10Seconds10000
kATATimeout30Seconds30000
kATATimeout45Seconds45000
kATATimeout1Minute60000
kATADefaultTimeout30000

enum(anonymous)

Retry constants
underlying type unsigned int
kATAZeroRetries0
kATADefaultRetries4

enum(anonymous)

max number of blocks supported in ATA transaction
underlying type unsigned int
kIOATASectorCount8Bit8
kIOATASectorCount16Bit16

enum(anonymous)

underlying type unsigned int
kIOATAMaximumBlockCount8Bit256
kIOATAMaximumBlockCount16Bit65536
kIOATAMaxBlocksPerXfer256For backwards compatibility

enum(anonymous)

Power Management time constants (in seconds)
underlying type unsigned int
kSecondsInAMinute60
k5Minutes300

enum(anonymous)

Bits for features published in Word 82 of device identify data
underlying type unsigned int
kATASupportsSMARTBit0
kATASupportsPowerManagementBit3
kATASupportsWriteCacheBit5

enum(anonymous)

Masks for features published in Word 82 of device identify data
underlying type unsigned int
kATASupportsSMARTMask1
kATASupportsPowerManagementMask8
kATASupportsWriteCacheMask32

enum(anonymous)

Bits for features published in Word 83 of device identify data
underlying type unsigned int
kATASupportsCompactFlashBit2
kATASupportsAdvancedPowerManagementBit3
kATASupports48BitAddressingBit10
kATASupportsFlushCacheBit12
kATASupportsFlushCacheExtendedBit13

enum(anonymous)

Masks for features published in Word 83 of device identify data
underlying type unsigned int
kATASupportsCompactFlashMask4
kATASupportsAdvancedPowerManagementMask8
kATASupports48BitAddressingMask1024
kATASupportsFlushCacheMask4096
kATASupportsFlushCacheExtendedMask8192
kIdentifyWordValidationMask49152Mask to ensure data is valid
kIdentifyWordValid16384

enum(anonymous)

Bits for features published in Word 84 of device identify data
underlying type unsigned int
kATAForceUnitAccessFeatureBit6

enum(anonymous)

Masks for features published in Word 84 of device identify data
underlying type unsigned int
kATAForceUnitAccessFeatureMask64

enum(anonymous)

Bits for features published in Word 85 of device identify data
underlying type unsigned int
kATAWriteCacheEnabledBit5

enum(anonymous)

Masks for features published in Word 85 of device identify data
underlying type unsigned int
kATAWriteCacheEnabledMask32

enum(anonymous)

Bits for features published in Word 106 of device identify data
underlying type unsigned int
kATAPhysicalLogicalEnabledBit015
kATAPhysicalLogicalEnabledBit114
kATAMultipleLogicalSectorsBit13
kATAValidLogicalSectorSizeBit12

enum(anonymous)

Masks for features published in Word 106 of device identify data
underlying type unsigned int
kATAPhysicalLogicalEnabledMask49152
kATAPhysicalLogicalEnabledValue16384
kATAMultipleLogicalSectorsMask8192
kATAValidLogicalSectorSizeMask4096
kATAPhysicalSectorSizeMask15
kATALogicalSectorAlignmentMask16383

macrokIOATASupportedFeaturesKey

Property table keys
#define kIOATASupportedFeaturesKey "ATA Features"

enum(anonymous)

ATA supported features
underlying type unsigned int
kIOATAFeaturePowerManagement1OBSOLETE
kIOATAFeatureWriteCache2OBSOLETE
kIOATAFeatureAdvancedPowerManagement4
kIOATAFeatureCompactFlash8
kIOATAFeature48BitLBA16
kIOATAFeatureSMART32

enum(anonymous)

ATA Advanced Power Management settings (valid settings range from 1-254), the settings below are the more common settings
underlying type unsigned int
kIOATAMaxPerformance254
kIOATADefaultPerformance128
kIOATAMaxPowerSavings1

enum(anonymous)

ATA Transfer Mode bit masks
underlying type unsigned int
kATAEnableUltraDMAModeMask64
kATAEnableMultiWordDMAModeMask32
kATAEnablePIOModeMask8

typedefATAOperationType

typedef uint32_t ATAOperationType

enum(anonymous)

underlying type unsigned int
kATAOperationTypeRead0
kATAOperationTypeWrite1
kATAOperationTypeFlushCache2
kATAOperationTypeSMART3
kATAOperationTypeConfiguration4
kATAOperationTypePowerManagement5
kATAOperationTypeSMS6

typedefATARequestIdentifier

typedef struct __ATAIORequest * ATARequestIdentifier