ReactOS 0.4.16-dev-820-g96aa1ee
|
Go to the source code of this file.
Classes | |
union | _AHCI_INTERRUPT_STATUS |
struct | _AHCI_FIS_DMA_SETUP |
struct | _AHCI_PIO_SETUP_FIS |
struct | _AHCI_D2H_REGISTER_FIS |
struct | _AHCI_SET_DEVICE_BITS_FIS |
struct | _AHCI_QUEUE |
union | _AHCI_COMMAND_HEADER_DESCRIPTION |
union | _AHCI_GHC |
union | _AHCI_PORT_CMD |
union | _AHCI_SERIAL_ATA_CONTROL |
union | _AHCI_SERIAL_ATA_STATUS |
union | _AHCI_TASK_FILE_DATA |
struct | _AHCI_PRDT |
struct | _AHCI_COMMAND_TABLE |
struct | _AHCI_COMMAND_HEADER |
struct | _AHCI_RECEIVED_FIS |
struct | _AHCI_PORT |
union | _AHCI_INTERRUPT_ENABLE |
struct | _AHCI_MEMORY_REGISTERS |
struct | _AHCI_PORT_EXTENSION |
struct | _AHCI_ADAPTER_EXTENSION |
struct | _LOCAL_SCATTER_GATHER_LIST |
struct | _AHCI_SRB_EXTENSION |
#define AHCI_ATA_CFIS_CommandReg 2 |
Definition at line 48 of file storahci.h.
#define AHCI_ATA_CFIS_Device 7 |
Definition at line 53 of file storahci.h.
#define AHCI_ATA_CFIS_FeaturesHigh 11 |
Definition at line 57 of file storahci.h.
#define AHCI_ATA_CFIS_FeaturesLow 3 |
Definition at line 49 of file storahci.h.
#define AHCI_ATA_CFIS_FisType 0 |
Definition at line 46 of file storahci.h.
#define AHCI_ATA_CFIS_LBA0 4 |
Definition at line 50 of file storahci.h.
#define AHCI_ATA_CFIS_LBA1 5 |
Definition at line 51 of file storahci.h.
#define AHCI_ATA_CFIS_LBA2 6 |
Definition at line 52 of file storahci.h.
#define AHCI_ATA_CFIS_LBA3 8 |
Definition at line 54 of file storahci.h.
#define AHCI_ATA_CFIS_LBA4 9 |
Definition at line 55 of file storahci.h.
#define AHCI_ATA_CFIS_LBA5 10 |
Definition at line 56 of file storahci.h.
#define AHCI_ATA_CFIS_PMPort_C 1 |
Definition at line 47 of file storahci.h.
#define AHCI_ATA_CFIS_SectorCountHigh 13 |
Definition at line 59 of file storahci.h.
#define AHCI_ATA_CFIS_SectorCountLow 12 |
Definition at line 58 of file storahci.h.
#define AHCI_DEVICE_TYPE_ATA 1 |
Definition at line 30 of file storahci.h.
#define AHCI_DEVICE_TYPE_ATAPI 2 |
Definition at line 31 of file storahci.h.
#define AHCI_DEVICE_TYPE_NODEVICE 3 |
Definition at line 32 of file storahci.h.
#define AHCI_Global_HBA_CAP_S64A (1 << 31) |
Definition at line 35 of file storahci.h.
Definition at line 81 of file storahci.h.
#define AhciDebugPrint | ( | format, | |
... | |||
) | DbgPrint("(%s:%d) " format, __RELFILE__, __LINE__, ##__VA_ARGS__) |
Definition at line 85 of file storahci.h.
#define ATA_FLAGS_48BIT_COMMAND (1 << 3) |
Definition at line 72 of file storahci.h.
#define ATA_FLAGS_DATA_IN (1 << 1) |
Definition at line 70 of file storahci.h.
#define ATA_FLAGS_DATA_OUT (1 << 2) |
Definition at line 71 of file storahci.h.
#define ATA_FLAGS_USE_DMA (1 << 4) |
Definition at line 73 of file storahci.h.
#define ATA_FUNCTION_ATA_COMMAND 0x100 |
Definition at line 62 of file storahci.h.
#define ATA_FUNCTION_ATA_IDENTIFY 0x101 |
Definition at line 63 of file storahci.h.
#define ATA_FUNCTION_ATA_READ 0x102 |
Definition at line 64 of file storahci.h.
#define ATA_FUNCTION_ATAPI_COMMAND 0x200 |
Definition at line 67 of file storahci.h.
#define DEBUG 1 |
Definition at line 15 of file storahci.h.
#define DEVICE_ATA_BLOCK_SIZE 512 |
Definition at line 27 of file storahci.h.
#define FIS_TYPE_BIST 0x58 |
Definition at line 42 of file storahci.h.
#define FIS_TYPE_DEV_BITS 0xA1 |
Definition at line 44 of file storahci.h.
#define FIS_TYPE_DMA_ACT 0x39 |
Definition at line 40 of file storahci.h.
#define FIS_TYPE_DMA_SETUP 0x41 |
Definition at line 41 of file storahci.h.
#define FIS_TYPE_PIO_SETUP 0x5F |
Definition at line 43 of file storahci.h.
#define FIS_TYPE_REG_D2H 0x34 |
Definition at line 39 of file storahci.h.
#define FIS_TYPE_REG_H2D 0x27 |
Definition at line 38 of file storahci.h.
#define IsAdapterCAPS64 | ( | CAP | ) | (CAP & AHCI_Global_HBA_CAP_S64A) |
Definition at line 78 of file storahci.h.
#define IsAtaCommand | ( | AtaFunction | ) | (AtaFunction & ATA_FUNCTION_ATA_COMMAND) |
Definition at line 75 of file storahci.h.
#define IsAtapiCommand | ( | AtaFunction | ) | (AtaFunction & ATA_FUNCTION_ATAPI_COMMAND) |
Definition at line 76 of file storahci.h.
#define IsDataTransferNeeded | ( | SrbExtension | ) | (SrbExtension->Flags & (ATA_FLAGS_DATA_IN | ATA_FLAGS_DATA_OUT)) |
Definition at line 77 of file storahci.h.
#define MAXIMUM_AHCI_PORT_COUNT 32 |
Definition at line 21 of file storahci.h.
#define MAXIMUM_AHCI_PORT_NCS 30 |
Definition at line 23 of file storahci.h.
#define MAXIMUM_AHCI_PRDT_ENTRIES 32 |
Definition at line 22 of file storahci.h.
#define MAXIMUM_QUEUE_BUFFER_SIZE 255 |
Definition at line 24 of file storahci.h.
#define MAXIMUM_TRANSFER_LENGTH (128*1024) |
Definition at line 25 of file storahci.h.
#define NDEBUG |
Definition at line 12 of file storahci.h.
typedef union _AHCI_INTERRUPT_ENABLE AHCI_INTERRUPT_ENABLE |
typedef union _AHCI_INTERRUPT_STATUS AHCI_INTERRUPT_STATUS |
typedef struct _AHCI_PORT AHCI_PORT |
typedef union _AHCI_PORT_CMD AHCI_PORT_CMD |
typedef struct _AHCI_PRDT AHCI_PRDT |
typedef struct _AHCI_QUEUE AHCI_QUEUE |
typedef union _AHCI_SERIAL_ATA_CONTROL AHCI_SERIAL_ATA_CONTROL |
typedef union _AHCI_SERIAL_ATA_STATUS AHCI_SERIAL_ATA_STATUS |
typedef union _AHCI_TASK_FILE_DATA AHCI_TASK_FILE_DATA |
typedef struct _AHCI_COMMAND_HEADER * PAHCI_COMMAND_HEADER |
typedef struct _AHCI_COMMAND_TABLE * PAHCI_COMMAND_TABLE |
Definition at line 88 of file storahci.h.
typedef struct _AHCI_PORT * PAHCI_PORT |
typedef struct _AHCI_PORT_EXTENSION * PAHCI_PORT_EXTENSION |
typedef struct _AHCI_PRDT * PAHCI_PRDT |
typedef struct _AHCI_QUEUE * PAHCI_QUEUE |
typedef struct _AHCI_RECEIVED_FIS * PAHCI_RECEIVED_FIS |
typedef struct _AHCI_SRB_EXTENSION * PAHCI_SRB_EXTENSION |
FORCEINLINE BOOLEAN AddQueue | ( | __inout PAHCI_QUEUE | Queue, |
__in PVOID | Srb | ||
) |
Definition at line 2501 of file storahci.c.
Referenced by AhciCompleteIssuedSrb(), and AhciProcessIO().
BOOLEAN AhciAdapterReset | ( | __in PAHCI_ADAPTER_EXTENSION | AdapterExtension | ) |
Definition at line 2393 of file storahci.c.
Referenced by AhciHwFindAdapter().
Definition at line 2595 of file storahci.c.
Referenced by DeviceRequestReadWrite().
VOID AhciProcessIO | ( | __in PAHCI_ADAPTER_EXTENSION | AdapterExtension, |
__in UCHAR | PathId, | ||
__in PSCSI_REQUEST_BLOCK | Srb | ||
) |
Definition at line 1555 of file storahci.c.
Referenced by AhciHwStartIo().
Definition at line 2443 of file storahci.c.
Referenced by AhciAllocateResourceForAdapter(), AhciATA_CFIS(), AhciATAPI_CFIS(), DeviceInquiryRequest(), DeviceReportLuns(), and DeviceRequestSense().
C_ASSERT | ( | (sizeof(AHCI_COMMAND_TABLE) % 128) | = =0 | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_COMMAND_TABLE, ACMD) | = =0x40 | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_COMMAND_TABLE, CFIS) | = =0x00 | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_COMMAND_TABLE, PRDT) | = =0x80 | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_COMMAND_TABLE, RSV0) | = =0x50 | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_MEMORY_REGISTERS, BOHC) | = =0x28 | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_MEMORY_REGISTERS, CAP) | = =0x00 | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_MEMORY_REGISTERS, CAP2) | = =0x24 | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_MEMORY_REGISTERS, CCC_CTL) | = =0x14 | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_MEMORY_REGISTERS, CCC_PTS) | = =0x18 | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_MEMORY_REGISTERS, EM_CTL) | = =0x20 | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_MEMORY_REGISTERS, EM_LOC) | = =0x1C | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_MEMORY_REGISTERS, GHC) | = =0x04 | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_MEMORY_REGISTERS, IS) | = =0x08 | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_MEMORY_REGISTERS, PI) | = =0x0C | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_MEMORY_REGISTERS, PortList) | = =0x100 | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_MEMORY_REGISTERS, Reserved) | = =0x2C | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_MEMORY_REGISTERS, VendorSpecific) | = =0xA0 | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_MEMORY_REGISTERS, VS) | = =0x10 | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_PORT, CI) | = =0x38 | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_PORT, CLB) | = =0x00 | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_PORT, CLBU) | = =0x04 | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_PORT, CMD) | = =0x18 | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_PORT, FB) | = =0x08 | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_PORT, FBS) | = =0x40 | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_PORT, FBU) | = =0x0C | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_PORT, IE) | = =0x14 | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_PORT, IS) | = =0x10 | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_PORT, RSV0) | = =0x1C | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_PORT, RSV1) | = =0x44 | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_PORT, SACT) | = =0x34 | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_PORT, SCTL) | = =0x2C | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_PORT, SERR) | = =0x30 | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_PORT, SIG) | = =0x24 | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_PORT, SNTF) | = =0x3C | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_PORT, SSTS) | = =0x28 | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_PORT, TFD) | = =0x20 | ) |
C_ASSERT | ( | FIELD_OFFSET(AHCI_PORT, Vendor) | = =0x70 | ) |
C_ASSERT | ( | sizeof(AHCI_COMMAND_HEADER_DESCRIPTION) | = =sizeof(ULONG) | ) |
C_ASSERT | ( | sizeof(AHCI_INTERRUPT_ENABLE) | = =sizeof(ULONG) | ) |
C_ASSERT | ( | sizeof(AHCI_PORT_CMD) | = =sizeof(ULONG) | ) |
C_ASSERT | ( | sizeof(AHCI_SERIAL_ATA_CONTROL) | = =sizeof(ULONG) | ) |
C_ASSERT | ( | sizeof(AHCI_SERIAL_ATA_STATUS) | = =sizeof(ULONG) | ) |
C_ASSERT | ( | sizeof(AHCI_TASK_FILE_DATA) | = =sizeof(ULONG) | ) |
UCHAR DeviceInquiryRequest | ( | __in PAHCI_ADAPTER_EXTENSION | AdapterExtension, |
__in PSCSI_REQUEST_BLOCK | Srb, | ||
__in PCDB | Cdb | ||
) |
Definition at line 2250 of file storahci.c.
Referenced by AhciHwStartIo().
UCHAR DeviceReportLuns | ( | __in PAHCI_ADAPTER_EXTENSION | AdapterExtension, |
__in PSCSI_REQUEST_BLOCK | Srb, | ||
__in PCDB | Cdb | ||
) |
Definition at line 2196 of file storahci.c.
Referenced by AhciHwStartIo().
UCHAR DeviceRequestCapacity | ( | __in PAHCI_ADAPTER_EXTENSION | AdapterExtension, |
__in PSCSI_REQUEST_BLOCK | Srb, | ||
__in PCDB | Cdb | ||
) |
Definition at line 2098 of file storahci.c.
Referenced by AhciHwStartIo().
UCHAR DeviceRequestComplete | ( | __in PAHCI_ADAPTER_EXTENSION | AdapterExtension, |
__in PSCSI_REQUEST_BLOCK | Srb, | ||
__in PCDB | Cdb | ||
) |
Definition at line 2166 of file storahci.c.
UCHAR DeviceRequestReadWrite | ( | __in PAHCI_ADAPTER_EXTENSION | AdapterExtension, |
__in PSCSI_REQUEST_BLOCK | Srb, | ||
__in PCDB | Cdb | ||
) |
Definition at line 1988 of file storahci.c.
Referenced by AhciHwStartIo().
UCHAR DeviceRequestSense | ( | __in PAHCI_ADAPTER_EXTENSION | AdapterExtension, |
__in PSCSI_REQUEST_BLOCK | Srb, | ||
__in PCDB | Cdb | ||
) |
Definition at line 1933 of file storahci.c.
Referenced by AhciHwStartIo().
FORCEINLINE PAHCI_SRB_EXTENSION GetSrbExtension | ( | __in PSCSI_REQUEST_BLOCK | Srb | ) |
Definition at line 2564 of file storahci.c.
Referenced by AhciATAPICommand(), AhciCommandCompletionDpcRoutine(), AhciCompleteIssuedSrb(), AhciProcessSrb(), DeviceInquiryRequest(), DeviceRequestReadWrite(), and InquiryCompletion().
FORCEINLINE BOOLEAN IsPortValid | ( | __in PAHCI_ADAPTER_EXTENSION | AdapterExtension, |
__in ULONG | pathId | ||
) |
Definition at line 2471 of file storahci.c.
Referenced by AhciHwInterrupt(), AhciHwResetBus(), AhciHwStartIo(), AhciInterruptHandler(), DeviceInquiryRequest(), DeviceRequestCapacity(), DeviceRequestReadWrite(), and DeviceRequestSense().
FORCEINLINE PVOID RemoveQueue | ( | __inout PAHCI_QUEUE | Queue | ) |
Definition at line 2532 of file storahci.c.
Referenced by AhciCommandCompletionDpcRoutine(), and AhciProcessIO().