source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/ddk/ata.h@ 1194

Last change on this file since 1194 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 54.4 KB
RevLine 
[1166]1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6
7#ifndef _NTATA_
8#define _NTATA_
9
10#pragma pack(push,1)
11
12typedef struct _IDENTIFY_DEVICE_DATA {
13 struct {
14 USHORT Reserved1 : 1;
15 USHORT Retired3 : 1;
16 USHORT ResponseIncomplete : 1;
17 USHORT Retired2 : 3;
18 USHORT FixedDevice : 1;
19 USHORT RemovableMedia : 1;
20 USHORT Retired1 : 7;
21 USHORT DeviceType : 1;
22 } GeneralConfiguration;
23 USHORT NumCylinders;
24 USHORT SpecificConfiguration;
25 USHORT NumHeads;
26 USHORT Retired1[2];
27 USHORT NumSectorsPerTrack;
28 USHORT VendorUnique1[3];
29 UCHAR SerialNumber[20];
30 USHORT Retired2[2];
31 USHORT Obsolete1;
32 UCHAR FirmwareRevision[8];
33 UCHAR ModelNumber[40];
34 UCHAR MaximumBlockTransfer;
35 UCHAR VendorUnique2;
36 struct {
37 USHORT FeatureSupported : 1;
38 USHORT Reserved : 15;
39 } TrustedComputing;
40 struct {
41 UCHAR CurrentLongPhysicalSectorAlignment : 2;
42 UCHAR ReservedByte49 : 6;
43 UCHAR DmaSupported : 1;
44 UCHAR LbaSupported : 1;
45 UCHAR IordyDisable : 1;
46 UCHAR IordySupported : 1;
47 UCHAR Reserved1 : 1;
48 UCHAR StandybyTimerSupport : 1;
49 UCHAR Reserved2 : 2;
50 USHORT ReservedWord50;
51 } Capabilities;
52 USHORT ObsoleteWords51[2];
53 USHORT TranslationFieldsValid : 3;
54 USHORT Reserved3 : 5;
55 USHORT FreeFallControlSensitivity : 8;
56 USHORT NumberOfCurrentCylinders;
57 USHORT NumberOfCurrentHeads;
58 USHORT CurrentSectorsPerTrack;
59 ULONG CurrentSectorCapacity;
60 UCHAR CurrentMultiSectorSetting;
61 UCHAR MultiSectorSettingValid : 1;
62 UCHAR ReservedByte59 : 3;
63 UCHAR SanitizeFeatureSupported : 1;
64 UCHAR CryptoScrambleExtCommandSupported : 1;
65 UCHAR OverwriteExtCommandSupported : 1;
66 UCHAR BlockEraseExtCommandSupported : 1;
67 ULONG UserAddressableSectors;
68 USHORT ObsoleteWord62;
69 USHORT MultiWordDMASupport : 8;
70 USHORT MultiWordDMAActive : 8;
71 USHORT AdvancedPIOModes : 8;
72 USHORT ReservedByte64 : 8;
73 USHORT MinimumMWXferCycleTime;
74 USHORT RecommendedMWXferCycleTime;
75 USHORT MinimumPIOCycleTime;
76 USHORT MinimumPIOCycleTimeIORDY;
77 struct {
78 USHORT ZonedCapabilities : 2;
79 USHORT NonVolatileWriteCache : 1;
80 USHORT ExtendedUserAddressableSectorsSupported : 1;
81 USHORT DeviceEncryptsAllUserData : 1;
82 USHORT ReadZeroAfterTrimSupported : 1;
83 USHORT Optional28BitCommandsSupported : 1;
84 USHORT IEEE1667 : 1;
85 USHORT DownloadMicrocodeDmaSupported : 1;
86 USHORT SetMaxSetPasswordUnlockDmaSupported : 1;
87 USHORT WriteBufferDmaSupported : 1;
88 USHORT ReadBufferDmaSupported : 1;
89 USHORT DeviceConfigIdentifySetDmaSupported : 1;
90 USHORT LPSAERCSupported : 1;
91 USHORT DeterministicReadAfterTrimSupported : 1;
92 USHORT CFastSpecSupported : 1;
93 } AdditionalSupported;
94 USHORT ReservedWords70[5];
95 USHORT QueueDepth : 5;
96 USHORT ReservedWord75 : 11;
97 struct {
98 USHORT Reserved0 : 1;
99 USHORT SataGen1 : 1;
100 USHORT SataGen2 : 1;
101 USHORT SataGen3 : 1;
102 USHORT Reserved1 : 4;
103 USHORT NCQ : 1;
104 USHORT HIPM : 1;
105 USHORT PhyEvents : 1;
106 USHORT NcqUnload : 1;
107 USHORT NcqPriority : 1;
108 USHORT HostAutoPS : 1;
109 USHORT DeviceAutoPS : 1;
110 USHORT ReadLogDMA : 1;
111 USHORT Reserved2 : 1;
112 USHORT CurrentSpeed : 3;
113 USHORT NcqStreaming : 1;
114 USHORT NcqQueueMgmt : 1;
115 USHORT NcqReceiveSend : 1;
116 USHORT DEVSLPtoReducedPwrState : 1;
117 USHORT Reserved3 : 8;
118 } SerialAtaCapabilities;
119 struct {
120 USHORT Reserved0 : 1;
121 USHORT NonZeroOffsets : 1;
122 USHORT DmaSetupAutoActivate : 1;
123 USHORT DIPM : 1;
124 USHORT InOrderData : 1;
125 USHORT HardwareFeatureControl : 1;
126 USHORT SoftwareSettingsPreservation : 1;
127 USHORT NCQAutosense : 1;
128 USHORT DEVSLP : 1;
129 USHORT HybridInformation : 1;
130 USHORT Reserved1 : 6;
131 } SerialAtaFeaturesSupported;
132 struct {
133 USHORT Reserved0 : 1;
134 USHORT NonZeroOffsets : 1;
135 USHORT DmaSetupAutoActivate : 1;
136 USHORT DIPM : 1;
137 USHORT InOrderData : 1;
138 USHORT HardwareFeatureControl : 1;
139 USHORT SoftwareSettingsPreservation : 1;
140 USHORT DeviceAutoPS : 1;
141 USHORT DEVSLP : 1;
142 USHORT HybridInformation : 1;
143 USHORT Reserved1 : 6;
144 } SerialAtaFeaturesEnabled;
145 USHORT MajorRevision;
146 USHORT MinorRevision;
147 struct {
148 USHORT SmartCommands : 1;
149 USHORT SecurityMode : 1;
150 USHORT RemovableMediaFeature : 1;
151 USHORT PowerManagement : 1;
152 USHORT Reserved1 : 1;
153 USHORT WriteCache : 1;
154 USHORT LookAhead : 1;
155 USHORT ReleaseInterrupt : 1;
156 USHORT ServiceInterrupt : 1;
157 USHORT DeviceReset : 1;
158 USHORT HostProtectedArea : 1;
159 USHORT Obsolete1 : 1;
160 USHORT WriteBuffer : 1;
161 USHORT ReadBuffer : 1;
162 USHORT Nop : 1;
163 USHORT Obsolete2 : 1;
164 USHORT DownloadMicrocode : 1;
165 USHORT DmaQueued : 1;
166 USHORT Cfa : 1;
167 USHORT AdvancedPm : 1;
168 USHORT Msn : 1;
169 USHORT PowerUpInStandby : 1;
170 USHORT ManualPowerUp : 1;
171 USHORT Reserved2 : 1;
172 USHORT SetMax : 1;
173 USHORT Acoustics : 1;
174 USHORT BigLba : 1;
175 USHORT DeviceConfigOverlay : 1;
176 USHORT FlushCache : 1;
177 USHORT FlushCacheExt : 1;
178 USHORT WordValid83 : 2;
179 USHORT SmartErrorLog : 1;
180 USHORT SmartSelfTest : 1;
181 USHORT MediaSerialNumber : 1;
182 USHORT MediaCardPassThrough : 1;
183 USHORT StreamingFeature : 1;
184 USHORT GpLogging : 1;
185 USHORT WriteFua : 1;
186 USHORT WriteQueuedFua : 1;
187 USHORT WWN64Bit : 1;
188 USHORT URGReadStream : 1;
189 USHORT URGWriteStream : 1;
190 USHORT ReservedForTechReport : 2;
191 USHORT IdleWithUnloadFeature : 1;
192 USHORT WordValid : 2;
193 } CommandSetSupport;
194 struct {
195 USHORT SmartCommands : 1;
196 USHORT SecurityMode : 1;
197 USHORT RemovableMediaFeature : 1;
198 USHORT PowerManagement : 1;
199 USHORT Reserved1 : 1;
200 USHORT WriteCache : 1;
201 USHORT LookAhead : 1;
202 USHORT ReleaseInterrupt : 1;
203 USHORT ServiceInterrupt : 1;
204 USHORT DeviceReset : 1;
205 USHORT HostProtectedArea : 1;
206 USHORT Obsolete1 : 1;
207 USHORT WriteBuffer : 1;
208 USHORT ReadBuffer : 1;
209 USHORT Nop : 1;
210 USHORT Obsolete2 : 1;
211 USHORT DownloadMicrocode : 1;
212 USHORT DmaQueued : 1;
213 USHORT Cfa : 1;
214 USHORT AdvancedPm : 1;
215 USHORT Msn : 1;
216 USHORT PowerUpInStandby : 1;
217 USHORT ManualPowerUp : 1;
218 USHORT Reserved2 : 1;
219 USHORT SetMax : 1;
220 USHORT Acoustics : 1;
221 USHORT BigLba : 1;
222 USHORT DeviceConfigOverlay : 1;
223 USHORT FlushCache : 1;
224 USHORT FlushCacheExt : 1;
225 USHORT Resrved3 : 1;
226 USHORT Words119_120Valid : 1;
227 USHORT SmartErrorLog : 1;
228 USHORT SmartSelfTest : 1;
229 USHORT MediaSerialNumber : 1;
230 USHORT MediaCardPassThrough : 1;
231 USHORT StreamingFeature : 1;
232 USHORT GpLogging : 1;
233 USHORT WriteFua : 1;
234 USHORT WriteQueuedFua : 1;
235 USHORT WWN64Bit : 1;
236 USHORT URGReadStream : 1;
237 USHORT URGWriteStream : 1;
238 USHORT ReservedForTechReport : 2;
239 USHORT IdleWithUnloadFeature : 1;
240 USHORT Reserved4 : 2;
241 } CommandSetActive;
242 USHORT UltraDMASupport : 8;
243 USHORT UltraDMAActive : 8;
244 struct {
245 USHORT TimeRequired : 15;
246 USHORT ExtendedTimeReported : 1;
247 } NormalSecurityEraseUnit;
248 struct {
249 USHORT TimeRequired : 15;
250 USHORT ExtendedTimeReported : 1;
251 } EnhancedSecurityEraseUnit;
252 USHORT CurrentAPMLevel : 8;
253 USHORT ReservedWord91 : 8;
254 USHORT MasterPasswordID;
255 USHORT HardwareResetResult;
256 USHORT CurrentAcousticValue : 8;
257 USHORT RecommendedAcousticValue : 8;
258 USHORT StreamMinRequestSize;
259 USHORT StreamingTransferTimeDMA;
260 USHORT StreamingAccessLatencyDMAPIO;
261 ULONG StreamingPerfGranularity;
262 ULONG Max48BitLBA[2];
263 USHORT StreamingTransferTime;
264 USHORT DsmCap;
265 struct {
266 USHORT LogicalSectorsPerPhysicalSector : 4;
267 USHORT Reserved0 : 8;
268 USHORT LogicalSectorLongerThan256Words : 1;
269 USHORT MultipleLogicalSectorsPerPhysicalSector : 1;
270 USHORT Reserved1 : 2;
271 } PhysicalLogicalSectorSize;
272 USHORT InterSeekDelay;
273 USHORT WorldWideName[4];
274 USHORT ReservedForWorldWideName128[4];
275 USHORT ReservedForTlcTechnicalReport;
276 USHORT WordsPerLogicalSector[2];
277 struct {
278 USHORT ReservedForDrqTechnicalReport : 1;
279 USHORT WriteReadVerify : 1;
280 USHORT WriteUncorrectableExt : 1;
281 USHORT ReadWriteLogDmaExt : 1;
282 USHORT DownloadMicrocodeMode3 : 1;
283 USHORT FreefallControl : 1;
284 USHORT SenseDataReporting : 1;
285 USHORT ExtendedPowerConditions : 1;
286 USHORT Reserved0 : 6;
287 USHORT WordValid : 2;
288 } CommandSetSupportExt;
289 struct {
290 USHORT ReservedForDrqTechnicalReport : 1;
291 USHORT WriteReadVerify : 1;
292 USHORT WriteUncorrectableExt : 1;
293 USHORT ReadWriteLogDmaExt : 1;
294 USHORT DownloadMicrocodeMode3 : 1;
295 USHORT FreefallControl : 1;
296 USHORT SenseDataReporting : 1;
297 USHORT ExtendedPowerConditions : 1;
298 USHORT Reserved0 : 6;
299 USHORT Reserved1 : 2;
300 } CommandSetActiveExt;
301 USHORT ReservedForExpandedSupportandActive[6];
302 USHORT MsnSupport : 2;
303 USHORT ReservedWord127 : 14;
304 struct {
305 USHORT SecuritySupported : 1;
306 USHORT SecurityEnabled : 1;
307 USHORT SecurityLocked : 1;
308 USHORT SecurityFrozen : 1;
309 USHORT SecurityCountExpired : 1;
310 USHORT EnhancedSecurityEraseSupported : 1;
311 USHORT Reserved0 : 2;
312 USHORT SecurityLevel : 1;
313 USHORT Reserved1 : 7;
314 } SecurityStatus;
315 USHORT ReservedWord129[31];
316 struct {
317 USHORT MaximumCurrentInMA : 12;
318 USHORT CfaPowerMode1Disabled : 1;
319 USHORT CfaPowerMode1Required : 1;
320 USHORT Reserved0 : 1;
321 USHORT Word160Supported : 1;
322 } CfaPowerMode1;
323 USHORT ReservedForCfaWord161[7];
324 USHORT NominalFormFactor : 4;
325 USHORT ReservedWord168 : 12;
326 struct {
327 USHORT SupportsTrim : 1;
328 USHORT Reserved0 : 15;
329 } DataSetManagementFeature;
330 USHORT AdditionalProductID[4];
331 USHORT ReservedForCfaWord174[2];
332 USHORT CurrentMediaSerialNumber[30];
333 struct {
334 USHORT Supported : 1;
335 USHORT Reserved0 : 1;
336 USHORT WriteSameSuported : 1;
337 USHORT ErrorRecoveryControlSupported : 1;
338 USHORT FeatureControlSuported : 1;
339 USHORT DataTablesSuported : 1;
340 USHORT Reserved1 : 6;
341 USHORT VendorSpecific : 4;
342 } SCTCommandTransport;
343 USHORT ReservedWord207[2];
344 struct {
345 USHORT AlignmentOfLogicalWithinPhysical : 14;
346 USHORT Word209Supported : 1;
347 USHORT Reserved0 : 1;
348 } BlockAlignment;
349 USHORT WriteReadVerifySectorCountMode3Only[2];
350 USHORT WriteReadVerifySectorCountMode2Only[2];
351 struct {
352 USHORT NVCachePowerModeEnabled : 1;
353 USHORT Reserved0 : 3;
354 USHORT NVCacheFeatureSetEnabled : 1;
355 USHORT Reserved1 : 3;
356 USHORT NVCachePowerModeVersion : 4;
357 USHORT NVCacheFeatureSetVersion : 4;
358 } NVCacheCapabilities;
359 USHORT NVCacheSizeLSW;
360 USHORT NVCacheSizeMSW;
361 USHORT NominalMediaRotationRate;
362 USHORT ReservedWord218;
363 struct {
364 UCHAR NVCacheEstimatedTimeToSpinUpInSeconds;
365 UCHAR Reserved;
366 } NVCacheOptions;
367 USHORT WriteReadVerifySectorCountMode : 8;
368 USHORT ReservedWord220 : 8;
369 USHORT ReservedWord221;
370 struct {
371 USHORT MajorVersion : 12;
372 USHORT TransportType : 4;
373 } TransportMajorVersion;
374 USHORT TransportMinorVersion;
375 USHORT ReservedWord224[6];
376 ULONG ExtendedNumberOfUserAddressableSectors[2];
377 USHORT MinBlocksPerDownloadMicrocodeMode03;
378 USHORT MaxBlocksPerDownloadMicrocodeMode03;
379 USHORT ReservedWord236[19];
380 USHORT Signature : 8;
381 USHORT CheckSum : 8;
382} IDENTIFY_DEVICE_DATA, *PIDENTIFY_DEVICE_DATA;
383
384typedef struct _IDENTIFY_PACKET_DATA {
385 struct {
386 USHORT PacketType : 2;
387 USHORT IncompleteResponse : 1;
388 USHORT Reserved1 : 2;
389 USHORT DrqDelay : 2;
390 USHORT RemovableMedia : 1;
391 USHORT CommandPacketType : 5;
392 USHORT Reserved2 : 1;
393 USHORT DeviceType : 2;
394 } GeneralConfiguration;
395 USHORT ResevedWord1;
396 USHORT UniqueConfiguration;
397 USHORT ReservedWords3[7];
398 UCHAR SerialNumber[20];
399 USHORT ReservedWords20[3];
400 UCHAR FirmwareRevision[8];
401 UCHAR ModelNumber[40];
402 USHORT ReservedWords47[2];
403 struct {
404 USHORT VendorSpecific : 8;
405 USHORT DmaSupported : 1;
406 USHORT LbaSupported : 1;
407 USHORT IordyDisabled : 1;
408 USHORT IordySupported : 1;
409 USHORT Obsolete : 1;
410 USHORT OverlapSupported : 1;
411 USHORT QueuedCommandsSupported : 1;
412 USHORT InterleavedDmaSupported : 1;
413 USHORT DeviceSpecificStandbyTimerValueMin : 1;
414 USHORT Obsolete1 : 1;
415 USHORT ReservedWord50 : 12;
416 USHORT WordValid : 2;
417 } Capabilities;
418 USHORT ObsoleteWords51[2];
419 USHORT TranslationFieldsValid : 3;
420 USHORT Reserved3 : 13;
421 USHORT ReservedWords54[8];
422 struct {
423 USHORT UDMA0Supported : 1;
424 USHORT UDMA1Supported : 1;
425 USHORT UDMA2Supported : 1;
426 USHORT UDMA3Supported : 1;
427 USHORT UDMA4Supported : 1;
428 USHORT UDMA5Supported : 1;
429 USHORT UDMA6Supported : 1;
430 USHORT MDMA0Supported : 1;
431 USHORT MDMA1Supported : 1;
432 USHORT MDMA2Supported : 1;
433 USHORT DMASupported : 1;
434 USHORT ReservedWord62 : 4;
435 USHORT DMADIRBitRequired : 1;
436 } DMADIR;
437 USHORT MultiWordDMASupport : 8;
438 USHORT MultiWordDMAActive : 8;
439 USHORT AdvancedPIOModes : 8;
440 USHORT ReservedByte64 : 8;
441 USHORT MinimumMWXferCycleTime;
442 USHORT RecommendedMWXferCycleTime;
443 USHORT MinimumPIOCycleTime;
444 USHORT MinimumPIOCycleTimeIORDY;
445 USHORT ReservedWords69[2];
446 USHORT BusReleaseDelay;
447 USHORT ServiceCommandDelay;
448 USHORT ReservedWords73[2];
449 USHORT QueueDepth : 5;
450 USHORT ReservedWord75 : 11;
451 struct {
452 USHORT Reserved0 : 1;
453 USHORT SataGen1 : 1;
454 USHORT SataGen2 : 1;
455 USHORT SataGen3 : 1;
456 USHORT Reserved1 : 5;
457 USHORT HIPM : 1;
458 USHORT PhyEvents : 1;
459 USHORT Reserved3 : 2;
460 USHORT HostAutoPS : 1;
461 USHORT DeviceAutoPS : 1;
462 USHORT Reserved4 : 1;
463 USHORT Reserved5 : 1;
464 USHORT CurrentSpeed : 3;
465 USHORT SlimlineDeviceAttention : 1;
466 USHORT HostEnvironmentDetect : 1;
467 USHORT Reserved : 10;
468 } SerialAtaCapabilities;
469 struct {
470 USHORT Reserved0 : 1;
471 USHORT Reserved1 : 2;
472 USHORT DIPM : 1;
473 USHORT Reserved2 : 1;
474 USHORT AsynchronousNotification : 1;
475 USHORT SoftwareSettingsPreservation : 1;
476 USHORT Reserved3 : 9;
477 } SerialAtaFeaturesSupported;
478 struct {
479 USHORT Reserved0 : 1;
480 USHORT Reserved1 : 2;
481 USHORT DIPM : 1;
482 USHORT Reserved2 : 1;
483 USHORT AsynchronousNotification : 1;
484 USHORT SoftwareSettingsPreservation : 1;
485 USHORT DeviceAutoPS : 1;
486 USHORT Reserved3 : 8;
487 } SerialAtaFeaturesEnabled;
488 USHORT MajorRevision;
489 USHORT MinorRevision;
490 struct {
491 USHORT SmartCommands : 1;
492 USHORT SecurityMode : 1;
493 USHORT RemovableMedia : 1;
494 USHORT PowerManagement : 1;
495 USHORT PacketCommands : 1;
496 USHORT WriteCache : 1;
497 USHORT LookAhead : 1;
498 USHORT ReleaseInterrupt : 1;
499 USHORT ServiceInterrupt : 1;
500 USHORT DeviceReset : 1;
501 USHORT HostProtectedArea : 1;
502 USHORT Obsolete1 : 1;
503 USHORT WriteBuffer : 1;
504 USHORT ReadBuffer : 1;
505 USHORT Nop : 1;
506 USHORT Obsolete2 : 1;
507 USHORT DownloadMicrocode : 1;
508 USHORT Reserved1 : 2;
509 USHORT AdvancedPm : 1;
510 USHORT Msn : 1;
511 USHORT PowerUpInStandby : 1;
512 USHORT ManualPowerUp : 1;
513 USHORT Reserved2 : 1;
514 USHORT SetMax : 1;
515 USHORT Reserved3 : 3;
516 USHORT FlushCache : 1;
517 USHORT Reserved4 : 1;
518 USHORT WordValid : 2;
519 } CommandSetSupport;
520 struct {
521 USHORT Reserved0 : 5;
522 USHORT GpLogging : 1;
523 USHORT Reserved1 : 2;
524 USHORT WWN64Bit : 1;
525 USHORT Reserved2 : 5;
526 USHORT WordValid : 2;
527 } CommandSetSupportExt;
528 struct {
529 USHORT SmartCommands : 1;
530 USHORT SecurityMode : 1;
531 USHORT RemovableMedia : 1;
532 USHORT PowerManagement : 1;
533 USHORT PacketCommands : 1;
534 USHORT WriteCache : 1;
535 USHORT LookAhead : 1;
536 USHORT ReleaseInterrupt : 1;
537 USHORT ServiceInterrupt : 1;
538 USHORT DeviceReset : 1;
539 USHORT HostProtectedArea : 1;
540 USHORT Obsolete1 : 1;
541 USHORT WriteBuffer : 1;
542 USHORT ReadBuffer : 1;
543 USHORT Nop : 1;
544 USHORT Obsolete2 : 1;
545 USHORT DownloadMicrocode : 1;
546 USHORT Reserved1 : 2;
547 USHORT AdvancedPm : 1;
548 USHORT Msn : 1;
549 USHORT PowerUpInStandby : 1;
550 USHORT ManualPowerUp : 1;
551 USHORT Reserved2 : 1;
552 USHORT SetMax : 1;
553 USHORT Reserved3 : 3;
554 USHORT FlushCache : 1;
555 USHORT Reserved : 3;
556 } CommandSetActive;
557 struct {
558 USHORT Reserved0 : 5;
559 USHORT GpLogging : 1;
560 USHORT Reserved1 : 2;
561 USHORT WWN64Bit : 1;
562 USHORT Reserved2 : 5;
563 USHORT WordValid : 2;
564 } CommandSetActiveExt;
565 USHORT UltraDMASupport : 8;
566 USHORT UltraDMAActive : 8;
567 USHORT TimeRequiredForNormalEraseModeSecurityEraseUnit;
568 USHORT TimeRequiredForEnhancedEraseModeSecurityEraseUnit;
569 USHORT CurrentAPMLevel;
570 USHORT MasterPasswordID;
571 USHORT HardwareResetResult;
572 USHORT ReservedWords94[14];
573 USHORT WorldWideName[4];
574 USHORT ReservedWords112[13];
575 USHORT AtapiZeroByteCount;
576 USHORT ReservedWord126;
577 USHORT MsnSupport : 2;
578 USHORT ReservedWord127 : 14;
579 USHORT SecurityStatus;
580 USHORT VendorSpecific[31];
581 USHORT ReservedWord160[16];
582 USHORT ReservedWord176[46];
583 struct {
584 USHORT MajorVersion : 12;
585 USHORT TransportType : 4;
586 } TransportMajorVersion;
587 USHORT TransportMinorVersion;
588 USHORT ReservedWord224[31];
589 USHORT Signature : 8;
590 USHORT CheckSum : 8;
591} IDENTIFY_PACKET_DATA, *PIDENTIFY_PACKET_DATA;
592
593typedef struct _REGISTER_FIS {
594 UCHAR FisType;
595 UCHAR Reserved0 : 7;
596 UCHAR CmdReg : 1;
597 UCHAR Command;
598 UCHAR Features;
599 UCHAR SectorNumber;
600 UCHAR CylinderLow;
601 UCHAR CylinderHigh;
602 UCHAR DeviceHead;
603 UCHAR SectorNumberExp;
604 UCHAR CylinderLowExp;
605 UCHAR CylinderHighExp;
606 UCHAR FeaturesExp;
607 UCHAR SectorCount;
608 UCHAR SectorCountExp;
609 UCHAR Reserved2;
610 UCHAR Control;
611 ULONG Reserved3;
612} REGISTER_FIS, *PREGISTER_FIS;
613
614typedef union _ATA_HYBRID_INFO_FIELDS {
615 _ANONYMOUS_STRUCT struct {
616 UCHAR HybridPriority : 4;
617 UCHAR Reserved0 : 1;
618 UCHAR InfoValid : 1;
619 UCHAR Reserved1 : 2;
620 } DUMMYSTRUCTNAME;
621 UCHAR AsUchar;
622} ATA_HYBRID_INFO_FIELDS, *PATA_HYBRID_INFO_FIELDS;
623
624typedef struct _DEVICE_SET_PASSWORD {
625 struct {
626 USHORT PasswordIdentifier : 1;
627 USHORT Reserved1 : 7;
628 USHORT MasterPasswordCapability : 1;
629 USHORT Reserved2 : 7;
630 } ControlWord;
631 USHORT Password[16];
632 USHORT MasterPasswordIdentifier;
633 USHORT Reserved[238];
634} DEVICE_SET_PASSWORD, *PDEVICE_SET_PASSWORD;
635
636typedef struct _IDENTIFY_DEVICE_DATA_LOG_PAGE_HEADER {
637 ULONGLONG RevisionNumber : 16;
638 ULONGLONG PageNumber : 8;
639 ULONGLONG Reserved : 39;
640 ULONGLONG Valid : 1;
641} IDENTIFY_DEVICE_DATA_LOG_PAGE_HEADER, *PIDENTIFY_DEVICE_DATA_LOG_PAGE_HEADER;
642
643typedef struct _IDENTIFY_DEVICE_DATA_LOG_PAGE_SUPPORTED_CAPABILITIES {
644 IDENTIFY_DEVICE_DATA_LOG_PAGE_HEADER Header;
645 struct {
646 ULONGLONG WRV : 1;
647 ULONGLONG WriteUncorrectable : 1;
648 ULONGLONG GplDma : 1;
649 ULONGLONG DmMode3 : 1;
650 ULONGLONG FreeFall : 1;
651 ULONGLONG SenseData : 1;
652 ULONGLONG EPC : 1;
653 ULONGLONG SmartErrorLogging : 1;
654 ULONGLONG SmartSelfTest : 1;
655 ULONGLONG Reserved9 : 1;
656 ULONGLONG Streaming : 1;
657 ULONGLONG GPL : 1;
658 ULONGLONG WriteFuaExt : 1;
659 ULONGLONG Unload : 1;
660 ULONGLONG DownloadMicrocode : 1;
661 ULONGLONG Reserved15ForCFA : 1;
662 ULONGLONG APM : 1;
663 ULONGLONG PUIS : 1;
664 ULONGLONG SpinUp : 1;
665 ULONGLONG Reserved19 : 1;
666 ULONGLONG Cmd48Bit : 1;
667 ULONGLONG Reserved21 : 1;
668 ULONGLONG FlushCacheExt : 1;
669 ULONGLONG Smart : 1;
670 ULONGLONG VolatileWriteCache : 1;
671 ULONGLONG ReadLookahead : 1;
672 ULONGLONG Reserved26 : 1;
673 ULONGLONG WriteBuffer : 1;
674 ULONGLONG ReadBuffer : 1;
675 ULONGLONG NOP : 1;
676 ULONGLONG Reserved30 : 1;
677 ULONGLONG RZAT : 1;
678 ULONGLONG Cmd28bit : 1;
679 ULONGLONG DownloadMicrocodeDma : 1;
680 ULONGLONG Reserved34 : 1;
681 ULONGLONG WriteBufferDma : 1;
682 ULONGLONG ReadBufferDma : 1;
683 ULONGLONG Reserved37 : 1;
684 ULONGLONG LpsMisalignmentReporting : 1;
685 ULONGLONG DRAT : 1;
686 ULONGLONG Reserved40ForCFA : 1;
687 ULONGLONG AmaxAddr : 1;
688 ULONGLONG SetEpcPowerSource : 1;
689 ULONGLONG LowPowerStandby : 1;
690 ULONGLONG DSN : 1;
691 ULONGLONG RequestSenseDeviceFault : 1;
692 ULONGLONG Reserved : 17;
693 ULONGLONG Valid : 1;
694 } SupportedCapabilities;
695 struct {
696 ULONGLONG DmMinTransferSize : 16;
697 ULONGLONG DmMaxTransferSize : 16;
698 ULONGLONG DmOffsetsImmediateSupported : 1;
699 ULONGLONG DmImmediateSupported : 1;
700 ULONGLONG DmOffsetsDeferredSupported : 1;
701 ULONGLONG Reserved : 28;
702 ULONGLONG Valid : 1;
703 } DownloadMicrocodeCapabilities;
704 struct {
705 ULONGLONG Rate : 16;
706 ULONGLONG Reserved : 47;
707 ULONGLONG Valid : 1;
708 } NominalMediaRotationRate;
709 struct {
710 ULONGLONG Factor : 4;
711 ULONGLONG Reserved : 59;
712 ULONGLONG Valid : 1;
713 } NominalFormFactor;
714 struct {
715 ULONGLONG Count : 32;
716 ULONGLONG Reserved : 31;
717 ULONGLONG Valid : 1;
718 } WRVSectorCountMode3;
719 struct {
720 ULONGLONG Count : 32;
721 ULONGLONG Reserved : 31;
722 ULONGLONG Valid : 1;
723 } WRVSectorCountMode2;
724 struct {
725 ULONGLONG Name;
726 ULONGLONG Reserved : 63;
727 ULONGLONG Valid : 1;
728 } WorldWideName;
729 struct {
730 ULONGLONG TrimSupported : 1;
731 ULONGLONG Reserved : 62;
732 ULONGLONG Valid : 1;
733 } DataSetManagement;
734 struct {
735 ULONGLONG UtilizationA : 32;
736 ULONGLONG UtilizationB : 32;
737 ULONGLONG Reserved0 : 32;
738 ULONGLONG UtilizationInterval : 8;
739 ULONGLONG UtilizationUnit : 8;
740 ULONGLONG UtilizationType : 8;
741 ULONGLONG Reserved1 : 7;
742 ULONGLONG Valid : 1;
743 } UtilizationPerUnitTime;
744 struct {
745 ULONGLONG DateTimeRateBasisSupported : 1;
746 ULONGLONG Reserved0 : 3;
747 ULONGLONG PowerOnHoursRateBasisSupported : 1;
748 ULONGLONG Reserved1 : 3;
749 ULONGLONG SincePowerOnRateBasisSupported : 1;
750 ULONGLONG Reserved2 : 14;
751 ULONGLONG SettingRateBasisSupported : 1;
752 ULONGLONG Reserved3 : 39;
753 ULONGLONG Valid : 1;
754 } UtilizationUsageRateSupport;
755 struct {
756 ULONGLONG Zoned : 2;
757 ULONGLONG Reserved : 61;
758 ULONGLONG Valid : 1;
759 } ZonedCapabilities;
760 struct {
761 ULONGLONG ReportZonesExtSupported : 1;
762 ULONGLONG NonDataOpenZoneExtSupported : 1;
763 ULONGLONG NonDataCloseZoneExtSupported : 1;
764 ULONGLONG NonDataFinishZoneExtSupported : 1;
765 ULONGLONG NonDataResetWritePointersExtSupported : 1;
766 ULONGLONG Reserved : 58;
767 ULONGLONG Valid : 1;
768 } SupportedZacCapabilities;
769 UCHAR Reserved[392];
770} IDENTIFY_DEVICE_DATA_LOG_PAGE_SUPPORTED_CAPABILITIES, *PIDENTIFY_DEVICE_DATA_LOG_PAGE_SUPPORTED_CAPABILITIES;
771
772typedef struct _IDENTIFY_DEVICE_DATA_LOG_PAGE_ZONED_DEVICE_INFO {
773 IDENTIFY_DEVICE_DATA_LOG_PAGE_HEADER Header;
774 struct {
775 ULONGLONG URSWRZ : 1;
776 ULONGLONG Reserved : 62;
777 ULONGLONG Valid : 1;
778 } ZonedDeviceCapabilities;
779 struct {
780 ULONGLONG Reserved : 63;
781 ULONGLONG Valid : 1;
782 } ZonedDeviceSettings;
783 struct {
784 ULONGLONG Number : 32;
785 ULONGLONG Reserved : 31;
786 ULONGLONG Valid : 1;
787 } OptimalNumberOfOpenSequentialWritePreferredZones;
788 struct {
789 ULONGLONG Number : 32;
790 ULONGLONG Reserved : 31;
791 ULONGLONG Valid : 1;
792 } OptimalNumberOfNonSequentiallyWrittenSequentialWritePreferredZones;
793 struct {
794 ULONGLONG Number : 32;
795 ULONGLONG Reserved : 31;
796 ULONGLONG Valid : 1;
797 } MaxNumberOfOpenSequentialWriteRequiredZones;
798 struct {
799 ULONGLONG ZacMinorVersion : 16;
800 ULONGLONG Reserved0 : 47;
801 ULONGLONG Valid : 1;
802 } Version;
803 UCHAR Reserved[456];
804} IDENTIFY_DEVICE_DATA_LOG_PAGE_ZONED_DEVICE_INFO, *PIDENTIFY_DEVICE_DATA_LOG_PAGE_ZONED_DEVICE_INFO;
805
806typedef struct _CURRENT_DEVICE_INTERNAL_STATUS_LOG {
807 UCHAR LogAddress;
808 UCHAR Reserved0[3];
809 ULONG OrganizationID;
810 USHORT Area1LastLogPage;
811 USHORT Area2LastLogPage;
812 USHORT Area3LastLogPage;
813 UCHAR Reserved2[368];
814 UCHAR SavedDataAvailable;
815 UCHAR SavedDataGenerationNumber;
816 UCHAR ReasonIdentifier[128];
817} CURRENT_DEVICE_INTERNAL_STATUS_LOG, *PCURRENT_DEVICE_INTERNAL_STATUS_LOG;
818
819typedef struct _SAVED_DEVICE_INTERNAL_STATUS_LOG {
820 UCHAR LogAddress;
821 UCHAR Reserved0[3];
822 ULONG OrganizationID;
823 USHORT Area1LastLogPage;
824 USHORT Area2LastLogPage;
825 USHORT Area3LastLogPage;
826 UCHAR Reserved2[368];
827 UCHAR SavedDataAvailable;
828 UCHAR GenerationNumber;
829 UCHAR ReasonIdentifier[128];
830} SAVED_DEVICE_INTERNAL_STATUS_LOG, *PSAVED_DEVICE_INTERNAL_STATUS_LOG;
831
832typedef struct _DEVICE_STATISTICS_LOG_PAGE_HEADER {
833 ULONGLONG RevisionNumber : 16;
834 ULONGLONG PageNumber : 8;
835 ULONGLONG Reserved : 40;
836} DEVICE_STATISTICS_LOG_PAGE_HEADER, *PDEVICE_STATISTICS_LOG_PAGE_HEADER;
837
838typedef struct _GP_LOG_SUPPORTED_DEVICE_STATISTICS {
839 DEVICE_STATISTICS_LOG_PAGE_HEADER Header;
840 UCHAR NumberOfEntries;
841 UCHAR LogPageNumbers[503];
842} GP_LOG_SUPPORTED_DEVICE_STATISTICS, *PGP_LOG_SUPPORTED_DEVICE_STATISTICS;
843
844typedef struct _GP_LOG_GENERAL_STATISTICS {
845 DEVICE_STATISTICS_LOG_PAGE_HEADER Header;
846 struct {
847 ULONGLONG Count : 32;
848 ULONGLONG Reserved : 24;
849 ULONGLONG ReservedFlags : 3;
850 ULONGLONG MonitoredConditionMet : 1;
851 ULONGLONG StatisticsSupportsDsn : 1;
852 ULONGLONG Normalized : 1;
853 ULONGLONG ValidValue : 1;
854 ULONGLONG Supported : 1;
855 } LifeTimePoweronResets;
856 struct {
857 ULONGLONG Count : 32;
858 ULONGLONG Reserved : 24;
859 ULONGLONG ReservedFlags : 3;
860 ULONGLONG MonitoredConditionMet : 1;
861 ULONGLONG StatisticsSupportsDsn : 1;
862 ULONGLONG Normalized : 1;
863 ULONGLONG ValidValue : 1;
864 ULONGLONG Supported : 1;
865 } PoweronHours;
866 struct {
867 ULONGLONG Count : 48;
868 ULONGLONG Reserved : 8;
869 ULONGLONG ReservedFlags : 3;
870 ULONGLONG MonitoredConditionMet : 1;
871 ULONGLONG StatisticsSupportsDsn : 1;
872 ULONGLONG Normalized : 1;
873 ULONGLONG ValidValue : 1;
874 ULONGLONG Supported : 1;
875 } LogicalSectorsWritten;
876 struct {
877 ULONGLONG Count : 48;
878 ULONGLONG Reserved : 8;
879 ULONGLONG ReservedFlags : 3;
880 ULONGLONG MonitoredConditionMet : 1;
881 ULONGLONG StatisticsSupportsDsn : 1;
882 ULONGLONG Normalized : 1;
883 ULONGLONG ValidValue : 1;
884 ULONGLONG Supported : 1;
885 } WriteCommandCount;
886 struct {
887 ULONGLONG Count : 48;
888 ULONGLONG Reserved : 8;
889 ULONGLONG ReservedFlags : 3;
890 ULONGLONG MonitoredConditionMet : 1;
891 ULONGLONG StatisticsSupportsDsn : 1;
892 ULONGLONG Normalized : 1;
893 ULONGLONG ValidValue : 1;
894 ULONGLONG Supported : 1;
895 } LogicalSectorsRead;
896 struct {
897 ULONGLONG Count : 48;
898 ULONGLONG Reserved : 8;
899 ULONGLONG ReservedFlags : 3;
900 ULONGLONG MonitoredConditionMet : 1;
901 ULONGLONG StatisticsSupportsDsn : 1;
902 ULONGLONG Normalized : 1;
903 ULONGLONG ValidValue : 1;
904 ULONGLONG Supported : 1;
905 } ReadCommandCount;
906 struct {
907 ULONGLONG TimeStamp : 48;
908 ULONGLONG Reserved : 8;
909 ULONGLONG ReservedFlags : 3;
910 ULONGLONG MonitoredConditionMet : 1;
911 ULONGLONG StatisticsSupportsDsn : 1;
912 ULONGLONG Normalized : 1;
913 ULONGLONG ValidValue : 1;
914 ULONGLONG Supported : 1;
915 } DateAndTime;
916 struct {
917 ULONGLONG Count : 32;
918 ULONGLONG Reserved : 24;
919 ULONGLONG ReservedFlags : 3;
920 ULONGLONG MonitoredConditionMet : 1;
921 ULONGLONG StatisticsSupportsDsn : 1;
922 ULONGLONG Normalized : 1;
923 ULONGLONG ValidValue : 1;
924 ULONGLONG Supported : 1;
925 } PendingErrorCount;
926 struct {
927 ULONGLONG Value : 16;
928 ULONGLONG Reserved : 40;
929 ULONGLONG ReservedFlags : 3;
930 ULONGLONG MonitoredConditionMet : 1;
931 ULONGLONG StatisticsSupportsDsn : 1;
932 ULONGLONG Normalized : 1;
933 ULONGLONG ValidValue : 1;
934 ULONGLONG Supported : 1;
935 } WorkloadUtilizaton;
936 struct {
937 ULONGLONG Value : 8;
938 ULONGLONG Reserved0 : 28;
939 ULONGLONG RateBasis : 4;
940 ULONGLONG RateValidity : 8;
941 ULONGLONG Reserved1 : 8;
942 ULONGLONG ReservedFlags : 3;
943 ULONGLONG MonitoredConditionMet : 1;
944 ULONGLONG StatisticsSupportsDsn : 1;
945 ULONGLONG Normalized : 1;
946 ULONGLONG ValidValue : 1;
947 ULONGLONG Supported : 1;
948 } UtilizationUsageRate;
949 UCHAR Reserved[424];
950} GP_LOG_GENERAL_STATISTICS, *PGP_LOG_GENERAL_STATISTICS;
951
952typedef struct _GP_LOG_FREE_FALL_STATISTICS {
953 DEVICE_STATISTICS_LOG_PAGE_HEADER Header;
954 struct {
955 ULONGLONG Count : 32;
956 ULONGLONG Reserved : 24;
957 ULONGLONG ReservedFlags : 3;
958 ULONGLONG MonitoredConditionMet : 1;
959 ULONGLONG StatisticsSupportsDsn : 1;
960 ULONGLONG Normalized : 1;
961 ULONGLONG ValidValue : 1;
962 ULONGLONG Supported : 1;
963 } NumberofFreeFallEventsDetected;
964 struct {
965 ULONGLONG Count : 32;
966 ULONGLONG Reserved : 24;
967 ULONGLONG ReservedFlags : 3;
968 ULONGLONG MonitoredConditionMet : 1;
969 ULONGLONG StatisticsSupportsDsn : 1;
970 ULONGLONG Normalized : 1;
971 ULONGLONG ValidValue : 1;
972 ULONGLONG Supported : 1;
973 } OverlimitShockEvents;
974 UCHAR Reserved[488];
975} GP_LOG_FREE_FALL_STATISTICS, *PGP_LOG_FREE_FALL_STATISTICS;
976
977typedef struct _GP_LOG_ROTATING_MEDIA_STATISTICS {
978 DEVICE_STATISTICS_LOG_PAGE_HEADER Header;
979 struct {
980 ULONGLONG Count : 32;
981 ULONGLONG Reserved : 24;
982 ULONGLONG ReservedFlags : 3;
983 ULONGLONG MonitoredConditionMet : 1;
984 ULONGLONG StatisticsSupportsDsn : 1;
985 ULONGLONG Normalized : 1;
986 ULONGLONG ValidValue : 1;
987 ULONGLONG Supported : 1;
988 } SpindleMotorPoweronHours;
989 struct {
990 ULONGLONG Count : 32;
991 ULONGLONG Reserved : 24;
992 ULONGLONG ReservedFlags : 3;
993 ULONGLONG MonitoredConditionMet : 1;
994 ULONGLONG StatisticsSupportsDsn : 1;
995 ULONGLONG Normalized : 1;
996 ULONGLONG ValidValue : 1;
997 ULONGLONG Supported : 1;
998 } HeadFlyingHours;
999 struct {
1000 ULONGLONG Count : 32;
1001 ULONGLONG Reserved : 24;
1002 ULONGLONG ReservedFlags : 3;
1003 ULONGLONG MonitoredConditionMet : 1;
1004 ULONGLONG StatisticsSupportsDsn : 1;
1005 ULONGLONG Normalized : 1;
1006 ULONGLONG ValidValue : 1;
1007 ULONGLONG Supported : 1;
1008 } HeadLoadEvents;
1009 struct {
1010 ULONGLONG Count : 32;
1011 ULONGLONG Reserved : 24;
1012 ULONGLONG ReservedFlags : 3;
1013 ULONGLONG MonitoredConditionMet : 1;
1014 ULONGLONG StatisticsSupportsDsn : 1;
1015 ULONGLONG Normalized : 1;
1016 ULONGLONG ValidValue : 1;
1017 ULONGLONG Supported : 1;
1018 } NumberOfReallocatedLogicalSectors;
1019 struct {
1020 ULONGLONG Count : 32;
1021 ULONGLONG Reserved : 24;
1022 ULONGLONG ReservedFlags : 3;
1023 ULONGLONG MonitoredConditionMet : 1;
1024 ULONGLONG StatisticsSupportsDsn : 1;
1025 ULONGLONG Normalized : 1;
1026 ULONGLONG ValidValue : 1;
1027 ULONGLONG Supported : 1;
1028 } ReadRecoveryAttempts;
1029 struct {
1030 ULONGLONG Count : 32;
1031 ULONGLONG Reserved : 24;
1032 ULONGLONG ReservedFlags : 3;
1033 ULONGLONG MonitoredConditionMet : 1;
1034 ULONGLONG StatisticsSupportsDsn : 1;
1035 ULONGLONG Normalized : 1;
1036 ULONGLONG ValidValue : 1;
1037 ULONGLONG Supported : 1;
1038 } NumberOfMechanicalStartFailures;
1039 struct {
1040 ULONGLONG Count : 32;
1041 ULONGLONG Reserved : 24;
1042 ULONGLONG ReservedFlags : 3;
1043 ULONGLONG MonitoredConditionMet : 1;
1044 ULONGLONG StatisticsSupportsDsn : 1;
1045 ULONGLONG Normalized : 1;
1046 ULONGLONG ValidValue : 1;
1047 ULONGLONG Supported : 1;
1048 } NumberOfReallocationCandidateLogicalSectors;
1049 struct {
1050 ULONGLONG Count : 32;
1051 ULONGLONG Reserved : 24;
1052 ULONGLONG ReservedFlags : 3;
1053 ULONGLONG MonitoredConditionMet : 1;
1054 ULONGLONG StatisticsSupportsDsn : 1;
1055 ULONGLONG Normalized : 1;
1056 ULONGLONG ValidValue : 1;
1057 ULONGLONG Supported : 1;
1058 } NumberOfHighPriorityUnloadEvents;
1059 UCHAR Reserved[440];
1060} GP_LOG_ROTATING_MEDIA_STATISTICS, *PGP_LOG_ROTATING_MEDIA_STATISTICS;
1061
1062typedef struct _GP_LOG_GENERAL_ERROR_STATISTICS {
1063 DEVICE_STATISTICS_LOG_PAGE_HEADER Header;
1064 struct {
1065 ULONGLONG Count : 32;
1066 ULONGLONG Reserved : 24;
1067 ULONGLONG ReservedFlags : 3;
1068 ULONGLONG MonitoredConditionMet : 1;
1069 ULONGLONG StatisticsSupportsDsn : 1;
1070 ULONGLONG Normalized : 1;
1071 ULONGLONG ValidValue : 1;
1072 ULONGLONG Supported : 1;
1073 } NumberOfReportedUncorrectableErrors;
1074 struct {
1075 ULONGLONG Count : 32;
1076 ULONGLONG Reserved : 24;
1077 ULONGLONG ReservedFlags : 3;
1078 ULONGLONG MonitoredConditionMet : 1;
1079 ULONGLONG StatisticsSupportsDsn : 1;
1080 ULONGLONG Normalized : 1;
1081 ULONGLONG ValidValue : 1;
1082 ULONGLONG Supported : 1;
1083 } NumberOfResetsBetweenCommandAcceptanceAndCommandCompletion;
1084 UCHAR Reserved[488];
1085} GP_LOG_GENERAL_ERROR_STATISTICS, *PGP_LOG_GENERAL_ERROR_STATISTICS;
1086
1087typedef struct _GP_LOG_TEMPERATURE_STATISTICS {
1088 DEVICE_STATISTICS_LOG_PAGE_HEADER Header;
1089 struct {
1090 ULONGLONG Value : 8;
1091 ULONGLONG Reserved : 48;
1092 ULONGLONG ReservedFlags : 3;
1093 ULONGLONG MonitoredConditionMet : 1;
1094 ULONGLONG StatisticsSupportsDsn : 1;
1095 ULONGLONG Normalized : 1;
1096 ULONGLONG ValidValue : 1;
1097 ULONGLONG Supported : 1;
1098 } CurrentTemperature;
1099 struct {
1100 ULONGLONG Value : 8;
1101 ULONGLONG Reserved : 48;
1102 ULONGLONG ReservedFlags : 3;
1103 ULONGLONG MonitoredConditionMet : 1;
1104 ULONGLONG StatisticsSupportsDsn : 1;
1105 ULONGLONG Normalized : 1;
1106 ULONGLONG ValidValue : 1;
1107 ULONGLONG Supported : 1;
1108 } AverageShortTermTemperature;
1109 struct {
1110 ULONGLONG Value : 8;
1111 ULONGLONG Reserved : 48;
1112 ULONGLONG ReservedFlags : 3;
1113 ULONGLONG MonitoredConditionMet : 1;
1114 ULONGLONG StatisticsSupportsDsn : 1;
1115 ULONGLONG Normalized : 1;
1116 ULONGLONG ValidValue : 1;
1117 ULONGLONG Supported : 1;
1118 } AverageLongTermTemperature;
1119 struct {
1120 ULONGLONG Value : 8;
1121 ULONGLONG Reserved : 48;
1122 ULONGLONG ReservedFlags : 3;
1123 ULONGLONG MonitoredConditionMet : 1;
1124 ULONGLONG StatisticsSupportsDsn : 1;
1125 ULONGLONG Normalized : 1;
1126 ULONGLONG ValidValue : 1;
1127 ULONGLONG Supported : 1;
1128 } HighestTemperature;
1129 struct {
1130 ULONGLONG Value : 8;
1131 ULONGLONG Reserved : 48;
1132 ULONGLONG ReservedFlags : 3;
1133 ULONGLONG MonitoredConditionMet : 1;
1134 ULONGLONG StatisticsSupportsDsn : 1;
1135 ULONGLONG Normalized : 1;
1136 ULONGLONG ValidValue : 1;
1137 ULONGLONG Supported : 1;
1138 } LowestTemperature;
1139 struct {
1140 ULONGLONG Value : 8;
1141 ULONGLONG Reserved : 48;
1142 ULONGLONG ReservedFlags : 3;
1143 ULONGLONG MonitoredConditionMet : 1;
1144 ULONGLONG StatisticsSupportsDsn : 1;
1145 ULONGLONG Normalized : 1;
1146 ULONGLONG ValidValue : 1;
1147 ULONGLONG Supported : 1;
1148 } HighestAverageShortTermTemperature;
1149 struct {
1150 ULONGLONG Value : 8;
1151 ULONGLONG Reserved : 48;
1152 ULONGLONG ReservedFlags : 3;
1153 ULONGLONG MonitoredConditionMet : 1;
1154 ULONGLONG StatisticsSupportsDsn : 1;
1155 ULONGLONG Normalized : 1;
1156 ULONGLONG ValidValue : 1;
1157 ULONGLONG Supported : 1;
1158 } LowestAverageShortTermTemperature;
1159 struct {
1160 ULONGLONG Value : 8;
1161 ULONGLONG Reserved : 48;
1162 ULONGLONG ReservedFlags : 3;
1163 ULONGLONG MonitoredConditionMet : 1;
1164 ULONGLONG StatisticsSupportsDsn : 1;
1165 ULONGLONG Normalized : 1;
1166 ULONGLONG ValidValue : 1;
1167 ULONGLONG Supported : 1;
1168 } HighstAverageLongTermTemperature;
1169 struct {
1170 ULONGLONG Value : 8;
1171 ULONGLONG Reserved : 48;
1172 ULONGLONG ReservedFlags : 3;
1173 ULONGLONG MonitoredConditionMet : 1;
1174 ULONGLONG StatisticsSupportsDsn : 1;
1175 ULONGLONG Normalized : 1;
1176 ULONGLONG ValidValue : 1;
1177 ULONGLONG Supported : 1;
1178 } LowestAverageLongTermTemperature;
1179 struct {
1180 ULONGLONG Value : 8;
1181 ULONGLONG Reserved : 48;
1182 ULONGLONG ReservedFlags : 3;
1183 ULONGLONG MonitoredConditionMet : 1;
1184 ULONGLONG StatisticsSupportsDsn : 1;
1185 ULONGLONG Normalized : 1;
1186 ULONGLONG ValidValue : 1;
1187 ULONGLONG Supported : 1;
1188 } TimeInOverTemperature;
1189 struct {
1190 ULONGLONG Value : 8;
1191 ULONGLONG Reserved : 48;
1192 ULONGLONG ReservedFlags : 3;
1193 ULONGLONG MonitoredConditionMet : 1;
1194 ULONGLONG StatisticsSupportsDsn : 1;
1195 ULONGLONG Normalized : 1;
1196 ULONGLONG ValidValue : 1;
1197 ULONGLONG Supported : 1;
1198 } SpecifiedMaximumOperatingTemperature;
1199 struct {
1200 ULONGLONG Value : 8;
1201 ULONGLONG Reserved : 48;
1202 ULONGLONG ReservedFlags : 3;
1203 ULONGLONG MonitoredConditionMet : 1;
1204 ULONGLONG StatisticsSupportsDsn : 1;
1205 ULONGLONG Normalized : 1;
1206 ULONGLONG ValidValue : 1;
1207 ULONGLONG Supported : 1;
1208 } TimeInUnderTemperature;
1209 struct {
1210 ULONGLONG Value : 8;
1211 ULONGLONG Reserved : 48;
1212 ULONGLONG ReservedFlags : 3;
1213 ULONGLONG MonitoredConditionMet : 1;
1214 ULONGLONG StatisticsSupportsDsn : 1;
1215 ULONGLONG Normalized : 1;
1216 ULONGLONG ValidValue : 1;
1217 ULONGLONG Supported : 1;
1218 } SpecifiedMinimumOperatingTemperature;
1219 UCHAR Reserved[400];
1220} GP_LOG_TEMPERATURE_STATISTICS, *PGP_LOG_TEMPERATURE_STATISTICS;
1221
1222typedef struct _GP_LOG_TRANSPORT_STATISTICS {
1223 DEVICE_STATISTICS_LOG_PAGE_HEADER Header;
1224 struct {
1225 ULONGLONG Count : 8;
1226 ULONGLONG Reserved : 48;
1227 ULONGLONG ReservedFlags : 3;
1228 ULONGLONG MonitoredConditionMet : 1;
1229 ULONGLONG StatisticsSupportsDsn : 1;
1230 ULONGLONG Normalized : 1;
1231 ULONGLONG ValidValue : 1;
1232 ULONGLONG Supported : 1;
1233 } NumberOfHardwareResets;
1234 struct {
1235 ULONGLONG Count : 32;
1236 ULONGLONG Reserved : 24;
1237 ULONGLONG ReservedFlags : 3;
1238 ULONGLONG MonitoredConditionMet : 1;
1239 ULONGLONG StatisticsSupportsDsn : 1;
1240 ULONGLONG Normalized : 1;
1241 ULONGLONG ValidValue : 1;
1242 ULONGLONG Supported : 1;
1243 } NumberOfAsrEvents;
1244 struct {
1245 ULONGLONG Count : 32;
1246 ULONGLONG Reserved : 24;
1247 ULONGLONG ReservedFlags : 3;
1248 ULONGLONG MonitoredConditionMet : 1;
1249 ULONGLONG StatisticsSupportsDsn : 1;
1250 ULONGLONG Normalized : 1;
1251 ULONGLONG ValidValue : 1;
1252 ULONGLONG Supported : 1;
1253 } NumberOfInterfaceCrcErrors;
1254 UCHAR Reserved[480];
1255} GP_LOG_TRANSPORT_STATISTICS, *PGP_LOG_TRANSPORT_STATISTICS;
1256
1257typedef struct _GP_LOG_SOLID_STATE_DEVICE_STATISTICS {
1258 DEVICE_STATISTICS_LOG_PAGE_HEADER Header;
1259 struct {
1260 ULONGLONG Value : 8;
1261 ULONGLONG Reserved : 48;
1262 ULONGLONG ReservedFlags : 3;
1263 ULONGLONG MonitoredConditionMet : 1;
1264 ULONGLONG StatisticsSupportsDsn : 1;
1265 ULONGLONG Normalized : 1;
1266 ULONGLONG ValidValue : 1;
1267 ULONGLONG Supported : 1;
1268 } PercentageUsedEnduranceIndicator;
1269 UCHAR Reserved[496];
1270} GP_LOG_SOLID_STATE_DEVICE_STATISTICS, *PGP_LOG_SOLID_STATE_DEVICE_STATISTICS;
1271
1272typedef struct _GP_LOG_NCQ_COMMAND_ERROR {
1273 UCHAR NcqTag : 5;
1274 UCHAR Reserved0 : 1;
1275 UCHAR UNL : 1;
1276 UCHAR NonQueuedCmd : 1;
1277 UCHAR Reserved1;
1278 UCHAR Status;
1279 UCHAR Error;
1280 UCHAR LBA7_0;
1281 UCHAR LBA15_8;
1282 UCHAR LBA23_16;
1283 UCHAR Device;
1284 UCHAR LBA31_24;
1285 UCHAR LBA39_32;
1286 UCHAR LBA47_40;
1287 UCHAR Reserved2;
1288 UCHAR Count7_0;
1289 UCHAR Count15_8;
1290 UCHAR SenseKey;
1291 UCHAR ASC;
1292 UCHAR ASCQ;
1293 UCHAR Reserved3[239];
1294 UCHAR Vendor[255];
1295 UCHAR Checksum;
1296} GP_LOG_NCQ_COMMAND_ERROR, *PGP_LOG_NCQ_COMMAND_ERROR;
1297
1298typedef struct _GP_LOG_NCQ_NON_DATA {
1299 struct {
1300 ULONG AbortNcq : 1;
1301 ULONG AbortAll : 1;
1302 ULONG AbortStreaming : 1;
1303 ULONG AbortNonStreaming : 1;
1304 ULONG AbortSelectedTTag : 1;
1305 ULONG Reserved : 27;
1306 } SubCmd0;
1307 struct {
1308 ULONG DeadlineHandling : 1;
1309 ULONG WriteDataNotContinue : 1;
1310 ULONG ReadDataNotContinue : 1;
1311 ULONG Reserved : 29;
1312 } SubCmd1;
1313 struct {
1314 ULONG HybridDemoteBySize : 1;
1315 ULONG Reserved : 31;
1316 } SubCmd2;
1317 struct {
1318 ULONG HybridChangeByLbaRange : 1;
1319 ULONG Reserved : 31;
1320 } SubCmd3;
1321 struct {
1322 ULONG HybridControl : 1;
1323 ULONG Reserved : 31;
1324 } SubCmd4;
1325 struct {
1326 ULONG Reserved : 32;
1327 } SubCmd5;
1328 struct {
1329 ULONG Reserved : 32;
1330 } SubCmd6;
1331 struct {
1332 ULONG Reserved : 32;
1333 } SubCmd7;
1334 struct {
1335 ULONG Reserved : 32;
1336 } SubCmd8;
1337 struct {
1338 ULONG Reserved : 32;
1339 } SubCmd9;
1340 struct {
1341 ULONG Reserved : 32;
1342 } SubCmdA;
1343 struct {
1344 ULONG Reserved : 32;
1345 } SubCmdB;
1346 struct {
1347 ULONG Reserved : 32;
1348 } SubCmdC;
1349 struct {
1350 ULONG Reserved : 32;
1351 } SubCmdD;
1352 struct {
1353 ULONG Reserved : 32;
1354 } SubCmdE;
1355 struct {
1356 ULONG Reserved : 32;
1357 } SubCmdF;
1358 ULONG Reserved[112];
1359} GP_LOG_NCQ_NON_DATA, *PGP_LOG_NCQ_NON_DATA;
1360
1361typedef struct _GP_LOG_NCQ_SEND_RECEIVE {
1362 struct {
1363 ULONG DataSetManagement : 1;
1364 ULONG HybridEvict : 1;
1365 ULONG Reserved : 30;
1366 } SubCmd;
1367 struct {
1368 ULONG Trim : 1;
1369 ULONG Reserved : 31;
1370 } DataSetManagement;
1371 ULONG Reserved[126];
1372} GP_LOG_NCQ_SEND_RECEIVE, *PGP_LOG_NCQ_SEND_RECEIVE;
1373
1374typedef struct _GP_LOG_HYBRID_INFORMATION_HEADER {
1375 USHORT HybridInfoDescrCount : 4;
1376 USHORT Reserved0 : 12;
1377 UCHAR Enabled;
1378 UCHAR HybridHealth;
1379 UCHAR DirtyLowThreshold;
1380 UCHAR DirtyHighThreshold;
1381 UCHAR OptimalWriteGranularity;
1382 UCHAR MaximumHybridPriorityLevel : 4;
1383 UCHAR Reserved1 : 4;
1384 UCHAR PowerCondidtion;
1385 UCHAR CachingMediumEnabled ;
1386 struct {
1387 UCHAR MaximumPriorityBehavior : 1;
1388 UCHAR SupportCacheBehavior : 1;
1389 UCHAR Reserved : 6;
1390 } SupportedOptions;
1391 UCHAR Reserved2;
1392 ULONG TimeSinceEnabled;
1393 ULONGLONG NVMSize;
1394 ULONGLONG EnableCount;
1395 USHORT MaximumEvictionCommands : 5;
1396 USHORT Reserved3 : 11;
1397 USHORT MaximumEvictionDataBlocks;
1398 UCHAR Reserved[28];
1399} GP_LOG_HYBRID_INFORMATION_HEADER, *PGP_LOG_HYBRID_INFORMATION_HEADER;
1400
1401typedef struct _GP_LOG_HYBRID_INFORMATION_DESCRIPTOR {
1402 UCHAR HybridPriority;
1403 UCHAR ConsumedNVMSizeFraction;
1404 UCHAR ConsumedMappingResourcesFraction;
1405 UCHAR ConsumedNVMSizeForDirtyDataFraction;
1406 UCHAR ConsumedMappingResourcesForDirtyDataFraction;
1407 UCHAR Reserved[11];
1408} GP_LOG_HYBRID_INFORMATION_DESCRIPTOR, *PGP_LOG_HYBRID_INFORMATION_DESCRIPTOR;
1409
1410typedef struct _GP_LOG_HYBRID_INFORMATION {
1411 GP_LOG_HYBRID_INFORMATION_HEADER Header;
1412 GP_LOG_HYBRID_INFORMATION_DESCRIPTOR Descriptor[0];
1413} GP_LOG_HYBRID_INFORMATION, *PGP_LOG_HYBRID_INFORMATION;
1414
1415typedef struct _REPORT_ZONES_EXT_DATA {
1416 ULONG ZoneListLength;
1417 UCHAR SAME : 4;
1418 UCHAR Reserved0 : 4;
1419 UCHAR Reserved1[3];
1420 ULONGLONG MaxLBA : 48;
1421 ULONGLONG Reserved2 : 16;
1422 UCHAR Reserved3[48];
1423} REPORT_ZONES_EXT_DATA, *PREPORT_ZONES_EXT_DATA;
1424
1425typedef struct _ATA_ZONE_DESCRIPTOR {
1426 UCHAR ZoneType : 4;
1427 UCHAR Reserved0 : 4;
1428 UCHAR Reset : 1;
1429 UCHAR NonSeq : 1;
1430 UCHAR Reserved1 : 2;
1431 UCHAR ZoneCondition : 4;
1432 UCHAR Reserved2[6];
1433 ULONGLONG ZoneLength : 48;
1434 ULONGLONG Reserved3 : 16;
1435 ULONGLONG ZoneStartLBA : 48;
1436 ULONGLONG Reserved4 : 16;
1437 ULONGLONG WritePointerLBA : 48;
1438 ULONGLONG Reserved5 : 16;
1439 UCHAR Reserved6[32];
1440} ATA_ZONE_DESCRIPTOR, *PATA_ZONE_DESCRIPTOR;
1441
1442typedef struct _ATA_PHYSICAL_ELEMENT_STATUS_DESCRIPTOR {
1443 UCHAR Reserved1[4];
1444 ULONG ElementIdentifier;
1445 UCHAR Reserved2[6];
1446 UCHAR PhysicalElementType;
1447 UCHAR PhysicalElementHealth;
1448 ULONGLONG AssociatedCapacity;
1449 UCHAR Reserved3[8];
1450} ATA_PHYSICAL_ELEMENT_STATUS_DESCRIPTOR, *PATA_PHYSICAL_ELEMENT_STATUS_DESCRIPTOR;
1451
1452typedef struct _ATA_GET_PHYSICAL_ELEMENT_STATUS_PARAMETER_DATA {
1453 ULONG NumberOfDescriptors;
1454 ULONG NumberOfDescriptorsReturned;
1455 ULONG ElementIdentifierBeingDepoped;
1456 UCHAR Reserved[20];
1457 ATA_PHYSICAL_ELEMENT_STATUS_DESCRIPTOR Descriptors[ANYSIZE_ARRAY];
1458} ATA_GET_PHYSICAL_ELEMENT_STATUS_PARAMETER_DATA, *PATA_GET_PHYSICAL_ELEMENT_STATUS_PARAMETER_DATA;
1459
1460#pragma pack(pop)
1461
1462#define ATAPI_MODE_SENSE 0x5A
1463#define ATAPI_MODE_SELECT 0x55
1464#define ATAPI_LS120_FORMAT_UNIT 0x24
1465
1466#define IDE_LBA_MODE (1 << 6)
1467
1468#define IDE_DC_DISABLE_INTERRUPTS 0x02
1469#define IDE_DC_RESET_CONTROLLER 0x04
1470#define IDE_DC_REENABLE_CONTROLLER 0x00
1471
1472#define IDE_STATUS_ERROR 0x01
1473#define IDE_STATUS_INDEX 0x02
1474#define IDE_STATUS_CORRECTED_ERROR 0x04
1475#define IDE_STATUS_DRQ 0x08
1476#define IDE_STATUS_DSC 0x10
1477#define IDE_STATUS_DEVICE_FAULT 0x20
1478#define IDE_STATUS_DRDY 0x40
1479#define IDE_STATUS_IDLE 0x50
1480#define IDE_STATUS_BUSY 0x80
1481
1482#define IDE_ERROR_BAD_BLOCK 0x80
1483#define IDE_ERROR_CRC_ERROR IDE_ERROR_BAD_BLOCK
1484#define IDE_ERROR_DATA_ERROR 0x40
1485#define IDE_ERROR_MEDIA_CHANGE 0x20
1486#define IDE_ERROR_ID_NOT_FOUND 0x10
1487#define IDE_ERROR_MEDIA_CHANGE_REQ 0x08
1488#define IDE_ERROR_COMMAND_ABORTED 0x04
1489#define IDE_ERROR_END_OF_MEDIA 0x02
1490#define IDE_ERROR_ILLEGAL_LENGTH 0x01
1491#define IDE_ERROR_ADDRESS_NOT_FOUND IDE_ERROR_ILLEGAL_LENGTH
1492
1493#define IDE_COMMAND_NOP 0x00
1494#define IDE_COMMAND_DATA_SET_MANAGEMENT 0x06
1495#define IDE_COMMAND_ATAPI_RESET 0x08
1496#define IDE_COMMAND_GET_PHYSICAL_ELEMENT_STATUS 0x12
1497#define IDE_COMMAND_READ 0x20
1498#define IDE_COMMAND_READ_EXT 0x24
1499#define IDE_COMMAND_READ_DMA_EXT 0x25
1500#define IDE_COMMAND_READ_DMA_QUEUED_EXT 0x26
1501#define IDE_COMMAND_READ_MULTIPLE_EXT 0x29
1502#define IDE_COMMAND_READ_LOG_EXT 0x2f
1503#define IDE_COMMAND_WRITE 0x30
1504#define IDE_COMMAND_WRITE_EXT 0x34
1505#define IDE_COMMAND_WRITE_DMA_EXT 0x35
1506#define IDE_COMMAND_WRITE_DMA_QUEUED_EXT 0x36
1507#define IDE_COMMAND_WRITE_MULTIPLE_EXT 0x39
1508#define IDE_COMMAND_WRITE_DMA_FUA_EXT 0x3D
1509#define IDE_COMMAND_WRITE_DMA_QUEUED_FUA_EXT 0x3E
1510#define IDE_COMMAND_WRITE_LOG_EXT 0x3F
1511#define IDE_COMMAND_VERIFY 0x40
1512#define IDE_COMMAND_VERIFY_EXT 0x42
1513#define IDE_COMMAND_ZAC_MANAGEMENT_IN 0x4A
1514#define IDE_COMMAND_WRITE_LOG_DMA_EXT 0x57
1515#define IDE_COMMAND_TRUSTED_NON_DATA 0x5B
1516#define IDE_COMMAND_TRUSTED_RECEIVE 0x5C
1517#define IDE_COMMAND_TRUSTED_RECEIVE_DMA 0x5D
1518#define IDE_COMMAND_TRUSTED_SEND 0x5E
1519#define IDE_COMMAND_TRUSTED_SEND_DMA 0x5F
1520#define IDE_COMMAND_READ_FPDMA_QUEUED 0x60
1521#define IDE_COMMAND_WRITE_FPDMA_QUEUED 0x61
1522#define IDE_COMMAND_NCQ_NON_DATA 0x63
1523#define IDE_COMMAND_SEND_FPDMA_QUEUED 0x64
1524#define IDE_COMMAND_RECEIVE_FPDMA_QUEUED 0x65
1525#define IDE_COMMAND_SET_DATE_AND_TIME 0x77
1526#define IDE_COMMAND_REMOVE_ELEMENT_AND_TRUNCATE 0x7C
1527#define IDE_COMMAND_EXECUTE_DEVICE_DIAGNOSTIC 0x90
1528#define IDE_COMMAND_SET_DRIVE_PARAMETERS 0x91
1529#define IDE_COMMAND_DOWNLOAD_MICROCODE 0x92
1530#define IDE_COMMAND_DOWNLOAD_MICROCODE_DMA 0x93
1531#define IDE_COMMAND_ZAC_MANAGEMENT_OUT 0x9F
1532#define IDE_COMMAND_ATAPI_PACKET 0xA0
1533#define IDE_COMMAND_ATAPI_IDENTIFY 0xA1
1534#define IDE_COMMAND_SMART 0xB0
1535#define IDE_COMMAND_READ_LOG_DMA_EXT 0xB1
1536#define IDE_COMMAND_SANITIZE_DEVICE 0xB4
1537#define IDE_COMMAND_READ_MULTIPLE 0xC4
1538#define IDE_COMMAND_WRITE_MULTIPLE 0xC5
1539#define IDE_COMMAND_SET_MULTIPLE 0xC6
1540#define IDE_COMMAND_READ_DMA 0xC8
1541#define IDE_COMMAND_WRITE_DMA 0xCA
1542#define IDE_COMMAND_WRITE_DMA_QUEUED 0xCC
1543#define IDE_COMMAND_WRITE_MULTIPLE_FUA_EXT 0xCE
1544#define IDE_COMMAND_GET_MEDIA_STATUS 0xDA
1545#define IDE_COMMAND_DOOR_LOCK 0xDE
1546#define IDE_COMMAND_DOOR_UNLOCK 0xDF
1547#define IDE_COMMAND_STANDBY_IMMEDIATE 0xE0
1548#define IDE_COMMAND_IDLE_IMMEDIATE 0xE1
1549#define IDE_COMMAND_CHECK_POWER 0xE5
1550#define IDE_COMMAND_SLEEP 0xE6
1551#define IDE_COMMAND_FLUSH_CACHE 0xE7
1552#define IDE_COMMAND_FLUSH_CACHE_EXT 0xEA
1553#define IDE_COMMAND_IDENTIFY 0xEC
1554#define IDE_COMMAND_MEDIA_EJECT 0xED
1555#define IDE_COMMAND_SET_FEATURE 0xEF
1556#define IDE_COMMAND_SECURITY_SET_PASSWORD 0xF1
1557#define IDE_COMMAND_SECURITY_UNLOCK 0xF2
1558#define IDE_COMMAND_SECURITY_ERASE_PREPARE 0xF3
1559#define IDE_COMMAND_SECURITY_ERASE_UNIT 0xF4
1560#define IDE_COMMAND_SECURITY_FREEZE_LOCK 0xF5
1561#define IDE_COMMAND_SECURITY_DISABLE_PASSWORD 0xF6
1562#define IDE_COMMAND_NOT_VALID 0xFF
1563
1564#define IDE_SET_DEFAULT_PIO_MODE(mode) ((UCHAR)1)
1565#define IDE_SET_ADVANCE_PIO_MODE(mode) ((UCHAR)((1 << 3) | (mode)))
1566#define IDE_SET_SWDMA_MODE(mode) ((UCHAR)((1 << 4) | (mode)))
1567#define IDE_SET_MWDMA_MODE(mode) ((UCHAR)((1 << 5) | (mode)))
1568#define IDE_SET_UDMA_MODE(mode) ((UCHAR)((1 << 6) | (mode)))
1569
1570#define IDE_FEATURE_ENABLE_WRITE_CACHE 0x2
1571#define IDE_FEATURE_SET_TRANSFER_MODE 0x3
1572#define IDE_FEATURE_ENABLE_PUIS 0x6
1573#define IDE_FEATURE_PUIS_SPIN_UP 0x7
1574#define IDE_FEATURE_ENABLE_SATA_FEATURE 0x10
1575#define IDE_FEATURE_DISABLE_MSN 0x31
1576#define IDE_FEATURE_DISABLE_REVERT_TO_POWER_ON 0x66
1577#define IDE_FEATURE_DISABLE_WRITE_CACHE 0x82
1578#define IDE_FEATURE_DISABLE_PUIS 0x86
1579#define IDE_FEATURE_DISABLE_SATA_FEATURE 0x90
1580#define IDE_FEATURE_ENABLE_MSN 0x95
1581
1582#define IDE_SATA_FEATURE_NON_ZERO_DMA_BUFFER_OFFSET 0x1
1583#define IDE_SATA_FEATURE_DMA_SETUP_FIS_AUTO_ACTIVATE 0x2
1584#define IDE_SATA_FEATURE_DEVICE_INITIATED_POWER_MANAGEMENT 0x3
1585#define IDE_SATA_FEATURE_GUARANTEED_IN_ORDER_DELIVERY 0x4
1586#define IDE_SATA_FEATURE_ASYNCHRONOUS_NOTIFICATION 0x5
1587#define IDE_SATA_FEATURE_SOFTWARE_SETTINGS_PRESERVATION 0x6
1588#define IDE_SATA_FEATURE_DEVICE_AUTO_PARTIAL_TO_SLUMBER 0x7
1589#define IDE_SATA_FEATURE_ENABLE_HARDWARE_FEATURE_CONTROL 0x8
1590#define IDE_SATA_FEATURE_DEVSLP 0x9
1591#define IDE_SATA_FEATURE_HYBRID_INFORMATION 0xA
1592
1593#define IDE_SMART_READ_ATTRIBUTES 0xD0
1594#define IDE_SMART_READ_THRESHOLDS 0xD1
1595#define IDE_SMART_ENABLE_DISABLE_AUTOSAVE 0xD2
1596#define IDE_SMART_SAVE_ATTRIBUTE_VALUES 0xD3
1597#define IDE_SMART_EXECUTE_OFFLINE_DIAGS 0xD4
1598#define IDE_SMART_READ_LOG 0xD5
1599#define IDE_SMART_WRITE_LOG 0xD6
1600#define IDE_SMART_ENABLE 0xD8
1601#define IDE_SMART_DISABLE 0xD9
1602#define IDE_SMART_RETURN_STATUS 0xDA
1603#define IDE_SMART_ENABLE_DISABLE_AUTO_OFFLINE 0xDB
1604
1605#define IDE_DSM_FEATURE_TRIM 0x0001
1606
1607#define IDE_NCQ_NON_DATA_ABORT_NCQ_QUEUE 0x00
1608#define IDE_NCQ_NON_DATA_DEADLINE_HANDLING 0x01
1609#define IDE_NCQ_NON_DATA_HYBRID_CHANGE_BY_SIZE 0x02
1610#define IDE_NCQ_NON_DATA_HYBRID_DEMOTE_BY_SIZE 0x02
1611#define IDE_NCQ_NON_DATA_HYBRID_CHANGE_BY_LBA_RANGE 0x03
1612#define IDE_NCQ_NON_DATA_HYBRID_CONTROL 0x04
1613
1614#define IDE_NCQ_SEND_DATA_SET_MANAGEMENT 0x00
1615#define IDE_NCQ_SEND_HYBRID_EVICT 0x01
1616
1617#define ATA_DEVICE_SET_PASSWORD_MASTER 0x01
1618#define ATA_DEVICE_SET_PASSWORD_USER 0x00
1619
1620#define IDE_GP_LOG_DIRECTORY_ADDRESS 0x00
1621#define IDE_GP_SUMMARY_SMART_ERROR 0x01
1622#define IDE_GP_COMPREHENSIVE_SMART_ERROR 0x02
1623#define IDE_GP_EXTENDED_COMPREHENSIVE_SMART_ERROR 0x03
1624#define IDE_GP_LOG_DEVICE_STATISTICS_ADDRESS 0x04
1625#define IDE_GP_SMART_SELF_TEST 0x06
1626#define IDE_GP_EXTENDED_SMART_SELF_TEST 0x07
1627#define IDE_GP_LOG_POWER_CONDITIONS 0x08
1628#define IDE_GP_SELECTIVE_SELF_TEST 0x09
1629#define IDE_GP_DEVICE_STATISTICS_NOTIFICATION 0x0A
1630#define IDE_GP_PENDING_DEFECTS 0x0C
1631#define IDE_GP_LPS_MISALIGNMENT 0x0D
1632#define IDE_GP_LOG_NCQ_COMMAND_ERROR_ADDRESS 0x10
1633#define IDE_GP_LOG_PHY_EVENT_COUNTER_ADDRESS 0x11
1634#define IDE_GP_LOG_NCQ_NON_DATA_ADDRESS 0x12
1635#define IDE_GP_LOG_NCQ_SEND_RECEIVE_ADDRESS 0x13
1636#define IDE_GP_LOG_HYBRID_INFO_ADDRESS 0x14
1637#define IDE_GP_LOG_REBUILD_ASSIST 0x15
1638#define IDE_GP_LOG_LBA_STATUS 0x19
1639#define IDE_GP_LOG_WRITE_STREAM_ERROR 0x21
1640#define IDE_GP_LOG_READ_STREAM_ERROR 0x22
1641#define IDE_GP_LOG_CURRENT_DEVICE_INTERNAL_STATUS 0x24
1642#define IDE_GP_LOG_SAVED_DEVICE_INTERNAL_STATUS 0x25
1643#define IDE_GP_LOG_IDENTIFY_DEVICE_DATA_ADDRESS 0x30
1644#define IDE_GP_LOG_SCT_COMMAND_STATUS 0xE0
1645#define IDE_GP_LOG_SCT_DATA_TRANSFER 0xE1
1646
1647#define IDE_GP_LOG_SECTOR_SIZE 0x200
1648
1649#define IDE_GP_LOG_VERSION 0x0001
1650
1651#define IDE_GP_LOG_SUPPORTED_PAGES 0x00
1652
1653#define IDE_GP_LOG_IDENTIFY_DEVICE_DATA_SUPPORTED_CAPABILITIES_PAGE 0x03
1654#define IDE_GP_LOG_IDENTIFY_DEVICE_DATA_SATA_PAGE 0x08
1655#define IDE_GP_LOG_IDENTIFY_DEVICE_DATA_ZONED_DEVICE_INFORMATION_PAGE 0x09
1656
1657#define ATA_ZONED_CAPABILITIES_NOT_REPORTED 0x0
1658#define ATA_ZONED_CAPABILITIES_HOST_AWARE 0x1
1659#define ATA_ZONED_CAPABILITIES_DEVICE_MANAGED 0x2
1660
1661#define ZAC_REVISION_NOT_REPORTED_1 0x0000
1662#define ZAC_REVISION_NOT_REPORTED_2 0xFFFF
1663#define ZAC_REVISION_01 0xB6E8
1664#define ZAC_REVISION_04 0xA36C
1665
1666#define CURRENT_DEVICE_INTERNAL_STATUS_DATA_LOG_ADDRESS 0x24
1667#define SAVED_DEVICE_INTERNAL_STATUS_DATA_LOG_ADDRESS 0x25
1668
1669#define IDE_GP_LOG_DEVICE_STATISTICS_GENERAL_PAGE 0x01
1670#define IDE_GP_LOG_DEVICE_STATISTICS_FREE_FALL_PAGE 0x02
1671#define IDE_GP_LOG_DEVICE_STATISTICS_ROTATING_MEDIA_PAGE 0x03
1672#define IDE_GP_LOG_DEVICE_STATISTICS_GENERAL_ERROR_PAGE 0x04
1673#define IDE_GP_LOG_DEVICE_STATISTICS_TEMPERATURE_PAGE 0x05
1674#define IDE_GP_LOG_DEVICE_STATISTICS_TRANSPORT_PAGE 0x06
1675#define IDE_GP_LOG_DEVICE_STATISTICS_SSD_PAGE 0x07
1676
1677#define HYBRID_INFORMATION_DISABLED 0x00
1678#define HYBRID_INFORMATION_DISABLE_IN_PROCESS 0x80
1679#define HYBRID_INFORMATION_ENABLED 0xFF
1680
1681#define HYBRID_HEALTH_UNUSEABLE 0x01
1682#define HYBRID_HEALTH_NVM_SIZE_CHANGED 0x02
1683#define HYBRID_HEALTH_READ_ONLY 0x04
1684#define HYBRID_HEALTH_DATA_LOSS 0x08
1685
1686#define ATA_DEVICE_SIGNATURE_ATA 0x00000101
1687#define ATA_DEVICE_SIGNATURE_ATAPI 0xEB140101
1688#define ATA_DEVICE_SIGNATURE_HOST_ZONED 0xABCD0101
1689#define ATA_DEVICE_SIGNATURE_ENCLOSURE 0xC33C0101
1690#define ATA_DEVICE_SIGNATURE_PORT_MULTIPLIER 0x96690101
1691
1692#define ZM_ACTION_REPORT_ZONES 0x00
1693#define ZM_ACTION_CLOSE_ZONE 0x01
1694#define ZM_ACTION_FINISH_ZONE 0x02
1695#define ZM_ACTION_OPEN_ZONE 0x03
1696#define ZM_ACTION_RESET_WRITE_POINTER 0x04
1697
1698#define ZM_ALL_ZONES_BIT (1 << 8)
1699
1700#define ATA_REPORT_ZONES_OPTION_LIST_ALL_ZONES 0x00
1701#define ATA_REPORT_ZONES_OPTION_LIST_EMPTY_ZONES 0x01
1702#define ATA_REPORT_ZONES_OPTION_LIST_IMPLICITLY_OPENED_ZONES 0x02
1703#define ATA_REPORT_ZONES_OPTION_LIST_EXPLICITLY_OPENED_ZONES 0x03
1704#define ATA_REPORT_ZONES_OPTION_LIST_CLOSED_ZONES 0x04
1705#define ATA_REPORT_ZONES_OPTION_LIST_FULL_ZONES 0x05
1706#define ATA_REPORT_ZONES_OPTION_LIST_READ_ONLY_ZONES 0x06
1707#define ATA_REPORT_ZONES_OPTION_LIST_OFFLINE_ZONES 0x07
1708
1709#define ATA_REPORT_ZONES_OPTION_LIST_RWP_ZONES 0x10
1710#define ATA_REPORT_ZONES_OPTION_LIST_NON_SEQUENTIAL_WRITE_RESOURCES_ACTIVE_ZONES 0x11
1711
1712#define ATA_REPORT_ZONES_OPTION_LIST_NOT_WRITE_POINTER_ZONES 0x3F
1713
1714#define ATA_ZONES_TYPE_AND_LENGTH_MAY_DIFFERENT 0x0
1715#define ATA_ZONES_TYPE_SAME_LENGTH_SAME 0x1
1716#define ATA_ZONES_TYPE_SAME_LAST_ZONE_LENGTH_DIFFERENT 0x2
1717#define ATA_ZONES_TYPE_MAY_DIFFERENT_LENGTH_SAME 0x3
1718
1719#define ATA_ZONE_TYPE_CONVENTIONAL 0x1
1720#define ATA_ZONE_TYPE_SEQUENTIAL_WRITE_REQUIRED 0x2
1721#define ATA_ZONE_TYPE_SEQUENTIAL_WRITE_PREFERRED 0x3
1722
1723#define ATA_ZONE_CONDITION_NOT_WRITE_POINTER 0x0
1724#define ATA_ZONE_CONDITION_EMPTY 0x1
1725#define ATA_ZONE_CONDITION_IMPLICITLY_OPENED 0x2
1726#define ATA_ZONE_CONDITION_EXPLICITLY_OPENED 0x3
1727#define ATA_ZONE_CONDITION_CLOSED 0x4
1728#define ATA_ZONE_CONDITION_READ_ONLY 0xD
1729#define ATA_ZONE_CONDITION_FULL 0xE
1730#define ATA_ZONE_CONDITION_OFFLINE 0xF
1731
1732#endif
Note: See TracBrowser for help on using the repository browser.