X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FModules%2FStorage%2FAHCI%2Fahci.h;h=81b6059e3dc17a799d69f79a77df7483e7fe250e;hb=c00f6ece0ff9a1ad2d07691122070d52d4397d78;hp=3965295658b61e2ae9e0f4e5c62ec3e53397fbee;hpb=9c7df214d8790f5cfebb32824f06f4844b4e69dd;p=tpg%2Facess2.git diff --git a/KernelLand/Modules/Storage/AHCI/ahci.h b/KernelLand/Modules/Storage/AHCI/ahci.h index 39652956..81b6059e 100644 --- a/KernelLand/Modules/Storage/AHCI/ahci.h +++ b/KernelLand/Modules/Storage/AHCI/ahci.h @@ -9,16 +9,53 @@ #define _AHCI__AHCI_H_ #include "ahci_hw.h" +#include +#include +#include +#include +#include typedef struct sAHCI_Ctrlr tAHCI_Ctrlr; +typedef struct sAHCI_Port tAHCI_Port; struct sAHCI_Ctrlr { - int PortCount; - + int ID; // Controller ID + int IRQ; tPAddr PMemBase; - struct sAHCI_MemSpace *MMIO; + tAHCI_MemSpace *MMIO; + + bool Supports64Bit; + + int NCS; + + int PortCount; + tAHCI_Port *Ports; +}; + +struct sAHCI_Port +{ + int Idx; // Hardware index + tAHCI_Ctrlr *Ctrlr; + volatile struct s_port *MMIO; + + tMutex lCommandSlots; + Uint32 IssuedCommands; + volatile struct sAHCI_CmdHdr *CmdList; + struct sAHCI_CmdTable *CommandTables[32]; + tThread *CommandThreads[32]; + volatile struct sAHCI_RcvdFIS *RcvdFIS; + + tSemaphore InterruptSem; + Uint32 LastIS; + + bool bHotplug; + bool bPresent; + bool bATAPI; + + void *LVMHandle; + Uint64 SectorCount; }; #endif