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