Modules/AHCI - Moved FIS definitions to sata.h
[tpg/acess2.git] / KernelLand / Modules / Storage / AHCI / sata.h
1 /*
2  * Acess2 Kernel - AHCI Driver
3  * - By John Hodge (thePowersGang)
4  *
5  * sata.h
6  * - SATA Structures
7  */
8 #ifndef _AHCI__SATA_H_
9 #define _AHCI__SATA_H_
10
11 enum eSATA_FIS_Types
12 {
13         SATA_FIS_D2HRegister = 0x34,
14         SATA_FIS_DMASetup = 0x41,
15         SATA_FIS_PIOSetup = 0x5F,
16 };
17
18 struct sSATA_FIS_DMASetup
19 {
20         Uint8   Type;   // = 0x41
21         Uint8   Flags;  // [6]: Interrupt, [5]: Direction
22         Uint8   _resvd1[2];
23         Uint32  DMABufIdLow;
24         Uint32  DMABufIdHigh;
25         Uint32  _resvd2[1];
26         Uint32  DMABufOfs;
27         Uint32  DMATransferCount;
28         Uint32  _resvd[1];
29 } PACKED;
30 struct sSATA_FIS_PIOSetup
31 {
32         Uint8   Type;   // = 0x5F
33         Uint8   Flags;
34         Uint8   Status;
35         Uint8   Error;
36         Uint8   SectorNum;
37         Uint8   CylLow;
38         Uint8   CylHigh;
39         Uint8   Dev_Head;
40         Uint8   SectorNumExp;
41         Uint8   CylLowExp;
42         Uint8   CylHighExp;
43         Uint8   _resvd1[1];
44         Uint8   SectorCount;
45         Uint8   SectorCountExp;
46         Uint8   _resvd2[1];
47         Uint8   E_Status;
48         Uint16  TransferCount;
49         Uint8   _resvd3[2];
50 } PACKED;
51 struct sSATA_FIS_D2HRegister
52 {
53         Uint8   Type;   // = 0x34
54         Uint8   IntResvd;       // [6]: Interrupt bit
55         Uint8   Status;
56         Uint8   Error;
57         Uint8   SectorNum;
58         Uint8   CylLow;
59         Uint8   CylHigh;
60         Uint8   Dev_Head;
61         Uint8   SectorNumExp;
62         Uint8   CylLowExp;
63         Uint8   CylHighExp;
64         Uint8   _resvd1[1];
65         Uint8   SectorCount;
66         Uint8   SectorCountExp;
67         Uint8   _resvd[6];
68 } PACKED;
69 struct sSATA_FIS_SDB
70 {
71         Uint8   Type;   // = 0xA1
72         Uint8   IntResvd;
73         Uint8   Status;
74         Uint8   Error;
75         Uint32  _resvd[1];
76 } PACKED;
77
78 #endif
79

UCC git Repository :: git.ucc.asn.au