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