diff -ruN v45h9\chglog.txt v45i\chglog.txt --- v45h9\chglog.txt Wed Sep 23 19:35:10 2015 +++ v45i\chglog.txt Thu Sep 24 13:01:26 2015 @@ -820,7 +820,8 @@ -- 2015.02.19 - v0.45g -!) added check for ATAPI if IDE identify fails +!) added check for ATAPI if IDE identify fails (some devices doesn't report +ATAPI signature in wrong internal states) -- 2015.02.22 - v0.45g1 @@ -909,7 +910,7 @@ 2015.09.22 - v0.45h6 +) added BOCHS detection -+) implemented quick device absence detection for BOCHS (0x00 status) +o) implemented quick device absence detection for BOCHS (0x00 status) !) unified IORES structure init via UniataInitIoRes() and UniataInitIoResEx() this affects problem with ReactOS boot under BOCHS (BUG 10176) e!) IORES->Proc check in IO routines replaced with ASSERT() @@ -929,13 +930,26 @@ 2015.09.23 - v0.45h8 +) sync with ReactOS repository -e) handle PRD and IO-buff double-buffering before sending CMD to device. +eo) handle PRD and IO-buff double-buffering before sending CMD to device. Copying is moved from AtapiDmaStar() to AtapiDmaDBPreSync() -+) #pragma pack(1) is used for BusMaster structures in 'bsmaster.h' +e) #pragma pack(1) is used for BusMaster structures in 'bsmaster.h' -- 2015.09.23 - v0.45h9 !) #pragma pack() is used in all uniata headers to avoid cross-environemnt -ambiguities +ambiguities (this was the root of the problem) +-- +2015.09.23 - v0.45h10 + +*) merged IORES-related logging from parallel branch (39k forked from 39j) +e!) fixed PCI bus scanning algorithm (it could stop after 1st pass even if +some devices are detected) + +-- +2015.09.24 - v0.45i + +o) implemented quick device absence detection for VBOX (0x00 status) +o) stop detection process is after SoftReset device still reports 0x00 +status. diff -ruN v45h9\driver\Dist\2K\uata_2k.inf v45i\driver\Dist\2K\uata_2k.inf --- v45h9\driver\Dist\2K\uata_2k.inf Wed Sep 23 19:35:40 2015 +++ v45i\driver\Dist\2K\uata_2k.inf Thu Sep 24 13:02:08 2015 @@ -6,7 +6,7 @@ ClassGUID={4D36E97B-E325-11CE-BFC1-08002BE10318} Class=SCSIAdapter CatalogFile=uniata.cat -DriverVer=09/23/2015,0.45.8.9 +DriverVer=09/24/2015,0.45.9.0 ; ; Source file information diff -ruN v45h9\driver\Dist\2K\uata_2kh.inf v45i\driver\Dist\2K\uata_2kh.inf --- v45h9\driver\Dist\2K\uata_2kh.inf Wed Sep 23 19:35:40 2015 +++ v45i\driver\Dist\2K\uata_2kh.inf Thu Sep 24 13:02:08 2015 @@ -6,7 +6,7 @@ ClassGUID={4D36E97B-E325-11CE-BFC1-08002BE10318} Class=hdc CatalogFile=uniata.cat -DriverVer=09/23/2015,0.45.8.9 +DriverVer=09/24/2015,0.45.9.0 ; ; Source file information diff -ruN v45h9\driver\Dist\2K\uniata_w2k.reg v45i\driver\Dist\2K\uniata_w2k.reg --- v45h9\driver\Dist\2K\uniata_w2k.reg Wed Sep 23 19:35:40 2015 +++ v45i\driver\Dist\2K\uniata_w2k.reg Thu Sep 24 13:02:08 2015 @@ -6,7 +6,7 @@ "Start"=dword:00000000 "Tag"=dword:00000019 "Type"=dword:00000001 -"DisplayName"="Universal BusMaster SATA/ATA/ATAPI Driver v0.45.8.9" +"DisplayName"="Universal BusMaster SATA/ATA/ATAPI Driver v0.45.9.0" "ImagePath"=hex(2):53,79,73,74,65,6d,33,32,5c,44,52,49,56,45,52,53,5c,75,6e,69,\ 61,74,61,2e,73,79,73,00 diff -ruN v45h9\driver\Dist\NT4\uata_nt4.inf v45i\driver\Dist\NT4\uata_nt4.inf --- v45h9\driver\Dist\NT4\uata_nt4.inf Wed Sep 23 19:35:38 2015 +++ v45i\driver\Dist\NT4\uata_nt4.inf Thu Sep 24 13:02:08 2015 @@ -6,7 +6,7 @@ ClassGUID={4D36E97B-E325-11CE-BFC1-08002BE10318} Class=SCSIAdapter CatalogFile=uniata.cat -DriverVer=09/23/2015,0.45.8.9 +DriverVer=09/24/2015,0.45.9.0 ; ; Source file information Binary files v45h9\driver\Dist\tools\build_inf.exe and v45i\driver\Dist\tools\build_inf.exe differ diff -ruN v45h9\driver\Dist\XP\uata_xp.inf v45i\driver\Dist\XP\uata_xp.inf --- v45h9\driver\Dist\XP\uata_xp.inf Wed Sep 23 19:35:40 2015 +++ v45i\driver\Dist\XP\uata_xp.inf Thu Sep 24 13:02:08 2015 @@ -6,7 +6,7 @@ ClassGUID={4D36E97B-E325-11CE-BFC1-08002BE10318} Class=SCSIAdapter CatalogFile=uniata.cat -DriverVer=09/23/2015,0.45.8.9 +DriverVer=09/24/2015,0.45.9.0 ; ; Source file information diff -ruN v45h9\driver\Dist\XP\uata_xph.inf v45i\driver\Dist\XP\uata_xph.inf --- v45h9\driver\Dist\XP\uata_xph.inf Wed Sep 23 19:35:40 2015 +++ v45i\driver\Dist\XP\uata_xph.inf Thu Sep 24 13:02:08 2015 @@ -6,7 +6,7 @@ ClassGUID={4D36E97B-E325-11CE-BFC1-08002BE10318} Class=hdc CatalogFile=uniata.cat -DriverVer=09/23/2015,0.45.8.9 +DriverVer=09/24/2015,0.45.9.0 ; ; Source file information diff -ruN v45h9\driver\id_ata.cpp v45i\driver\id_ata.cpp --- v45h9\driver\id_ata.cpp Wed Sep 23 19:22:54 2015 +++ v45i\driver\id_ata.cpp Thu Sep 24 12:12:00 2015 @@ -267,6 +267,7 @@ return; \ } \ if(res->Proc) { \ + KdPrint(("PROC io write request @ ch %x, res* %x\n", chan, _port)); \ ASSERT(FALSE); /* We should never get here */ \ } \ if(!res->MemIo) { \ @@ -303,6 +304,7 @@ return; \ } \ if(res->Proc) { \ + KdPrint(("PROC io write request @ ch %x, res* %x, offs %x\n", chan, _port, offs)); \ ASSERT(FALSE); /* We should never get here */ \ } \ if(!res->MemIo) { \ @@ -337,6 +339,7 @@ return (_type)(-1); \ } \ if(res->Proc) { \ + KdPrint(("PROC io read request @ ch %x, res* %x\n", chan, _port)); \ ASSERT(FALSE); /* We should never get here */ \ } \ if(!res->MemIo) { \ @@ -372,6 +375,7 @@ return (_type)(-1); \ } \ if(res->Proc) { \ + KdPrint(("PROC io read request @ ch %x, res* %x, offs %x\n", chan, _port, offs)); \ ASSERT(FALSE); /* We should never get here */ \ } \ if(!res->MemIo) { \ @@ -1564,6 +1568,10 @@ statusByte = AtaCommand(deviceExtension, DeviceNumber, lChannel, Command, (j < 4) ? DEV_BSIZE : 0 /* cyl */, 0, 0, 0, 0, ATA_WAIT_INTR); // Clear interrupt + if (!statusByte) { + KdPrint2((PRINT_PREFIX "IssueIdentify: 0-status, not present\n")); + return FALSE; + } else if (statusByte & IDE_STATUS_DRQ) { // Read status to acknowledge any interrupts generated. KdPrint2((PRINT_PREFIX "IssueIdentify: IDE_STATUS_DRQ (%#x)\n", statusByte)); diff -ruN v45h9\driver\id_probe.cpp v45i\driver\id_probe.cpp --- v45h9\driver\id_probe.cpp Wed Sep 23 18:18:20 2015 +++ v45i\driver\id_probe.cpp Thu Sep 24 12:13:42 2015 @@ -353,6 +353,7 @@ RtlZeroMemory(PciDevMap, maxPciBus*PCI_MAX_DEVICES); for(pass=0; pass<3; pass++) { + no_buses = FALSE; for(busNumber=0 ;busNumberBaseIoAddress1[c]); - KdPrint2((PRINT_PREFIX "IDX_IO1 %x->%x(%s)\n", - IDX_IO1, - chan->RegTranslation[IDX_IO1].Addr, - chan->RegTranslation[IDX_IO1].MemIo ? "mem" : "io")); - - KdPrint2((PRINT_PREFIX "IDX_IO2 %x->%x(%s)\n", - IDX_IO2, - chan->RegTranslation[IDX_IO2].Addr, - chan->RegTranslation[IDX_IO2].MemIo ? "mem" : "io")); - - KdPrint2((PRINT_PREFIX "IDX_BM_IO %x->%x(%s)\n", - IDX_BM_IO, - chan->RegTranslation[IDX_BM_IO].Addr, - chan->RegTranslation[IDX_BM_IO].MemIo ? "mem" : "io")); - - KdPrint2((PRINT_PREFIX "IDX_SATA_IO %x->%x(%s)\n", - IDX_SATA_IO, - chan->RegTranslation[IDX_SATA_IO].Addr, - chan->RegTranslation[IDX_SATA_IO].MemIo ? "mem" : "io")); + DbgDumpRegTranslation(chan, IDX_IO1); + DbgDumpRegTranslation(chan, IDX_IO2); + DbgDumpRegTranslation(chan, IDX_BM_IO); + DbgDumpRegTranslation(chan, IDX_SATA_IO); if(!(deviceExtension->HwFlags & UNIATA_AHCI)) { #ifdef _DEBUG @@ -2687,10 +2676,11 @@ KdPrint2((PRINT_PREFIX " AHCI HDD at home\n")); return ATA_AT_HOME_HDD; } - if(g_opt_VirtualMachine == VM_BOCHS) { + if(g_opt_VirtualMachine /*== VM_BOCHS || + g_opt_VirtualMachine == VM_VBOX*/) { GetStatus(chan, signatureLow); if(!signatureLow) { - KdPrint2((PRINT_PREFIX " 0-status BOCHS - not present\n")); + KdPrint2((PRINT_PREFIX " 0-status VM - not present\n")); UniataForgetDevice(LunExt); return ATA_AT_HOME_NOBODY; } @@ -2979,7 +2969,8 @@ RetVal = DFLAGS_DEVICE_PRESENT; LunExt->DeviceFlags |= DFLAGS_DEVICE_PRESENT; LunExt->DeviceFlags &= ~DFLAGS_ATAPI_DEVICE; - } else { + } else + if(!g_opt_VirtualMachine) { // This can be ATAPI on broken hardware GetBaseStatus(chan, statusByte); if(!at_home && UniataAnybodyHome(HwDeviceExtension, lChannel, deviceNumber)) { @@ -2989,6 +2980,9 @@ KdPrint2((PRINT_PREFIX "CheckDevice: try ATAPI %#x, status %#x\n", deviceNumber, statusByte)); goto try_atapi; + } else { + KdPrint2((PRINT_PREFIX "CheckDevice: VM Device %#x not present\n", + deviceNumber)); } GetBaseStatus(chan, statusByte); } diff -ruN v45h9\driver\tools.h v45i\driver\tools.h --- v45h9\driver\tools.h Wed Sep 23 19:05:50 2015 +++ v45i\driver\tools.h Wed Sep 23 21:16:26 2015 @@ -111,6 +111,14 @@ KdPrint(("\n")); \ } +#define DbgDumpRegTranslation(chan, idx) \ + KdPrint2((PRINT_PREFIX \ + " IO_%#x (%#x), %s:\n", \ + idx, \ + chan->RegTranslation[idx].Addr, \ + chan->RegTranslation[idx].Proc ? "Proc" : ( \ + chan->RegTranslation[idx].MemIo ? "Mem" : "IO"))); \ + #define BrutePoint() { ASSERT(0); } #define DbgAllocatePool(x,y) ExAllocatePool(x,y) @@ -120,6 +128,8 @@ #else #define KdDump(a,b) {} + +#define DbgDumpRegTranslation(chan, idx) {} #define DbgAllocatePool(x,y) ExAllocatePool(x,y) #define DbgFreePool(x) ExFreePool(x) diff -ruN v45h9\driver\uniata_ver.h v45i\driver\uniata_ver.h --- v45h9\driver\uniata_ver.h Wed Sep 23 19:35:32 2015 +++ v45i\driver\uniata_ver.h Thu Sep 24 13:01:56 2015 @@ -1,10 +1,10 @@ -#define UNIATA_VER_STR "45h9" -#define UNIATA_VER_DOT 0.45.8.9 +#define UNIATA_VER_STR "45i" +#define UNIATA_VER_DOT 0.45.9.0 #define UNIATA_VER_MJ 0 #define UNIATA_VER_MN 45 -#define UNIATA_VER_SUB_MJ 8 -#define UNIATA_VER_SUB_MN 9 -#define UNIATA_VER_DOT_COMMA 0,45,8,9 -#define UNIATA_VER_DOT_STR "0.45.8.9" +#define UNIATA_VER_SUB_MJ 9 +#define UNIATA_VER_SUB_MN 0 +#define UNIATA_VER_DOT_COMMA 0,45,9,0 +#define UNIATA_VER_DOT_STR "0.45.9.0" #define UNIATA_VER_YEAR 2015 #define UNIATA_VER_YEAR_STR "2015"