68 ULONG VendorID = deviceExtension->
DevID & 0xffff;
116 switch(deviceExtension->
DevID) {
125 if(ChipType !=
PRMIO) {
143 switch(deviceExtension->
DevID) {
157 switch(deviceExtension->
DevID) {
185 KdPrint((
"SATA controller %s (%s%s channel)\n",
186 (satacfg & 0x01) == 0 ?
"disabled" :
"enabled",
187 (satacfg & 0x08) == 0 ?
"" :
"combined mode, ",
188 (satacfg & 0x10) == 0 ?
"primary" :
"secondary"));
193 if ((satacfg & 0x09) == 0x01) {
256 if(deviceExtension->
DevID == 0x82131283) {
291 ULONG tmp32, port_mask;
350 ULONG VendorID = deviceExtension->
DevID & 0xffff;
378 BaseIoAddressBM = pciData->u.type0.BaseAddresses[4] & ~0x07;
380 ConfigInfo->MaximumTransferLength =
DEV_BSIZE*256;
551 switch(deviceExtension->
DevID) {
613 deviceExtension->
HwFlags = tmp32;
617 deviceExtension->
HwFlags |= tmp32;
627 if(tmp32 != 0xffffffff) {
656 ChipFlags &= ~UNIATA_AHCI;
657 deviceExtension->
HwFlags &= ~UNIATA_AHCI;
669 ChipFlags &= ~UNIATA_AHCI;
670 deviceExtension->
HwFlags &= ~UNIATA_AHCI;
698 BaseIoAddress1 =
AtapiGetIoRange(HwDeviceExtension, ConfigInfo, pciData, SystemIoBusNumber,
700 BaseIoAddress2 =
AtapiGetIoRange(HwDeviceExtension, ConfigInfo, pciData, SystemIoBusNumber,
702 BaseIoAddressBM =
AtapiGetIoRange(HwDeviceExtension, ConfigInfo, pciData, SystemIoBusNumber,
707 chan = &deviceExtension->
chan[
c];
732 BaseMemAddress =
AtapiGetIoRange(HwDeviceExtension, ConfigInfo, pciData, SystemIoBusNumber,
733 5, 0, ((ChipFlags &
NV4OFF) ? 0x400 : 0) + 0x40*2);
735 if(!BaseMemAddress) {
738 if((*ConfigInfo->AccessRanges)[5].RangeInMemory) {
744 chan = &deviceExtension->
chan[
c];
756 if(ChipType !=
PRMIO) {
765 BaseMemAddress =
AtapiGetIoRange(HwDeviceExtension, ConfigInfo, pciData, SystemIoBusNumber,
768 if(!BaseMemAddress) {
771 if((*ConfigInfo->AccessRanges)[4].RangeInMemory) {
778 BaseMemAddress =
AtapiGetIoRange(HwDeviceExtension, ConfigInfo, pciData, SystemIoBusNumber,
781 if(!BaseMemAddress) {
784 if((*ConfigInfo->AccessRanges)[3].RangeInMemory) {
795 ((reg48 & 0x02) ? 1 : 0) +
805 chan = &deviceExtension->
chan[
c];
821 if((ChipFlags &
PRSATA) ||
822 ((ChipFlags &
PRCMBO) &&
c<2)) {
843 chan = &deviceExtension->
chan[0];
868 BaseMemAddress =
AtapiGetIoRange(HwDeviceExtension, ConfigInfo, pciData, SystemIoBusNumber,
871 if(!BaseMemAddress) {
874 if((*ConfigInfo->AccessRanges)[5].RangeInMemory) {
884 chan = &deviceExtension->
chan[
c];
926 BaseMemAddress =
AtapiGetIoRange(HwDeviceExtension, ConfigInfo, pciData, SystemIoBusNumber,
929 if(!BaseMemAddress) {
932 if((*ConfigInfo->AccessRanges)[5].RangeInMemory) {
941 chan = &deviceExtension->
chan[
c];
1002 if(SiSSouthAdapters[
i].nDeviceId == 0x1182 ||
1003 SiSSouthAdapters[
i].nDeviceId == 0x1183) {
1026 BaseMemAddress =
AtapiGetIoRange(HwDeviceExtension, ConfigInfo, pciData, SystemIoBusNumber,
1029 if(BaseMemAddress) {
1030 if((*ConfigInfo->AccessRanges)[5].RangeInMemory) {
1037 ULONG offs =
c << (SIS_182 ? 5 : 6);
1039 chan = &deviceExtension->
chan[
c];
1077 BaseMemAddress =
AtapiGetIoRange(HwDeviceExtension, ConfigInfo, pciData, SystemIoBusNumber,
1079 if(BaseMemAddress && (*ConfigInfo->AccessRanges)[5].RangeInMemory) {
1085 if(BaseMemAddress) {
1089 ULONG BaseIoAddressBM_0;
1094 AtapiGetIoRange(HwDeviceExtension, ConfigInfo, pciData, SystemIoBusNumber, 4, 0,
1099 chan = &deviceExtension->
chan[
c];
1116 chan = &deviceExtension->
chan[
c];
1117 if((ChipFlags &
VIABAR) && (
c==2)) {
1145 BaseMemAddress =
AtapiGetIoRange(HwDeviceExtension, ConfigInfo, pciData, SystemIoBusNumber,
1147 if(!BaseMemAddress) {
1150 if((*ConfigInfo->AccessRanges)[0].RangeInMemory) {
1158 ULONG offs = 0x200 +
c*0x200;
1160 chan = &deviceExtension->
chan[
c];
1204 deviceExtension->
HwFlags &= ~UNIATA_AHCI;
1206 BaseIoAddressBM =
AtapiGetIoRange(HwDeviceExtension, ConfigInfo, pciData, SystemIoBusNumber,
1208 if(BaseIoAddressBM) {
1211 if((*ConfigInfo->AccessRanges)[4].RangeInMemory) {
1235 deviceExtension->
HwFlags &= ~UNIATA_AHCI;
1244 if(deviceExtension->
DevID == 0x28288086 &&
1245 pciData->u.type0.SubVendorID == 0x106b) {
1250 BaseMemAddress =
AtapiGetIoRange(HwDeviceExtension, ConfigInfo, pciData, SystemIoBusNumber,
1252 if(BaseMemAddress && (*ConfigInfo->AccessRanges)[5].RangeInMemory) {
1260 chan = &deviceExtension->
chan[
c];
1263 if(ChipFlags &
ICH5) {
1265 if ((tmp8 & 0x04) == 0) {
1267 }
else if ((tmp8 & 0x02) == 0) {
1272 }
else if ((tmp8 & 0x02) != 0) {
1279 if(ChipFlags &
I6CH2) {
1284 switch(tmp8 & 0x03) {
1305 if(!(ChipFlags &
ICH7) && BaseMemAddress) {
1310 if((ChipFlags &
ICH5) || BaseMemAddress) {
1315 deviceExtension->
HwFlags &= ~CHIPTYPE_MASK;
1316 deviceExtension->
HwFlags |= ChipType;
1318 if(ChipFlags &
ICH7) {
1335 if(deviceExtension->
DevID == 0x01021078) {
1336 ConfigInfo->AlignmentMask = 0x0f;
1344 KdPrint((
" Check JMicron AHCI\n"));
1349 KdPrint((
" JMicron PATA/SATA\n"));
1358 KdPrint((
" JMicron Combined\n"));
1396 slotData.
u.
bits.FunctionNumber = funcNumber;
1409 VendorID = pciData.VendorID;
1411 dev_id = (VendorID | (
DeviceID << 16));
1413 if (dev_id == 0x03051106 ||
1414 dev_id == 0x03911106 ||
1415 dev_id == 0x31021106 ||
1416 dev_id == 0x31121106) {
1421 if ((reg76 & 0xf0) != 0xd0) {
1430 deviceExtension->
HwFlags &= ~VIABUG;
1462 slotData.
u.
bits.FunctionNumber = funcNumber;
1475 VendorID = pciData.VendorID;
1477 dev_id = (VendorID | (
DeviceID << 16));
1517 slotData.
u.
bits.FunctionNumber = funcNumber;
1530 VendorID = pciData.VendorID;
1532 dev_id = (VendorID | (
DeviceID << 16));
1549 PVOID HwDeviceExtension = (
PVOID)deviceExtension;
1550 ULONG slotNumber = deviceExtension->slotNumber;
1551 ULONG SystemIoBusNumber = deviceExtension->SystemIoBusNumber;
1561 c = channel - deviceExtension->Channel;
1562 chan = &deviceExtension->chan[
c];
1564 slotData.
u.
AsULONG = deviceExtension->slotNumber;
1571 if(ChipType ==
HPT374 && slotData.
u.
bits.FunctionNumber == 1) {
1572 reg = channel ? 0x57 : 0x53;
1582 res =
res & (channel ? 0x01 : 0x02);
1652 PVOID HwDeviceExtension = (
PVOID)deviceExtension;
1653 ULONG slotNumber = deviceExtension->slotNumber;
1654 ULONG SystemIoBusNumber = deviceExtension->SystemIoBusNumber;
1656 if(deviceExtension->MaxTransferMode <=
ATA_UDMA2) {
1657 KdPrint2((
PRINT_PREFIX "generic_cable80(%d, %#x, %d) <= UDMA2\n", channel, pci_reg, bit_offs));
1666 c = channel - deviceExtension->Channel;
1667 chan = &deviceExtension->chan[
c];
1675 if(!(tmp8 & (1 << (channel << bit_offs)))) {
1698 c = channel - deviceExtension->Channel;
1700 chan = &deviceExtension->chan[
c];
1805 c = channel - deviceExtension->
Channel;
1825 chan = &deviceExtension->
chan[
c];
1828 if(tmp32 != 0xffffffff) {
1860 chan = &deviceExtension->
chan[
c];
1863 if(tmp32 != 0xffffffff) {
1895 ULONG VendorID = deviceExtension->
DevID & 0xffff;
1922 channel += deviceExtension->
Channel;
1933 VendorID = 0xffffffff;
1984 chan = &deviceExtension->
chan[
c];
1987 if(RevID == 0xc2 || RevID == 0xc3) {
1989 SystemIoBusNumber, slotNumber,
c);
2065 chan = &deviceExtension->
chan[
c];
2106 chan = &deviceExtension->
chan[
c];
2108 if(ChipFlags &
ICH5) {
2110 if ((tmp8 & 0x04) == 0) {
2112 chan->
lun[0]->SATA_lun_map = (tmp8 & 0x01) ^
c;
2113 chan->
lun[1]->SATA_lun_map = 0;
2114 }
else if ((tmp8 & 0x02) == 0) {
2116 chan->
lun[0]->SATA_lun_map = (tmp8 & 0x01) ? 1 : 0;
2117 chan->
lun[1]->SATA_lun_map = (tmp8 & 0x01) ? 0 : 1;
2122 }
else if ((tmp8 & 0x02) != 0) {
2124 chan->
lun[0]->SATA_lun_map = (tmp8 & 0x01) ? 1 : 0;
2125 chan->
lun[1]->SATA_lun_map = (tmp8 & 0x01) ? 0 : 1;
2132 if(ChipFlags &
I6CH2) {
2135 chan->
lun[0]->SATA_lun_map =
c ? 0 : 1;
2136 chan->
lun[1]->SATA_lun_map = 0;
2139 switch(tmp8 & 0x03) {
2142 chan->
lun[0]->SATA_lun_map = 0+
c;
2143 chan->
lun[1]->SATA_lun_map = 2+
c;
2148 chan->
lun[0]->SATA_lun_map = 0;
2149 chan->
lun[1]->SATA_lun_map = 2;
2159 chan->
lun[0]->SATA_lun_map = 1;
2160 chan->
lun[1]->SATA_lun_map = 3;
2178 chan = &deviceExtension->
chan[
c];
2195 chan = &deviceExtension->
chan[
c];
2204 if(reg54 == 0x0000 || reg54 == 0xffff) {
2207 if( ((reg54 >> (channel*2)) & 30) == 0) {
2216 ULONG offs = (ChipFlags &
NV4OFF) ? 0x0440 : 0x0010;
2222 if(ChipFlags &
NVQ) {
2226 if(tmp32 & ~0xfffffff9) {
2228 tmp32 & 0xfffffff9);
2231 deviceExtension->
HwFlags = ChipFlags;
2233 if(ChipFlags &
NVQ) {
2240 tmp32 | ~0x00000006);
2293 chan = &deviceExtension->
chan[
c];
2295 if(Reg50 & (1 << (channel+10))) {
2305 chan = &deviceExtension->
chan[
c];
2316 (ChipFlags &
PRG2) ? 0x60 : 0x6c, 0x000000ff);
2323 chan = &deviceExtension->
chan[
c];
2340 SystemIoBusNumber, slotNumber);
2369 if ((tmp8 & 0x30) != 0x10)
2372 if ((tmp8 & 0x30) != 0x10) {
2384 chan = &deviceExtension->
chan[
c];
2386 if(Reg79 & (channel ? 0x02 : 0x01)) {
2417 if (ChipFlags &
SII4CH) {
2422 chan = &deviceExtension->
chan[
c];
2477 chan = &deviceExtension->
chan[
c];
2513 chan = &deviceExtension->
chan[
c];
2515 if(tmp16 & 0x8000) {
2524 chan = &deviceExtension->
chan[
c];
2526 if(tmp8 & (0x10 << channel)) {
2582 SystemIoBusNumber, slotNumber);
2603 chan = &deviceExtension->
chan[
c];
2606 if((ChipFlags &
VIABAR) && (
c >= 2)) {
2639 chan = &deviceExtension->
chan[
c];
2640 if(!(tmp16 & (channel ? 0x08 : 0x04))) {
2653 if(!(tmp8 & 0x40)) {
2676 c_swp = (reg40 & (1<<22)) ? 1 : 0;
2688 if(reg40 & (1 << 23)) {
2710 chan = &deviceExtension->
chan[
c];
2719 if(!(reg40 & (1<<5))) {
2722 if(!(reg40 & (1<<3))) {
2727 if(!(reg80 & (1<<21))) {
2730 if(!(reg80 & (1<<19))) {
2775 if(!BaseIoAddressBM_0) {
2778 for(
c=0;
c<deviceExtension->NumberChannels;
c++) {
2779 chan = &deviceExtension->chan[
c];
2783 if(BaseIoAddressBM_0) {
2784 BaseIoAddressBM_0++;
2831 MemIo = Proc =
FALSE;
2833 chan->RegTranslation[
idx].Addr =
addr;
2834 chan->RegTranslation[
idx].MemIo = MemIo;
2835 chan->RegTranslation[
idx].Proc = Proc;
2847 MemIo = Proc =
FALSE;
2850 IoRes->MemIo = MemIo;
2864 KdPrint2((
PRINT_PREFIX "AtapiSetupLunPtrs for channel %d of %d, %d luns \n",
c, deviceExtension->NumberChannels, deviceExtension->NumberLuns));
2866 if(!deviceExtension->NumberLuns) {
2871 chan->DeviceExtension = deviceExtension;
2873 chan->NumberLuns = deviceExtension->NumberLuns;
2874 for(
i=0;
i<deviceExtension->NumberLuns;
i++) {
2875 chan->lun[
i] = &(deviceExtension->lun[
c*deviceExtension->NumberLuns+
i]);
2879 chan->AltRegMap = deviceExtension->AltRegMap;
2880 chan->NextDpcChan = -1;
2881 chan->last_devsel = -1;
2882 for(
i=0;
i<deviceExtension->NumberLuns;
i++) {
2883 chan->lun[
i]->DeviceExtension = deviceExtension;
2884 chan->lun[
i]->chan = chan;
2885 chan->lun[
i]->Lun =
i;
2888 deviceExtension->AhciInternalAtaReq0 &&
2889 deviceExtension->AhciInternalSrb0) {
2890 chan->AhciInternalAtaReq = &(deviceExtension->AhciInternalAtaReq0[
c]);
2891 chan->AhciInternalSrb = &(deviceExtension->AhciInternalSrb0[
c]);
2893 chan->AhciInternalSrb->SrbExtension = chan->AhciInternalAtaReq;
2894 chan->AhciInternalAtaReq->Srb = chan->AhciInternalSrb;
2903 ULONG NewNumberChannels
2911 old_luns = deviceExtension->
lun;
2912 old_chans = deviceExtension->
chan;
2914 if(old_luns || old_chans) {
2947 if (!deviceExtension->
lun) {
2955 if (!deviceExtension->
chan) {
2970 if (deviceExtension->
lun) {
2974 if (deviceExtension->
chan) {
struct _HW_DEVICE_EXTENSION * PHW_DEVICE_EXTENSION
struct _HW_LU_EXTENSION * PHW_LU_EXTENSION
BUSMASTER_CONTROLLER_INFORMATION_BASE const BusMasterAdapters[]
#define UNIATA_SIMPLEX_ONLY
#define NUM_BUSMASTER_ADAPTERS
struct _BUSMASTER_CONTROLLER_INFORMATION_BASE * PBUSMASTER_CONTROLLER_INFORMATION_BASE
__inline ULONG Ata_is_dev_listed(IN PBUSMASTER_CONTROLLER_INFORMATION_BASE BusMasterAdapters, ULONG VendorId, ULONG DeviceId, ULONG RevId, ULONG lim)
#define PCI_DEV_HW_SPEC_BM(idhi, idlo, rev, mode, name, flags)
#define IDE_MAX_LUN_PER_CHAN
#define Ata_is_ahci_dev(pciData)
#define BMLIST_TERMINATOR
#define ATA_SILICON_IMAGE_ID
#define ATA_SERVERWORKS_ID
VOID NTAPI ScsiPortFreeDeviceBase(IN PVOID HwDeviceExtension, IN PVOID MappedAddress)
ULONG NTAPI ScsiPortGetBusData(IN PVOID DeviceExtension, IN ULONG BusDataType, IN ULONG SystemIoBusNumber, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Length)
struct _HW_CHANNEL * PHW_CHANNEL
VOID DDKFASTAPI AtapiWritePortEx1(IN PHW_CHANNEL chan, IN ULONGIO_PTR port, IN ULONG offs, IN UCHAR data)
#define ChangePciConfig1(offs, _op)
#define IDX_BM_DeviceSpecific1
#define SetPciConfig4(offs, op)
#define ChangePciConfig4(offs, _op)
ULONG NTAPI AtapiFindListedDev(PBUSMASTER_CONTROLLER_INFORMATION_BASE BusMasterAdapters, ULONG lim, IN PVOID HwDeviceExtension, IN ULONG BusNumber, IN ULONG SlotNumber, OUT PCI_SLOT_NUMBER *_slotData)
#define IDX_SATA_SControl
#define IDX_BM_DeviceSpecific0
UCHAR DDKFASTAPI AtapiReadPort1(IN PHW_CHANNEL chan, IN ULONGIO_PTR port)
ULONG DDKFASTAPI AtapiReadPort4(IN PHW_CHANNEL chan, IN ULONGIO_PTR port)
#define GetPciConfig1(offs, op)
VOID DDKFASTAPI AtapiWritePortEx4(IN PHW_CHANNEL chan, IN ULONGIO_PTR port, IN ULONG offs, IN ULONG data)
#define ChangePciConfig2(offs, _op)
ULONG DDKFASTAPI AtapiReadPortEx4(IN PHW_CHANNEL chan, IN ULONGIO_PTR port, IN ULONG offs)
ULONG g_opt_VirtualMachine
#define GetPciConfig4(offs, op)
VOID DDKFASTAPI AtapiWritePort4(IN PHW_CHANNEL chan, IN ULONGIO_PTR port, IN ULONG data)
union _ATA_REQ * PATA_REQ
#define UNIATA_ALLOCATE_NEW_LUNS
VOID DDKFASTAPI AtapiWritePort2(IN PHW_CHANNEL chan, IN ULONGIO_PTR port, IN USHORT data)
#define SetPciConfig2(offs, op)
ULONGIO_PTR NTAPI AtapiGetIoRange(IN PVOID HwDeviceExtension, IN PPORT_CONFIGURATION_INFORMATION ConfigInfo, IN PPCI_COMMON_CONFIG pciData, IN ULONG SystemIoBusNumber, IN ULONG rid, IN ULONG offset, IN ULONG length)
#define PCI_DEV_SUBCLASS_IDE
#define PCISLOTNUM_NOT_SPECIFIED
#define SATA_MAX_PM_UNITS
BOOLEAN g_opt_AtapiDmaRawRead
#define GetPciConfig2(offs, op)
VOID DDKFASTAPI AtapiWritePort1(IN PHW_CHANNEL chan, IN ULONGIO_PTR port, IN UCHAR data)
#define CTRFLAGS_NO_SLAVE
USHORT NTAPI UniataEnableIoPCI(IN ULONG busNumber, IN ULONG slotNumber, IN OUT PPCI_COMMON_CONFIG pciData)
UCHAR DDKFASTAPI AtapiReadPortEx1(IN PHW_CHANNEL chan, IN ULONGIO_PTR port, IN ULONG offs)
#define SetPciConfig1(offs, op)
PBUSMASTER_CONTROLLER_INFORMATION BMList
_In_ PCHAR _In_ ULONG DeviceNumber
#define ScsiPortConvertPhysicalAddressToUlong(Address)
struct _SCSI_REQUEST_BLOCK * PSCSI_REQUEST_BLOCK
NTHALAPI ULONG NTAPI HalGetBusData(BUS_DATA_TYPE, ULONG, ULONG, PVOID, ULONG)
#define ExAllocatePool(type, size)
GLenum const GLvoid * addr
GLboolean GLboolean GLboolean GLboolean a
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
BOOLEAN NTAPI UniataAllocateLunExt(PHW_DEVICE_EXTENSION deviceExtension, ULONG NewNumberChannels)
BOOLEAN NTAPI generic_cable80(IN PHW_DEVICE_EXTENSION deviceExtension, IN ULONG channel, IN ULONG pci_reg, IN ULONG bit_offs)
static BUSMASTER_CONTROLLER_INFORMATION_BASE const AtiSouthAdapters[]
NTSTATUS NTAPI UniataChipDetect(IN PVOID HwDeviceExtension, IN PPCI_COMMON_CONFIG pciData, IN ULONG DeviceNumber, IN OUT PPORT_CONFIGURATION_INFORMATION ConfigInfo, IN BOOLEAN *simplexOnly)
VOID UniataInitIoRes(IN PHW_CHANNEL chan, IN ULONG idx, IN ULONG addr, IN BOOLEAN MemIo, IN BOOLEAN Proc)
VOID NTAPI AtapiSetupLunPtrs(IN PHW_CHANNEL chan, IN PHW_DEVICE_EXTENSION deviceExtension, IN ULONG c)
BOOLEAN NTAPI UniataChipDetectChannels(IN PVOID HwDeviceExtension, IN PPCI_COMMON_CONFIG pciData, IN ULONG DeviceNumber, IN PPORT_CONFIGURATION_INFORMATION ConfigInfo)
VOID UniataInitIoResEx(IN PIORES IoRes, IN ULONG addr, IN BOOLEAN MemIo, IN BOOLEAN Proc)
VOID NTAPI UniataInitMapBM(IN PHW_DEVICE_EXTENSION deviceExtension, IN PIDE_BUSMASTER_REGISTERS BaseIoAddressBM_0, IN BOOLEAN MemIo)
VOID NTAPI UniataInitSyncBaseIO(IN PHW_CHANNEL chan)
ULONG NTAPI hpt_cable80(IN PHW_DEVICE_EXTENSION deviceExtension, IN ULONG channel)
BOOLEAN NTAPI AtapiChipInit(IN PVOID HwDeviceExtension, IN ULONG DeviceNumber, IN ULONG channel)
VOID NTAPI AtapiRosbSouthBridgeFixup(IN PVOID HwDeviceExtension, IN BUS_DATA_TYPE BusDataType, IN ULONG SystemIoBusNumber, IN ULONG slotNumber)
VOID NTAPI AtapiAliSouthBridgeFixup(IN PVOID HwDeviceExtension, IN BUS_DATA_TYPE BusDataType, IN ULONG SystemIoBusNumber, IN ULONG slotNumber, IN ULONG c)
VOID NTAPI UniAtaReadLunConfig(IN PHW_DEVICE_EXTENSION deviceExtension, IN ULONG channel, IN ULONG DeviceNumber)
VOID NTAPI AtapiViaSouthBridgeFixup(IN PVOID HwDeviceExtension, IN BUS_DATA_TYPE BusDataType, IN ULONG SystemIoBusNumber, IN ULONG slotNumber)
BOOLEAN NTAPI AtapiReadChipConfig(IN PVOID HwDeviceExtension, IN ULONG DeviceNumber, IN ULONG channel)
VOID NTAPI UniataInitMapBase(IN PHW_CHANNEL chan, IN PIDE_REGISTERS_1 BaseIoAddress1, IN PIDE_REGISTERS_2 BaseIoAddress2)
VOID NTAPI UniataFreeLunExt(PHW_DEVICE_EXTENSION deviceExtension)
VOID NTAPI UniataSataWritePort4(IN PHW_CHANNEL chan, IN ULONG io_port_ndx, IN ULONG data, IN ULONG pm_port)
BOOLEAN NTAPI UniataAhciDetect(IN PVOID HwDeviceExtension, IN PPCI_COMMON_CONFIG pciData, IN OUT PPORT_CONFIGURATION_INFORMATION ConfigInfo)
VOID NTAPI UniataAhciReset(IN PVOID HwDeviceExtension, IN ULONG lChannel)
VOID UniataAhciSetupCmdPtr(IN OUT PATA_REQ AtaReq)
BOOLEAN NTAPI UniataAhciInit(IN PVOID HwDeviceExtension)
#define memcpy(s1, s2, n)
#define offsetof(TYPE, MEMBER)
enum _BUS_DATA_TYPE BUS_DATA_TYPE
struct _HW_LU_EXTENSION * lun[IDE_MAX_LUN_PER_CHAN]
PSCSI_REQUEST_BLOCK AhciInternalSrb0
BOOLEAN opt_AtapiDmaReadWrite
PATA_REQ AhciInternalAtaReq0
ULONG MaximumDmaTransferLength
BOOLEAN opt_AtapiDmaRawRead
IORES BaseIoAddressSATA_0
ULONG DmaSegmentAlignmentMask
BOOLEAN opt_AtapiDmaControlCmd
BOOLEAN opt_AtapiDmaZeroTransfer
BOOLEAN opt_ReadCacheEnable
ULONG opt_MaxTransferMode
IDENTIFY_DATA2 IdentifyData
ULONG opt_PreferedTransferMode
BOOLEAN opt_WriteCacheEnable
USHORT CurrentSectorsPerTrack
USHORT NumberOfCurrentHeads
USHORT FirmwareRevision[4]
USHORT NumberOfCurrentCylinders
struct _PCI_SLOT_NUMBER::@4322::@4323 bits
union _PCI_SLOT_NUMBER::@4322 u
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define STATUS_UNSUCCESSFUL
ULONG NTAPI AtapiRegCheckDevValue(IN PVOID HwDeviceExtension, IN ULONG chan, IN ULONG dev, IN PCWSTR Name, IN ULONG Default)
#define ATA_MODE_NOT_SPEC
#define DFLAGS_MANUAL_CHS
#define IDX_IO2_AltStatus
#define AtapiStallExecution(dt)
#define IDX_IO1_o_Feature
#define CHAN_NOT_SPECIFIED_CHECK_CABLE
#define DEVNUM_NOT_SPECIFIED
#define ATA_C_F_APM_CNT_MIN_NO_STANDBY
#define IDX_IO1_o_Command
#define ATA_C_F_AAM_CNT_MAX_POWER_SAVE
#define CHAN_NOT_SPECIFIED
#define IDX_IO2_o_Control
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ PCUNICODE_STRING DeviceID
#define PCI_COMMON_HDR_LENGTH