|
ReactOS 0.4.17-dev-1321-g5c122a9
|
#include "storahci.h"
Go to the source code of this file.
Functions | |||||||||||||
AhciPortInitialize | |||||||||||||
@implemented Initialize port by setting up PxCLB & PxFB Registers
| |||||||||||||
| BOOLEAN NTAPI | AhciPortInitialize (__in PVOID DeviceExtension) | ||||||||||||
AhciAllocateResourceForAdapter | |||||||||||||
@implemented Allocate memory from poll for required pointers
| |||||||||||||
| BOOLEAN | AhciAllocateResourceForAdapter (__in PAHCI_ADAPTER_EXTENSION AdapterExtension, __in PPORT_CONFIGURATION_INFORMATION ConfigInfo) | ||||||||||||
AhciStartPort | |||||||||||||
@implemented Try to start the port device
| |||||||||||||
| BOOLEAN | AhciStartPort (__in PAHCI_PORT_EXTENSION PortExtension) | ||||||||||||
AhciCommandCompletionDpcRoutine | |||||||||||||
@implemented Handles Completed Commands
| |||||||||||||
| VOID NTAPI | AhciCommandCompletionDpcRoutine (__in PSTOR_DPC Dpc, __in PVOID HwDeviceExtension, __in PVOID SystemArgument1, __in PVOID SystemArgument2) | ||||||||||||
AhciHwPassiveInitialize | |||||||||||||
@implemented initializes the HBA and finds all devices that are of interest to the miniport driver. (at PASSIVE LEVEL)
| |||||||||||||
| BOOLEAN NTAPI | AhciHwPassiveInitialize (__in PVOID DeviceExtension) | ||||||||||||
AhciHwInitialize | |||||||||||||
@implemented initializes the HBA and finds all devices that are of interest to the miniport driver.
| |||||||||||||
| BOOLEAN NTAPI | AhciHwInitialize (__in PVOID DeviceExtension) | ||||||||||||
AhciCompleteIssuedSrb | |||||||||||||
@implemented Complete issued Srbs
| |||||||||||||
| VOID | AhciCompleteIssuedSrb (__in PAHCI_PORT_EXTENSION PortExtension, __in ULONG CommandsToComplete) | ||||||||||||
AhciInterruptHandler | |||||||||||||
@not_implemented Interrupt Handler for PortExtension
| |||||||||||||
| VOID | AhciInterruptHandler (__in PAHCI_PORT_EXTENSION PortExtension) | ||||||||||||
AhciHwInterrupt | |||||||||||||
@implemented The Storport driver calls the HwStorInterrupt routine after the HBA generates an interrupt request.
| |||||||||||||
| BOOLEAN NTAPI | AhciHwInterrupt (__in PVOID DeviceExtension) | ||||||||||||
AhciHwStartIo | |||||||||||||
@not_implemented The Storport driver calls the HwStorStartIo routine one time for each incoming I/O request.
| |||||||||||||
| BOOLEAN NTAPI | AhciHwStartIo (__in PVOID DeviceExtension, __in PSCSI_REQUEST_BLOCK Srb) | ||||||||||||
AhciHwResetBus | |||||||||||||
@not_implemented The HwStorResetBus routine is called by the port driver to clear error conditions.
| |||||||||||||
| BOOLEAN NTAPI | AhciHwResetBus (__in PVOID AdapterExtension, __in ULONG PathId) | ||||||||||||
AhciHwFindAdapter | |||||||||||||
@implemented The HwStorFindAdapter routine uses the supplied configuration to determine whether a specific HBA is supported and, if it is, to return configuration information about that adapter. 10.1 Platform Communication http://www.intel.in/content/dam/www/public/us/en/documents/technical-specifications/serial-ata-ahci-spec-rev1_2.pdf
SP_RETURN_ERROR Indicates that an HBA was found but there was an error obtaining the configuration information. If possible, such an error should be logged with StorPortLogError. SP_RETURN_BAD_CONFIG Indicates that the supplied configuration information was invalid for the adapter. SP_RETURN_NOT_FOUND Indicates that no supported HBA was found for the supplied configuration information.
| |||||||||||||
| ULONG NTAPI | AhciHwFindAdapter (__in PVOID DeviceExtension, __in PVOID HwContext, __in PVOID BusInformation, __in PCHAR ArgumentString, __inout PPORT_CONFIGURATION_INFORMATION ConfigInfo, __in PBOOLEAN Reserved3) | ||||||||||||
DriverEntry | |||||||||||||
@implemented Initial Entrypoint for storahci miniport driver
| |||||||||||||
| ULONG NTAPI | DriverEntry (__in PVOID DriverObject, __in PVOID RegistryPath) | ||||||||||||
AhciATA_CFIS | |||||||||||||
@implemented create ATA CFIS from Srb
| |||||||||||||
| ULONG | AhciATA_CFIS (__in PAHCI_PORT_EXTENSION PortExtension, __in PAHCI_SRB_EXTENSION SrbExtension) | ||||||||||||
AhciATAPI_CFIS | |||||||||||||
@not_implemented create ATAPI CFIS from Srb
| |||||||||||||
| ULONG | AhciATAPI_CFIS (__in PAHCI_PORT_EXTENSION PortExtension, __in PAHCI_SRB_EXTENSION SrbExtension) | ||||||||||||
AhciBuild_PRDT | |||||||||||||
@implemented Build PRDT for data transfer
| |||||||||||||
| ULONG | AhciBuild_PRDT (__in PAHCI_PORT_EXTENSION PortExtension, __in PAHCI_SRB_EXTENSION SrbExtension) | ||||||||||||
AhciProcessSrb | |||||||||||||
@implemented Prepare Srb for IO processing
| |||||||||||||
| VOID | AhciProcessSrb (__in PAHCI_PORT_EXTENSION PortExtension, __in PSCSI_REQUEST_BLOCK Srb, __in ULONG SlotIndex) | ||||||||||||
AhciActivatePort | |||||||||||||
@implemented Program Port and populate command list
| |||||||||||||
| VOID | AhciActivatePort (__in PAHCI_PORT_EXTENSION PortExtension) | ||||||||||||
AhciProcessIO | |||||||||||||
@implemented Acquire Exclusive lock to port, populate pending commands to command List program controller's port to process new commands in command list.
| |||||||||||||
| VOID | AhciProcessIO (__in PAHCI_ADAPTER_EXTENSION AdapterExtension, __in UCHAR PathId, __in PSCSI_REQUEST_BLOCK Srb) | ||||||||||||
AtapiInquiryCompletion | |||||||||||||
@implemented AtapiInquiryCompletion routine should be called after device signals for device inquiry request is completed (through interrupt) – ATAPI Device only
| |||||||||||||
| VOID | AtapiInquiryCompletion (__in PVOID _Extension, __in PVOID _Srb) | ||||||||||||
InquiryCompletion | |||||||||||||
@implemented InquiryCompletion routine should be called after device signals for device inquiry request is completed (through interrupt)
| |||||||||||||
| VOID | InquiryCompletion (__in PVOID _Extension, __in PVOID _Srb) | ||||||||||||
AhciATAPICommand | |||||||||||||
@implemented Handles ATAPI Requests commands
| |||||||||||||
| UCHAR | AhciATAPICommand (__in PAHCI_ADAPTER_EXTENSION AdapterExtension, __in PSCSI_REQUEST_BLOCK Srb, __in PCDB Cdb) | ||||||||||||
DeviceRequestSense | |||||||||||||
@implemented Handle SCSIOP_MODE_SENSE OperationCode
| |||||||||||||
| UCHAR | DeviceRequestSense (__in PAHCI_ADAPTER_EXTENSION AdapterExtension, __in PSCSI_REQUEST_BLOCK Srb, __in PCDB Cdb) | ||||||||||||
DeviceRequestReadWrite | |||||||||||||
@implemented Handle SCSIOP_READ SCSIOP_WRITE OperationCode
| |||||||||||||
| UCHAR | DeviceRequestReadWrite (__in PAHCI_ADAPTER_EXTENSION AdapterExtension, __in PSCSI_REQUEST_BLOCK Srb, __in PCDB Cdb) | ||||||||||||
DeviceRequestCapacity | |||||||||||||
@implemented Handle SCSIOP_READ_CAPACITY OperationCode
| |||||||||||||
| UCHAR | DeviceRequestCapacity (__in PAHCI_ADAPTER_EXTENSION AdapterExtension, __in PSCSI_REQUEST_BLOCK Srb, __in PCDB Cdb) | ||||||||||||
DeviceRequestComplete | |||||||||||||
@implemented Handle UnHandled Requests
| |||||||||||||
| UCHAR | DeviceRequestComplete (__in PAHCI_ADAPTER_EXTENSION AdapterExtension, __in PSCSI_REQUEST_BLOCK Srb, __in PCDB Cdb) | ||||||||||||
DeviceReportLuns | |||||||||||||
@implemented Handle SCSIOP_REPORT_LUNS OperationCode
| |||||||||||||
| UCHAR | DeviceReportLuns (__in PAHCI_ADAPTER_EXTENSION AdapterExtension, __in PSCSI_REQUEST_BLOCK Srb, __in PCDB Cdb) | ||||||||||||
DeviceInquiryRequest | |||||||||||||
@implemented Tells wheather given port is implemented or not
| |||||||||||||
| UCHAR | DeviceInquiryRequest (__in PAHCI_ADAPTER_EXTENSION AdapterExtension, __in PSCSI_REQUEST_BLOCK Srb, __in PCDB Cdb) | ||||||||||||
AhciAdapterReset | |||||||||||||
@implemented 10.4.3 HBA Reset If the HBA becomes unusable for multiple ports, and a software reset or port reset does not correct the problem, software may reset the entire HBA by setting GHC.HR to ‘1’. When software sets the GHC.HR bit to ‘1’, the HBA shall perform an internal reset action. The bit shall be cleared to ‘0’ by the HBA when the reset is complete. A software write of ‘0’ to GHC.HR shall have no effect. To perform the HBA reset, software sets GHC.HR to ‘1’ and may poll until this bit is read to be ‘0’, at which point software knows that the HBA reset has completed. If the HBA has not cleared GHC.HR to ‘0’ within 1 second of software setting GHC.HR to ‘1’, the HBA is in a hung or locked state.
| |||||||||||||
| BOOLEAN | AhciAdapterReset (__in PAHCI_ADAPTER_EXTENSION AdapterExtension) | ||||||||||||
AhciZeroMemory | |||||||||||||
| FORCEINLINE VOID | AhciZeroMemory (__out PCHAR Buffer, __in ULONG BufferSize) | ||||||||||||
IsPortValid | |||||||||||||
@implemented Tells wheather given port is implemented or not
| |||||||||||||
| FORCEINLINE BOOLEAN | IsPortValid (__in PAHCI_ADAPTER_EXTENSION AdapterExtension, __in ULONG pathId) | ||||||||||||
AddQueue | |||||||||||||
@implemented Add Srb to Queue
| |||||||||||||
| FORCEINLINE BOOLEAN | AddQueue (__inout PAHCI_QUEUE Queue, __in PVOID Srb) | ||||||||||||
RemoveQueue | |||||||||||||
@implemented Remove and return Srb from Queue
| |||||||||||||
| FORCEINLINE PVOID | RemoveQueue (__inout PAHCI_QUEUE Queue) | ||||||||||||
GetSrbExtension | |||||||||||||
@implemented GetSrbExtension from Srb make sure It is properly aligned
| |||||||||||||
| FORCEINLINE PAHCI_SRB_EXTENSION | GetSrbExtension (__in PSCSI_REQUEST_BLOCK Srb) | ||||||||||||
AhciGetLba | |||||||||||||
@implemented Find the logical address of demand block from Cdb
| |||||||||||||
| FORCEINLINE ULONG64 | AhciGetLba (__in PCDB Cdb, __in ULONG CdbLength) | ||||||||||||
| FORCEINLINE BOOLEAN AddQueue | ( | __inout PAHCI_QUEUE | Queue, |
| __in PVOID | Srb | ||
| ) |
Definition at line 2503 of file storahci.c.
Referenced by AhciCompleteIssuedSrb(), and AhciProcessIO().
| VOID AhciActivatePort | ( | __in PAHCI_PORT_EXTENSION | PortExtension | ) |
Definition at line 1492 of file storahci.c.
Referenced by AhciProcessIO().
| BOOLEAN AhciAdapterReset | ( | __in PAHCI_ADAPTER_EXTENSION | AdapterExtension | ) |
Definition at line 2395 of file storahci.c.
Referenced by AhciHwFindAdapter().
| BOOLEAN AhciAllocateResourceForAdapter | ( | __in PAHCI_ADAPTER_EXTENSION | AdapterExtension, |
| __in PPORT_CONFIGURATION_INFORMATION | ConfigInfo | ||
| ) |
Definition at line 145 of file storahci.c.
Referenced by AhciHwFindAdapter().
| ULONG AhciATA_CFIS | ( | __in PAHCI_PORT_EXTENSION | PortExtension, |
| __in PAHCI_SRB_EXTENSION | SrbExtension | ||
| ) |
Definition at line 1221 of file storahci.c.
Referenced by AhciProcessSrb().
| ULONG AhciATAPI_CFIS | ( | __in PAHCI_PORT_EXTENSION | PortExtension, |
| __in PAHCI_SRB_EXTENSION | SrbExtension | ||
| ) |
Definition at line 1268 of file storahci.c.
Referenced by AhciProcessSrb().
| UCHAR AhciATAPICommand | ( | __in PAHCI_ADAPTER_EXTENSION | AdapterExtension, |
| __in PSCSI_REQUEST_BLOCK | Srb, | ||
| __in PCDB | Cdb | ||
| ) |
Definition at line 1845 of file storahci.c.
Referenced by DeviceInquiryRequest(), DeviceReportLuns(), DeviceRequestCapacity(), DeviceRequestReadWrite(), and DeviceRequestSense().
| ULONG AhciBuild_PRDT | ( | __in PAHCI_PORT_EXTENSION | PortExtension, |
| __in PAHCI_SRB_EXTENSION | SrbExtension | ||
| ) |
Definition at line 1316 of file storahci.c.
Referenced by AhciProcessSrb().
| VOID NTAPI AhciCommandCompletionDpcRoutine | ( | __in PSTOR_DPC | Dpc, |
| __in PVOID | HwDeviceExtension, | ||
| __in PVOID | SystemArgument1, | ||
| __in PVOID | SystemArgument2 | ||
| ) |
Definition at line 422 of file storahci.c.
Referenced by AhciHwPassiveInitialize().
| VOID AhciCompleteIssuedSrb | ( | __in PAHCI_PORT_EXTENSION | PortExtension, |
| __in ULONG | CommandsToComplete | ||
| ) |
Definition at line 563 of file storahci.c.
Referenced by AhciInterruptHandler().
Definition at line 2597 of file storahci.c.
Referenced by DeviceRequestReadWrite().
| ULONG NTAPI AhciHwFindAdapter | ( | __in PVOID | DeviceExtension, |
| __in PVOID | HwContext, | ||
| __in PVOID | BusInformation, | ||
| __in PCHAR | ArgumentString, | ||
| __inout PPORT_CONFIGURATION_INFORMATION | ConfigInfo, | ||
| __in PBOOLEAN | Reserved3 | ||
| ) |
Definition at line 992 of file storahci.c.
Referenced by DriverEntry().
Definition at line 523 of file storahci.c.
Referenced by DriverEntry().
Definition at line 721 of file storahci.c.
Referenced by DriverEntry().
Definition at line 485 of file storahci.c.
Referenced by AhciHwInitialize().
Definition at line 932 of file storahci.c.
Referenced by DriverEntry().
Definition at line 789 of file storahci.c.
Referenced by DriverEntry().
| VOID AhciInterruptHandler | ( | __in PAHCI_PORT_EXTENSION | PortExtension | ) |
Definition at line 623 of file storahci.c.
Referenced by AhciHwInterrupt().
Definition at line 23 of file storahci.c.
Referenced by AhciHwFindAdapter().
| VOID AhciProcessIO | ( | __in PAHCI_ADAPTER_EXTENSION | AdapterExtension, |
| __in UCHAR | PathId, | ||
| __in PSCSI_REQUEST_BLOCK | Srb | ||
| ) |
Definition at line 1557 of file storahci.c.
Referenced by AhciHwStartIo().
| VOID AhciProcessSrb | ( | __in PAHCI_PORT_EXTENSION | PortExtension, |
| __in PSCSI_REQUEST_BLOCK | Srb, | ||
| __in ULONG | SlotIndex | ||
| ) |
Definition at line 1366 of file storahci.c.
Referenced by AhciProcessIO().
| BOOLEAN AhciStartPort | ( | __in PAHCI_PORT_EXTENSION | PortExtension | ) |
Definition at line 228 of file storahci.c.
Referenced by AhciHwPassiveInitialize().
Definition at line 2445 of file storahci.c.
Referenced by AhciAllocateResourceForAdapter(), AhciATA_CFIS(), AhciATAPI_CFIS(), DeviceInquiryRequest(), DeviceReportLuns(), and DeviceRequestSense().
Definition at line 1640 of file storahci.c.
Referenced by AhciATAPICommand().
| UCHAR DeviceInquiryRequest | ( | __in PAHCI_ADAPTER_EXTENSION | AdapterExtension, |
| __in PSCSI_REQUEST_BLOCK | Srb, | ||
| __in PCDB | Cdb | ||
| ) |
Definition at line 2252 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 2198 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 2100 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 2168 of file storahci.c.
| UCHAR DeviceRequestReadWrite | ( | __in PAHCI_ADAPTER_EXTENSION | AdapterExtension, |
| __in PSCSI_REQUEST_BLOCK | Srb, | ||
| __in PCDB | Cdb | ||
| ) |
Definition at line 1990 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 1935 of file storahci.c.
Referenced by AhciHwStartIo().
Definition at line 1165 of file storahci.c.
| FORCEINLINE PAHCI_SRB_EXTENSION GetSrbExtension | ( | __in PSCSI_REQUEST_BLOCK | Srb | ) |
Definition at line 2566 of file storahci.c.
Referenced by AhciATAPICommand(), AhciCommandCompletionDpcRoutine(), AhciCompleteIssuedSrb(), AhciProcessSrb(), DeviceInquiryRequest(), DeviceRequestReadWrite(), and InquiryCompletion().
Definition at line 1683 of file storahci.c.
Referenced by DeviceInquiryRequest().
| FORCEINLINE BOOLEAN IsPortValid | ( | __in PAHCI_ADAPTER_EXTENSION | AdapterExtension, |
| __in ULONG | pathId | ||
| ) |
Definition at line 2473 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 2534 of file storahci.c.
Referenced by AhciCommandCompletionDpcRoutine(), and AhciProcessIO().