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