28 UINT16 sectors_per_track;
29 UINT16 vendor_specific_7_9[3];
31 UINT16 vendor_specific_20_21[2];
32 UINT16 ecc_bytes_available;
35 UINT16 multi_sector_cmd_max_sct_cnt;
39 UINT16 pio_cycle_timing;
41 UINT16 field_validity;
42 UINT16 current_cylinders;
44 UINT16 current_sectors;
45 UINT16 CurrentCapacityLsb;
46 UINT16 CurrentCapacityMsb;
48 UINT16 user_addressable_sectors_lo;
49 UINT16 user_addressable_sectors_hi;
51 UINT16 multi_word_dma_mode;
52 UINT16 advanced_pio_modes;
53 UINT16 min_multi_word_dma_cycle_time;
54 UINT16 rec_multi_word_dma_cycle_time;
55 UINT16 min_pio_cycle_time_without_flow_control;
56 UINT16 min_pio_cycle_time_with_flow_control;
57 UINT16 reserved_69_79[11];
58 UINT16 major_version_no;
59 UINT16 minor_version_no;
67 UINT16 reserved_89_127[39];
68 UINT16 security_status;
69 UINT16 vendor_data_129_159[31];
70 UINT16 reserved_160_255[96];
83 UINT16 retired_4_5[2];
85 UINT16 cfa_reserved_7_8[2];
88 UINT16 retired_20_21[2];
92 UINT16 multi_sector_cmd_max_sct_cnt;
93 UINT16 trusted_computing_support;
94 UINT16 capabilities_49;
95 UINT16 capabilities_50;
96 UINT16 obsolete_51_52[2];
97 UINT16 field_validity;
98 UINT16 obsolete_54_58[5];
99 UINT16 multi_sector_setting;
100 UINT16 user_addressable_sectors_lo;
101 UINT16 user_addressable_sectors_hi;
103 UINT16 multi_word_dma_mode;
104 UINT16 advanced_pio_modes;
105 UINT16 min_multi_word_dma_cycle_time;
106 UINT16 rec_multi_word_dma_cycle_time;
107 UINT16 min_pio_cycle_time_without_flow_control;
108 UINT16 min_pio_cycle_time_with_flow_control;
111 UINT16 reserved_71_74[4];
113 UINT16 serial_ata_capabilities;
115 UINT16 serial_ata_features_supported;
116 UINT16 serial_ata_features_enabled;
117 UINT16 major_version_no;
118 UINT16 minor_version_no;
126 UINT16 time_for_security_erase_unit;
127 UINT16 time_for_enhanced_security_erase_unit;
128 UINT16 advanced_power_management_level;
129 UINT16 master_password_identifier;
130 UINT16 hardware_configuration_test_result;
132 UINT16 stream_minimum_request_size;
133 UINT16 streaming_transfer_time_for_dma;
134 UINT16 streaming_access_latency_for_dma_and_pio;
135 UINT16 streaming_performance_granularity[2];
136 UINT16 maximum_lba_for_48bit_addressing[4];
137 UINT16 streaming_transfer_time_for_pio;
138 UINT16 max_no_of_512byte_blocks_per_data_set_cmd;
140 UINT16 interseek_delay_for_iso7779;
141 UINT16 world_wide_name[4];
142 UINT16 reserved_for_128bit_wwn_112_115[4];
143 UINT16 reserved_for_technical_report;
148 UINT16 reserved_121_126[6];
151 UINT16 vendor_specific_129_159[31];
153 UINT16 reserved_for_compactflash_161_167[7];
154 UINT16 device_nominal_form_factor;
155 UINT16 is_data_set_cmd_supported;
156 CHAR8 additional_product_identifier[8];
157 UINT16 reserved_174_175[2];
158 CHAR8 media_serial_number[60];
160 UINT16 reserved_207_208[2];
162 UINT16 write_read_verify_sector_count_mode3[2];
163 UINT16 verify_sector_count_mode2[2];
164 UINT16 nv_cache_capabilities;
167 UINT16 nominal_media_rotation_rate;
172 UINT16 transport_major_revision_number;
173 UINT16 transport_minor_revision_number;
174 UINT16 reserved_224_229[6];
175 UINT64 extended_no_of_addressable_sectors;
178 UINT16 reserved_236_254[19];
179 UINT16 integrity_word;
191 UINT16 reserved_3_9[7];
193 UINT16 reserved_20_22[3];
194 CHAR8 FirmwareVer[8];
196 UINT16 reserved_47_48[2];
197 UINT16 capabilities_49;
198 UINT16 capabilities_50;
202 UINT16 reserved_54_61[8];
206 UINT16 min_multi_word_dma_cycle_time;
207 UINT16 rec_multi_word_dma_cycle_time;
208 UINT16 min_pio_cycle_time_without_flow_control;
209 UINT16 min_pio_cycle_time_with_flow_control;
210 UINT16 reserved_69_70[2];
211 UINT16 obsolete_71_72[2];
212 UINT16 reserved_73_74[2];
214 UINT16 serial_ata_capabilities;
216 UINT16 serial_ata_features_supported;
217 UINT16 serial_ata_features_enabled;
220 UINT16 cmd_set_support_82;
221 UINT16 cmd_set_support_83;
222 UINT16 cmd_feature_support;
223 UINT16 cmd_feature_enable_85;
224 UINT16 cmd_feature_enable_86;
225 UINT16 cmd_feature_default;
226 UINT16 ultra_dma_select;
229 UINT16 advanced_power_management_level;
230 UINT16 master_pwd_revison_code;
233 UINT16 reserved_95_107[13];
234 UINT16 world_wide_name[4];
235 UINT16 reserved_for_128bit_wwn_112_115[4];
236 UINT16 reserved_116_118[3];
238 UINT16 command_and_feature_sets_supported_enabled;
239 UINT16 reserved_121_124[4];
241 UINT16 obsolete_126_127[2];
242 UINT16 security_status;
243 UINT16 reserved_129_159[31];
244 UINT16 cfa_reserved_160_175[16];
245 UINT16 reserved_176_221[46];
246 UINT16 transport_major_version;
247 UINT16 transport_minor_version;
248 UINT16 reserved_224_254[31];
249 UINT16 integrity_word;
256 UINT8 peripheral_type;
259 UINT8 response_data_format;
264 UINT8 vendor_info[8];
265 UINT8 product_id[16];
266 UINT8 product_revision_level[4];
267 UINT8 vendor_specific_36_55[55 - 36 + 1];
268 UINT8 reserved_56_95[95 - 56 + 1];
273 UINT8 vendor_specific_96_253[253 - 96 + 1];
280 UINT8 error_code : 7;
284 UINT8 reserved_2 : 1;
285 UINT8 Vendor_specifc_1 : 3;
286 UINT8 vendor_specific_3;
287 UINT8 vendor_specific_4;
288 UINT8 vendor_specific_5;
289 UINT8 vendor_specific_6;
291 UINT8 vendor_specific_8;
292 UINT8 vendor_specific_9;
293 UINT8 vendor_specific_10;
294 UINT8 vendor_specific_11;
298 UINT8 sense_key_specific_15 : 7;
300 UINT8 sense_key_specific_16;
301 UINT8 sense_key_specific_17;
326 UINT8 Capacity_Length;
332 UINT8 reserved_9 : 6;
361 UINT8 reserved_1 : 5;
365 UINT8 allocation_length;
380 UINT8 reserved_1 : 5;
384 UINT8 allocation_length;
399 UINT8 reserved_1 : 5;
418 UINT8 reserved_1 : 5;
425 UINT8 allocation_length_hi;
426 UINT8 allocation_length_lo;
437 UINT8 reserved_1 : 5;
440 UINT8 page_control : 2;
445 UINT8 parameter_list_length_hi;
446 UINT8 parameter_list_length_lo;
468#define ATAPI_MAX_DMA_EXT_CMD_SECTORS 0x10000
469#define ATAPI_MAX_DMA_CMD_SECTORS 0x100
472#define ATA_SIGNATURE 0x0101
473#define ATAPI_SIGNATURE 0xeb14
474#define ATAPI_SIGNATURE_32 0xeb140101
477#define ATA_SPINUP_CFG_REQUIRED_IDD_INCOMPLETE 0x37c8
478#define ATA_SPINUP_CFG_REQUIRED_IDD_COMPLETE 0x738c
479#define ATA_SPINUP_CFG_NOT_REQUIRED_IDD_INCOMPLETE 0x8c73
480#define ATA_SPINUP_CFG_NOT_REQUIRED_IDD_COMPLETE 0xc837
485#define ATA_CMD_FORMAT_UNIT 0x04
486#define ATA_CMD_SOFT_RESET 0x08
487#define ATA_CMD_PACKET 0xA0
488#define ATA_CMD_IDENTIFY_DEVICE 0xA1
489#define ATA_CMD_SERVICE 0xA2
490#define ATA_CMD_TEST_UNIT_READY 0x00
491#define ATA_CMD_REQUEST_SENSE 0x03
492#define ATA_CMD_INQUIRY 0x12
493#define ATA_CMD_READ_FORMAT_CAPACITY 0x23
494#define ATA_CMD_READ_CAPACITY 0x25
495#define ATA_CMD_READ_10 0x28
496#define ATA_CMD_WRITE_10 0x2A
497#define ATA_CMD_ATAPI_SEEK 0x2B
498#define ATA_CMD_WRITE_AND_VERIFY 0x2E
499#define ATA_CMD_VERIFY 0x2F
500#define ATA_CMD_READ_12 0xA8
501#define ATA_CMD_WRITE_12 0xAA
502#define ATA_CMD_START_STOP_UNIT 0x1B
503#define ATA_CMD_PREVENT_ALLOW_MEDIA_REMOVAL 0x1E
504#define ATA_CMD_MODE_SELECT 0x55
506#define ATA_CMD_MODE_SENSE 0x5A
507#define ATA_PAGE_CODE_READ_WRITE_ERROR 0x01
508#define ATA_PAGE_CODE_CACHING_PAGE 0x08
509#define ATA_PAGE_CODE_REMOVABLE_BLOCK_CAPABILITIES 0x1B
510#define ATA_PAGE_CODE_TIMER_PROTECT_PAGE 0x1C
511#define ATA_PAGE_CODE_RETURN_ALL_PAGES 0x3F
513#define ATA_CMD_GET_CONFIGURATION 0x46
514#define ATA_GCCD_RT_FIELD_VALUE_ALL 0x00
515#define ATA_GCCD_RT_FIELD_VALUE_CURRENT 0x01
516#define ATA_GCCD_RT_FIELD_VALUE_SINGLE 0x02
517#define ATA_GCCD_RT_FIELD_VALUE_RESERVED 0x03
519#define ATA_FEATURE_LIST_PROFILE_LIST 0x0000
520#define ATA_FEATURE_LIST_CORE 0x0001
521#define ATA_FEATURE_LIST_MORPHING 0x0002
522#define ATA_FEATURE_LIST_REMOVEABLE_MEDIUM 0x0003
523#define ATA_FEATURE_LIST_WRITE_PROTECT 0x0004
529#define ATA_CMD_SUBOP_STOP_DISC 0x00
530#define ATA_CMD_SUBOP_START_DISC 0x01
531#define ATA_CMD_SUBOP_EJECT_DISC 0x02
532#define ATA_CMD_SUBOP_CLOSE_TRAY 0x03
542#define ATA_CMD_IDENTIFY_DRIVE 0xec
543#define ATA_CMD_READ_BUFFER 0xe4
544#define ATA_CMD_READ_SECTORS 0x20
545#define ATA_CMD_READ_SECTORS_WITH_RETRY 0x21
546#define ATA_CMD_READ_LONG 0x22
547#define ATA_CMD_READ_LONG_WITH_RETRY 0x23
548#define ATA_CMD_READ_SECTORS_EXT 0x24
549#define ATA_CMD_READ_MULTIPLE 0xc4
550#define ATA_CMD_READ_MULTIPLE_EXT 0x29
551#define ATA_CMD_READ_LOG_EXT 0x2f
556#define ATA_CMD_FORMAT_TRACK 0x50
557#define ATA_CMD_WRITE_BUFFER 0xe8
558#define ATA_CMD_WRITE_SECTORS 0x30
559#define ATA_CMD_WRITE_SECTORS_WITH_RETRY 0x31
560#define ATA_CMD_WRITE_LONG 0x32
561#define ATA_CMD_WRITE_LONG_WITH_RETRY 0x33
562#define ATA_CMD_WRITE_VERIFY 0x3c
563#define ATA_CMD_WRITE_SECTORS_EXT 0x34
564#define ATA_CMD_WRITE_MULTIPLE 0xc5
565#define ATA_CMD_WRITE_MULTIPLE_EXT 0x39
570#define ATA_CMD_ACK_MEDIA_CHANGE 0xdb
571#define ATA_CMD_BOOT_POST_BOOT 0xdc
572#define ATA_CMD_BOOT_PRE_BOOT 0xdd
573#define ATA_CMD_CHECK_POWER_MODE 0x98
574#define ATA_CMD_CHECK_POWER_MODE_ALIAS 0xe5
575#define ATA_CMD_DOOR_LOCK 0xde
576#define ATA_CMD_DOOR_UNLOCK 0xdf
577#define ATA_CMD_EXEC_DRIVE_DIAG 0x90
578#define ATA_CMD_IDLE_ALIAS 0x97
579#define ATA_CMD_IDLE 0xe3
580#define ATA_CMD_IDLE_IMMEDIATE 0x95
581#define ATA_CMD_IDLE_IMMEDIATE_ALIAS 0xe1
582#define ATA_CMD_INIT_DRIVE_PARAM 0x91
583#define ATA_CMD_RECALIBRATE 0x10
584#define ATA_CMD_READ_DRIVE_STATE 0xe9
585#define ATA_CMD_SET_MULTIPLE_MODE 0xC6
586#define ATA_CMD_READ_VERIFY 0x40
587#define ATA_CMD_READ_VERIFY_WITH_RETRY 0x41
588#define ATA_CMD_SEEK 0x70
589#define ATA_CMD_SET_FEATURES 0xef
590#define ATA_CMD_STANDBY 0x96
591#define ATA_CMD_STANDBY_ALIAS 0xe2
592#define ATA_CMD_STANDBY_IMMEDIATE 0x94
593#define ATA_CMD_STANDBY_IMMEDIATE_ALIAS 0xe0
594#define ATA_CMD_SLEEP 0xe6
595#define ATA_CMD_READ_NATIVE_MAX_ADDRESS 0xf8
596#define ATA_CMD_READ_NATIVE_MAX_ADDRESS_EXT 0x27
601#define ATA_SUB_CMD_ENABLE_VOLATILE_WRITE_CACHE 0x02
602#define ATA_SUB_CMD_SET_TRANSFER_MODE 0x03
603#define ATA_SUB_CMD_ENABLE_APM 0x05
604#define ATA_SUB_CMD_ENABLE_PUIS 0x06
605#define ATA_SUB_CMD_PUIS_SET_DEVICE_SPINUP 0x07
606#define ATA_SUB_CMD_ENABLE_WRITE_READ_VERIFY 0x0b
607#define ATA_SUB_CMD_ENABLE_SATA_FEATURE 0x10
608#define ATA_SUB_CMD_DISABLE_MEDIA_STATUS_NOTIFICATION 0x31
609#define ATA_SUB_CMD_ENABLE_FREE_FALL_CONTROL 0x41
610#define ATA_SUB_CMD_ACOUSTIC_MANAGEMENT_ENABLE 0x42
611#define ATA_SUB_CMD_SET_MAX_HOST_INTERFACE_SECTOR_TIMES 0x43
612#define ATA_SUB_CMD_EXTENDED_POWER_CONDITIONS 0x4a
613#define ATA_SUB_CMD_DISABLE_READ_LOOK_AHEAD 0x55
614#define ATA_SUB_CMD_EN_DIS_DSN_FEATURE 0x63
615#define ATA_SUB_CMD_DISABLE_REVERT_TO_POWER_ON_DEFAULTS 0x66
616#define ATA_SUB_CMD_DISABLE_VOLATILE_WRITE_CACHE 0x82
617#define ATA_SUB_CMD_DISABLE_APM 0x85
618#define ATA_SUB_CMD_DISABLE_PUIS 0x86
619#define ATA_SUB_CMD_DISABLE_WRITE_READ_VERIFY 0x8b
620#define ATA_SUB_CMD_DISABLE_SATA_FEATURE 0x90
621#define ATA_SUB_CMD_ENABLE_MEDIA_STATUS_NOTIFICATION 0x95
622#define ATA_SUB_CMD_ENABLE_READ_LOOK_AHEAD 0xaa
623#define ATA_SUB_CMD_DISABLE_FREE_FALL_CONTROL 0xc1
624#define ATA_SUB_CMD_ACOUSTIC_MANAGEMENT_DISABLE 0xc2
625#define ATA_SUB_CMD_EN_DIS_SENSE_DATA_REPORTING 0xc3
626#define ATA_SUB_CMD_ENABLE_REVERT_TO_POWER_ON_DEFAULTS 0xcc
631#define ATA_CMD_SMART 0xb0
632#define ATA_CONSTANT_C2 0xc2
633#define ATA_CONSTANT_4F 0x4f
635#define ATA_SMART_READ_DATA 0xd0
637#define ATA_SMART_AUTOSAVE 0xd2
638#define ATA_AUTOSAVE_DISABLE_ATTR 0x00
639#define ATA_AUTOSAVE_ENABLE_ATTR 0xf1
641#define ATA_SMART_EXECUTE_OFFLINE_IMMEDIATE 0xd4
642#define ATA_EXECUTE_SMART_OFFLINE_ROUTINE 0x00
643#define ATA_EXECUTE_SMART_OFFLINE_SHORT_SELFTEST 0x01
644#define ATA_EXECUTE_SMART_OFFLINE_EXTENDED_SELFTEST 0x02
645#define ATA_EXECUTE_SMART_OFFLINE_CONVEYANCE_SELFTEST 0x03
646#define ATA_EXECUTE_SMART_OFFLINE_SELECTIVE_SELFTEST 0x04
647#define ATA_SMART_ABORT_SELF_TEST_SUBROUTINE 0x7f
648#define ATA_EXECUTE_SMART_CAPTIVE_SHORT_SELFTEST 0x81
649#define ATA_EXECUTE_SMART_CAPTIVE_EXTENDED_SELFTEST 0x82
650#define ATA_EXECUTE_SMART_CAPTIVE_CONVEYANCE_SELFTEST 0x83
651#define ATA_EXECUTE_SMART_CAPTIVE_SELECTIVE_SELFTEST 0x84
653#define ATA_SMART_READLOG 0xd5
654#define ATA_SMART_WRITELOG 0xd6
655#define ATA_SMART_ENABLE_OPERATION 0xd8
656#define ATA_SMART_DISABLE_OPERATION 0xd9
657#define ATA_SMART_RETURN_STATUS 0xda
659#define ATA_SMART_THRESHOLD_NOT_EXCEEDED_VALUE 0xc24f
660#define ATA_SMART_THRESHOLD_EXCEEDED_VALUE 0x2cf4
663#define ATA_SMART_LOG_DIRECTORY 0x00
664#define ATA_SMART_SUM_SMART_ERROR_LOG 0x01
665#define ATA_SMART_COMP_SMART_ERROR_LOG 0x02
666#define ATA_SMART_EXT_COMP_SMART_ERROR_LOG 0x03
667#define ATA_SMART_SMART_SELFTEST_LOG 0x06
668#define ATA_SMART_EXT_SMART_SELFTEST_LOG 0x07
669#define ATA_SMART_SELECTIVE_SELFTEST_LOG 0x09
670#define ATA_SMART_HOST_VENDOR_SPECIFIC 0x80
671#define ATA_SMART_DEVICE_VENDOR_SPECIFIC 0xa0
676#define ATA_CMD_READ_DMA 0xc8
677#define ATA_CMD_READ_DMA_WITH_RETRY 0xc9
678#define ATA_CMD_READ_DMA_EXT 0x25
679#define ATA_CMD_WRITE_DMA 0xca
680#define ATA_CMD_WRITE_DMA_WITH_RETRY 0xcb
681#define ATA_CMD_WRITE_DMA_EXT 0x35
686#define ATA_CMD_SECURITY_SET_PASSWORD 0xf1
687#define ATA_CMD_SECURITY_UNLOCK 0xf2
688#define ATA_CMD_SECURITY_ERASE_PREPARE 0xf3
689#define ATA_CMD_SECURITY_ERASE_UNIT 0xf4
690#define ATA_CMD_SECURITY_FREEZE_LOCK 0xf5
691#define ATA_CMD_SECURITY_DISABLE_PASSWORD 0xf6
693#define ATA_SECURITY_BUFFER_LENGTH 512
698#define ATA_CMD_DEV_CONFIG_OVERLAY 0xb1
699#define ATA_CMD_DEV_CONFIG_RESTORE_FEATURE 0xc0
700#define ATA_CMD_DEV_CONFIG_FREEZELOCK_FEATURE 0xc1
701#define ATA_CMD_DEV_CONFIG_IDENTIFY_FEATURE 0xc2
702#define ATA_CMD_DEV_CONFIG_SET_FEATURE 0xc3
707#define ATA_CMD_TRUSTED_NON_DATA 0x5b
708#define ATA_CMD_TRUSTED_RECEIVE 0x5c
709#define ATA_CMD_TRUSTED_RECEIVE_DMA 0x5d
710#define ATA_CMD_TRUSTED_SEND 0x5e
711#define ATA_CMD_TRUSTED_SEND_DMA 0x5f
716#define ATA_TR_RETURN_SECURITY_PROTOCOL_INFORMATION 0x00
717#define ATA_TR_SECURITY_PROTOCOL_JEDEC_RESERVED 0xec
718#define ATA_TR_SECURITY_PROTOCOL_SDCARD_RESERVED 0xed
719#define ATA_TR_SECURITY_PROTOCOL_IEEE1667_RESERVED 0xee
724#define ATA_ACOUSTIC_LEVEL_BYPASS 0xff
725#define ATA_ACOUSTIC_LEVEL_MAXIMUM_PERFORMANCE 0xfe
726#define ATA_ACOUSTIC_LEVEL_QUIET 0x80
731#define ATA_CMD_DIPM_SUB 0x03
732#define ATA_DIPM_ENABLE 0x10
733#define ATA_DIPM_DISABLE 0x90
738#define ATA_CMD_DEVSLEEP_SUB 0x09
739#define ATA_DEVSLEEP_ENABLE 0x10
740#define ATA_DEVSLEEP_DISABLE 0x90
742#define ATA_DEVSLP_EXIT_TIMEOUT 20
743#define ATA_DEVSLP_MINIMUM_DETECTION_TIME 10
744#define ATA_DEVSLP_MINIMUM_ASSERTION_TIME 10
749#define ATA_CMD_SET_MAX_ADDRESS_EXT 0x37
750#define ATA_CMD_SET_MAX_ADDRESS 0xf9
751#define ATA_SET_MAX_SET_PASSWORD 0x01
752#define ATA_SET_MAX_LOCK 0x02
753#define ATA_SET_MAX_UNLOCK 0x03
754#define ATA_SET_MAX_FREEZE_LOCK 0x04
760#define ATA_DEFAULT_CTL (0x0a)
765#define ATA_DEFAULT_CMD (0xa0)
767#define ATAPI_MAX_BYTE_COUNT (0xfffe)
769#define ATA_REQUEST_SENSE_ERROR (0x70)
777#define ATA_SK_NO_SENSE (0x0)
778#define ATA_SK_RECOVERY_ERROR (0x1)
779#define ATA_SK_NOT_READY (0x2)
780#define ATA_SK_MEDIUM_ERROR (0x3)
781#define ATA_SK_HARDWARE_ERROR (0x4)
782#define ATA_SK_ILLEGAL_REQUEST (0x5)
783#define ATA_SK_UNIT_ATTENTION (0x6)
784#define ATA_SK_DATA_PROTECT (0x7)
785#define ATA_SK_BLANK_CHECK (0x8)
786#define ATA_SK_VENDOR_SPECIFIC (0x9)
787#define ATA_SK_RESERVED_A (0xA)
788#define ATA_SK_ABORT (0xB)
789#define ATA_SK_RESERVED_C (0xC)
790#define ATA_SK_OVERFLOW (0xD)
791#define ATA_SK_MISCOMPARE (0xE)
792#define ATA_SK_RESERVED_F (0xF)
797#define ATA_ASC_NOT_READY (0x04)
798#define ATA_ASC_MEDIA_ERR1 (0x10)
799#define ATA_ASC_MEDIA_ERR2 (0x11)
800#define ATA_ASC_MEDIA_ERR3 (0x14)
801#define ATA_ASC_MEDIA_ERR4 (0x30)
802#define ATA_ASC_MEDIA_UPSIDE_DOWN (0x06)
803#define ATA_ASC_INVALID_CMD (0x20)
804#define ATA_ASC_LBA_OUT_OF_RANGE (0x21)
805#define ATA_ASC_INVALID_FIELD (0x24)
806#define ATA_ASC_WRITE_PROTECTED (0x27)
807#define ATA_ASC_MEDIA_CHANGE (0x28)
808#define ATA_ASC_RESET (0x29)
809#define ATA_ASC_ILLEGAL_FIELD (0x26)
810#define ATA_ASC_NO_MEDIA (0x3A)
811#define ATA_ASC_ILLEGAL_MODE_FOR_THIS_TRACK (0x64)
816#define ATA_ASCQ_IN_PROGRESS (0x01)
821#define ATA_ERRREG_BBK BIT7
822#define ATA_ERRREG_UNC BIT6
823#define ATA_ERRREG_MC BIT5
824#define ATA_ERRREG_IDNF BIT4
825#define ATA_ERRREG_MCR BIT3
826#define ATA_ERRREG_ABRT BIT2
827#define ATA_ERRREG_TK0NF BIT1
828#define ATA_ERRREG_AMNF BIT0
833#define ATA_STSREG_BSY BIT7
834#define ATA_STSREG_DRDY BIT6
835#define ATA_STSREG_DWF BIT5
836#define ATA_STSREG_DF BIT5
837#define ATA_STSREG_DSC BIT4
838#define ATA_STSREG_DRQ BIT3
839#define ATA_STSREG_CORR BIT2
840#define ATA_STSREG_IDX BIT1
841#define ATA_STSREG_ERR BIT0
846#define ATA_CTLREG_SRST BIT2
847#define ATA_CTLREG_IEN_L BIT1
EFI_STATUS TestUnitReady(IN ATAPI_BLK_IO_DEV *AtapiBlkIoDev, IN UINTN DevicePosition)
EFI_STATUS Inquiry(IN ATAPI_BLK_IO_DEV *AtapiBlkIoDev, IN UINTN DevicePosition, OUT EFI_PEI_BLOCK_IO_MEDIA *MediaInfo, OUT EFI_PEI_BLOCK_IO2_MEDIA *MediaInfo2)
UINT16 ultra_dma_mode
word 88
UINT16 command_set_supported_83
word 83
UINT16 command_set_feature_extn
word 84
UINT16 command_set_feature_enb_86
word 86
UINT16 config
General Configuration.
UINT16 command_set_feature_enb_85
word 85
UINT16 cylinders
Number of Cylinders.
UINT16 command_set_feature_default
word 87
UINT16 command_set_supported_82
word 82
UINT16 heads
Number of logical heads.
UINT16 features_and_command_sets_enabled_ext
word 120
UINT16 ultra_dma_mode
word 88
UINT16 command_set_feature_enb_85
word 85
UINT16 max_number_per_download_microcode_mode3
word 235
UINT16 specific_config
Specific Configuration.
UINT16 reserved_77
Reserved for Serial ATA.
UINT16 config
General Configuration.
UINT16 additional_supported
word 69
UINT16 command_set_feature_enb_86
word 86
UINT16 security_status
word 128
UINT16 command_set_feature_extn
word 84
UINT16 command_set_feature_default
word 87
UINT16 alignment_logic_in_phy_blocks
word 209
UINT16 write_read_verify_mode
word 220
UINT16 command_set_supported_83
word 83
UINT16 nv_cache_size_in_logical_block_msw
word 216
UINT16 cfa_power_mode
word 160
UINT16 logic_sector_size_lo
word 117
UINT16 phy_logic_sector_support
word 106
UINT16 logic_sector_size_hi
word 118
UINT16 nv_cache_size_in_logical_block_lsw
word 215
UINT16 sct_command_transport
word 206
UINT16 command_set_supported_82
word 82
UINT16 min_number_per_download_microcode_mode3
word 234
UINT16 features_and_command_sets_supported_ext
word 119
UINT16 nv_cache_options
word 219
UINT16 reserved_77
Reserved for Serial ATA.
UINT16 command_and_feature_sets_supported
word 119
UINT16 advanced_pio_modes
word 64
UINT16 specific_config
Specific Configuration.
UINT16 field_validity
word 53
UINT16 major_version_no
word 80
UINT16 time_required_for_sec_erase
word 89
UINT16 hardware_reset_result
word 93
UINT16 multi_word_dma_mode
word 63
UINT16 atapi_byte_count_0_behavior
word 125
UINT16 time_required_for_enhanced_sec_erase
word 90
UINT16 minor_version_no
word 81
UINT16 config
General Configuration.
UINT8 page_code
defined in SFF8090i, V6
UINT8 addnl_length
n - 4, Numbers of bytes following this one.
UINT8 addnl_sense_length
n - 7
UINT8 addnl_sense_code
mandatory
UINT8 field_replaceable_unit_code
optional
UINT8 addnl_sense_code_qualifier
mandatory