1 /*++ 2 3 Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved 4 5 This program and the accompanying materials are licensed and made available under 6 the terms and conditions of the BSD License that accompanies this distribution. 7 The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php. 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 13 14 --*/ 15 16 17 /*++ 18 19 Module Name: 20 21 CEATA.h 22 23 Abstract: 24 25 Header file for chipset CE-AT spec. 26 27 --*/ 28 29 #ifndef _CE_ATA_H 30 #define _CE_ATA_H 31 32 #pragma pack(1) 33 34 35 #define DATA_UNIT_SIZE 512 36 37 38 #define CMD60 60 39 #define CMD61 61 40 41 42 #define RW_MULTIPLE_REGISTER CMD60 43 #define RW_MULTIPLE_BLOCK CMD61 44 45 46 #define CE_ATA_SIG_CE 0xCE 47 #define CE_ATA_SIG_AA 0xAA 48 49 50 #define Reg_Features_Exp 01 51 #define Reg_SectorCount_Exp 02 52 #define Reg_LBALow_Exp 03 53 #define Reg_LBAMid_Exp 04 54 #define Reg_LBAHigh_Exp 05 55 #define Reg_Control 06 56 #define Reg_Features_Error 09 57 #define Reg_SectorCount 10 58 #define Reg_LBALow 11 59 #define Reg_LBAMid 12 60 #define Reg_LBAHigh 13 61 #define Reg_Device_Head 14 62 #define Reg_Command_Status 15 63 64 #define Reg_scrTempC 0x80 65 #define Reg_scrTempMaxP 0x84 66 #define Reg_scrTempMinP 0x88 67 #define Reg_scrStatus 0x8C 68 #define Reg_scrReallocsA 0x90 69 #define Reg_scrERetractsA 0x94 70 #define Reg_scrCapabilities 0x98 71 #define Reg_scrControl 0xC0 72 73 74 75 typedef struct { 76 UINT8 Reserved0; 77 UINT8 Features_Exp; 78 UINT8 SectorCount_Exp; 79 UINT8 LBALow_Exp; 80 UINT8 LBAMid_Exp; 81 UINT8 LBAHigh_Exp; 82 UINT8 Control; 83 UINT8 Reserved1[2]; 84 UINT8 Features_Error; 85 UINT8 SectorCount; 86 UINT8 LBALow; 87 UINT8 LBAMid; 88 UINT8 LBAHigh; 89 UINT8 Device_Head; 90 UINT8 Command_Status; 91 } TASK_FILE; 92 93 94 // 95 //Reduced ATA command set 96 // 97 #define IDENTIFY_DEVICE 0xEC 98 #define READ_DMA_EXT 0x25 99 #define WRITE_DMA_EXT 0x35 100 #define STANDBY_IMMEDIATE 0xE0 101 #define FLUSH_CACHE_EXT 0xEA 102 103 104 105 typedef struct { 106 UINT16 Reserved0[10]; 107 UINT16 SerialNumber[10]; 108 UINT16 Reserved1[3]; 109 UINT16 FirmwareRevision[4]; 110 UINT16 ModelNumber[20]; 111 UINT16 Reserved2[33]; 112 UINT16 MajorVersion; 113 UINT16 Reserved3[19]; 114 UINT16 MaximumLBA[4]; 115 UINT16 Reserved4[2]; 116 UINT16 Sectorsize; 117 UINT16 Reserved5; 118 UINT16 DeviceGUID[4]; 119 UINT16 Reserved6[94]; 120 UINT16 Features; 121 UINT16 MaxWritesPerAddress; 122 UINT16 Reserved7[47]; 123 UINT16 IntegrityWord; 124 } IDENTIFY_DEVICE_DATA; 125 126 127 128 129 130 #pragma pack() 131 132 #endif 133