diff options
author | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-01-26 05:14:54 +0000 |
---|---|---|
committer | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-01-26 05:14:54 +0000 |
commit | 4777d7fc9eb5925845654492d40fa433a931f454 (patch) | |
tree | 1e114ffb055687d2d6e71d4342e4fbcb484cf129 /MdePkg | |
parent | dff2673eec6ee1792fad41833a5dc76499e99a31 (diff) | |
download | edk2-platforms-4777d7fc9eb5925845654492d40fa433a931f454.tar.xz |
Scrub EFI_ATA_IDENTIFY_DATA and EFI_ATAPI_IDENTIFY_DATA to strict follow ATA-8 spec in MdePkg
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9817 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg')
-rw-r--r-- | MdePkg/Include/IndustryStandard/Atapi.h | 224 | ||||
-rw-r--r-- | MdePkg/Include/Protocol/IdeControllerInit.h | 151 |
2 files changed, 172 insertions, 203 deletions
diff --git a/MdePkg/Include/IndustryStandard/Atapi.h b/MdePkg/Include/IndustryStandard/Atapi.h index 7a406e114e..695e5cf25d 100644 --- a/MdePkg/Include/IndustryStandard/Atapi.h +++ b/MdePkg/Include/IndustryStandard/Atapi.h @@ -2,7 +2,7 @@ This file contains just some basic definitions that are needed by drivers
that dealing with ATA/ATAPI interface.
-Copyright (c) 2007 - 2009, Intel Corporation
+Copyright (c) 2007 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -19,7 +19,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #pragma pack(1)
///
-/// ATA_IDENTIFY_DATA is defined in ATA-5
+/// ATA5_IDENTIFY_DATA is defined in ATA-5
+/// (This structure is provided here mainly for backward-compatibility support.
+/// Old drivers may reference some field that is marked "obsolete" in
+/// ATA_IDENTIFY_DATA, which current conforms to ATA-8)
///
typedef struct {
UINT16 config; ///< General Configuration
@@ -71,73 +74,170 @@ typedef struct { UINT16 security_status;
UINT16 vendor_data_129_159[31];
UINT16 reserved_160_255[96];
+} ATA5_IDENTIFY_DATA;
+
+///
+/// ATA_IDENTIFY_DATA is strictly complied with ATA/ATAPI-8 Spec
+/// to define the data returned by an ATA device upon successful
+/// completion of the ATA IDENTIFY_DEVICE command
+///
+typedef struct {
+ UINT16 config; ///< General Configuration
+ UINT16 obsolete_1;
+ UINT16 specific_config; ///< Specific Configuration
+ UINT16 obsolete_3;
+ UINT16 retired_4_5[2];
+ UINT16 obsolete_6;
+ UINT16 cfa_reserved_7_8[2];
+ UINT16 retired_9;
+ CHAR8 SerialNo[20]; ///< word 10~19
+ UINT16 retired_20_21[2];
+ UINT16 obsolete_22;
+ CHAR8 FirmwareVer[8]; ///< word 23~26
+ CHAR8 ModelName[40]; ///< word 27~46
+ UINT16 multi_sector_cmd_max_sct_cnt;
+ UINT16 trusted_computing_support;
+ UINT16 capabilities_49;
+ UINT16 capabilities_50;
+ UINT16 obsolete_51_52[2];
+ UINT16 field_validity;
+ UINT16 obsolete_54_58[5];
+ UINT16 multi_sector_setting;
+ UINT16 user_addressable_sectors_lo;
+ UINT16 user_addressable_sectors_hi;
+ UINT16 obsolete_62;
+ UINT16 multi_word_dma_mode;
+ UINT16 advanced_pio_modes;
+ UINT16 min_multi_word_dma_cycle_time;
+ UINT16 rec_multi_word_dma_cycle_time;
+ UINT16 min_pio_cycle_time_without_flow_control;
+ UINT16 min_pio_cycle_time_with_flow_control;
+ UINT16 reserved_69_74[6];
+ UINT16 queue_depth;
+ UINT16 reserved_76_79[4]; ///< reserved for Serial ATA
+ UINT16 major_version_no;
+ UINT16 minor_version_no;
+ UINT16 command_set_supported_82; ///< word 82
+ UINT16 command_set_supported_83; ///< word 83
+ UINT16 command_set_feature_extn; ///< word 84
+ UINT16 command_set_feature_enb_85; ///< word 85
+ UINT16 command_set_feature_enb_86; ///< word 86
+ UINT16 command_set_feature_default; ///< word 87
+ UINT16 ultra_dma_mode; ///< word 88
+ UINT16 time_for_security_erase_unit;
+ UINT16 time_for_enhanced_security_erase_unit;
+ UINT16 advanced_power_management_level;
+ UINT16 master_password_identifier;
+ UINT16 hardware_configuration_test_result;
+ UINT16 acoustic_management_value;
+ UINT16 stream_minimum_request_size;
+ UINT16 streaming_transfer_time_for_dma;
+ UINT16 streaming_access_latency_for_dma_and_pio;
+ UINT16 streaming_performance_granularity[2]; ///< word 98~99
+ UINT16 maximum_lba_for_48bit_addressing[4]; ///< word 100~103
+ UINT16 streaming_transfer_time_for_pio;
+ UINT16 reserved_105;
+ UINT16 phy_logic_sector_support; ///< word 106
+ UINT16 interseek_delay_for_iso7779;
+ UINT16 world_wide_name[4]; ///< word 108~111
+ UINT16 reserved_for_128bit_wwn_112_115[4];
+ UINT16 reserved_for_technical_report;
+ UINT16 logic_sector_size_lo; ///< word 117
+ UINT16 logic_sector_size_hi; ///< word 118
+ UINT16 features_and_command_sets_supported_ext; ///< word 119
+ UINT16 features_and_command_sets_enabled_ext; ///< word 120
+ UINT16 reserved_121_126[8];
+ UINT16 obsolete_127;
+ UINT16 security_status; ///< word 128
+ UINT16 vendor_specific_129_159[31];
+ UINT16 cfa_power_mode; ///< word 160
+ UINT16 reserved_for_compactflash_161_175[15];
+ CHAR8 media_serial_number[60]; ///< word 176~205
+ UINT16 sct_command_transport; ///< word 206
+ UINT16 reserved_207_208[2];
+ UINT16 alignment_logic_in_phy_blocks; ///< word 209
+ UINT16 write_read_verify_sector_count_mode3[2]; ///< word 210~211
+ UINT16 verify_sector_count_mode2[2];
+ UINT16 nv_cache_capabilities;
+ UINT16 nv_cache_size_in_logical_block_lsw; ///< word 215
+ UINT16 nv_cache_size_in_logical_block_msw; ///< word 216
+ UINT16 nv_cache_read_speed;
+ UINT16 nv_cache_write_speed;
+ UINT16 nv_cache_options; ///< word 219
+ UINT16 write_read_verify_mode; ///< word 220
+ UINT16 reserved_221;
+ UINT16 transport_major_revision_number;
+ UINT16 transport_minor_revision_number;
+ UINT16 reserved_224_233[10];
+ UINT16 min_number_per_download_microcode_mode3; ///< word 234
+ UINT16 max_number_per_download_microcode_mode3; ///< word 235
+ UINT16 reserved_236_254[19];
+ UINT16 integrity_word;
} ATA_IDENTIFY_DATA;
///
-/// ATAPI_IDENTIFY_DATA is defined in ATA-6
+/// ATAPI_IDENTIFY_DATA is strictly complied with ATA/ATAPI-8 Spec
+/// to define the data returned by an ATAPI device upon successful
+/// completion of the ATA IDENTIFY_PACKET_DEVICE command
///
typedef struct {
- UINT16 config; ///< General Configuration
- UINT16 obsolete_1;
- UINT16 specific_config;
- UINT16 obsolete_3;
- UINT16 retired_4_5[2];
- UINT16 obsolete_6;
- UINT16 cfa_reserved_7_8[2];
- UINT16 retired_9;
- CHAR8 SerialNo[20]; ///< ASCII
- UINT16 retired_20_21[2];
- UINT16 obsolete_22;
- CHAR8 FirmwareVer[8]; ///< ASCII
- CHAR8 ModelName[40]; ///< ASCII
- UINT16 multi_sector_cmd_max_sct_cnt;
- UINT16 reserved_48;
- UINT16 capabilities_49;
- UINT16 capabilities_50;
- UINT16 obsolete_51_52[2];
- UINT16 field_validity;
- UINT16 obsolete_54_58[5];
- UINT16 mutil_sector_setting;
- UINT16 user_addressable_sectors_lo;
- UINT16 user_addressable_sectors_hi;
- UINT16 obsolete_62;
- UINT16 multi_word_dma_mode;
- UINT16 advanced_pio_modes;
- UINT16 min_multi_word_dma_cycle_time;
- UINT16 rec_multi_word_dma_cycle_time;
- UINT16 min_pio_cycle_time_without_flow_control;
- UINT16 min_pio_cycle_time_with_flow_control;
- UINT16 reserved_69_74[6];
- UINT16 queue_depth;
- UINT16 reserved_76_79[4];
- UINT16 major_version_no;
- UINT16 minor_version_no;
- UINT16 cmd_set_support_82;
- UINT16 cmd_set_support_83;
- UINT16 cmd_feature_support;
- UINT16 cmd_feature_enable_85;
- UINT16 cmd_feature_enable_86;
- UINT16 cmd_feature_default;
- UINT16 ultra_dma_select;
- UINT16 time_required_for_sec_erase;
- UINT16 time_required_for_enhanced_sec_erase;
- UINT16 current_advanced_power_mgmt_value;
- UINT16 master_pwd_revison_code;
- UINT16 hardware_reset_result;
- UINT16 current_auto_acoustic_mgmt_value;
- UINT16 reserved_95_99[5];
- UINT16 max_user_lba_for_48bit_addr[4];
- UINT16 reserved_104_126[23];
- UINT16 removable_media_status_notification_support;
- UINT16 security_status;
- UINT16 vendor_data_129_159[31];
- UINT16 cfa_power_mode;
- UINT16 cfa_reserved_161_175[15];
- UINT16 current_media_serial_no[30];
- UINT16 reserved_206_254[49];
- UINT16 integrity_word;
+ UINT16 config; ///< General Configuration
+ UINT16 reserved_1;
+ UINT16 specific_config; ///< Specific Configuration
+ UINT16 reserved_3_9[7];
+ CHAR8 SerialNo[20]; ///< word 10~19
+ UINT16 reserved_20_22[3];
+ CHAR8 FirmwareVer[8]; ///< word 23~26
+ CHAR8 ModelName[40]; ///< word 27~46
+ UINT16 reserved_47_48[2];
+ UINT16 capabilities_49;
+ UINT16 capabilities_50;
+ UINT16 obsolete_51;
+ UINT16 reserved_52;
+ UINT16 field_validity; ///< word 53
+ UINT16 reserved_54_61[8];
+ UINT16 dma_dir;
+ UINT16 multi_word_dma_mode; ///< word 63
+ UINT16 advanced_pio_modes; ///< word 64
+ UINT16 min_multi_word_dma_cycle_time;
+ UINT16 rec_multi_word_dma_cycle_time;
+ UINT16 min_pio_cycle_time_without_flow_control;
+ UINT16 min_pio_cycle_time_with_flow_control;
+ UINT16 reserved_69_70[2];
+ UINT16 obsolete_71_72[2];
+ UINT16 reserved_73_74[2];
+ UINT16 queue_depth;
+ UINT16 reserved_76_79[4];
+ UINT16 major_version_no; ///< word 80
+ UINT16 minor_version_no; ///< word 81
+ UINT16 cmd_set_support_82;
+ UINT16 cmd_set_support_83;
+ UINT16 cmd_feature_support;
+ UINT16 cmd_feature_enable_85;
+ UINT16 cmd_feature_enable_86;
+ UINT16 cmd_feature_default;
+ UINT16 ultra_dma_select;
+ UINT16 time_required_for_sec_erase; ///< word 89
+ UINT16 time_required_for_enhanced_sec_erase; ///< word 90
+ UINT16 reserved_91;
+ UINT16 master_pwd_revison_code;
+ UINT16 hardware_reset_result; ///< word 93
+ UINT16 current_auto_acoustic_mgmt_value;
+ UINT16 reserved_95_107[13];
+ UINT16 world_wide_name[4]; ///< word 108~111
+ UINT16 reserved_for_128bit_wwn_112_115[4];
+ UINT16 reserved_116_124[9];
+ UINT16 atapi_byte_count_0_behavior; ///< word 125
+ UINT16 obsolete_126;
+ UINT16 removable_media_status_notification_support;
+ UINT16 security_status;
+ UINT16 reserved_129_160[32];
+ UINT16 cfa_reserved_161_175[15];
+ UINT16 reserved_176_254[79];
+ UINT16 integrity_word;
} ATAPI_IDENTIFY_DATA;
+
///
/// Standard Quiry Data format, defined in SFF-8070i(ATAPI Removable Rewritable Specification)
///
diff --git a/MdePkg/Include/Protocol/IdeControllerInit.h b/MdePkg/Include/Protocol/IdeControllerInit.h index b4c5dcb0df..92f94ea59e 100644 --- a/MdePkg/Include/Protocol/IdeControllerInit.h +++ b/MdePkg/Include/Protocol/IdeControllerInit.h @@ -13,7 +13,7 @@ A device handle for an IDE controller must contain an EFI_DEVICE_PATH_PROTOCOL.
- Copyright (c) 2007 - 2009, Intel Corporation
+ Copyright (c) 2007 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -31,6 +31,8 @@ #ifndef _EFI_IDE_CONTROLLER_INIT_PROTOCOL_H_
#define _EFI_IDE_CONTROLLER_INIT_PROTOCOL_H_
+#include <IndustryStandard/Atapi.h>
+
///
/// Global ID for the EFI_IDE_CONTROLLER_INIT_PROTOCOL
///
@@ -199,147 +201,14 @@ typedef struct { } EFI_ATA_COLLECTIVE_MODE;
///
-/// EFI_ATA_IDENTIFY_DATA structure
-///
-/// This structure definition is not part of the protocol
-/// definition because the ATA/ATAPI Specification controls
-/// the definition of all the fields. The ATA/ATAPI
-/// Specification can obsolete old fields or redefine existing
-/// fields. This definition is provided here for reference only.
-///
-#pragma pack(1)
-typedef struct {
- UINT16 config; ///< General Configuration
- UINT16 cylinders; ///< Number of Cylinders
- UINT16 reserved_2;
- UINT16 heads; ///< Number of logical heads
- UINT16 vendor_data1;
- UINT16 vendor_data2;
- UINT16 sectors_per_track;
- UINT16 vendor_specific_7_9[3];
- CHAR8 SerialNo[20]; ///< ASCII
- UINT16 vendor_specific_20_21[2];
- UINT16 ecc_bytes_available;
- CHAR8 FirmwareVer[8]; ///< ASCII
- CHAR8 ModelName[40]; ///< ASCII
- UINT16 multi_sector_cmd_max_sct_cnt;
- UINT16 reserved_48;
- UINT16 capabilities;
- UINT16 reserved_50;
- UINT16 pio_cycle_timing;
- UINT16 reserved_52;
- UINT16 field_validity;
- UINT16 current_cylinders;
- UINT16 current_heads;
- UINT16 current_sectors;
- UINT16 CurrentCapacityLsb;
- UINT16 CurrentCapacityMsb;
- UINT16 reserved_59;
- UINT16 user_addressable_sectors_lo;
- UINT16 user_addressable_sectors_hi;
- UINT16 reserved_62;
- UINT16 multi_word_dma_mode;
- UINT16 advanced_pio_modes;
- UINT16 min_multi_word_dma_cycle_time;
- UINT16 rec_multi_word_dma_cycle_time;
- UINT16 min_pio_cycle_time_without_flow_control;
- UINT16 min_pio_cycle_time_with_flow_control;
- UINT16 reserved_69_79[11];
- UINT16 major_version_no;
- UINT16 minor_version_no;
- UINT16 command_set_supported_82; ///< word 82
- UINT16 command_set_supported_83; ///< word 83
- UINT16 command_set_feature_extn; ///< word 84
- UINT16 command_set_feature_enb_85; ///< word 85
- UINT16 command_set_feature_enb_86; ///< word 86
- UINT16 command_set_feature_default; ///< word 87
- UINT16 ultra_dma_mode; ///< word 88
- UINT16 reserved_89_105[17];
- UINT16 phy_logic_sector_support; ///< word 106
- UINT16 reserved_107_116[10];
- UINT16 logic_sector_size_lo; ///< word 117
- UINT16 logic_sector_size_hi; ///< word 118
- UINT16 reserved_119_127[9];
- UINT16 security_status;
- UINT16 vendor_data_129_159[31];
- UINT16 reserved_160_208[49];
- UINT16 alignment_logic_in_phy_blocks; ///< word 209
- UINT16 reserved_210_255[46];
-} EFI_ATA_IDENTIFY_DATA;
-#pragma pack()
-
-///
-/// EFI_ATAPI_IDENTIFY_DATA structure
+/// EFI_ATA_IDENTIFY_DATA & EFI_ATAPI_IDENTIFY_DATA structure
///
-/// This structure definition is not part of the protocol
-/// definition because the ATA/ATAPI Specification controls
-/// the definition of all the fields. The ATA/ATAPI
-/// Specification can obsolete old fields or redefine existing
-/// fields. This definition is provided here for reference only.
-///
-#pragma pack(1)
-typedef struct {
- UINT16 config; ///< General Configuration
- UINT16 obsolete_1;
- UINT16 specific_config;
- UINT16 obsolete_3;
- UINT16 retired_4_5[2];
- UINT16 obsolete_6;
- UINT16 cfa_reserved_7_8[2];
- UINT16 retired_9;
- CHAR8 SerialNo[20]; ///< ASCII
- UINT16 retired_20_21[2];
- UINT16 obsolete_22;
- CHAR8 FirmwareVer[8]; ///< ASCII
- CHAR8 ModelName[40]; ///< ASCII
- UINT16 multi_sector_cmd_max_sct_cnt;
- UINT16 reserved_48;
- UINT16 capabilities_49;
- UINT16 capabilities_50;
- UINT16 obsolete_51_52[2];
- UINT16 field_validity;
- UINT16 obsolete_54_58[5];
- UINT16 mutil_sector_setting;
- UINT16 user_addressable_sectors_lo;
- UINT16 user_addressable_sectors_hi;
- UINT16 obsolete_62;
- UINT16 multi_word_dma_mode;
- UINT16 advanced_pio_modes;
- UINT16 min_multi_word_dma_cycle_time;
- UINT16 rec_multi_word_dma_cycle_time;
- UINT16 min_pio_cycle_time_without_flow_control;
- UINT16 min_pio_cycle_time_with_flow_control;
- UINT16 reserved_69_74[6];
- UINT16 queue_depth;
- UINT16 reserved_76_79[4];
- UINT16 major_version_no;
- UINT16 minor_version_no;
- UINT16 cmd_set_support_82;
- UINT16 cmd_set_support_83;
- UINT16 cmd_feature_support;
- UINT16 cmd_feature_enable_85;
- UINT16 cmd_feature_enable_86;
- UINT16 cmd_feature_default;
- UINT16 ultra_dma_select;
- UINT16 time_required_for_sec_erase;
- UINT16 time_required_for_enhanced_sec_erase;
- UINT16 current_advanced_power_mgmt_value;
- UINT16 master_pwd_revison_code;
- UINT16 hardware_reset_result;
- UINT16 current_auto_acoustic_mgmt_value;
- UINT16 reserved_95_99[5];
- UINT16 max_user_lba_for_48bit_addr[4];
- UINT16 reserved_104_126[23];
- UINT16 removable_media_status_notification_support;
- UINT16 security_status;
- UINT16 vendor_data_129_159[31];
- UINT16 cfa_power_mode;
- UINT16 cfa_reserved_161_175[15];
- UINT16 current_media_serial_no[30];
- UINT16 reserved_206_254[49];
- UINT16 integrity_word;
-} EFI_ATAPI_IDENTIFY_DATA;
-#pragma pack()
+/// The definition of these two structures is not part of the protocol
+/// definition because the ATA/ATAPI Specification controls the definition
+/// of all the fields. The ATA/ATAPI Specification can obsolete old fields
+/// or redefine existing fields.
+typedef ATA_IDENTIFY_DATA EFI_ATA_IDENTIFY_DATA;
+typedef ATAPI_IDENTIFY_DATA EFI_ATAPI_IDENTIFY_DATA;
///
/// This flag indicates whether the IDENTIFY data is a response from an ATA device
|