X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FModules%2FStorage%2FAHCI%2Fahci_hw.h;h=d74f822461390c137780e1131df16cc13327a1ab;hb=de6091a10d2cdded5e58f25ba3e3db7db726d01d;hp=36cc74f4226015dd3669f713c73133068e1d8c28;hpb=10b384da656541a3c32e3f86bc5c525737c2de38;p=tpg%2Facess2.git diff --git a/KernelLand/Modules/Storage/AHCI/ahci_hw.h b/KernelLand/Modules/Storage/AHCI/ahci_hw.h index 36cc74f4..d74f8224 100644 --- a/KernelLand/Modules/Storage/AHCI/ahci_hw.h +++ b/KernelLand/Modules/Storage/AHCI/ahci_hw.h @@ -8,6 +8,8 @@ #ifndef _AHCI__AHCI_HW_H_ #define _AHCI__AHCI_HW_H_ +#include "sata.h" + #define AHCI_CAP_S64A (1 << 31) // Supports 64-bit addressing #define AHCI_CAP_SNCQ (1 << 30) // Supports Native Command Queuing #define AHCI_CAP_SXS (1 << 5) // Support External SATA @@ -115,32 +117,15 @@ struct sAHCI_MemSpace } Ports[32]; } PACKED; -struct sAHCI_FIS_DMASetup -{ - Uint32 unk[7]; -} PACKED; -struct sAHCI_FIS_PIOSetup -{ - Uint32 unk[5]; -} PACKED; -struct sAHCI_FIS_D2HRegister -{ - Uint32 unk[5]; -} PACKED; -struct sAHCI_FIS_SDB -{ - Uint32 unk[2]; -} PACKED; - struct sAHCI_RcvdFIS { - struct sAHCI_FIS_DMASetup DSFIS; + struct sSATA_FIS_DMASetup DSFIS; Uint32 _pad1[1]; - struct sAHCI_FIS_PIOSetup PSFIS; + struct sSATA_FIS_PIOSetup PSFIS; Uint32 _pad2[3]; - struct sAHCI_FIS_D2HRegister RFIS; + struct sSATA_FIS_D2HRegister RFIS; Uint32 _pad3[1]; - struct sAHCI_FIS_SDB SDBFIS; + struct sSATA_FIS_SDB SDBFIS; Uint32 UFIS[64/4]; Uint32 _redvd[(0x100 - 0xA0) / 4]; } PACKED; @@ -152,7 +137,13 @@ struct sAHCI_CmdHdr Uint32 PRDBC; Uint32 CTBA; // 128-byte alignment Uint32 CTBAU; - Uint32 resdv[4]; + union { + struct { + struct sThread *Thread; + struct sAHCI_CmdTable *TablePtr; + } PACKED Ptrs; + Uint32 resdv[4]; + } Resvd; } PACKED; struct sAHCI_CmdEnt @@ -163,5 +154,13 @@ struct sAHCI_CmdEnt Uint32 DBC; // Data byte count (31: IOC, 21:0 count) 0=1, 1=2, ... } PACKED; +struct sAHCI_CmdTable +{ + Uint32 CFIS[64/4]; + Uint32 ACMD[16/4]; + Uint32 _resvd[0x30/4]; + struct sAHCI_CmdEnt PRDT[0x80/16]; +} PACKED; + #endif