1 | /*␊ |
2 | * Copyright (c) 1998-2009 Apple Inc. All rights reserved.␊ |
3 | *␊ |
4 | * ␊ |
5 | * This file contains Original Code and/or Modifications of Original Code␊ |
6 | * as defined in and that are subject to the Apple Public Source License␊ |
7 | * Version 2.0 (the 'License'). You may not use this file except in␊ |
8 | * compliance with the License. Please obtain a copy of the License at␊ |
9 | * http://www.opensource.apple.com/apsl/ and read it before using this␊ |
10 | * file.␊ |
11 | * ␊ |
12 | * The Original Code and all software distributed under the License are␊ |
13 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER␊ |
14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,␊ |
15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,␊ |
16 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.␊ |
17 | * Please see the License for the specific language governing rights and␊ |
18 | * limitations under the License.␊ |
19 | * ␊ |
20 | */␊ |
21 | ␊ |
22 | #ifndef _IOKIT_SCSI_CMDS_MODE_DEFINITIONS_H_␊ |
23 | #define _IOKIT_SCSI_CMDS_MODE_DEFINITIONS_H_␊ |
24 | ␊ |
25 | ␊ |
26 | //-----------------------------------------------------------------------------␊ |
27 | //␉Includes␊ |
28 | //-----------------------------------------------------------------------------␊ |
29 | ␊ |
30 | #if KERNEL␊ |
31 | #include <IOKit/IOTypes.h>␊ |
32 | #else␊ |
33 | #include <CoreFoundation/CoreFoundation.h>␊ |
34 | #endif␊ |
35 | ␊ |
36 | ␊ |
37 | /*! @header SCSI Request Sense Definitions␊ |
38 | ␉@discussion␊ |
39 | ␉This file contains all definitions for the data returned from␊ |
40 | ␉the MODE_SENSE_6 and MODE_SENSE_10 commands.␊ |
41 | */␊ |
42 | ␊ |
43 | #pragma pack(1)␊ |
44 | ␊ |
45 | /*!␊ |
46 | @struct SPCModeParameterHeader6␊ |
47 | @discussion␊ |
48 | Mode Parameter Header for the MODE_SENSE_6 command.␊ |
49 | */␊ |
50 | typedef struct SPCModeParameterHeader6␊ |
51 | {␊ |
52 | ␉UInt8␉␉MODE_DATA_LENGTH;␊ |
53 | ␉UInt8␉␉MEDIUM_TYPE;␊ |
54 | ␉UInt8␉␉DEVICE_SPECIFIC_PARAMETER;␊ |
55 | ␉UInt8␉␉BLOCK_DESCRIPTOR_LENGTH;␊ |
56 | } SPCModeParameterHeader6;␊ |
57 | ␊ |
58 | ␊ |
59 | /*!␊ |
60 | @struct SPCModeParameterHeader10␊ |
61 | @discussion␊ |
62 | Mode Parameter Header for the MODE_SENSE_10 command.␊ |
63 | */␊ |
64 | typedef struct SPCModeParameterHeader10␊ |
65 | {␊ |
66 | ␉UInt16␉␉MODE_DATA_LENGTH;␊ |
67 | ␉UInt8␉␉MEDIUM_TYPE;␊ |
68 | ␉UInt8␉␉DEVICE_SPECIFIC_PARAMETER;␊ |
69 | ␉UInt8␉␉LONGLBA;␊ |
70 | ␉UInt8␉␉RESERVED;␊ |
71 | ␉UInt16␉␉BLOCK_DESCRIPTOR_LENGTH;␊ |
72 | } SPCModeParameterHeader10;␊ |
73 | ␊ |
74 | ␊ |
75 | /*!␊ |
76 | @enum Long LBA Bitfield definitions␊ |
77 | @discussion␊ |
78 | Long LBA Bitfield definitions for Mode Parameter Header␊ |
79 | for MODE_SENSE_10 command.␊ |
80 | @constant kModeSenseParameterHeader10_LongLBABit␊ |
81 | Bit to indicate Long LBA block descriptors follow.␊ |
82 | @constant kModeSenseParameterHeader10_LongLBAMask␊ |
83 | Mask to test for kModeSenseParameterHeader10_LongLBABit.␊ |
84 | */␊ |
85 | enum␊ |
86 | {␊ |
87 | ␉kModeSenseParameterHeader10_LongLBABit␉= 0,␊ |
88 | ␉kModeSenseParameterHeader10_LongLBAMask␉= (1 << kModeSenseParameterHeader10_LongLBABit),␊ |
89 | };␊ |
90 | ␊ |
91 | ␊ |
92 | /*!␊ |
93 | @enum Device Specific Parameter Bitfield definitions␊ |
94 | @discussion␊ |
95 | SBC definitions for Device Specific Parameter in the␊ |
96 | Mode Sense Header Block.␊ |
97 | @constant kModeSenseSBCDeviceSpecific_DPOFUABit␊ |
98 | Bit to indicate DPO and FUA bits are accepted by the device server.␊ |
99 | @constant kModeSenseSBCDeviceSpecific_WriteProtectBit␊ |
100 | Bit to indicate medium is write protected.␊ |
101 | @constant kModeSenseSBCDeviceSpecific_DPOFUAMask␊ |
102 | Mask to test for kModeSenseSBCDeviceSpecific_DPOFUABit.␊ |
103 | @constant kModeSenseSBCDeviceSpecific_WriteProtectMask␊ |
104 | Mask to test for kModeSenseSBCDeviceSpecific_WriteProtectBit.␊ |
105 | */␊ |
106 | enum␊ |
107 | {␊ |
108 | ␉kModeSenseSBCDeviceSpecific_DPOFUABit␉ ␉␉= 4,␊ |
109 | ␉kModeSenseSBCDeviceSpecific_WriteProtectBit␉ ␉= 7,␊ |
110 | ␉kModeSenseSBCDeviceSpecific_DPOFUAMask ␉␉␉= (1 << kModeSenseSBCDeviceSpecific_DPOFUABit),␊ |
111 | ␉kModeSenseSBCDeviceSpecific_WriteProtectMask ␉= (1 << kModeSenseSBCDeviceSpecific_WriteProtectBit)␊ |
112 | };␊ |
113 | ␊ |
114 | ␊ |
115 | /*!␊ |
116 | @struct ModeParameterBlockDescriptor␊ |
117 | @discussion␊ |
118 | General mode parameter block descriptor.␊ |
119 | */␊ |
120 | typedef struct ModeParameterBlockDescriptor␊ |
121 | {␊ |
122 | ␉UInt8␉␉DENSITY_CODE;␊ |
123 | ␉UInt8␉␉NUMBER_OF_BLOCKS[3];␊ |
124 | ␉UInt8␉␉RESERVED;␊ |
125 | ␉UInt8␉␉BLOCK_LENGTH[3];␊ |
126 | } ModeParameterBlockDescriptor;␊ |
127 | ␊ |
128 | ␊ |
129 | /*!␊ |
130 | @struct DASDModeParameterBlockDescriptor␊ |
131 | @discussion␊ |
132 | Direct Access Storage Device mode parameter block descriptor.␊ |
133 | */␊ |
134 | typedef struct DASDModeParameterBlockDescriptor␊ |
135 | {␊ |
136 | ␉UInt32␉␉NUMBER_OF_BLOCKS;␊ |
137 | ␉UInt8␉␉DENSITY_CODE;␊ |
138 | ␉UInt8␉␉BLOCK_LENGTH[3];␊ |
139 | } DASDModeParameterBlockDescriptor;␊ |
140 | ␊ |
141 | ␊ |
142 | /*!␊ |
143 | @struct LongLBAModeParameterBlockDescriptor␊ |
144 | @discussion␊ |
145 | Long LBA mode parameter block descriptor.␊ |
146 | */␊ |
147 | typedef struct LongLBAModeParameterBlockDescriptor␊ |
148 | {␊ |
149 | ␉UInt64␉␉NUMBER_OF_BLOCKS;␊ |
150 | ␉UInt8␉␉DENSITY_CODE;␊ |
151 | ␉UInt8␉␉RESERVED[3];␊ |
152 | ␉UInt32␉␉BLOCK_LENGTH;␊ |
153 | } LongLBAModeParameterBlockDescriptor;␊ |
154 | ␊ |
155 | ␊ |
156 | /*!␊ |
157 | @struct ModePageFormatHeader␊ |
158 | @discussion␊ |
159 | Mode Page format header.␊ |
160 | */␊ |
161 | typedef struct ModePageFormatHeader␊ |
162 | {␊ |
163 | ␉UInt8␉␉PS_PAGE_CODE;␊ |
164 | ␉UInt8␉␉PAGE_LENGTH;␊ |
165 | } ModePageFormatHeader;␊ |
166 | ␊ |
167 | ␊ |
168 | /*!␊ |
169 | @enum Mode Page Format bit definitions␊ |
170 | @discussion␊ |
171 | Mode Page Format bit definitions.␊ |
172 | @constant kModePageFormat_PS_Bit␊ |
173 | Bit to indicate Parameters Saveable.␊ |
174 | @constant kModePageFormat_PAGE_CODE_Mask␊ |
175 | Mask to obtain the PAGE_CODE from the PS_PAGE_CODE field.␊ |
176 | @constant kModePageFormat_PS_Mask␊ |
177 | Mask to test for kModePageFormat_PS_Bit.␊ |
178 | */␊ |
179 | enum␊ |
180 | {␊ |
181 | ␉kModePageFormat_PS_Bit␉␉␉= 7,␊ |
182 | ␉␊ |
183 | ␉kModePageFormat_PAGE_CODE_Mask␉= 0x3F,␊ |
184 | ␉kModePageFormat_PS_Mask␉␉␉= (1 << kModePageFormat_PS_Bit)␊ |
185 | };␊ |
186 | ␊ |
187 | ␊ |
188 | #if 0␊ |
189 | #pragma mark -␊ |
190 | #pragma mark SPC Mode Pages␊ |
191 | #pragma mark -␊ |
192 | #endif␊ |
193 | ␊ |
194 | ␊ |
195 | /*!␊ |
196 | @enum SPC Mode Pages␊ |
197 | @discussion␊ |
198 | SPC Mode Page definitions.␊ |
199 | @constant kSPCModePagePowerConditionCode␊ |
200 | Power Conditions Mode Page value.␊ |
201 | @constant kSPCModePageAllPagesCode␊ |
202 | All Mode Pages value.␊ |
203 | */␊ |
204 | enum␊ |
205 | {␊ |
206 | ␉kSPCModePagePowerConditionCode␉␉= 0x1A,␊ |
207 | ␉kSPCModePageAllPagesCode␉␉␉= 0x3F␊ |
208 | };␊ |
209 | ␊ |
210 | /*!␊ |
211 | @struct SPCModePagePowerCondition␊ |
212 | @discussion␊ |
213 | Power Conditions Mode Page (PAGE CODE 0x1A) format.␊ |
214 | */␊ |
215 | typedef struct SPCModePagePowerCondition␊ |
216 | {␊ |
217 | ␉ModePageFormatHeader␉header;␊ |
218 | ␉UInt8␉␉␉␉␉RESERVED;␊ |
219 | ␉UInt8␉␉␉␉␉IDLE_STANDBY;␊ |
220 | ␉UInt32␉␉␉␉␉IDLE_CONDITION_TIMER;␊ |
221 | ␉UInt32␉␉␉␉␉STANDBY_CONDITION_TIMER;␊ |
222 | } SPCModePagePowerCondition;␊ |
223 | ␊ |
224 | ␊ |
225 | #if 0␊ |
226 | #pragma mark -␊ |
227 | #pragma mark 0x00 SBC Direct Access Mode Pages␊ |
228 | #pragma mark -␊ |
229 | #endif␊ |
230 | ␊ |
231 | ␊ |
232 | /*!␊ |
233 | @enum SBC Mode Pages␊ |
234 | @discussion␊ |
235 | SBC Mode Page definitions.␊ |
236 | @constant kSBCModePageFormatDeviceCode␊ |
237 | Format Device Mode Page value.␊ |
238 | @constant kSBCModePageRigidDiskGeometryCode␊ |
239 | Rigid Disk Geometry Page value.␊ |
240 | @constant kSBCModePageFlexibleDiskCode␊ |
241 | Flexible Disk Page value.␊ |
242 | @constant kSBCModePageCachingCode␊ |
243 | Caching Page value.␊ |
244 | */␊ |
245 | enum␊ |
246 | {␊ |
247 | ␉kSBCModePageFormatDeviceCode␉␉= 0x03,␊ |
248 | ␉kSBCModePageRigidDiskGeometryCode␉= 0x04,␊ |
249 | ␉kSBCModePageFlexibleDiskCode␉␉= 0x05,␊ |
250 | ␉kSBCModePageCachingCode␉␉␉␉= 0x08␊ |
251 | };␊ |
252 | ␊ |
253 | ␊ |
254 | /*!␊ |
255 | @struct SBCModePageFormatDevice␊ |
256 | @discussion␊ |
257 | Format Device Mode Page (PAGE CODE 0x03) format.␊ |
258 | */␊ |
259 | typedef struct SBCModePageFormatDevice␊ |
260 | {␊ |
261 | ␉ModePageFormatHeader␉header;␊ |
262 | ␉UInt16␉␉␉␉␉TRACKS_PER_ZONE;␊ |
263 | ␉UInt16␉␉␉␉␉ALTERNATE_SECTORS_PER_ZONE;␊ |
264 | ␉UInt16␉␉␉␉␉ALTERNATE_TRACKS_PER_ZONE;␊ |
265 | ␉UInt16␉␉␉␉␉ALTERNATE_TRACKS_PER_LOGICAL_UNIT;␊ |
266 | ␉UInt16␉␉␉␉␉SECTORS_PER_TRACK;␊ |
267 | ␉UInt16␉␉␉␉␉DATA_BYTES_PER_PHYSICAL_SECTOR;␊ |
268 | ␉UInt16␉␉␉␉␉INTERLEAVE;␊ |
269 | ␉UInt16␉␉␉␉␉TRACK_SKEW_FACTOR;␊ |
270 | ␉UInt16␉␉␉␉␉CYLINDER_SKEW_FACTOR;␊ |
271 | ␉UInt8␉␉␉␉␉SSEC_HSEC_RMB_SURF;␊ |
272 | ␉UInt8␉␉␉␉␉RESERVED[3];␊ |
273 | } SBCModePageFormatDevice;␊ |
274 | ␊ |
275 | ␊ |
276 | /*!␊ |
277 | @struct SBCModePageRigidDiskGeometry␊ |
278 | @discussion␊ |
279 | Rigid Disk Geometry Mode Page (PAGE CODE 0x04) format.␊ |
280 | */␊ |
281 | typedef struct SBCModePageRigidDiskGeometry␊ |
282 | {␊ |
283 | ␉ModePageFormatHeader␉header;␊ |
284 | ␉UInt8␉␉␉␉␉NUMBER_OF_CYLINDERS[3];␊ |
285 | ␉UInt8␉␉␉␉␉NUMBER_OF_HEADS;␊ |
286 | ␉UInt8␉␉␉␉␉STARTING_CYLINDER_WRITE_PRECOMPENSATION[3];␊ |
287 | ␉UInt8␉␉␉␉␉STARTING_CYLINDER_REDUCED_WRITE_CURRENT[3];␊ |
288 | ␉UInt16␉␉␉␉␉DEVICE_STEP_RATE;␊ |
289 | ␉UInt8␉␉␉␉␉LANDING_ZONE_CYLINDER[3];␊ |
290 | ␉UInt8␉␉␉␉␉RPL;␊ |
291 | ␉UInt8␉␉␉␉␉ROTATIONAL_OFFSET;␊ |
292 | ␉UInt8␉␉␉␉␉RESERVED;␊ |
293 | ␉UInt16␉␉␉␉␉MEDIUM_ROTATION_RATE;␊ |
294 | ␉UInt8␉␉␉␉␉RESERVED1[2];␊ |
295 | } SBCModePageRigidDiskGeometry;␊ |
296 | ␊ |
297 | ␊ |
298 | /*!␊ |
299 | @enum Rigid Disk Geometry bitfields␊ |
300 | @discussion␊ |
301 | Bit field masks for Rigid Disk Geometry structure fields.␊ |
302 | @constant kSBCModePageRigidDiskGeometry_RPL_Mask␊ |
303 | Mask for use with the RPL field.␊ |
304 | */␊ |
305 | enum␊ |
306 | {␊ |
307 | ␉kSBCModePageRigidDiskGeometry_RPL_Mask␉= 0x03␊ |
308 | };␊ |
309 | ␊ |
310 | ␊ |
311 | /*!␊ |
312 | @struct SBCModePageFlexibleDisk␊ |
313 | @discussion␊ |
314 | Flexible Disk Mode Page (PAGE CODE 0x05) format.␊ |
315 | */␊ |
316 | typedef struct SBCModePageFlexibleDisk␊ |
317 | {␊ |
318 | ␉ModePageFormatHeader␉header;␊ |
319 | ␉UInt16␉␉␉␉␉TRANSFER_RATE;␊ |
320 | ␉UInt8␉␉␉␉␉NUMBER_OF_HEADS;␊ |
321 | ␉UInt8␉␉␉␉␉SECTORS_PER_TRACK;␊ |
322 | ␉UInt16␉␉␉␉␉DATA_BYTES_PER_SECTOR;␊ |
323 | ␉UInt16␉␉␉␉␉NUMBER_OF_CYLINDERS;␊ |
324 | ␉UInt16␉␉␉␉␉STARTING_CYLINDER_WRITE_PRECOMPENSATION;␊ |
325 | ␉UInt16␉␉␉␉␉STARTING_CYLINDER_REDUCED_WRITE_CURRENT;␊ |
326 | ␉UInt16␉␉␉␉␉DEVICE_STEP_RATE;␊ |
327 | ␉UInt8␉␉␉␉␉DEVICE_STEP_PULSE_WIDTH;␊ |
328 | ␉UInt16␉␉␉␉␉HEAD_SETTLE_DELAY;␊ |
329 | ␉UInt8␉␉␉␉␉MOTOR_ON_DELAY;␊ |
330 | ␉UInt8␉␉␉␉␉MOTOR_OFF_DELAY;␊ |
331 | ␉UInt8␉␉␉␉␉TRDY_SSN_MO;␊ |
332 | ␉UInt8␉␉␉␉␉SPC;␊ |
333 | ␉UInt8␉␉␉␉␉WRITE_COMPENSATION;␊ |
334 | ␉UInt8␉␉␉␉␉HEAD_LOAD_DELAY;␊ |
335 | ␉UInt8␉␉␉␉␉HEAD_UNLOAD_DELAY;␊ |
336 | ␉UInt8␉␉␉␉␉PIN_34_PIN_2;␊ |
337 | ␉UInt8␉␉␉␉␉PIN_4_PIN_1;␊ |
338 | ␉UInt16␉␉␉␉␉MEDIUM_ROTATION_RATE;␊ |
339 | ␉UInt8␉␉␉␉␉RESERVED[2];␊ |
340 | } SBCModePageFlexibleDisk;␊ |
341 | ␊ |
342 | ␊ |
343 | /*!␊ |
344 | @enum TRDY_SSN_MO bitfields␊ |
345 | @discussion␊ |
346 | Bit field definitions and masks for Flexible Disk TRDY_SSN_MO field.␊ |
347 | @constant kSBCModePageFlexibleDisk_MO_Bit␊ |
348 | MO Bit definition.␊ |
349 | @constant kSBCModePageFlexibleDisk_SSN_Bit␊ |
350 | SSN Bit definition.␊ |
351 | @constant kSBCModePageFlexibleDisk_TRDY_Bit␊ |
352 | TRDY Bit definition.␊ |
353 | @constant kSBCModePageFlexibleDisk_MO_Mask␊ |
354 | Mask for use with TRDY_SSN_MO field.␊ |
355 | @constant kSBCModePageFlexibleDisk_SSN_Mask␊ |
356 | Mask for use with TRDY_SSN_MO field.␊ |
357 | @constant kSBCModePageFlexibleDisk_TRDY_Mask␊ |
358 | Mask for use with TRDY_SSN_MO field.␊ |
359 | */␊ |
360 | enum␊ |
361 | {␊ |
362 | ␉// Bits 0:4 Reserved␊ |
363 | ␉kSBCModePageFlexibleDisk_MO_Bit␉␉= 5,␊ |
364 | ␉kSBCModePageFlexibleDisk_SSN_Bit␉= 6,␊ |
365 | ␉kSBCModePageFlexibleDisk_TRDY_Bit␉= 7,␊ |
366 | ␉␊ |
367 | ␉kSBCModePageFlexibleDisk_MO_Mask␉= (1 << kSBCModePageFlexibleDisk_MO_Bit),␊ |
368 | ␉kSBCModePageFlexibleDisk_SSN_Mask␉= (1 << kSBCModePageFlexibleDisk_SSN_Bit),␊ |
369 | ␉kSBCModePageFlexibleDisk_TRDY_Mask␉= (1 << kSBCModePageFlexibleDisk_TRDY_Bit)␊ |
370 | };␊ |
371 | ␊ |
372 | ␊ |
373 | /*!␊ |
374 | @enum SPC bitfields␊ |
375 | @discussion␊ |
376 | Bit field definitions and masks for Flexible Disk SPC field.␊ |
377 | @constant kSBCModePageFlexibleDisk_SPC_Mask␊ |
378 | Mask for use with SPC field.␊ |
379 | */␊ |
380 | enum␊ |
381 | {␊ |
382 | ␉kSBCModePageFlexibleDisk_SPC_Mask␉= 0x0F␊ |
383 | };␊ |
384 | ␊ |
385 | ␊ |
386 | /*!␊ |
387 | @enum PIN_34_PIN_2 bitfields␊ |
388 | @discussion␊ |
389 | Bit field definitions and masks for Flexible Disk PIN_34_PIN_2 field.␊ |
390 | @constant kSBCModePageFlexibleDisk_PIN_2_Mask␊ |
391 | Mask for use with PIN_34_PIN_2 field.␊ |
392 | @constant kSBCModePageFlexibleDisk_PIN_34_Mask␊ |
393 | Mask for use with PIN_34_PIN_2 field.␊ |
394 | */␊ |
395 | enum␊ |
396 | {␊ |
397 | ␉kSBCModePageFlexibleDisk_PIN_2_Mask␉␉= 0x0F,␊ |
398 | ␉kSBCModePageFlexibleDisk_PIN_34_Mask␉= 0xF0␊ |
399 | };␊ |
400 | ␊ |
401 | ␊ |
402 | /*!␊ |
403 | @enum PIN_4_PIN_1 bitfields␊ |
404 | @discussion␊ |
405 | Bit field definitions and masks for Flexible Disk PIN_4_PIN_1 field.␊ |
406 | @constant kSBCModePageFlexibleDisk_PIN_1_Mask␊ |
407 | Mask for use with PIN_4_PIN_1 field.␊ |
408 | @constant kSBCModePageFlexibleDisk_PIN_4_Mask␊ |
409 | Mask for use with PIN_4_PIN_1 field.␊ |
410 | */␊ |
411 | enum␊ |
412 | {␊ |
413 | ␉kSBCModePageFlexibleDisk_PIN_1_Mask␉␉= 0x0F,␊ |
414 | ␉kSBCModePageFlexibleDisk_PIN_4_Mask␉␉= 0xF0␊ |
415 | };␊ |
416 | ␊ |
417 | ␊ |
418 | /*!␊ |
419 | @struct SBCModePageCaching␊ |
420 | @discussion␊ |
421 | Caching Mode Page (PAGE CODE 0x08) format.␊ |
422 | */␊ |
423 | typedef struct SBCModePageCaching␊ |
424 | {␊ |
425 | ␉ModePageFormatHeader␉header;␊ |
426 | ␉UInt8␉␉␉␉␉flags;␊ |
427 | ␉UInt8␉␉␉␉␉DEMAND_READ_WRITE_RETENTION_PRIORITY;␊ |
428 | ␉UInt16␉␉␉␉␉DISABLE_PREFETCH_TRANSFER_LENGTH;␊ |
429 | ␉UInt16␉␉␉␉␉MINIMUM_PREFETCH;␊ |
430 | ␉UInt16␉␉␉␉␉MAXIMUM_PREFETCH;␊ |
431 | ␉UInt16␉␉␉␉␉MAXIMUM_PREFETCH_CEILING;␊ |
432 | ␉UInt8␉␉␉␉␉flags2;␊ |
433 | ␉UInt8␉␉␉␉␉NUMBER_OF_CACHE_SEGMENTS;␊ |
434 | ␉UInt16␉␉␉␉␉CACHE_SEGMENT_SIZE;␊ |
435 | ␉UInt8␉␉␉␉␉RESERVED;␊ |
436 | ␉UInt8␉␉␉␉␉NON_CACHE_SEGMENT_SIZE[3];␊ |
437 | } SBCModePageCaching;␊ |
438 | ␊ |
439 | ␊ |
440 | /*!␊ |
441 | @enum Caching flags bitfields␊ |
442 | @discussion␊ |
443 | Bit field definitions and masks for Caching flags field.␊ |
444 | @constant kSBCModePageCaching_RCD_Bit␊ |
445 | RCD Bit definition.␊ |
446 | @constant kSBCModePageCaching_MF_Bit␊ |
447 | MF Bit definition.␊ |
448 | @constant kSBCModePageCaching_WCE_Bit␊ |
449 | WCE Bit definition.␊ |
450 | @constant kSBCModePageCaching_SIZE_Bit␊ |
451 | SIZE Bit definition.␊ |
452 | @constant kSBCModePageCaching_DISC_Bit␊ |
453 | DISC Bit definition.␊ |
454 | @constant kSBCModePageCaching_CAP_Bit␊ |
455 | CAP Bit definition.␊ |
456 | @constant kSBCModePageCaching_ABPF_Bit␊ |
457 | ABPF Bit definition.␊ |
458 | @constant kSBCModePageCaching_IC_Bit␊ |
459 | IC Bit definition.␊ |
460 | @constant kSBCModePageCaching_RCD_Mask␊ |
461 | Mask for use with flags field.␊ |
462 | @constant kSBCModePageCaching_MF_Mask␊ |
463 | Mask for use with flags field.␊ |
464 | @constant kSBCModePageCaching_WCE_Mask␊ |
465 | Mask for use with flags field.␊ |
466 | @constant kSBCModePageCaching_SIZE_Mask␊ |
467 | Mask for use with flags field.␊ |
468 | @constant kSBCModePageCaching_DISC_Mask␊ |
469 | Mask for use with flags field.␊ |
470 | @constant kSBCModePageCaching_CAP_Mask␊ |
471 | Mask for use with flags field.␊ |
472 | @constant kSBCModePageCaching_ABPF_Mask␊ |
473 | Mask for use with flags field.␊ |
474 | @constant kSBCModePageCaching_IC_Mask␊ |
475 | Mask for use with flags field.␊ |
476 | */␊ |
477 | enum␊ |
478 | {␊ |
479 | ␉kSBCModePageCaching_RCD_Bit␉␉= 0,␊ |
480 | ␉kSBCModePageCaching_MF_Bit␉␉= 1,␊ |
481 | ␉kSBCModePageCaching_WCE_Bit␉␉= 2,␊ |
482 | ␉kSBCModePageCaching_SIZE_Bit␉= 3,␊ |
483 | ␉kSBCModePageCaching_DISC_Bit␉= 4,␊ |
484 | ␉kSBCModePageCaching_CAP_Bit␉␉= 5,␊ |
485 | ␉kSBCModePageCaching_ABPF_Bit␉= 6,␊ |
486 | ␉kSBCModePageCaching_IC_Bit␉␉= 7,␊ |
487 | ␊ |
488 | ␉kSBCModePageCaching_RCD_Mask␉= (1 << kSBCModePageCaching_RCD_Bit),␊ |
489 | ␉kSBCModePageCaching_MF_Mask␉␉= (1 << kSBCModePageCaching_MF_Bit),␊ |
490 | ␉kSBCModePageCaching_WCE_Mask␉= (1 << kSBCModePageCaching_WCE_Bit),␊ |
491 | ␉kSBCModePageCaching_SIZE_Mask␉= (1 << kSBCModePageCaching_SIZE_Bit),␊ |
492 | ␉kSBCModePageCaching_DISC_Mask␉= (1 << kSBCModePageCaching_DISC_Bit),␊ |
493 | ␉kSBCModePageCaching_CAP_Mask␉= (1 << kSBCModePageCaching_CAP_Bit),␊ |
494 | ␉kSBCModePageCaching_ABPF_Mask␉= (1 << kSBCModePageCaching_ABPF_Bit),␊ |
495 | ␉kSBCModePageCaching_IC_Mask␉␉= (1 << kSBCModePageCaching_IC_Bit)␊ |
496 | };␊ |
497 | ␊ |
498 | ␊ |
499 | /*!␊ |
500 | @enum Demand Read/Write Retention masks␊ |
501 | @discussion␊ |
502 | Demand Read/Write Retention masks.␊ |
503 | @constant kSBCModePageCaching_DEMAND_WRITE_Mask␊ |
504 | Mask for the DEMAND_READ_WRITE_RETENTION_PRIORITY field.␊ |
505 | @constant kSBCModePageCaching_DEMAND_READ_Mask␊ |
506 | Mask for the DEMAND_READ_WRITE_RETENTION_PRIORITY field.␊ |
507 | */␊ |
508 | enum␊ |
509 | {␊ |
510 | ␉kSBCModePageCaching_DEMAND_WRITE_Mask␉= 0x00FF,␊ |
511 | ␉kSBCModePageCaching_DEMAND_READ_Mask ␉= 0xFF00␊ |
512 | };␊ |
513 | ␊ |
514 | /*!␊ |
515 | @enum Caching flags2 bitfields␊ |
516 | @discussion␊ |
517 | Bit field definitions and masks for Caching flags2 field.␊ |
518 | @constant kSBCModePageCaching_VS1_Bit␊ |
519 | VS1 Bit definition.␊ |
520 | @constant kSBCModePageCaching_VS2_Bit␊ |
521 | VS2 Bit definition.␊ |
522 | @constant kSBCModePageCaching_DRA_Bit␊ |
523 | DRA Bit definition.␊ |
524 | @constant kSBCModePageCaching_LBCSS_Bit␊ |
525 | LBCSS Bit definition.␊ |
526 | @constant kSBCModePageCaching_FSW_Bit␊ |
527 | FSW Bit definition.␊ |
528 | @constant kSBCModePageCaching_VS1_Mask␊ |
529 | Mask for use with flags2 field.␊ |
530 | @constant kSBCModePageCaching_VS2_Mask␊ |
531 | Mask for use with flags2 field.␊ |
532 | @constant kSBCModePageCaching_DRA_Mask␊ |
533 | Mask for use with flags2 field.␊ |
534 | @constant kSBCModePageCaching_LBCSS_Mask␊ |
535 | Mask for use with flags2 field.␊ |
536 | @constant kSBCModePageCaching_FSW_Mask␊ |
537 | Mask for use with flags2 field.␊ |
538 | */␊ |
539 | enum␊ |
540 | {␊ |
541 | ␉// Bits 0:2 Reserved␊ |
542 | ␉kSBCModePageCaching_VS1_Bit␉␉= 3,␊ |
543 | ␉kSBCModePageCaching_VS2_Bit␉␉= 4,␊ |
544 | ␉kSBCModePageCaching_DRA_Bit␉␉= 5,␊ |
545 | ␉kSBCModePageCaching_LBCSS_Bit␉= 6,␊ |
546 | ␉kSBCModePageCaching_FSW_Bit␉␉= 7,␊ |
547 | ␊ |
548 | ␉kSBCModePageCaching_VS1_Mask␉= (1 << kSBCModePageCaching_VS1_Bit),␊ |
549 | ␉kSBCModePageCaching_VS2_Mask␉= (1 << kSBCModePageCaching_VS2_Bit),␊ |
550 | ␉kSBCModePageCaching_DRA_Mask␉= (1 << kSBCModePageCaching_DRA_Bit),␊ |
551 | ␉kSBCModePageCaching_LBCSS_Mask␉= (1 << kSBCModePageCaching_LBCSS_Bit),␊ |
552 | ␉kSBCModePageCaching_FSW_Mask␉= (1 << kSBCModePageCaching_FSW_Bit)␊ |
553 | };␊ |
554 | ␊ |
555 | #pragma options align=reset␊ |
556 | ␊ |
557 | #endif␉/* _IOKIT_SCSI_CMDS_MODE_DEFINITIONS_H_ */␊ |
558 | |