Changeset 99404 in vbox for trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/IndustryStandard/Atapi.h
- Timestamp:
- Apr 14, 2023 3:17:44 PM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 156854
- Location:
- trunk/src/VBox/Devices/EFI/FirmwareNew
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/FirmwareNew
-
Property svn:mergeinfo
changed from (toggle deleted branches)
to (toggle deleted branches)/vendor/edk2/current 103735-103757,103769-103776,129194-145445 /vendor/edk2/current 103735-103757,103769-103776,129194-156846
-
Property svn:mergeinfo
changed from (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/IndustryStandard/Atapi.h
r85718 r99404 20 20 /// 21 21 typedef struct { 22 UINT16 config;///< General Configuration.23 UINT16 cylinders;///< Number of Cylinders.24 UINT16 reserved_2;25 UINT16 heads;///< Number of logical heads.26 UINT16 vendor_data1;27 UINT16 vendor_data2;28 UINT16 sectors_per_track;29 UINT16 vendor_specific_7_9[3];30 CHAR8 SerialNo[20];///< ASCII31 UINT16 vendor_specific_20_21[2];32 UINT16 ecc_bytes_available;33 CHAR8 FirmwareVer[8];///< ASCII34 CHAR8 ModelName[40];///< ASCII35 UINT16 multi_sector_cmd_max_sct_cnt;36 UINT16 reserved_48;37 UINT16 capabilities;38 UINT16 reserved_50;39 UINT16 pio_cycle_timing;40 UINT16 reserved_52;41 UINT16 field_validity;42 UINT16 current_cylinders;43 UINT16 current_heads;44 UINT16 current_sectors;45 UINT16 CurrentCapacityLsb;46 UINT16 CurrentCapacityMsb;47 UINT16 reserved_59;48 UINT16 user_addressable_sectors_lo;49 UINT16 user_addressable_sectors_hi;50 UINT16 reserved_62;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;60 UINT16 command_set_supported_82; ///< word 8261 UINT16 command_set_supported_83; ///< word 8362 UINT16 command_set_feature_extn; ///< word 8463 UINT16 command_set_feature_enb_85; ///< word 8564 UINT16 command_set_feature_enb_86; ///< word 8665 UINT16 command_set_feature_default; ///< word 8766 UINT16 ultra_dma_mode; ///< word 8867 UINT16 reserved_89_127[39];68 UINT16 security_status;69 UINT16 vendor_data_129_159[31];70 UINT16 reserved_160_255[96];22 UINT16 config; ///< General Configuration. 23 UINT16 cylinders; ///< Number of Cylinders. 24 UINT16 reserved_2; 25 UINT16 heads; ///< Number of logical heads. 26 UINT16 vendor_data1; 27 UINT16 vendor_data2; 28 UINT16 sectors_per_track; 29 UINT16 vendor_specific_7_9[3]; 30 CHAR8 SerialNo[20]; ///< ASCII 31 UINT16 vendor_specific_20_21[2]; 32 UINT16 ecc_bytes_available; 33 CHAR8 FirmwareVer[8]; ///< ASCII 34 CHAR8 ModelName[40]; ///< ASCII 35 UINT16 multi_sector_cmd_max_sct_cnt; 36 UINT16 reserved_48; 37 UINT16 capabilities; 38 UINT16 reserved_50; 39 UINT16 pio_cycle_timing; 40 UINT16 reserved_52; 41 UINT16 field_validity; 42 UINT16 current_cylinders; 43 UINT16 current_heads; 44 UINT16 current_sectors; 45 UINT16 CurrentCapacityLsb; 46 UINT16 CurrentCapacityMsb; 47 UINT16 reserved_59; 48 UINT16 user_addressable_sectors_lo; 49 UINT16 user_addressable_sectors_hi; 50 UINT16 reserved_62; 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; 60 UINT16 command_set_supported_82; ///< word 82 61 UINT16 command_set_supported_83; ///< word 83 62 UINT16 command_set_feature_extn; ///< word 84 63 UINT16 command_set_feature_enb_85; ///< word 85 64 UINT16 command_set_feature_enb_86; ///< word 86 65 UINT16 command_set_feature_default; ///< word 87 66 UINT16 ultra_dma_mode; ///< word 88 67 UINT16 reserved_89_127[39]; 68 UINT16 security_status; 69 UINT16 vendor_data_129_159[31]; 70 UINT16 reserved_160_255[96]; 71 71 } ATA5_IDENTIFY_DATA; 72 72 … … 77 77 /// 78 78 typedef struct { 79 UINT16 config;///< General Configuration.80 UINT16 obsolete_1;81 UINT16 specific_config;///< Specific Configuration.82 UINT16 obsolete_3;83 UINT16 retired_4_5[2];84 UINT16 obsolete_6;85 UINT16 cfa_reserved_7_8[2];86 UINT16 retired_9;87 CHAR8 SerialNo[20];///< word 10~1988 UINT16 retired_20_21[2];89 UINT16 obsolete_22;90 CHAR8 FirmwareVer[8];///< word 23~2691 CHAR8 ModelName[40];///< word 27~4692 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;102 UINT16 obsolete_62;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;109 UINT16 additional_supported;///< word 69110 UINT16 reserved_70;111 UINT16 reserved_71_74[4];///< Reserved for IDENTIFY PACKET DEVICE cmd.112 UINT16 queue_depth;113 UINT16 serial_ata_capabilities;114 UINT16 reserved_77;///< Reserved for Serial ATA115 UINT16 serial_ata_features_supported;116 UINT16 serial_ata_features_enabled;117 UINT16 major_version_no;118 UINT16 minor_version_no;119 UINT16 command_set_supported_82;///< word 82120 UINT16 command_set_supported_83;///< word 83121 UINT16 command_set_feature_extn;///< word 84122 UINT16 command_set_feature_enb_85;///< word 85123 UINT16 command_set_feature_enb_86;///< word 86124 UINT16 command_set_feature_default;///< word 87125 UINT16 ultra_dma_mode;///< word 88126 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;131 UINT16 obsolete_94;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];///< word 98~99136 UINT16 maximum_lba_for_48bit_addressing[4];///< word 100~103137 UINT16 streaming_transfer_time_for_pio;138 UINT16 max_no_of_512byte_blocks_per_data_set_cmd;139 UINT16 phy_logic_sector_support;///< word 106140 UINT16 interseek_delay_for_iso7779;141 UINT16 world_wide_name[4];///< word 108~111142 UINT16 reserved_for_128bit_wwn_112_115[4];143 UINT16 reserved_for_technical_report;144 UINT16 logic_sector_size_lo; ///< word 117145 UINT16 logic_sector_size_hi; ///< word 118146 UINT16 features_and_command_sets_supported_ext; ///< word 119147 UINT16 features_and_command_sets_enabled_ext; ///< word 120148 UINT16 reserved_121_126[6];149 UINT16 obsolete_127;150 UINT16 security_status;///< word 128151 UINT16 vendor_specific_129_159[31];152 UINT16 cfa_power_mode;///< word 160153 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];///< word 176~205159 UINT16 sct_command_transport;///< word 206160 UINT16 reserved_207_208[2];161 UINT16 alignment_logic_in_phy_blocks; ///< word 209162 UINT16 write_read_verify_sector_count_mode3[2]; ///< word 210~211163 UINT16 verify_sector_count_mode2[2];164 UINT16 nv_cache_capabilities;165 UINT16 nv_cache_size_in_logical_block_lsw;///< word 215166 UINT16 nv_cache_size_in_logical_block_msw;///< word 216167 UINT16 nominal_media_rotation_rate;168 UINT16 reserved_218;169 UINT16 nv_cache_options;///< word 219170 UINT16 write_read_verify_mode;///< word 220171 UINT16 reserved_221;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;176 UINT16 min_number_per_download_microcode_mode3; ///< word 234177 UINT16 max_number_per_download_microcode_mode3; ///< word 235178 UINT16 reserved_236_254[19];179 UINT16 integrity_word;79 UINT16 config; ///< General Configuration. 80 UINT16 obsolete_1; 81 UINT16 specific_config; ///< Specific Configuration. 82 UINT16 obsolete_3; 83 UINT16 retired_4_5[2]; 84 UINT16 obsolete_6; 85 UINT16 cfa_reserved_7_8[2]; 86 UINT16 retired_9; 87 CHAR8 SerialNo[20]; ///< word 10~19 88 UINT16 retired_20_21[2]; 89 UINT16 obsolete_22; 90 CHAR8 FirmwareVer[8]; ///< word 23~26 91 CHAR8 ModelName[40]; ///< word 27~46 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; 102 UINT16 obsolete_62; 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; 109 UINT16 additional_supported; ///< word 69 110 UINT16 reserved_70; 111 UINT16 reserved_71_74[4]; ///< Reserved for IDENTIFY PACKET DEVICE cmd. 112 UINT16 queue_depth; 113 UINT16 serial_ata_capabilities; 114 UINT16 reserved_77; ///< Reserved for Serial ATA 115 UINT16 serial_ata_features_supported; 116 UINT16 serial_ata_features_enabled; 117 UINT16 major_version_no; 118 UINT16 minor_version_no; 119 UINT16 command_set_supported_82; ///< word 82 120 UINT16 command_set_supported_83; ///< word 83 121 UINT16 command_set_feature_extn; ///< word 84 122 UINT16 command_set_feature_enb_85; ///< word 85 123 UINT16 command_set_feature_enb_86; ///< word 86 124 UINT16 command_set_feature_default; ///< word 87 125 UINT16 ultra_dma_mode; ///< word 88 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; 131 UINT16 obsolete_94; 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]; ///< word 98~99 136 UINT16 maximum_lba_for_48bit_addressing[4]; ///< word 100~103 137 UINT16 streaming_transfer_time_for_pio; 138 UINT16 max_no_of_512byte_blocks_per_data_set_cmd; 139 UINT16 phy_logic_sector_support; ///< word 106 140 UINT16 interseek_delay_for_iso7779; 141 UINT16 world_wide_name[4]; ///< word 108~111 142 UINT16 reserved_for_128bit_wwn_112_115[4]; 143 UINT16 reserved_for_technical_report; 144 UINT16 logic_sector_size_lo; ///< word 117 145 UINT16 logic_sector_size_hi; ///< word 118 146 UINT16 features_and_command_sets_supported_ext; ///< word 119 147 UINT16 features_and_command_sets_enabled_ext; ///< word 120 148 UINT16 reserved_121_126[6]; 149 UINT16 obsolete_127; 150 UINT16 security_status; ///< word 128 151 UINT16 vendor_specific_129_159[31]; 152 UINT16 cfa_power_mode; ///< word 160 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]; ///< word 176~205 159 UINT16 sct_command_transport; ///< word 206 160 UINT16 reserved_207_208[2]; 161 UINT16 alignment_logic_in_phy_blocks; ///< word 209 162 UINT16 write_read_verify_sector_count_mode3[2]; ///< word 210~211 163 UINT16 verify_sector_count_mode2[2]; 164 UINT16 nv_cache_capabilities; 165 UINT16 nv_cache_size_in_logical_block_lsw; ///< word 215 166 UINT16 nv_cache_size_in_logical_block_msw; ///< word 216 167 UINT16 nominal_media_rotation_rate; 168 UINT16 reserved_218; 169 UINT16 nv_cache_options; ///< word 219 170 UINT16 write_read_verify_mode; ///< word 220 171 UINT16 reserved_221; 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; 176 UINT16 min_number_per_download_microcode_mode3; ///< word 234 177 UINT16 max_number_per_download_microcode_mode3; ///< word 235 178 UINT16 reserved_236_254[19]; 179 UINT16 integrity_word; 180 180 } ATA_IDENTIFY_DATA; 181 181 … … 186 186 /// 187 187 typedef struct { 188 UINT16 config;///< General Configuration.189 UINT16 reserved_1;190 UINT16 specific_config;///< Specific Configuration.191 UINT16 reserved_3_9[7];192 CHAR8 SerialNo[20];///< word 10~19193 UINT16 reserved_20_22[3];194 CHAR8 FirmwareVer[8];///< word 23~26195 CHAR8 ModelName[40];///< word 27~46196 UINT16 reserved_47_48[2];197 UINT16 capabilities_49;198 UINT16 capabilities_50;199 UINT16 obsolete_51;200 UINT16 reserved_52;201 UINT16 field_validity;///< word 53202 UINT16 reserved_54_61[8];203 UINT16 dma_dir;204 UINT16 multi_word_dma_mode;///< word 63205 UINT16 advanced_pio_modes;///< word 64206 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];213 UINT16 obsolete_75;214 UINT16 serial_ata_capabilities;215 UINT16 reserved_77;///< Reserved for Serial ATA216 UINT16 serial_ata_features_supported;217 UINT16 serial_ata_features_enabled;218 UINT16 major_version_no;///< word 80219 UINT16 minor_version_no;///< word 81220 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;227 UINT16 time_required_for_sec_erase;///< word 89228 UINT16 time_required_for_enhanced_sec_erase;///< word 90229 UINT16 advanced_power_management_level;230 UINT16 master_pwd_revison_code;231 UINT16 hardware_reset_result;///< word 93232 UINT16 obsolete_94;233 UINT16 reserved_95_107[13];234 UINT16 world_wide_name[4];///< word 108~111235 UINT16 reserved_for_128bit_wwn_112_115[4];236 UINT16 reserved_116_118[3];237 UINT16 command_and_feature_sets_supported;///< word 119238 UINT16 command_and_feature_sets_supported_enabled;239 UINT16 reserved_121_124[4];240 UINT16 atapi_byte_count_0_behavior;///< word 125241 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;188 UINT16 config; ///< General Configuration. 189 UINT16 reserved_1; 190 UINT16 specific_config; ///< Specific Configuration. 191 UINT16 reserved_3_9[7]; 192 CHAR8 SerialNo[20]; ///< word 10~19 193 UINT16 reserved_20_22[3]; 194 CHAR8 FirmwareVer[8]; ///< word 23~26 195 CHAR8 ModelName[40]; ///< word 27~46 196 UINT16 reserved_47_48[2]; 197 UINT16 capabilities_49; 198 UINT16 capabilities_50; 199 UINT16 obsolete_51; 200 UINT16 reserved_52; 201 UINT16 field_validity; ///< word 53 202 UINT16 reserved_54_61[8]; 203 UINT16 dma_dir; 204 UINT16 multi_word_dma_mode; ///< word 63 205 UINT16 advanced_pio_modes; ///< word 64 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]; 213 UINT16 obsolete_75; 214 UINT16 serial_ata_capabilities; 215 UINT16 reserved_77; ///< Reserved for Serial ATA 216 UINT16 serial_ata_features_supported; 217 UINT16 serial_ata_features_enabled; 218 UINT16 major_version_no; ///< word 80 219 UINT16 minor_version_no; ///< word 81 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; 227 UINT16 time_required_for_sec_erase; ///< word 89 228 UINT16 time_required_for_enhanced_sec_erase; ///< word 90 229 UINT16 advanced_power_management_level; 230 UINT16 master_pwd_revison_code; 231 UINT16 hardware_reset_result; ///< word 93 232 UINT16 obsolete_94; 233 UINT16 reserved_95_107[13]; 234 UINT16 world_wide_name[4]; ///< word 108~111 235 UINT16 reserved_for_128bit_wwn_112_115[4]; 236 UINT16 reserved_116_118[3]; 237 UINT16 command_and_feature_sets_supported; ///< word 119 238 UINT16 command_and_feature_sets_supported_enabled; 239 UINT16 reserved_121_124[4]; 240 UINT16 atapi_byte_count_0_behavior; ///< word 125 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; 250 250 } ATAPI_IDENTIFY_DATA; 251 251 252 253 252 /// 254 253 /// Standard Quiry Data format, defined in SFF-8070i(ATAPI Removable Rewritable Specification). 255 254 /// 256 255 typedef struct { 257 UINT8 peripheral_type;258 UINT8 RMB;259 UINT8 version;260 UINT8 response_data_format;261 UINT8 addnl_length;///< n - 4, Numbers of bytes following this one.262 UINT8 reserved_5;263 UINT8 reserved_6;264 UINT8 reserved_7;265 UINT8 vendor_info[8];266 UINT8 product_id[16];267 UINT8 product_revision_level[4];268 UINT8 vendor_specific_36_55[55 - 36 + 1];269 UINT8 reserved_56_95[95 - 56 + 1];256 UINT8 peripheral_type; 257 UINT8 RMB; 258 UINT8 version; 259 UINT8 response_data_format; 260 UINT8 addnl_length; ///< n - 4, Numbers of bytes following this one. 261 UINT8 reserved_5; 262 UINT8 reserved_6; 263 UINT8 reserved_7; 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]; 270 269 /// 271 270 /// Vendor-specific parameters fields. The sizeof (ATAPI_INQUIRY_DATA) is 254 272 271 /// since allocation_length is one byte in ATAPI_INQUIRY_CMD. 273 272 /// 274 UINT8 vendor_specific_96_253[253 - 96 + 1];273 UINT8 vendor_specific_96_253[253 - 96 + 1]; 275 274 } ATAPI_INQUIRY_DATA; 276 275 … … 279 278 /// 280 279 typedef struct { 281 UINT8 error_code: 7;282 UINT8 valid: 1;283 UINT8 reserved_1;284 UINT8 sense_key: 4;285 UINT8 reserved_2: 1;286 UINT8 Vendor_specifc_1 : 3;287 UINT8 vendor_specific_3;288 UINT8 vendor_specific_4;289 UINT8 vendor_specific_5;290 UINT8 vendor_specific_6;291 UINT8 addnl_sense_length;///< n - 7292 UINT8 vendor_specific_8;293 UINT8 vendor_specific_9;294 UINT8 vendor_specific_10;295 UINT8 vendor_specific_11;296 UINT8 addnl_sense_code;///< mandatory297 UINT8 addnl_sense_code_qualifier;///< mandatory298 UINT8 field_replaceable_unit_code;///< optional299 UINT8 sense_key_specific_15 : 7;300 UINT8 SKSV: 1;301 UINT8 sense_key_specific_16;302 UINT8 sense_key_specific_17;280 UINT8 error_code : 7; 281 UINT8 valid : 1; 282 UINT8 reserved_1; 283 UINT8 sense_key : 4; 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; 290 UINT8 addnl_sense_length; ///< n - 7 291 UINT8 vendor_specific_8; 292 UINT8 vendor_specific_9; 293 UINT8 vendor_specific_10; 294 UINT8 vendor_specific_11; 295 UINT8 addnl_sense_code; ///< mandatory 296 UINT8 addnl_sense_code_qualifier; ///< mandatory 297 UINT8 field_replaceable_unit_code; ///< optional 298 UINT8 sense_key_specific_15 : 7; 299 UINT8 SKSV : 1; 300 UINT8 sense_key_specific_16; 301 UINT8 sense_key_specific_17; 303 302 } ATAPI_REQUEST_SENSE_DATA; 304 303 … … 307 306 /// 308 307 typedef struct { 309 UINT8 LastLba3;310 UINT8 LastLba2;311 UINT8 LastLba1;312 UINT8 LastLba0;313 UINT8 BlockSize3;314 UINT8 BlockSize2;315 UINT8 BlockSize1;316 UINT8 BlockSize0;308 UINT8 LastLba3; 309 UINT8 LastLba2; 310 UINT8 LastLba1; 311 UINT8 LastLba0; 312 UINT8 BlockSize3; 313 UINT8 BlockSize2; 314 UINT8 BlockSize1; 315 UINT8 BlockSize0; 317 316 } ATAPI_READ_CAPACITY_DATA; 318 317 … … 322 321 /// 323 322 typedef struct { 324 UINT8 reserved_0;325 UINT8 reserved_1;326 UINT8 reserved_2;327 UINT8 Capacity_Length;328 UINT8 LastLba3;329 UINT8 LastLba2;330 UINT8 LastLba1;331 UINT8 LastLba0;332 UINT8 DesCode: 2;333 UINT8 reserved_9 : 6;334 UINT8 BlockSize2;335 UINT8 BlockSize1;336 UINT8 BlockSize0;323 UINT8 reserved_0; 324 UINT8 reserved_1; 325 UINT8 reserved_2; 326 UINT8 Capacity_Length; 327 UINT8 LastLba3; 328 UINT8 LastLba2; 329 UINT8 LastLba1; 330 UINT8 LastLba0; 331 UINT8 DesCode : 2; 332 UINT8 reserved_9 : 6; 333 UINT8 BlockSize2; 334 UINT8 BlockSize1; 335 UINT8 BlockSize0; 337 336 } ATAPI_READ_FORMAT_CAPACITY_DATA; 338 337 … … 341 340 /// 342 341 typedef struct { 343 UINT8 opcode;344 UINT8 reserved_1;345 UINT8 reserved_2;346 UINT8 reserved_3;347 UINT8 reserved_4;348 UINT8 reserved_5;349 UINT8 reserved_6;350 UINT8 reserved_7;351 UINT8 reserved_8;352 UINT8 reserved_9;353 UINT8 reserved_10;354 UINT8 reserved_11;342 UINT8 opcode; 343 UINT8 reserved_1; 344 UINT8 reserved_2; 345 UINT8 reserved_3; 346 UINT8 reserved_4; 347 UINT8 reserved_5; 348 UINT8 reserved_6; 349 UINT8 reserved_7; 350 UINT8 reserved_8; 351 UINT8 reserved_9; 352 UINT8 reserved_10; 353 UINT8 reserved_11; 355 354 } ATAPI_TEST_UNIT_READY_CMD; 356 355 … … 359 358 /// 360 359 typedef struct { 361 UINT8 opcode;362 UINT8 reserved_1 : 5;363 UINT8 lun: 3;364 UINT8 page_code;///< defined in SFF8090i, V6365 UINT8 reserved_3;366 UINT8 allocation_length;367 UINT8 reserved_5;368 UINT8 reserved_6;369 UINT8 reserved_7;370 UINT8 reserved_8;371 UINT8 reserved_9;372 UINT8 reserved_10;373 UINT8 reserved_11;360 UINT8 opcode; 361 UINT8 reserved_1 : 5; 362 UINT8 lun : 3; 363 UINT8 page_code; ///< defined in SFF8090i, V6 364 UINT8 reserved_3; 365 UINT8 allocation_length; 366 UINT8 reserved_5; 367 UINT8 reserved_6; 368 UINT8 reserved_7; 369 UINT8 reserved_8; 370 UINT8 reserved_9; 371 UINT8 reserved_10; 372 UINT8 reserved_11; 374 373 } ATAPI_INQUIRY_CMD; 375 374 … … 378 377 /// 379 378 typedef struct { 380 UINT8 opcode;381 UINT8 reserved_1 : 5;382 UINT8 lun: 3;383 UINT8 reserved_2;384 UINT8 reserved_3;385 UINT8 allocation_length;386 UINT8 reserved_5;387 UINT8 reserved_6;388 UINT8 reserved_7;389 UINT8 reserved_8;390 UINT8 reserved_9;391 UINT8 reserved_10;392 UINT8 reserved_11;379 UINT8 opcode; 380 UINT8 reserved_1 : 5; 381 UINT8 lun : 3; 382 UINT8 reserved_2; 383 UINT8 reserved_3; 384 UINT8 allocation_length; 385 UINT8 reserved_5; 386 UINT8 reserved_6; 387 UINT8 reserved_7; 388 UINT8 reserved_8; 389 UINT8 reserved_9; 390 UINT8 reserved_10; 391 UINT8 reserved_11; 393 392 } ATAPI_REQUEST_SENSE_CMD; 394 393 … … 397 396 /// 398 397 typedef struct { 399 UINT8 opcode;400 UINT8 reserved_1 : 5;401 UINT8 lun: 3;402 UINT8 Lba0;403 UINT8 Lba1;404 UINT8 Lba2;405 UINT8 Lba3;406 UINT8 reserved_6;407 UINT8 TranLen0;408 UINT8 TranLen1;409 UINT8 reserved_9;410 UINT8 reserved_10;411 UINT8 reserved_11;398 UINT8 opcode; 399 UINT8 reserved_1 : 5; 400 UINT8 lun : 3; 401 UINT8 Lba0; 402 UINT8 Lba1; 403 UINT8 Lba2; 404 UINT8 Lba3; 405 UINT8 reserved_6; 406 UINT8 TranLen0; 407 UINT8 TranLen1; 408 UINT8 reserved_9; 409 UINT8 reserved_10; 410 UINT8 reserved_11; 412 411 } ATAPI_READ10_CMD; 413 412 … … 416 415 /// 417 416 typedef struct { 418 UINT8 opcode;419 UINT8 reserved_1 : 5;420 UINT8 lun: 3;421 UINT8 reserved_2;422 UINT8 reserved_3;423 UINT8 reserved_4;424 UINT8 reserved_5;425 UINT8 reserved_6;426 UINT8 allocation_length_hi;427 UINT8 allocation_length_lo;428 UINT8 reserved_9;429 UINT8 reserved_10;430 UINT8 reserved_11;417 UINT8 opcode; 418 UINT8 reserved_1 : 5; 419 UINT8 lun : 3; 420 UINT8 reserved_2; 421 UINT8 reserved_3; 422 UINT8 reserved_4; 423 UINT8 reserved_5; 424 UINT8 reserved_6; 425 UINT8 allocation_length_hi; 426 UINT8 allocation_length_lo; 427 UINT8 reserved_9; 428 UINT8 reserved_10; 429 UINT8 reserved_11; 431 430 } ATAPI_READ_FORMAT_CAP_CMD; 432 431 … … 435 434 /// 436 435 typedef struct { 437 UINT8 opcode;438 UINT8 reserved_1: 5;439 UINT8 lun: 3;440 UINT8 page_code: 6;441 UINT8 page_control : 2;442 UINT8 reserved_3;443 UINT8 reserved_4;444 UINT8 reserved_5;445 UINT8 reserved_6;446 UINT8 parameter_list_length_hi;447 UINT8 parameter_list_length_lo;448 UINT8 reserved_9;449 UINT8 reserved_10;450 UINT8 reserved_11;436 UINT8 opcode; 437 UINT8 reserved_1 : 5; 438 UINT8 lun : 3; 439 UINT8 page_code : 6; 440 UINT8 page_control : 2; 441 UINT8 reserved_3; 442 UINT8 reserved_4; 443 UINT8 reserved_5; 444 UINT8 reserved_6; 445 UINT8 parameter_list_length_hi; 446 UINT8 parameter_list_length_lo; 447 UINT8 reserved_9; 448 UINT8 reserved_10; 449 UINT8 reserved_11; 451 450 } ATAPI_MODE_SENSE_CMD; 452 451 … … 456 455 /// 457 456 typedef union { 458 UINT16 Data16[6];459 ATAPI_TEST_UNIT_READY_CMD TestUnitReady;460 ATAPI_READ10_CMD Read10;461 ATAPI_REQUEST_SENSE_CMD RequestSence;462 ATAPI_INQUIRY_CMD Inquiry;463 ATAPI_MODE_SENSE_CMD ModeSense;464 ATAPI_READ_FORMAT_CAP_CMD ReadFormatCapacity;457 UINT16 Data16[6]; 458 ATAPI_TEST_UNIT_READY_CMD TestUnitReady; 459 ATAPI_READ10_CMD Read10; 460 ATAPI_REQUEST_SENSE_CMD RequestSence; 461 ATAPI_INQUIRY_CMD Inquiry; 462 ATAPI_MODE_SENSE_CMD ModeSense; 463 ATAPI_READ_FORMAT_CAP_CMD ReadFormatCapacity; 465 464 } ATAPI_PACKET_COMMAND; 466 465 467 466 #pragma pack() 468 467 469 470 #define ATAPI_MAX_DMA_EXT_CMD_SECTORS 0x10000 471 #define ATAPI_MAX_DMA_CMD_SECTORS 0x100 468 #define ATAPI_MAX_DMA_EXT_CMD_SECTORS 0x10000 469 #define ATAPI_MAX_DMA_CMD_SECTORS 0x100 472 470 473 471 // ATA/ATAPI Signature equates 474 #define ATA_SIGNATURE 0x0101///< defined in ACS-3475 #define ATAPI_SIGNATURE 0xeb14///< defined in ACS-3476 #define ATAPI_SIGNATURE_32 0xeb140101///< defined in ACS-3472 #define ATA_SIGNATURE 0x0101 ///< defined in ACS-3 473 #define ATAPI_SIGNATURE 0xeb14 ///< defined in ACS-3 474 #define ATAPI_SIGNATURE_32 0xeb140101 ///< defined in ACS-3 477 475 478 476 // Spin Up Configuration definitions 479 #define ATA_SPINUP_CFG_REQUIRED_IDD_INCOMPLETE 0x37c8///< defined in ACS-3480 #define ATA_SPINUP_CFG_REQUIRED_IDD_COMPLETE 0x738c///< defined in ACS-3481 #define ATA_SPINUP_CFG_NOT_REQUIRED_IDD_INCOMPLETE 0x8c73///< defined in ACS-3482 #define ATA_SPINUP_CFG_NOT_REQUIRED_IDD_COMPLETE 0xc837///< defined in ACS-3477 #define ATA_SPINUP_CFG_REQUIRED_IDD_INCOMPLETE 0x37c8 ///< defined in ACS-3 478 #define ATA_SPINUP_CFG_REQUIRED_IDD_COMPLETE 0x738c ///< defined in ACS-3 479 #define ATA_SPINUP_CFG_NOT_REQUIRED_IDD_INCOMPLETE 0x8c73 ///< defined in ACS-3 480 #define ATA_SPINUP_CFG_NOT_REQUIRED_IDD_COMPLETE 0xc837 ///< defined in ACS-3 483 481 484 482 // 485 483 // ATA Packet Command Code 486 484 // 487 #define ATA_CMD_FORMAT_UNIT 0x04///< defined in ATAPI Removable Rewritable Media Devices488 #define ATA_CMD_SOFT_RESET 0x08///< defined from ATA-3489 #define ATA_CMD_PACKET 0xA0///< defined from ATA-3490 #define ATA_CMD_IDENTIFY_DEVICE 0xA1///< defined from ATA-3491 #define ATA_CMD_SERVICE 0xA2///< defined from ATA-3492 #define ATA_CMD_TEST_UNIT_READY 0x00///< defined from ATA-1493 #define ATA_CMD_REQUEST_SENSE 0x03///< defined from ATA-4494 #define ATA_CMD_INQUIRY 0x12///< defined in ATAPI Removable Rewritable Media Devices495 #define ATA_CMD_READ_FORMAT_CAPACITY 0x23///< defined in ATAPI Removable Rewritable Media Devices496 #define ATA_CMD_READ_CAPACITY 0x25///< defined in ATAPI Removable Rewritable Media Devices497 #define ATA_CMD_READ_10 0x28///< defined in ATAPI Removable Rewritable Media Devices498 #define ATA_CMD_WRITE_10 0x2A///< defined in ATAPI Removable Rewritable Media Devices499 #define ATA_CMD_ATAPI_SEEK 0x2B///< defined in ATAPI Removable Rewritable Media Devices500 #define ATA_CMD_WRITE_AND_VERIFY 0x2E///< defined in ATAPI Removable Rewritable Media Devices501 #define ATA_CMD_VERIFY 0x2F///< defined in ATAPI Removable Rewritable Media Devices502 #define ATA_CMD_READ_12 0xA8///< defined in ATAPI Removable Rewritable Media Devices503 #define ATA_CMD_WRITE_12 0xAA///< defined in ATAPI Removable Rewritable Media Devices504 #define ATA_CMD_START_STOP_UNIT 0x1B///< defined in ATAPI Removable Rewritable Media Devices505 #define ATA_CMD_PREVENT_ALLOW_MEDIA_REMOVAL 0x1E///< defined in ATAPI Removable Rewritable Media Devices506 #define ATA_CMD_MODE_SELECT 0x55///< defined in ATAPI Removable Rewritable Media Devices507 508 #define ATA_CMD_MODE_SENSE 0x5A///< defined in ATAPI Removable Rewritable Media Devices509 #define ATA_PAGE_CODE_READ_WRITE_ERROR 0x01///< defined in ATAPI Removable Rewritable Media Devices510 #define ATA_PAGE_CODE_CACHING_PAGE 0x08///< defined in ATAPI Removable Rewritable Media Devices511 #define ATA_PAGE_CODE_REMOVABLE_BLOCK_CAPABILITIES 0x1B///< defined in ATAPI Removable Rewritable Media Devices512 #define ATA_PAGE_CODE_TIMER_PROTECT_PAGE 0x1C///< defined in ATAPI Removable Rewritable Media Devices513 #define ATA_PAGE_CODE_RETURN_ALL_PAGES 0x3F///< defined in ATAPI Removable Rewritable Media Devices514 515 #define ATA_CMD_GET_CONFIGURATION 0x46///< defined in ATAPI Multimedia Devices516 #define ATA_GCCD_RT_FIELD_VALUE_ALL 0x00///< defined in ATAPI Multimedia Devices517 #define ATA_GCCD_RT_FIELD_VALUE_CURRENT 0x01///< defined in ATAPI Multimedia Devices518 #define ATA_GCCD_RT_FIELD_VALUE_SINGLE 0x02///< defined in ATAPI Multimedia Devices519 #define ATA_GCCD_RT_FIELD_VALUE_RESERVED 0x03///< defined in ATAPI Multimedia Devices520 521 #define ATA_FEATURE_LIST_PROFILE_LIST 0x0000///< defined in ATAPI Multimedia Devices522 #define ATA_FEATURE_LIST_CORE 0x0001///< defined in ATAPI Multimedia Devices523 #define ATA_FEATURE_LIST_MORPHING 0x0002///< defined in ATAPI Multimedia Devices524 #define ATA_FEATURE_LIST_REMOVEABLE_MEDIUM 0x0003///< defined in ATAPI Multimedia Devices525 #define ATA_FEATURE_LIST_WRITE_PROTECT 0x0004///< defined in ATAPI Multimedia Devices485 #define ATA_CMD_FORMAT_UNIT 0x04 ///< defined in ATAPI Removable Rewritable Media Devices 486 #define ATA_CMD_SOFT_RESET 0x08 ///< defined from ATA-3 487 #define ATA_CMD_PACKET 0xA0 ///< defined from ATA-3 488 #define ATA_CMD_IDENTIFY_DEVICE 0xA1 ///< defined from ATA-3 489 #define ATA_CMD_SERVICE 0xA2 ///< defined from ATA-3 490 #define ATA_CMD_TEST_UNIT_READY 0x00 ///< defined from ATA-1 491 #define ATA_CMD_REQUEST_SENSE 0x03 ///< defined from ATA-4 492 #define ATA_CMD_INQUIRY 0x12 ///< defined in ATAPI Removable Rewritable Media Devices 493 #define ATA_CMD_READ_FORMAT_CAPACITY 0x23 ///< defined in ATAPI Removable Rewritable Media Devices 494 #define ATA_CMD_READ_CAPACITY 0x25 ///< defined in ATAPI Removable Rewritable Media Devices 495 #define ATA_CMD_READ_10 0x28 ///< defined in ATAPI Removable Rewritable Media Devices 496 #define ATA_CMD_WRITE_10 0x2A ///< defined in ATAPI Removable Rewritable Media Devices 497 #define ATA_CMD_ATAPI_SEEK 0x2B ///< defined in ATAPI Removable Rewritable Media Devices 498 #define ATA_CMD_WRITE_AND_VERIFY 0x2E ///< defined in ATAPI Removable Rewritable Media Devices 499 #define ATA_CMD_VERIFY 0x2F ///< defined in ATAPI Removable Rewritable Media Devices 500 #define ATA_CMD_READ_12 0xA8 ///< defined in ATAPI Removable Rewritable Media Devices 501 #define ATA_CMD_WRITE_12 0xAA ///< defined in ATAPI Removable Rewritable Media Devices 502 #define ATA_CMD_START_STOP_UNIT 0x1B ///< defined in ATAPI Removable Rewritable Media Devices 503 #define ATA_CMD_PREVENT_ALLOW_MEDIA_REMOVAL 0x1E ///< defined in ATAPI Removable Rewritable Media Devices 504 #define ATA_CMD_MODE_SELECT 0x55 ///< defined in ATAPI Removable Rewritable Media Devices 505 506 #define ATA_CMD_MODE_SENSE 0x5A ///< defined in ATAPI Removable Rewritable Media Devices 507 #define ATA_PAGE_CODE_READ_WRITE_ERROR 0x01 ///< defined in ATAPI Removable Rewritable Media Devices 508 #define ATA_PAGE_CODE_CACHING_PAGE 0x08 ///< defined in ATAPI Removable Rewritable Media Devices 509 #define ATA_PAGE_CODE_REMOVABLE_BLOCK_CAPABILITIES 0x1B ///< defined in ATAPI Removable Rewritable Media Devices 510 #define ATA_PAGE_CODE_TIMER_PROTECT_PAGE 0x1C ///< defined in ATAPI Removable Rewritable Media Devices 511 #define ATA_PAGE_CODE_RETURN_ALL_PAGES 0x3F ///< defined in ATAPI Removable Rewritable Media Devices 512 513 #define ATA_CMD_GET_CONFIGURATION 0x46 ///< defined in ATAPI Multimedia Devices 514 #define ATA_GCCD_RT_FIELD_VALUE_ALL 0x00 ///< defined in ATAPI Multimedia Devices 515 #define ATA_GCCD_RT_FIELD_VALUE_CURRENT 0x01 ///< defined in ATAPI Multimedia Devices 516 #define ATA_GCCD_RT_FIELD_VALUE_SINGLE 0x02 ///< defined in ATAPI Multimedia Devices 517 #define ATA_GCCD_RT_FIELD_VALUE_RESERVED 0x03 ///< defined in ATAPI Multimedia Devices 518 519 #define ATA_FEATURE_LIST_PROFILE_LIST 0x0000 ///< defined in ATAPI Multimedia Devices 520 #define ATA_FEATURE_LIST_CORE 0x0001 ///< defined in ATAPI Multimedia Devices 521 #define ATA_FEATURE_LIST_MORPHING 0x0002 ///< defined in ATAPI Multimedia Devices 522 #define ATA_FEATURE_LIST_REMOVEABLE_MEDIUM 0x0003 ///< defined in ATAPI Multimedia Devices 523 #define ATA_FEATURE_LIST_WRITE_PROTECT 0x0004 ///< defined in ATAPI Multimedia Devices 526 524 527 525 /// … … 529 527 /// 530 528 ///@{ 531 #define ATA_CMD_SUBOP_STOP_DISC 0x00///< Stop the Disc532 #define ATA_CMD_SUBOP_START_DISC 0x01///< Start the Disc and acquire the format type533 #define ATA_CMD_SUBOP_EJECT_DISC 0x02///< Eject the Disc if possible534 #define ATA_CMD_SUBOP_CLOSE_TRAY 0x03///< Load the Disc (Close Tray)529 #define ATA_CMD_SUBOP_STOP_DISC 0x00 ///< Stop the Disc 530 #define ATA_CMD_SUBOP_START_DISC 0x01 ///< Start the Disc and acquire the format type 531 #define ATA_CMD_SUBOP_EJECT_DISC 0x02 ///< Eject the Disc if possible 532 #define ATA_CMD_SUBOP_CLOSE_TRAY 0x03 ///< Load the Disc (Close Tray) 535 533 ///@} 536 534 … … 542 540 // Class 1: PIO Data-In Commands 543 541 // 544 #define ATA_CMD_IDENTIFY_DRIVE 0xec///< defined from ATA-3545 #define ATA_CMD_READ_BUFFER 0xe4///< defined from ATA-1546 #define ATA_CMD_READ_SECTORS 0x20///< defined from ATA-1547 #define ATA_CMD_READ_SECTORS_WITH_RETRY 0x21///< defined from ATA-1, obsoleted from ATA-5548 #define ATA_CMD_READ_LONG 0x22///< defined from ATA-1, obsoleted from ATA-5549 #define ATA_CMD_READ_LONG_WITH_RETRY 0x23///< defined from ATA-1, obsoleted from ATA-5550 #define ATA_CMD_READ_SECTORS_EXT 0x24///< defined from ATA-6551 #define ATA_CMD_READ_MULTIPLE 0xc4///< defined in ACS-3552 #define ATA_CMD_READ_MULTIPLE_EXT 0x29///< defined in ACS-3553 #define ATA_CMD_READ_LOG_EXT 0x2f///< defined in ACS-3542 #define ATA_CMD_IDENTIFY_DRIVE 0xec ///< defined from ATA-3 543 #define ATA_CMD_READ_BUFFER 0xe4 ///< defined from ATA-1 544 #define ATA_CMD_READ_SECTORS 0x20 ///< defined from ATA-1 545 #define ATA_CMD_READ_SECTORS_WITH_RETRY 0x21 ///< defined from ATA-1, obsoleted from ATA-5 546 #define ATA_CMD_READ_LONG 0x22 ///< defined from ATA-1, obsoleted from ATA-5 547 #define ATA_CMD_READ_LONG_WITH_RETRY 0x23 ///< defined from ATA-1, obsoleted from ATA-5 548 #define ATA_CMD_READ_SECTORS_EXT 0x24 ///< defined from ATA-6 549 #define ATA_CMD_READ_MULTIPLE 0xc4 ///< defined in ACS-3 550 #define ATA_CMD_READ_MULTIPLE_EXT 0x29 ///< defined in ACS-3 551 #define ATA_CMD_READ_LOG_EXT 0x2f ///< defined in ACS-3 554 552 555 553 // 556 554 // Class 2: PIO Data-Out Commands 557 555 // 558 #define ATA_CMD_FORMAT_TRACK 0x50///< defined from ATA-1, obsoleted from ATA-4559 #define ATA_CMD_WRITE_BUFFER 0xe8///< defined from ATA-1560 #define ATA_CMD_WRITE_SECTORS 0x30///< defined from ATA-1561 #define ATA_CMD_WRITE_SECTORS_WITH_RETRY 0x31///< defined from ATA-1, obsoleted from ATA-5562 #define ATA_CMD_WRITE_LONG 0x32///< defined from ATA-1, obsoleted from ATA-5563 #define ATA_CMD_WRITE_LONG_WITH_RETRY 0x33///< defined from ATA-1, obsoleted from ATA-5564 #define ATA_CMD_WRITE_VERIFY 0x3c///< defined from ATA-1, obsoleted from ATA-5565 #define ATA_CMD_WRITE_SECTORS_EXT 0x34///< defined from ATA-6566 #define ATA_CMD_WRITE_MULTIPLE 0xc5///< defined in ACS-3567 #define ATA_CMD_WRITE_MULTIPLE_EXT 0x39///< defined in ACS-3556 #define ATA_CMD_FORMAT_TRACK 0x50 ///< defined from ATA-1, obsoleted from ATA-4 557 #define ATA_CMD_WRITE_BUFFER 0xe8 ///< defined from ATA-1 558 #define ATA_CMD_WRITE_SECTORS 0x30 ///< defined from ATA-1 559 #define ATA_CMD_WRITE_SECTORS_WITH_RETRY 0x31 ///< defined from ATA-1, obsoleted from ATA-5 560 #define ATA_CMD_WRITE_LONG 0x32 ///< defined from ATA-1, obsoleted from ATA-5 561 #define ATA_CMD_WRITE_LONG_WITH_RETRY 0x33 ///< defined from ATA-1, obsoleted from ATA-5 562 #define ATA_CMD_WRITE_VERIFY 0x3c ///< defined from ATA-1, obsoleted from ATA-5 563 #define ATA_CMD_WRITE_SECTORS_EXT 0x34 ///< defined from ATA-6 564 #define ATA_CMD_WRITE_MULTIPLE 0xc5 ///< defined in ACS-3 565 #define ATA_CMD_WRITE_MULTIPLE_EXT 0x39 ///< defined in ACS-3 568 566 569 567 // 570 568 // Class 3 No Data Command 571 569 // 572 #define ATA_CMD_ACK_MEDIA_CHANGE 0xdb///< defined from ATA-1, obsoleted from ATA-5573 #define ATA_CMD_BOOT_POST_BOOT 0xdc///< defined from ATA-1, obsoleted from ATA-3574 #define ATA_CMD_BOOT_PRE_BOOT 0xdd///< defined from ATA-1, obsoleted from ATA-3575 #define ATA_CMD_CHECK_POWER_MODE 0x98///< defined from ATA-1, obsoleted from ATA-4576 #define ATA_CMD_CHECK_POWER_MODE_ALIAS 0xe5///< defined from ATA-1577 #define ATA_CMD_DOOR_LOCK 0xde///< defined from ATA-1578 #define ATA_CMD_DOOR_UNLOCK 0xdf///< defined from ATA-1579 #define ATA_CMD_EXEC_DRIVE_DIAG 0x90///< defined from ATA-1580 #define ATA_CMD_IDLE_ALIAS 0x97///< defined from ATA-1, obsoleted from ATA-4581 #define ATA_CMD_IDLE 0xe3///< defined from ATA-1582 #define ATA_CMD_IDLE_IMMEDIATE 0x95///< defined from ATA-1, obsoleted from ATA-4583 #define ATA_CMD_IDLE_IMMEDIATE_ALIAS 0xe1///< defined from ATA-1584 #define ATA_CMD_INIT_DRIVE_PARAM 0x91///< defined from ATA-1, obsoleted from ATA-6585 #define ATA_CMD_RECALIBRATE 0x10///< defined from ATA-1, obsoleted from ATA-4586 #define ATA_CMD_READ_DRIVE_STATE 0xe9///< defined from ATA-1, obsoleted from ATA-3587 #define ATA_CMD_SET_MULTIPLE_MODE 0xC6///< defined from ATA-2588 #define ATA_CMD_READ_VERIFY 0x40///< defined from ATA-1589 #define ATA_CMD_READ_VERIFY_WITH_RETRY 0x41///< defined from ATA-1, obsoleted from ATA-5590 #define ATA_CMD_SEEK 0x70///< defined from ATA-1591 #define ATA_CMD_SET_FEATURES 0xef///< defined from ATA-1592 #define ATA_CMD_STANDBY 0x96///< defined from ATA-1, obsoleted from ATA-4593 #define ATA_CMD_STANDBY_ALIAS 0xe2///< defined from ATA-1594 #define ATA_CMD_STANDBY_IMMEDIATE 0x94///< defined from ATA-1, obsoleted from ATA-4595 #define ATA_CMD_STANDBY_IMMEDIATE_ALIAS 0xe0///< defined from ATA-1596 #define ATA_CMD_SLEEP 0xe6///< defined in ACS-3597 #define ATA_CMD_READ_NATIVE_MAX_ADDRESS 0xf8///< defined in ATA-6598 #define ATA_CMD_READ_NATIVE_MAX_ADDRESS_EXT 0x27///< defined in ATA-6570 #define ATA_CMD_ACK_MEDIA_CHANGE 0xdb ///< defined from ATA-1, obsoleted from ATA-5 571 #define ATA_CMD_BOOT_POST_BOOT 0xdc ///< defined from ATA-1, obsoleted from ATA-3 572 #define ATA_CMD_BOOT_PRE_BOOT 0xdd ///< defined from ATA-1, obsoleted from ATA-3 573 #define ATA_CMD_CHECK_POWER_MODE 0x98 ///< defined from ATA-1, obsoleted from ATA-4 574 #define ATA_CMD_CHECK_POWER_MODE_ALIAS 0xe5 ///< defined from ATA-1 575 #define ATA_CMD_DOOR_LOCK 0xde ///< defined from ATA-1 576 #define ATA_CMD_DOOR_UNLOCK 0xdf ///< defined from ATA-1 577 #define ATA_CMD_EXEC_DRIVE_DIAG 0x90 ///< defined from ATA-1 578 #define ATA_CMD_IDLE_ALIAS 0x97 ///< defined from ATA-1, obsoleted from ATA-4 579 #define ATA_CMD_IDLE 0xe3 ///< defined from ATA-1 580 #define ATA_CMD_IDLE_IMMEDIATE 0x95 ///< defined from ATA-1, obsoleted from ATA-4 581 #define ATA_CMD_IDLE_IMMEDIATE_ALIAS 0xe1 ///< defined from ATA-1 582 #define ATA_CMD_INIT_DRIVE_PARAM 0x91 ///< defined from ATA-1, obsoleted from ATA-6 583 #define ATA_CMD_RECALIBRATE 0x10 ///< defined from ATA-1, obsoleted from ATA-4 584 #define ATA_CMD_READ_DRIVE_STATE 0xe9 ///< defined from ATA-1, obsoleted from ATA-3 585 #define ATA_CMD_SET_MULTIPLE_MODE 0xC6 ///< defined from ATA-2 586 #define ATA_CMD_READ_VERIFY 0x40 ///< defined from ATA-1 587 #define ATA_CMD_READ_VERIFY_WITH_RETRY 0x41 ///< defined from ATA-1, obsoleted from ATA-5 588 #define ATA_CMD_SEEK 0x70 ///< defined from ATA-1 589 #define ATA_CMD_SET_FEATURES 0xef ///< defined from ATA-1 590 #define ATA_CMD_STANDBY 0x96 ///< defined from ATA-1, obsoleted from ATA-4 591 #define ATA_CMD_STANDBY_ALIAS 0xe2 ///< defined from ATA-1 592 #define ATA_CMD_STANDBY_IMMEDIATE 0x94 ///< defined from ATA-1, obsoleted from ATA-4 593 #define ATA_CMD_STANDBY_IMMEDIATE_ALIAS 0xe0 ///< defined from ATA-1 594 #define ATA_CMD_SLEEP 0xe6 ///< defined in ACS-3 595 #define ATA_CMD_READ_NATIVE_MAX_ADDRESS 0xf8 ///< defined in ATA-6 596 #define ATA_CMD_READ_NATIVE_MAX_ADDRESS_EXT 0x27 ///< defined in ATA-6 599 597 600 598 // 601 599 // Set Features Sub Command 602 600 // 603 #define ATA_SUB_CMD_ENABLE_VOLATILE_WRITE_CACHE 0x02///< defined in ACS-3604 #define ATA_SUB_CMD_SET_TRANSFER_MODE 0x03///< defined in ACS-3605 #define ATA_SUB_CMD_ENABLE_APM 0x05///< defined in ACS-3606 #define ATA_SUB_CMD_ENABLE_PUIS 0x06///< defined in ACS-3607 #define ATA_SUB_CMD_PUIS_SET_DEVICE_SPINUP 0x07///< defined in ACS-3608 #define ATA_SUB_CMD_ENABLE_WRITE_READ_VERIFY 0x0b///< defined in ACS-3609 #define ATA_SUB_CMD_ENABLE_SATA_FEATURE 0x10///< defined in ACS-3610 #define ATA_SUB_CMD_DISABLE_MEDIA_STATUS_NOTIFICATION 0x31///< defined in ACS-3611 #define ATA_SUB_CMD_ENABLE_FREE_FALL_CONTROL 0x41///< defined in ACS-3612 #define ATA_SUB_CMD_ACOUSTIC_MANAGEMENT_ENABLE 0x42///< defined in ACS-3613 #define ATA_SUB_CMD_SET_MAX_HOST_INTERFACE_SECTOR_TIMES 0x43///< defined in ACS-3614 #define ATA_SUB_CMD_EXTENDED_POWER_CONDITIONS 0x4a///< defined in ACS-3615 #define ATA_SUB_CMD_DISABLE_READ_LOOK_AHEAD 0x55///< defined in ACS-3616 #define ATA_SUB_CMD_EN_DIS_DSN_FEATURE 0x63///< defined in ACS-3617 #define ATA_SUB_CMD_DISABLE_REVERT_TO_POWER_ON_DEFAULTS 0x66///< defined in ACS-3618 #define ATA_SUB_CMD_DISABLE_VOLATILE_WRITE_CACHE 0x82///< defined in ACS-3619 #define ATA_SUB_CMD_DISABLE_APM 0x85///< defined in ACS-3620 #define ATA_SUB_CMD_DISABLE_PUIS 0x86///< defined in ACS-3621 #define ATA_SUB_CMD_DISABLE_WRITE_READ_VERIFY 0x8b///< defined in ACS-3622 #define ATA_SUB_CMD_DISABLE_SATA_FEATURE 0x90///< defined in ACS-3623 #define ATA_SUB_CMD_ENABLE_MEDIA_STATUS_NOTIFICATION 0x95///< defined in ACS-3624 #define ATA_SUB_CMD_ENABLE_READ_LOOK_AHEAD 0xaa///< defined in ACS-3625 #define ATA_SUB_CMD_DISABLE_FREE_FALL_CONTROL 0xc1///< defined in ACS-3626 #define ATA_SUB_CMD_ACOUSTIC_MANAGEMENT_DISABLE 0xc2///< defined in ACS-3627 #define ATA_SUB_CMD_EN_DIS_SENSE_DATA_REPORTING 0xc3///< defined in ACS-3628 #define ATA_SUB_CMD_ENABLE_REVERT_TO_POWER_ON_DEFAULTS 0xcc///< defined in ACS-3601 #define ATA_SUB_CMD_ENABLE_VOLATILE_WRITE_CACHE 0x02 ///< defined in ACS-3 602 #define ATA_SUB_CMD_SET_TRANSFER_MODE 0x03 ///< defined in ACS-3 603 #define ATA_SUB_CMD_ENABLE_APM 0x05 ///< defined in ACS-3 604 #define ATA_SUB_CMD_ENABLE_PUIS 0x06 ///< defined in ACS-3 605 #define ATA_SUB_CMD_PUIS_SET_DEVICE_SPINUP 0x07 ///< defined in ACS-3 606 #define ATA_SUB_CMD_ENABLE_WRITE_READ_VERIFY 0x0b ///< defined in ACS-3 607 #define ATA_SUB_CMD_ENABLE_SATA_FEATURE 0x10 ///< defined in ACS-3 608 #define ATA_SUB_CMD_DISABLE_MEDIA_STATUS_NOTIFICATION 0x31 ///< defined in ACS-3 609 #define ATA_SUB_CMD_ENABLE_FREE_FALL_CONTROL 0x41 ///< defined in ACS-3 610 #define ATA_SUB_CMD_ACOUSTIC_MANAGEMENT_ENABLE 0x42 ///< defined in ACS-3 611 #define ATA_SUB_CMD_SET_MAX_HOST_INTERFACE_SECTOR_TIMES 0x43 ///< defined in ACS-3 612 #define ATA_SUB_CMD_EXTENDED_POWER_CONDITIONS 0x4a ///< defined in ACS-3 613 #define ATA_SUB_CMD_DISABLE_READ_LOOK_AHEAD 0x55 ///< defined in ACS-3 614 #define ATA_SUB_CMD_EN_DIS_DSN_FEATURE 0x63 ///< defined in ACS-3 615 #define ATA_SUB_CMD_DISABLE_REVERT_TO_POWER_ON_DEFAULTS 0x66 ///< defined in ACS-3 616 #define ATA_SUB_CMD_DISABLE_VOLATILE_WRITE_CACHE 0x82 ///< defined in ACS-3 617 #define ATA_SUB_CMD_DISABLE_APM 0x85 ///< defined in ACS-3 618 #define ATA_SUB_CMD_DISABLE_PUIS 0x86 ///< defined in ACS-3 619 #define ATA_SUB_CMD_DISABLE_WRITE_READ_VERIFY 0x8b ///< defined in ACS-3 620 #define ATA_SUB_CMD_DISABLE_SATA_FEATURE 0x90 ///< defined in ACS-3 621 #define ATA_SUB_CMD_ENABLE_MEDIA_STATUS_NOTIFICATION 0x95 ///< defined in ACS-3 622 #define ATA_SUB_CMD_ENABLE_READ_LOOK_AHEAD 0xaa ///< defined in ACS-3 623 #define ATA_SUB_CMD_DISABLE_FREE_FALL_CONTROL 0xc1 ///< defined in ACS-3 624 #define ATA_SUB_CMD_ACOUSTIC_MANAGEMENT_DISABLE 0xc2 ///< defined in ACS-3 625 #define ATA_SUB_CMD_EN_DIS_SENSE_DATA_REPORTING 0xc3 ///< defined in ACS-3 626 #define ATA_SUB_CMD_ENABLE_REVERT_TO_POWER_ON_DEFAULTS 0xcc ///< defined in ACS-3 629 627 630 628 // 631 629 // S.M.A.R.T 632 630 // 633 #define ATA_CMD_SMART 0xb0///< defined from ATA-3634 #define ATA_CONSTANT_C2 0xc2///< reserved635 #define ATA_CONSTANT_4F 0x4f///< reserved636 637 #define ATA_SMART_READ_DATA 0xd0///< defined in ACS-3638 639 #define ATA_SMART_AUTOSAVE 0xd2///< defined in ACS-3640 #define ATA_AUTOSAVE_DISABLE_ATTR0x00641 #define ATA_AUTOSAVE_ENABLE_ATTR0xf1642 643 #define ATA_SMART_EXECUTE_OFFLINE_IMMEDIATE 0xd4///< defined in ACS-3644 #define ATA_EXECUTE_SMART_OFFLINE_ROUTINE 0x00///< defined in ACS-3645 #define ATA_EXECUTE_SMART_OFFLINE_SHORT_SELFTEST 0x01///< defined in ACS-3646 #define ATA_EXECUTE_SMART_OFFLINE_EXTENDED_SELFTEST 0x02///< defined in ACS-3647 #define ATA_EXECUTE_SMART_OFFLINE_CONVEYANCE_SELFTEST 0x03///< defined in ACS-3648 #define ATA_EXECUTE_SMART_OFFLINE_SELECTIVE_SELFTEST 0x04///< defined in ACS-3649 #define ATA_SMART_ABORT_SELF_TEST_SUBROUTINE 0x7f///< defined in ACS-3650 #define ATA_EXECUTE_SMART_CAPTIVE_SHORT_SELFTEST 0x81///< defined in ACS-3651 #define ATA_EXECUTE_SMART_CAPTIVE_EXTENDED_SELFTEST 0x82///< defined in ACS-3652 #define ATA_EXECUTE_SMART_CAPTIVE_CONVEYANCE_SELFTEST 0x83///< defined in ACS-3653 #define ATA_EXECUTE_SMART_CAPTIVE_SELECTIVE_SELFTEST 0x84///< defined in ACS-3654 655 #define ATA_SMART_READLOG 0xd5///< defined in ACS-3656 #define ATA_SMART_WRITELOG 0xd6///< defined in ACS-3657 #define ATA_SMART_ENABLE_OPERATION 0xd8///< reserved658 #define ATA_SMART_DISABLE_OPERATION 0xd9///< defined in ACS-3659 #define ATA_SMART_RETURN_STATUS 0xda///< defined from ATA-3660 661 #define ATA_SMART_THRESHOLD_NOT_EXCEEDED_VALUE 0xc24f///< defined in ACS-3662 #define ATA_SMART_THRESHOLD_EXCEEDED_VALUE 0x2cf4///< defined in ACS-3631 #define ATA_CMD_SMART 0xb0 ///< defined from ATA-3 632 #define ATA_CONSTANT_C2 0xc2 ///< reserved 633 #define ATA_CONSTANT_4F 0x4f ///< reserved 634 635 #define ATA_SMART_READ_DATA 0xd0 ///< defined in ACS-3 636 637 #define ATA_SMART_AUTOSAVE 0xd2 ///< defined in ACS-3 638 #define ATA_AUTOSAVE_DISABLE_ATTR 0x00 639 #define ATA_AUTOSAVE_ENABLE_ATTR 0xf1 640 641 #define ATA_SMART_EXECUTE_OFFLINE_IMMEDIATE 0xd4 ///< defined in ACS-3 642 #define ATA_EXECUTE_SMART_OFFLINE_ROUTINE 0x00 ///< defined in ACS-3 643 #define ATA_EXECUTE_SMART_OFFLINE_SHORT_SELFTEST 0x01 ///< defined in ACS-3 644 #define ATA_EXECUTE_SMART_OFFLINE_EXTENDED_SELFTEST 0x02 ///< defined in ACS-3 645 #define ATA_EXECUTE_SMART_OFFLINE_CONVEYANCE_SELFTEST 0x03 ///< defined in ACS-3 646 #define ATA_EXECUTE_SMART_OFFLINE_SELECTIVE_SELFTEST 0x04 ///< defined in ACS-3 647 #define ATA_SMART_ABORT_SELF_TEST_SUBROUTINE 0x7f ///< defined in ACS-3 648 #define ATA_EXECUTE_SMART_CAPTIVE_SHORT_SELFTEST 0x81 ///< defined in ACS-3 649 #define ATA_EXECUTE_SMART_CAPTIVE_EXTENDED_SELFTEST 0x82 ///< defined in ACS-3 650 #define ATA_EXECUTE_SMART_CAPTIVE_CONVEYANCE_SELFTEST 0x83 ///< defined in ACS-3 651 #define ATA_EXECUTE_SMART_CAPTIVE_SELECTIVE_SELFTEST 0x84 ///< defined in ACS-3 652 653 #define ATA_SMART_READLOG 0xd5 ///< defined in ACS-3 654 #define ATA_SMART_WRITELOG 0xd6 ///< defined in ACS-3 655 #define ATA_SMART_ENABLE_OPERATION 0xd8 ///< reserved 656 #define ATA_SMART_DISABLE_OPERATION 0xd9 ///< defined in ACS-3 657 #define ATA_SMART_RETURN_STATUS 0xda ///< defined from ATA-3 658 659 #define ATA_SMART_THRESHOLD_NOT_EXCEEDED_VALUE 0xc24f ///< defined in ACS-3 660 #define ATA_SMART_THRESHOLD_EXCEEDED_VALUE 0x2cf4 ///< defined in ACS-3 663 661 664 662 // SMART Log Definitions 665 #define ATA_SMART_LOG_DIRECTORY 0x00///< defined in ACS-3666 #define ATA_SMART_SUM_SMART_ERROR_LOG 0x01///< defined in ACS-3667 #define ATA_SMART_COMP_SMART_ERROR_LOG 0x02///< defined in ACS-3668 #define ATA_SMART_EXT_COMP_SMART_ERROR_LOG 0x03///< defined in ACS-3669 #define ATA_SMART_SMART_SELFTEST_LOG 0x06///< defined in ACS-3670 #define ATA_SMART_EXT_SMART_SELFTEST_LOG 0x07///< defined in ACS-3671 #define ATA_SMART_SELECTIVE_SELFTEST_LOG 0x09///< defined in ACS-3672 #define ATA_SMART_HOST_VENDOR_SPECIFIC 0x80///< defined in ACS-3673 #define ATA_SMART_DEVICE_VENDOR_SPECIFIC 0xa0///< defined in ACS-3663 #define ATA_SMART_LOG_DIRECTORY 0x00 ///< defined in ACS-3 664 #define ATA_SMART_SUM_SMART_ERROR_LOG 0x01 ///< defined in ACS-3 665 #define ATA_SMART_COMP_SMART_ERROR_LOG 0x02 ///< defined in ACS-3 666 #define ATA_SMART_EXT_COMP_SMART_ERROR_LOG 0x03 ///< defined in ACS-3 667 #define ATA_SMART_SMART_SELFTEST_LOG 0x06 ///< defined in ACS-3 668 #define ATA_SMART_EXT_SMART_SELFTEST_LOG 0x07 ///< defined in ACS-3 669 #define ATA_SMART_SELECTIVE_SELFTEST_LOG 0x09 ///< defined in ACS-3 670 #define ATA_SMART_HOST_VENDOR_SPECIFIC 0x80 ///< defined in ACS-3 671 #define ATA_SMART_DEVICE_VENDOR_SPECIFIC 0xa0 ///< defined in ACS-3 674 672 675 673 // 676 674 // Class 4: DMA Command 677 675 // 678 #define ATA_CMD_READ_DMA 0xc8///< defined from ATA-1679 #define ATA_CMD_READ_DMA_WITH_RETRY 0xc9///< defined from ATA-1, obsoleted from ATA-5680 #define ATA_CMD_READ_DMA_EXT 0x25///< defined from ATA-6681 #define ATA_CMD_WRITE_DMA 0xca///< defined from ATA-1682 #define ATA_CMD_WRITE_DMA_WITH_RETRY 0xcb///< defined from ATA-1, obsoleted from ATA-683 #define ATA_CMD_WRITE_DMA_EXT 0x35///< defined from ATA-6676 #define ATA_CMD_READ_DMA 0xc8 ///< defined from ATA-1 677 #define ATA_CMD_READ_DMA_WITH_RETRY 0xc9 ///< defined from ATA-1, obsoleted from ATA-5 678 #define ATA_CMD_READ_DMA_EXT 0x25 ///< defined from ATA-6 679 #define ATA_CMD_WRITE_DMA 0xca ///< defined from ATA-1 680 #define ATA_CMD_WRITE_DMA_WITH_RETRY 0xcb ///< defined from ATA-1, obsoleted from ATA- 681 #define ATA_CMD_WRITE_DMA_EXT 0x35 ///< defined from ATA-6 684 682 685 683 // 686 684 // ATA Security commands 687 685 // 688 #define ATA_CMD_SECURITY_SET_PASSWORD 0xf1///< defined in ACS-3689 #define ATA_CMD_SECURITY_UNLOCK 0xf2///< defined in ACS-3690 #define ATA_CMD_SECURITY_ERASE_PREPARE 0xf3///< defined in ACS-3691 #define ATA_CMD_SECURITY_ERASE_UNIT 0xf4///< defined in ACS-3692 #define ATA_CMD_SECURITY_FREEZE_LOCK 0xf5///< defined in ACS-3693 #define ATA_CMD_SECURITY_DISABLE_PASSWORD 0xf6///< defined in ACS-3694 695 #define ATA_SECURITY_BUFFER_LENGTH 512///< defined in ACS-3686 #define ATA_CMD_SECURITY_SET_PASSWORD 0xf1 ///< defined in ACS-3 687 #define ATA_CMD_SECURITY_UNLOCK 0xf2 ///< defined in ACS-3 688 #define ATA_CMD_SECURITY_ERASE_PREPARE 0xf3 ///< defined in ACS-3 689 #define ATA_CMD_SECURITY_ERASE_UNIT 0xf4 ///< defined in ACS-3 690 #define ATA_CMD_SECURITY_FREEZE_LOCK 0xf5 ///< defined in ACS-3 691 #define ATA_CMD_SECURITY_DISABLE_PASSWORD 0xf6 ///< defined in ACS-3 692 693 #define ATA_SECURITY_BUFFER_LENGTH 512 ///< defined in ACS-3 696 694 697 695 // 698 696 // ATA Device Config Overlay 699 697 // 700 #define ATA_CMD_DEV_CONFIG_OVERLAY 0xb1///< defined from ATA-6701 #define ATA_CMD_DEV_CONFIG_RESTORE_FEATURE 0xc0///< defined from ATA-6702 #define ATA_CMD_DEV_CONFIG_FREEZELOCK_FEATURE 0xc1///< defined from ATA-6703 #define ATA_CMD_DEV_CONFIG_IDENTIFY_FEATURE 0xc2///< defined from ATA-6704 #define ATA_CMD_DEV_CONFIG_SET_FEATURE 0xc3///< defined from ATA-6698 #define ATA_CMD_DEV_CONFIG_OVERLAY 0xb1 ///< defined from ATA-6 699 #define ATA_CMD_DEV_CONFIG_RESTORE_FEATURE 0xc0 ///< defined from ATA-6 700 #define ATA_CMD_DEV_CONFIG_FREEZELOCK_FEATURE 0xc1 ///< defined from ATA-6 701 #define ATA_CMD_DEV_CONFIG_IDENTIFY_FEATURE 0xc2 ///< defined from ATA-6 702 #define ATA_CMD_DEV_CONFIG_SET_FEATURE 0xc3 ///< defined from ATA-6 705 703 706 704 // 707 705 // ATA Trusted Computing Feature Set Commands 708 706 // 709 #define ATA_CMD_TRUSTED_NON_DATA 0x5b///< defined in ACS-3710 #define ATA_CMD_TRUSTED_RECEIVE 0x5c///< defined in ACS-3711 #define ATA_CMD_TRUSTED_RECEIVE_DMA 0x5d///< defined in ACS-3712 #define ATA_CMD_TRUSTED_SEND 0x5e///< defined in ACS-3713 #define ATA_CMD_TRUSTED_SEND_DMA 0x5f///< defined in ACS-3707 #define ATA_CMD_TRUSTED_NON_DATA 0x5b ///< defined in ACS-3 708 #define ATA_CMD_TRUSTED_RECEIVE 0x5c ///< defined in ACS-3 709 #define ATA_CMD_TRUSTED_RECEIVE_DMA 0x5d ///< defined in ACS-3 710 #define ATA_CMD_TRUSTED_SEND 0x5e ///< defined in ACS-3 711 #define ATA_CMD_TRUSTED_SEND_DMA 0x5f ///< defined in ACS-3 714 712 715 713 // 716 714 // ATA Trusted Receive Fields 717 715 // 718 #define ATA_TR_RETURN_SECURITY_PROTOCOL_INFORMATION 0x00///< defined in ACS-3719 #define ATA_TR_SECURITY_PROTOCOL_JEDEC_RESERVED 0xec///< defined in ACS-3720 #define ATA_TR_SECURITY_PROTOCOL_SDCARD_RESERVED 0xed///< defined in ACS-3721 #define ATA_TR_SECURITY_PROTOCOL_IEEE1667_RESERVED 0xee///< defined in ACS-3716 #define ATA_TR_RETURN_SECURITY_PROTOCOL_INFORMATION 0x00 ///< defined in ACS-3 717 #define ATA_TR_SECURITY_PROTOCOL_JEDEC_RESERVED 0xec ///< defined in ACS-3 718 #define ATA_TR_SECURITY_PROTOCOL_SDCARD_RESERVED 0xed ///< defined in ACS-3 719 #define ATA_TR_SECURITY_PROTOCOL_IEEE1667_RESERVED 0xee ///< defined in ACS-3 722 720 723 721 // 724 722 // Equates used for Acoustic Flags 725 723 // 726 #define ATA_ACOUSTIC_LEVEL_BYPASS 0xff///< defined from ATA-6727 #define ATA_ACOUSTIC_LEVEL_MAXIMUM_PERFORMANCE 0xfe///< defined from ATA-6728 #define ATA_ACOUSTIC_LEVEL_QUIET 0x80///< defined from ATA-6724 #define ATA_ACOUSTIC_LEVEL_BYPASS 0xff ///< defined from ATA-6 725 #define ATA_ACOUSTIC_LEVEL_MAXIMUM_PERFORMANCE 0xfe ///< defined from ATA-6 726 #define ATA_ACOUSTIC_LEVEL_QUIET 0x80 ///< defined from ATA-6 729 727 730 728 // 731 729 // Equates used for DiPM Support 732 730 // 733 #define ATA_CMD_DIPM_SUB 0x03// defined in ACS-3 : Count value in SetFeature identification : 03h Device-initiated interface power state transitions734 #define ATA_DIPM_ENABLE 0x10// defined in ACS-3735 #define ATA_DIPM_DISABLE 0x90// defined in ACS-3731 #define ATA_CMD_DIPM_SUB 0x03 // defined in ACS-3 : Count value in SetFeature identification : 03h Device-initiated interface power state transitions 732 #define ATA_DIPM_ENABLE 0x10 // defined in ACS-3 733 #define ATA_DIPM_DISABLE 0x90 // defined in ACS-3 736 734 737 735 // 738 736 // Equates used for DevSleep Support 739 737 // 740 #define ATA_CMD_DEVSLEEP_SUB 0x09// defined in SATA 3.2 Gold Spec : Count value in SetFeature identification : 09h Device Sleep741 #define ATA_DEVSLEEP_ENABLE 0x10// defined in SATA 3.2 Gold Spec742 #define ATA_DEVSLEEP_DISABLE 0x90// defined in SATA 3.2 Gold Spec743 744 #define ATA_DEVSLP_EXIT_TIMEOUT 20// MDAT - 20 ms745 #define ATA_DEVSLP_MINIMUM_DETECTION_TIME 10// DMDT - 10 us746 #define ATA_DEVSLP_MINIMUM_ASSERTION_TIME 10// DETO - 10 ms738 #define ATA_CMD_DEVSLEEP_SUB 0x09 // defined in SATA 3.2 Gold Spec : Count value in SetFeature identification : 09h Device Sleep 739 #define ATA_DEVSLEEP_ENABLE 0x10 // defined in SATA 3.2 Gold Spec 740 #define ATA_DEVSLEEP_DISABLE 0x90 // defined in SATA 3.2 Gold Spec 741 742 #define ATA_DEVSLP_EXIT_TIMEOUT 20 // MDAT - 20 ms 743 #define ATA_DEVSLP_MINIMUM_DETECTION_TIME 10 // DMDT - 10 us 744 #define ATA_DEVSLP_MINIMUM_ASSERTION_TIME 10 // DETO - 10 ms 747 745 748 746 // 749 747 // Set MAX Commands 750 748 // 751 #define ATA_CMD_SET_MAX_ADDRESS_EXT 0x37///< defined from ATA-6752 #define ATA_CMD_SET_MAX_ADDRESS 0xf9///< defined from ATA-6753 #define ATA_SET_MAX_SET_PASSWORD 0x01///< defined from ATA-6754 #define ATA_SET_MAX_LOCK 0x02///< defined from ATA-6755 #define ATA_SET_MAX_UNLOCK 0x03///< defined from ATA-6756 #define ATA_SET_MAX_FREEZE_LOCK 0x04///< defined from ATA-6749 #define ATA_CMD_SET_MAX_ADDRESS_EXT 0x37 ///< defined from ATA-6 750 #define ATA_CMD_SET_MAX_ADDRESS 0xf9 ///< defined from ATA-6 751 #define ATA_SET_MAX_SET_PASSWORD 0x01 ///< defined from ATA-6 752 #define ATA_SET_MAX_LOCK 0x02 ///< defined from ATA-6 753 #define ATA_SET_MAX_UNLOCK 0x03 ///< defined from ATA-6 754 #define ATA_SET_MAX_FREEZE_LOCK 0x04 ///< defined from ATA-6 757 755 758 756 /// … … 760 758 /// Bit3 is set to 1 according ATA-1 761 759 /// 762 #define ATA_DEFAULT_CTL 760 #define ATA_DEFAULT_CTL (0x0a) 763 761 /// 764 762 /// Default context of Device/Head Register, 765 763 /// Bit7 and Bit5 are set to 1 for back-compatibilities. 766 764 /// 767 #define ATA_DEFAULT_CMD 768 769 #define ATAPI_MAX_BYTE_COUNT 770 771 #define ATA_REQUEST_SENSE_ERROR (0x70)///< defined in SFF-8070i765 #define ATA_DEFAULT_CMD (0xa0) 766 767 #define ATAPI_MAX_BYTE_COUNT (0xfffe) 768 769 #define ATA_REQUEST_SENSE_ERROR (0x70) ///< defined in SFF-8070i 772 770 773 771 // … … 777 775 // Sense Key 778 776 // 779 #define ATA_SK_NO_SENSE 780 #define ATA_SK_RECOVERY_ERROR 781 #define ATA_SK_NOT_READY 782 #define ATA_SK_MEDIUM_ERROR 783 #define ATA_SK_HARDWARE_ERROR 784 #define ATA_SK_ILLEGAL_REQUEST 785 #define ATA_SK_UNIT_ATTENTION 786 #define ATA_SK_DATA_PROTECT 787 #define ATA_SK_BLANK_CHECK 788 #define ATA_SK_VENDOR_SPECIFIC 789 #define ATA_SK_RESERVED_A 790 #define ATA_SK_ABORT 791 #define ATA_SK_RESERVED_C 792 #define ATA_SK_OVERFLOW 793 #define ATA_SK_MISCOMPARE 794 #define ATA_SK_RESERVED_F 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) 795 793 796 794 // 797 795 // Additional Sense Codes 798 796 // 799 #define ATA_ASC_NOT_READY 800 #define ATA_ASC_MEDIA_ERR1 801 #define ATA_ASC_MEDIA_ERR2 802 #define ATA_ASC_MEDIA_ERR3 803 #define ATA_ASC_MEDIA_ERR4 804 #define ATA_ASC_MEDIA_UPSIDE_DOWN 805 #define ATA_ASC_INVALID_CMD 806 #define ATA_ASC_LBA_OUT_OF_RANGE 807 #define ATA_ASC_INVALID_FIELD 808 #define ATA_ASC_WRITE_PROTECTED 809 #define ATA_ASC_MEDIA_CHANGE 810 #define ATA_ASC_RESET (0x29)///< Power On Reset or Bus Reset occurred.811 #define ATA_ASC_ILLEGAL_FIELD 812 #define ATA_ASC_NO_MEDIA 813 #define ATA_ASC_ILLEGAL_MODE_FOR_THIS_TRACK 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) ///< Power On Reset or Bus Reset occurred. 809 #define ATA_ASC_ILLEGAL_FIELD (0x26) 810 #define ATA_ASC_NO_MEDIA (0x3A) 811 #define ATA_ASC_ILLEGAL_MODE_FOR_THIS_TRACK (0x64) 814 812 815 813 // 816 814 // Additional Sense Code Qualifier 817 815 // 818 #define ATA_ASCQ_IN_PROGRESS 816 #define ATA_ASCQ_IN_PROGRESS (0x01) 819 817 820 818 // 821 819 // Error Register 822 820 // 823 #define ATA_ERRREG_BBK BIT7///< Bad block detected defined from ATA-1, obsoleted from ATA-2824 #define ATA_ERRREG_UNC BIT6///< Uncorrectable Data defined from ATA-1, obsoleted from ATA-4825 #define ATA_ERRREG_MC BIT5///< Media Change defined from ATA-1, obsoleted from ATA-4826 #define ATA_ERRREG_IDNF BIT4///< ID Not Found defined from ATA-1, obsoleted from ATA-4827 #define ATA_ERRREG_MCR BIT3///< Media Change Requested defined from ATA-1, obsoleted from ATA-4828 #define ATA_ERRREG_ABRT BIT2///< Aborted Command defined from ATA-1829 #define ATA_ERRREG_TK0NF BIT1///< Track 0 Not Found defined from ATA-1, obsoleted from ATA-4830 #define ATA_ERRREG_AMNF BIT0///< Address Mark Not Found defined from ATA-1, obsoleted from ATA-4821 #define ATA_ERRREG_BBK BIT7 ///< Bad block detected defined from ATA-1, obsoleted from ATA-2 822 #define ATA_ERRREG_UNC BIT6 ///< Uncorrectable Data defined from ATA-1, obsoleted from ATA-4 823 #define ATA_ERRREG_MC BIT5 ///< Media Change defined from ATA-1, obsoleted from ATA-4 824 #define ATA_ERRREG_IDNF BIT4 ///< ID Not Found defined from ATA-1, obsoleted from ATA-4 825 #define ATA_ERRREG_MCR BIT3 ///< Media Change Requested defined from ATA-1, obsoleted from ATA-4 826 #define ATA_ERRREG_ABRT BIT2 ///< Aborted Command defined from ATA-1 827 #define ATA_ERRREG_TK0NF BIT1 ///< Track 0 Not Found defined from ATA-1, obsoleted from ATA-4 828 #define ATA_ERRREG_AMNF BIT0 ///< Address Mark Not Found defined from ATA-1, obsoleted from ATA-4 831 829 832 830 // 833 831 // Status Register 834 832 // 835 #define ATA_STSREG_BSY BIT7///< Controller Busy defined from ATA-1836 #define ATA_STSREG_DRDY BIT6///< Drive Ready defined from ATA-1837 #define ATA_STSREG_DWF BIT5///< Drive Write Fault defined from ATA-1, obsoleted from ATA-4838 #define ATA_STSREG_DF BIT5///< Drive Fault defined from ATA-6839 #define ATA_STSREG_DSC BIT4///< Disk Seek Complete defined from ATA-1, obsoleted from ATA-4840 #define ATA_STSREG_DRQ BIT3///< Data Request defined from ATA-1841 #define ATA_STSREG_CORR BIT2///< Corrected Data defined from ATA-1, obsoleted from ATA-4842 #define ATA_STSREG_IDX BIT1///< Index defined from ATA-1, obsoleted from ATA-4843 #define ATA_STSREG_ERR BIT0///< Error defined from ATA-1833 #define ATA_STSREG_BSY BIT7 ///< Controller Busy defined from ATA-1 834 #define ATA_STSREG_DRDY BIT6 ///< Drive Ready defined from ATA-1 835 #define ATA_STSREG_DWF BIT5 ///< Drive Write Fault defined from ATA-1, obsoleted from ATA-4 836 #define ATA_STSREG_DF BIT5 ///< Drive Fault defined from ATA-6 837 #define ATA_STSREG_DSC BIT4 ///< Disk Seek Complete defined from ATA-1, obsoleted from ATA-4 838 #define ATA_STSREG_DRQ BIT3 ///< Data Request defined from ATA-1 839 #define ATA_STSREG_CORR BIT2 ///< Corrected Data defined from ATA-1, obsoleted from ATA-4 840 #define ATA_STSREG_IDX BIT1 ///< Index defined from ATA-1, obsoleted from ATA-4 841 #define ATA_STSREG_ERR BIT0 ///< Error defined from ATA-1 844 842 845 843 // 846 844 // Device Control Register 847 845 // 848 #define ATA_CTLREG_SRST BIT2///< Software Reset.849 #define ATA_CTLREG_IEN_L BIT1///< Interrupt Enable #.846 #define ATA_CTLREG_SRST BIT2 ///< Software Reset. 847 #define ATA_CTLREG_IEN_L BIT1 ///< Interrupt Enable #. 850 848 851 849 #endif
Note:
See TracChangeset
for help on using the changeset viewer.