source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS/Inc/ATA_ID.inc@ 363

Last change on this file since 363 was 363, checked in by aitotat@…, 13 years ago

Changes to XTIDE Universal BIOS:

  • Added Advanced ATA Module (MODULE_ADVANCED_ATA) with native support for QDI Vision QD6500 and QD6580 VLB IDE Controllers.
  • Hopefully optimized IDE transfer functions for 8088 (replaced some memory accesses from WORD to BYTE).
  • XT build does not fit in 8k at the moment!!!
File size: 22.4 KB
Line 
1; Project name : XTIDE Universal BIOS
2; Description : ATA Identify Drive information.
3%ifndef ATA_ID_INC
4%define ATA_ID_INC
5
6; PIO Minimum Cycle Times (t0)
7; Timings for Advanced modes 3 and 4 can be read from ATA info WORDs 67 and 68
8PIO_0_MIN_CYCLE_TIME_NS EQU 600
9PIO_1_MIN_CYCLE_TIME_NS EQU 383
10PIO_2_MIN_CYCLE_TIME_NS EQU 240
11PIO_3_MIN_CYCLE_TIME_NS EQU 180
12PIO_4_MIN_CYCLE_TIME_NS EQU 120
13
14; PIO Minimum Address Valid Times (t1)
15PIO_0_MIN_ADDRESS_VALID_NS EQU 70
16PIO_1_MIN_ADDRESS_VALID_NS EQU 50
17PIO_2_MIN_ADDRESS_VALID_NS EQU 30
18PIO_3_MIN_ADDRESS_VALID_NS EQU 30
19PIO_4_MIN_ADDRESS_VALID_NS EQU 25
20
21; PIO Minimum Active Times (t2)
22PIO_0_MIN_ACTIVE_TIME_NS EQU 165
23PIO_1_MIN_ACTIVE_TIME_NS EQU 125
24PIO_2_MIN_ACTIVE_TIME_NS EQU 100
25PIO_3_MIN_ACTIVE_TIME_NS EQU 80
26PIO_4_MIN_ACTIVE_TIME_NS EQU 70
27
28; PIO Minimum Recovery Times or Inactive Times (t2i) can be calculated
29; from Minimum Cycle Time (t0) - Minimum Active Time (t2) - Address Valid Time (t1).
30; I'm not sure about this calculation so correct me if I'm wrong!
31; Recovery time should be calculated at run time since Cycle Time t0 can be
32; read from ATA information (ATA2+) but most drives just report the
33; Min Cycle Times listed above.
34
35
36
37; ATA-1 Drive Information struct
38; F = Fixed value
39; V = Variable value
40; R = Reserved word
41; X = Vendor specific word
42struc ATA1
43 .wGenCfg resw 1 ; 0F, General configuration bit-significant information
44 .wCylCnt resw 1 ; 1F, Number of cylinders
45 resw 1 ; 2R
46 .wHeadCnt resw 1 ; 3F, Number of heads
47 .wBpTrck resw 1 ; 4F, Number of unformatted bytes per track
48 .wBpSect resw 1 ; 5F, Number of unformatted bytes per sector
49 .wSPT resw 1 ; 6F, Number of sectors per track
50 resw 3 ; 7...9X
51 .strSerial resb 20 ; 10...19F, Serial number (20 ASCII characters, 0000h=not specified)
52 .wBuffType resw 1 ; 20F, Buffer type
53 .wBuffSize resw 1 ; 21F, Buffer size in 512 byte increments (0000h=not specified)
54 .wEccCnt resw 1 ; 22F, # of ECC bytes avail on read/write long cmds (0000h=not spec'd)
55 .strFirmW resb 8 ; 23...26F, Firmware revision (8 ASCII characters, 0000h=not specified)
56 .strModel resb 40 ; 27...46F, Model number (40 ASCII characters, 0000h=not specified)
57 .bBlckSize resb 1 ; 47[0-7]F, Maximum number of sectors that can be transferred
58 ; per interrupt on read and write multiple commands
59 ; (00h=Read/write multiple commands not implemented)
60 resb 1 ; 47[8-15]X
61 .wDWIO resw 1 ; 48F, Can perform doubleword I/O (boolean)
62 .wCaps resw 1 ; 49FRX, Capabilities
63 resw 1 ; 50R
64 resb 1 ; 51[0-7]X
65 .bPioMode resb 1 ; 51[8-15]F, PIO data transfer cycle timing mode (0, 1 or 2)
66 resb 1 ; 52[0-7]X
67 .bDMATiming resb 1 ; 52[8-15]F, DMA data transfer cycle timing mode
68 .wFields resw 1 ; 53FVR, Field (next words) validity bits
69
70 ; Words 54-58 are valid only if bit0 is set in .wFields
71 .wCurCyls resw 1 ; 54V, Number of current cylinders
72 .wCurHeads resw 1 ; 55V, Number of current heads
73 .wCurSPT resw 1 ; 56V, Number of current sectors per track
74 .dwCurSCnt resd 1 ; 57...58V, Current capacity in sectors
75
76 ; Words 59-63 are always valid
77 .bBlockSel resb 1 ; 59[0-7]V, Current setting for number of sectors that
78 ; can be transferred per interrupt on R/W multiple command
79 .bBlockFlgs resb 1 ; 59[8-15]VR, bit 0 set if Multiple sector setting is valid
80 .dwLBACnt resd 1 ; 60...61F, Total number of user addressable sectors (LBA mode only)
81 .bSDMASupp resb 1 ; 62[0-7]F, Single word DMA transfer modes supported
82 .bSDMAAct resb 1 ; 62[8-15]V, Single word DMA transfer mode active
83 .bMDMASupp resb 1 ; 63[0-7]F, Multiword DMA transfer modes supported
84 .bMDMAAct resb 1 ; 63[8-15]V, Multiword DMA transfer mode active
85endstruc
86
87A1_MODEL_NUMBER_LENGTH EQU 40 ; 40 ASCII characters
88
89; ATA-1 Word 0, General configuration
90A1_wGenCfg_NONMAG EQU (1<<15) ; Reserved for non-magnetic drives
91A1_wGenCfg_FGAPREQ EQU (1<<14) ; Format speed tolerance gap required
92A1_wGenCfg_TRCKOFF EQU (1<<13) ; Track offset option available
93A1_wGenCfg_DATAOFF EQU (1<<12) ; Data strobe offset option available
94A1_wGenCfg_ROTTOL EQU (1<<11) ; Rotational speed tolerance is > 0,5%
95A1_wGenCfg_XFERFAST EQU (1<<10) ; Disk transfer rate > 10 Mbs
96A1_wGenCfg_XFERMED EQU (1<<9) ; Disk transfer rate > 5Mbs but <= 10Mbs
97A1_wGenCfg_XFERSLOW EQU (1<<8) ; Disk transfer rate <= 5Mbs
98A1_wGenCfg_REMOVABLE EQU (1<<7) ; Removable cartridge drive
99A1_wGenCfg_FIXED EQU (1<<6) ; Fixed drive
100A1_wGenCfg_MOTCTRL EQU (1<<5) ; Spindle motor control option implemented
101A1_wGenCfg_HEADSLOW EQU (1<<4) ; Head switch time > 15 usec
102A1_wGenCfg_NOTMFM EQU (1<<3) ; Not MFM encoded
103A1_wGenCfg_SOFTSECT EQU (1<<2) ; Soft sectored
104A1_wGenCfg_HARDSECT EQU (1<<1) ; Hard sectored
105
106; ATA-1 Word 49, Capabilities
107A1_wCaps_LBA EQU (1<<9) ; LBA supported
108A1_wCaps_DMA EQU (1<<8) ; DMA supported
109
110; ATA-1 Word 53, Fields
111A1_wFields_54to58 EQU (1<<0) ; The fields reported in words 54-58 are valid
112
113; ATA-1 Word 59 high byte, Block mode flags
114A1_bBlockFlgs_VALID EQU (1<<0) ; Multiple sector setting (bBlockSel) is valid
115
116
117;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
118
119; ATA-2 Drive Information struct
120; F = Fixed value
121; V = Variable value
122; R = Reserved word
123; X = Vendor specific word
124struc ATA2
125 .wGenCfg resw 1 ; 0F, General configuration bit-significant information
126 .wCylCnt resw 1 ; 1F, Number of logical cylinders
127 resw 1 ; 2R
128 .wHeadCnt resw 1 ; 3F, Number of logical heads
129 resw 1 ; 4X
130 resw 1 ; 5X
131 .wSPT resw 1 ; 6F, Number of logical sectors per track
132 resw 3 ; 7...9X
133 .strSerial resb 20 ; 10...19F, Serial number (20 ASCII characters, 0000h=not specified)
134 resw 1 ; 20X
135 resw 1 ; 21X
136 .wEccCnt resw 1 ; 22F, # of ECC bytes avail on read/write long cmds (0000h=not spec'd)
137 .strFirmW resb 8 ; 23...26F, Firmware revision (8 ASCII characters, 0000h=not specified)
138 .strModel resb 40 ; 27...46F, Model number (40 ASCII characters, 0000h=not specified)
139 .bBlckSize resb 1 ; 47[0-7]F, Maximum number of sectors that can be transferred
140 ; per interrupt on read and write multiple commands
141 ; (00h=Read/write multiple commands not implemented)
142 resb 1 ; 47[8-15]X
143 resw 1 ; 48R
144 .wCaps resw 1 ; 49FRX, Capabilities
145 resw 1 ; 50R
146 resb 1 ; 51[0-7]X
147 .bPIOTiming resb 1 ; 51[8-15]F, PIO data transfer cycle timing mode
148 resb 1 ; 52[0-7]X
149 .bDMATiming resb 1 ; 52[8-15]F, DMA data transfer cycle timing mode
150 .wFields resw 1 ; 53FVR, Field (next words) validity bits
151
152 ; Words 54-58 are valid only if bit0 is set in .wFields
153 .wCurCyls resw 1 ; 54V, Number of current logical cylinders
154 .wCurHeads resw 1 ; 55V, Number of current logical heads
155 .wCurSPT resw 1 ; 56V, Number of current logical sectors per track
156 .dwCurSCnt resd 1 ; 57...58V, Current capacity in sectors
157
158 ; Words 59-63 are always valid
159 .bBlockSel resb 1 ; 59[0-7]V, Current setting for number of sectors that
160 ; can be transferred per interrupt on R/W multiple command
161 .bBlockFlgs resb 1 ; 59[8-15]VR, bit 0 set if Multiple sector setting is valid
162 .dwLBACnt resd 1 ; 60...61F, Total number of user addressable sectors (LBA mode only)
163 .bSDMASupp resb 1 ; 62[0-7]F, Single word DMA transfer modes supported
164 .bSDMAAct resb 1 ; 62[8-15]V, Single word DMA transfer mode active
165 .bMDMASupp resb 1 ; 63[0-7]F, Multiword DMA transfer modes supported
166 .bMDMAAct resb 1 ; 63[8-15]V, Multiword DMA transfer mode active
167
168 ; Words 64-70 are valid only if bit1 is set in .wFields (ATA2+)
169 .bPIOSupp resb 1 ; 64[0-7]F, Advanced PIO Transfer Modes Supported
170 resb 1 ; 64[8-15]R
171 .wMDMAMinCy resw 1 ; 65F, Minimum Multiword DMA Transfer Cycle Time Per Word
172 .wMDMARecCy resw 1 ; 66F, Manufacturer’s Recommended Multiword DMA Transfer Cycle Time
173 .wPIOMinCy resw 1 ; 67F, Minimum PIO Transfer Cycle Time Without Flow Control
174 .wPIOMinCyF resw 1 ; 68F, Minimum PIO Transfer Cycle Time With IORDY Flow Control
175endstruc
176
177; ATA-2 Word 0, General configuration
178A2_wGenCfg_NONMAG EQU (1<<15) ; Reserved for non-magnetic drives
179A2_wGenCfg_REMOVABLE EQU (1<<7) ; Removable media device
180A2_wGenCfg_FIXED EQU (1<<6) ; Not removable controller and/or device
181
182; ATA-1 Word 49, Capabilities
183A2_wCaps_TIMER EQU (1<<13) ; Standby timer values as specified in this standard are supported
184A2_wCaps_IORDY EQU (1<<11) ; IORDY supported
185A2_wCaps_CANDISIORDY EQU (1<<10) ; IORDY can be disabled
186A2_wCaps_LBA EQU (1<<9) ; LBA supported
187A2_wCaps_DMA EQU (1<<8) ; DMA supported
188
189; ATA-2 Word 53, Fields
190A2_wFields_54to58 EQU (1<<0) ; The fields reported in words 54-58 are valid
191A2_wFields_64to70 EQU (1<<1) ; The fields reported in words 64-70 are valid
192
193; ATA-2 Word 59 high byte, Block mode flags
194A2_bBlockFlgs_VALID EQU (1<<0) ; Multiple sector setting (bBlockSel) is valid
195
196; ATA-2 Word 64, Advanced PIO transfer modes supported
197A2_bPIOSupp_PIO3 EQU (1<<0)
198A2_bPIOSupp_PIO4 EQU (1<<1)
199
200
201;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
202
203; ATA-6 Drive Information struct
204; F = Fixed value
205; V = Variable value
206; R = Reserved word
207; X = Vendor specific word
208struc ATA6
209 .wGenCfg resw 1 ; 0F, General configuration bit-significant information
210 resw 1 ; 1X, Obsolete (Number of logical cylinders)
211 resw 1 ; 2V, Specific configuration
212 resw 1 ; 3X, Obsolete (Number of logical heads)
213 resw 1 ; 4X
214 resw 1 ; 5X
215 resw 1 ; 6X, Obsolete (Number of logical sectors per track)
216 resw 2 ; 7...8V, Reserved for assignment by the CompactFlash Association
217 resw 1 ; 9X
218 .strSerial resb 20 ; 10...19F, Serial number (20 ASCII characters, 0000h=not specified)
219 resw 1 ; 20X
220 resw 1 ; 21X
221 resw 1 ; 22X, Obsolete (# of ECC bytes avail on read/write long cmds (0000h=not spec'd))
222 .strFirmW resb 8 ; 23...26F, Firmware revision (8 ASCII characters, 0000h=not specified)
223 .strModel resb 40 ; 27...46F, Model number (40 ASCII characters, 0000h=not specified)
224 .bBlckSize resb 1 ; 47[0-7]F, Maximum number of sectors that can be transferred
225 ; per interrupt on read and write multiple commands
226 ; (00h=Read/write multiple commands not implemented)
227 resb 1 ; 47[8-15]F, 80h
228 resw 1 ; 48R
229 .wCaps resw 1 ; 49FX, Capabilities
230 .wCapsHigh resw 1 ; 50FX, Capabilities 2
231 resw 1 ; 51X, Obsolete (PIO data transfer cycle timing mode)
232 resw 1 ; 52X, Obsolete (DMA data transfer cycle timing mode)
233 .wFields resw 1 ; 53FX, Field (next words) validity bits
234
235 ; Words 54-58 are valid only if bit0 is set in .wFields
236 resw 1 ; 54X, Obsolete (Number of current logical cylinders)
237 resw 1 ; 55X, Obsolete (Number of current logical heads)
238 resw 1 ; 56X, Obsolete (Number of current logical sectors per track)
239 resd 1 ; 57...58X, Obsolete (Current capacity in sectors)
240
241 ; Words 59-63 are always valid
242 .bBlockSel resb 1 ; 59[0-7]V, Current setting for number of sectors that
243 ; can be transferred per interrupt on R/W multiple command
244 .bBlockFlgs resb 1 ; 59[8-15]VR, bit 0 set if Multiple sector setting is valid
245 .dwLBACnt resd 1 ; 60...61F, Total number of user addressable sectors (LBA-28)
246 resb 1 ; 62[0-7]X, Obsolete (Single word DMA transfer modes supported)
247 resb 1 ; 62[8-15]X, Obsolete (Single word DMA transfer mode active)
248 .wMDMA resw 1 ; 63FV, Multiword DMA transfer modes supported and active
249
250 ; Words 64-70 are valid only if bit1 is set in .wFields (ATA2+)
251 .bPIOSupp resb 1 ; 64[0-7]F, Advanced PIO Transfer Modes Supported
252 resb 1 ; 64[8-15]R
253 .wMDMAMinCy resw 1 ; 65F, Minimum Multiword DMA Transfer Cycle Time Per Word
254 .wMDMARecCy resw 1 ; 66F, Manufacturer’s Recommended Multiword DMA Transfer Cycle Time
255 .wPIOMinCy resw 1 ; 67F, Minimum PIO Transfer Cycle Time Without Flow Control
256 .wPIOMinCyF resw 1 ; 68F, Minimum PIO Transfer Cycle Time With IORDY Flow Control
257 resw 71-69 ; 69...70R
258
259 ; Words 71...74 are reserved for IDENTIFY PACKET DEVICE command
260 resw 75-71 ; 71...74R
261
262 .wQueue resw 1 ; 75[0-4]F, Maximum queue depth - 1
263 resw 80-76 ; 76...79R
264
265 .wMajorVer resw 1 ; 80F, Major Version Number
266 .wMinorVer resw 1 ; 81F, Minor Version Number
267 .wSetSup82 resw 1 ; 82F, Command set supported
268 .wSetSup83 resw 1 ; 83F, Command sets supported
269 .wSetSup84 resw 1 ; 84F, Command set / Feature supported extension
270 .wEnFor82 resw 1 ; 85FV, Command set / feature enabled (for word 82)
271 .wEnFor83 resw 1 ; 86FV, Command set / feature enabled (for word 83)
272 .wEnFor84 resw 1 ; 87FV, Command set / feature enabled (for word 84)
273
274 ; Word 88 is valid only if bit2 is set in .wFields (word 53)
275 .wUDMA resw 1 ; 88FV, Ultra DMA Mode support
276
277 .wEraseTime resw 1 ; 89F, Time required for security erase unit completion
278 .wEnhErTime resw 1 ; 90F, Time required for Enhanced security erase completion
279 .wCurPower resw 1 ; 91V, Current advanced power management value
280 .wPWRev resw 1 ; 92V, Master Password Revision Code
281 .wReset resw 1 ; 93FV, Hardware reset result
282 .bCurAcous resb 1 ; 94[0-7]V, Current automatic acoustic management value
283 .bRecAcous resb 1 ; 94[8-15]V, Vendor’s recommended acoustic management value
284 resw 100-95 ; 95...99R
285 .qwLBACnt resb 8 ; 100...103V, Total number of user addressable sectors (LBA48)
286 resw 127-104 ; 104...126R
287 .wRMSN resw 1 ; 127F, Removable Media Status Notification feature set support
288 .wSecurity resw 1 ; 128FV, Security Status
289 resw 160-129 ; 129...157X, Vendor Specific
290 .wCFAPower resw 1 ; 160FV, CFA Power Mode 1
291 resw 176-161 ; 161...175R, Reserved for assignment by the CompactFlash Association
292 .strMediaSr resw 206-176 ; 176...205V, Current media serial number
293 resw 255-206 ; 206...254R
294 .bSignature resb 1 ; 255[0-7]X, Signature
295 .bChecksum resb 1 ; 255[8-15]X, Checksum
296endstruc
297
298; ATA-6 Word 0, General configuration
299A6_wGenCfg_REMOVABLE EQU (1<<7) ; Removable media device
300A6_wGenCfg_INCOMPLETE EQU (1<<2) ; Response incomplete
301
302; ATA-6 Word 49, Capabilities
303A6_wCaps_TIMER EQU (1<<13) ; Standby timer values as specified in this standard are supported
304A6_wCaps_IORDY EQU (1<<11) ; IORDY supported
305A6_wCaps_CANDISIORDY EQU (1<<10) ; IORDY can be disabled
306A6_wCaps_LBA EQU (1<<9) ; LBA supported
307A6_wCaps_DMA EQU (1<<8) ; DMA supported
308
309; ATA-6 Word 53, Fields
310A6_wFields_88 EQU (1<<2) ; The fields reported in word 88 are valid
311A6_wFields_64to70 EQU (1<<1) ; The fields reported in words 64-70 are valid
312
313; ATA-6 Word 59 high byte, Block mode flags
314A6_bBlockFlgs_VALID EQU (1<<0) ; Multiple sector setting (bBlockSel) is valid
315
316; ATA-6 Word 63, Multiword DMA Mode
317A6_wMDMA_MODE2_SELECTED EQU (1<<10) ; Multiword DMA mode 2 is selected
318A6_wMDMA_MODE1_SELECTED EQU (1<<9) ; Multiword DMA mode 1 is selected
319A6_wMDMA_MODE0_SELECTED EQU (1<<8) ; Multiword DMA mode 0 is selected
320A6_wMDMA_MODE2_SUPRTD EQU (1<<2) ; Multiword DMA mode 2 and below are supported
321A6_wMDMA_MODE1_SUPRTD EQU (1<<1) ; Multiword DMA mode 1 and below are supported
322A6_wMDMA_MODE0_SUPRTD EQU (1<<0) ; Multiword DMA mode 0 is supported
323
324; ATA-6 Word 80, Major version number
325A6_wMajorVer_ATA6 EQU (1<<6)
326A6_wMajorVer_ATA5 EQU (1<<5)
327A6_wMajorVer_ATA4 EQU (1<<4)
328A6_wMajorVer_ATA3 EQU (1<<3)
329
330; ATA-6 Word 82, Command set supported
331A6_wSetSup82_NOP EQU (1<<14) ; NOP command supported
332A6_wSetSup82_RDBUFF EQU (1<<13) ; READ BUFFER command supported
333A6_wSetSup82_WRBUFF EQU (1<<12) ; WRITE BUFFER command supported
334A6_wSetSup82_PROT_AREA EQU (1<<10) ; Host Protected Area feature set supported
335A6_wSetSup82_DEV_RESET EQU (1<<9) ; DEVICE RESET command supported
336A6_wSetSup82_SERVICE EQU (1<<8) ; SERVICE interrupt supported
337A6_wSetSup82_RELEASE EQU (1<<7) ; Release interrupt supported
338A6_wSetSup82_LOOKAHEAD EQU (1<<6) ; Look-ahead supported
339A6_wSetSup82_WRCACHE EQU (1<<5) ; Write cache supported
340A6_wSetSup82_POWERMAN EQU (1<<3) ; Power Management feature set supported
341A6_wSetSup82_REM_MEDIA EQU (1<<2) ; Removable Media feature set supported
342A6_wSetSup82_SECURITY EQU (1<<1) ; Security Mode feature set supported
343A6_wSetSup82_SMART EQU (1<<0) ; SMART feature set supported
344
345; ATA-6 Word 83, Command sets supported
346A6_wSetSup83_FLUSH_EXT EQU (1<<13) ; FLUSH CACHE EXT command supported
347A6_wSetSup83_FLUSH EQU (1<<12) ; FLUSH CACHE command supported
348A6_wSetSup83_CFG EQU (1<<11) ; Device Configuration Overlay feature set supported
349A6_wSetSup83_LBA48 EQU (1<<10) ; 48-bit LBA feature set supported
350A6_wSetSup83_ACOUSTIC EQU (1<<9) ; Automatic Acoustic Management feature set supported
351A6_wSetSup83_SET_MAX EQU (1<<8) ; SET MAX security extension supported
352A6_wSetSup83_FEATURES EQU (1<<6) ; SET FEATURES subcommand required to spinup after power-up
353A6_wSetSup83_POWERUP EQU (1<<5) ; Power-Up In Standby feature set supported
354A6_wSetSup83_RMSN EQU (1<<4) ; Removable Media Status Notification feature set supported
355A6_wSetSup83_APM EQU (1<<3) ; Advanced Power Management feature set supported
356A6_wSetSup83_CFA EQU (1<<2) ; CFA feature set supported
357A6_wSetSup83_DMAQUEUED EQU (1<<1) ; READ/WRITE DMA QUEUED supported
358A6_wSetSup83_MICROCODE EQU (1<<0) ; DOWNLOAD MICROCODE command supported
359
360; ATA-6 Word 84, Command set/feature supported extension
361A6_wSetSup84_GENLOG EQU (1<<5) ; General Purpose Logging feature set supported
362A6_wSetSup84_MEDIAPASS EQU (1<<3) ; Media Card Pass Through Command feature set supported
363A6_wSetSup84_MEDIASER EQU (1<<2) ; Media serial number supported
364A6_wSetSup84_SMARTTEST EQU (1<<1) ; SMART self-test supported
365A6_wSetSup84_SMARTLOG EQU (1<<0) ; SMART error logging supported
366
367; ATA-6 Word 85, Command set/feature enabled (supported by word 82)
368A6_wEnFor82_NOP EQU (1<<14) ; NOP command enabled
369A6_wEnFor82_RDBUFF EQU (1<<13) ; READ BUFFER command enabled
370A6_wEnFor82_WRBUFF EQU (1<<12) ; WRITE BUFFER command enabled
371A6_wEnFor82_PROT_AREA EQU (1<<10) ; Host Protected Area feature set enabled
372A6_wEnFor82_DEV_RESET EQU (1<<9) ; DEVICE RESET command enabled
373A6_wEnFor82_SERVICE EQU (1<<8) ; SERVICE interrupt enabled
374A6_wEnFor82_RELEASE EQU (1<<7) ; Release interrupt enabled
375A6_wEnFor82_LOOKAHEAD EQU (1<<6) ; Look-ahead enabled
376A6_wEnFor82_WRCACHE EQU (1<<5) ; Write cache enabled
377A6_wEnFor82_POWERMAN EQU (1<<3) ; Power Management feature set enabled
378A6_wEnFor82_REM_MEDIA EQU (1<<2) ; Removable Media feature set enabled
379A6_wEnFor82_SECURITY EQU (1<<1) ; Security Mode feature set enabled
380A6_wEnFor82_SMART EQU (1<<0) ; SMART feature set enabled
381
382; ATA-6 Word 86, Command set/feature enabled (supported by word 83)
383A6_wEnFor83_FLUSH_EXT EQU (1<<13) ; FLUSH CACHE EXT command supported
384A6_wEnFor83_FLUSH EQU (1<<12) ; FLUSH CACHE command supported
385A6_wEnFor83_CFG EQU (1<<11) ; Device Configuration Overlay supported
386A6_wEnFor83_LBA48 EQU (1<<10) ; 48-bit LBA feature set supported
387A6_wEnFor83_ACOUSTIC EQU (1<<9) ; Automatic Acoustic Management feature set enabled
388A6_wEnFor83_SET_MAX EQU (1<<8) ; SET MAX security extension enabled by SET MAX SET PASSWORD
389A6_wEnFor83_FEATURES EQU (1<<6) ; SET FEATURES subcommand required to spinup after power-up
390A6_wEnFor83_POWERUP EQU (1<<5) ; Power-Up In Standby feature set enabled
391A6_wEnFor83_RMSN EQU (1<<4) ; Removable Media Status Notification feature set enabled
392A6_wEnFor83_APM EQU (1<<3) ; Advanced Power Management feature set enabled
393A6_wEnFor83_CFA EQU (1<<2) ; CFA feature set enabled
394A6_wEnFor83_DMAQUEUED EQU (1<<1) ; READ/WRITE DMA QUEUED supported
395A6_wEnFor83_MICROCODE EQU (1<<0) ; DOWNLOAD MICROCODE command supported
396
397; ATA-6 Word 87, Command set/feature default
398A6_wEnFor84_GENLOG EQU (1<<5) ; General Purpose Logging feature set supported
399A6_wEnFor84_MEDIAPASS EQU (1<<3) ; Media Card Pass Through Command feature set enabled
400A6_wEnFor84_MEDIASER EQU (1<<2) ; Media serial number is valid
401A6_wEnFor84_SMARTTEST EQU (1<<1) ; SMART self-test supported
402A6_wEnFor84_SMARTLOG EQU (1<<0) ; SMART error logging supported
403
404; ATA-6 Word 88, Ultra DMA Mode
405A6_wUDMA_MODE5_SELECTED EQU (1<<13) ; Ultra DMA mode 5 is selected
406A6_wUDMA_MODE4_SELECTED EQU (1<<12) ; Ultra DMA mode 4 is selected
407A6_wUDMA_MODE3_SELECTED EQU (1<<11) ; Ultra DMA mode 3 is selected
408A6_wUDMA_MODE2_SELECTED EQU (1<<10) ; Ultra DMA mode 2 is selected
409A6_wUDMA_MODE1_SELECTED EQU (1<<9) ; Ultra DMA mode 1 is selected
410A6_wUDMA_MODE0_SELECTED EQU (1<<8) ; Ultra DMA mode 0 is selected
411A6_wUDMA_MODE5_SUPRTD EQU (1<<5) ; Ultra DMA mode 5 and below are supported
412A6_wUDMA_MODE4_SUPRTD EQU (1<<4) ; Ultra DMA mode 4 and below are supported
413A6_wUDMA_MODE3_SUPRTD EQU (1<<3) ; Ultra DMA mode 3 and below are supported
414A6_wUDMA_MODE2_SUPRTD EQU (1<<2) ; Ultra DMA mode 2 and below are supported
415A6_wUDMA_MODE1_SUPRTD EQU (1<<1) ; Ultra DMA mode 1 and below are supported
416A6_wUDMA_MODE0_SUPRTD EQU (1<<0) ; Ultra DMA mode 0 is supported
417
418; ATA-6 Word 93, Hardware reset result
419A6_wReset_CBLID_BELOW EQU (1<<13) ; Device detected CBLID- above ViH
420A6_wReset_DEV1_PDIAG EQU (1<<11) ; Device 1 asserted PDIAG-
421A6_wReset_DEV0_RESP_D1 EQU (1<<6) ; Device 0 responds when Device 1 is selected
422A6_wReset_DEV0_DASP EQU (1<<5) ; Device 0 detected the assertion of DASP-
423A6_wReset_DEV0_PDIAG EQU (1<<4) ; Device 0 detected the assertion of PDIAG
424A6_wReset_DEV0_PASSED EQU (1<<3) ; Device 0 passed diagnostics
425A6_wReset_MASK_DEV1_DETERMINE EQU ((1<<10)|(1<<9)) ; These bits indicate how Device 1 determined the device number
426A6_wReset_MASK_DEV0_DETERMINE EQU ((1<<2)|(1<<1)) ; These bits indicate how Device 0 determined the device number:
427A6_wReset_RESERVED EQU 00b
428A6_wReset_JUMPER EQU 01b ; a jumper was used
429A6_wReset_CSEL EQU 10b ; the CSEL signal was used
430A6_wReset_UNKNOWN EQU 11b ; some other method was used or the method is unknown
431
432; ATA-6 Word 127, Removable Media Status Notification feature set support
433A6_wRMSN_SUPPORTED EQU (1<<0) ; Removable Media Status Notification feature supported
434
435; ATA-6 Word 128, Security status
436A6_wSecurity_MAX EQU (1<<8) ; Security level 0 = High, 1 = Maximum
437A6_wSecurity_ENH_ERASE EQU (1<<5) ; Enhanced security erase supported
438A6_wSecurity_EXPIRED EQU (1<<4) ; Security count expired
439A6_wSecurity_FROZEN EQU (1<<3) ; Security frozen
440A6_wSecurity_LOCKED EQU (1<<2) ; Security locked
441A6_wSecurity_ENABLED EQU (1<<1) ; Security enabled
442A6_wSecurity_SUPPORTED EQU (1<<0) ; Security supported
443
444; ATA-6 Word 160, CFA Power Mode 1
445A6_wCFAPower_WORDSUPP EQU (1<<15) ; Word 160 supported
446A6_wCFAPower_REQUIRED EQU (1<<13) ; CFA power mode 1 is required for one or more commands implemented by the device
447A6_wCFAPower_DISABLED EQU (1<<12) ; CFA power mode 1 disabled
448A6_wCFAPower_MASK_mA EQU 0FFFh ; Maximum current in mA
449
450
451%endif ; ATA_ID_INC
Note: See TracBrowser for help on using the repository browser.