Author: tfaber Date: Sat Apr 15 20:24:43 2017 New Revision: 74319
URL: http://svn.reactos.org/svn/reactos?rev=74319&view=rev Log: [UNIATA] - Update to version 0.46e3 (and fix up the version numbers) - Un-"fix" insignificant typo corrections that only serve to make syncing harder CORE-13032 #resolve CORE-11894 CORE-11277 CORE-12909
Modified: trunk/reactos/drivers/storage/ide/uniata/atacmd_map.h trunk/reactos/drivers/storage/ide/uniata/atapi.h trunk/reactos/drivers/storage/ide/uniata/bsmaster.h trunk/reactos/drivers/storage/ide/uniata/id_ata.cpp trunk/reactos/drivers/storage/ide/uniata/id_dma.cpp trunk/reactos/drivers/storage/ide/uniata/uniata_ver.h
Modified: trunk/reactos/drivers/storage/ide/uniata/atacmd_map.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/ide/uniata/... ============================================================================== --- trunk/reactos/drivers/storage/ide/uniata/atacmd_map.h [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/ide/uniata/atacmd_map.h [iso-8859-1] Sat Apr 15 20:24:43 2017 @@ -1,5 +1,5 @@
-// Build Version 0.46d8 +// Build Version 0.46e3
UCHAR const AtaCommands48[256] = {
Modified: trunk/reactos/drivers/storage/ide/uniata/atapi.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/ide/uniata/... ============================================================================== --- trunk/reactos/drivers/storage/ide/uniata/atapi.h [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/ide/uniata/atapi.h [iso-8859-1] Sat Apr 15 20:24:43 2017 @@ -712,7 +712,7 @@ USHORT UDMASupport : 7; // 62 ATAPI USHORT MultiWordDMASupport : 3; USHORT DMASupport : 1; - USHORT Reserved62_11_14 : 4; + USHORT Reseved62_11_14 : 4; USHORT DMADirRequired : 1; } AtapiDMA; };
Modified: trunk/reactos/drivers/storage/ide/uniata/bsmaster.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/ide/uniata/... ============================================================================== --- trunk/reactos/drivers/storage/ide/uniata/bsmaster.h [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/ide/uniata/bsmaster.h [iso-8859-1] Sat Apr 15 20:24:43 2017 @@ -1896,8 +1896,9 @@ #define VM_VMWARE 0x03 #define VM_QEMU 0x04 #define VM_BOCHS 0x05 - -#define VM_MAX_KNOWN VM_BOCHS +#define VM_PCEM 0x06 + +#define VM_MAX_KNOWN VM_PCEM
extern BOOLEAN WinVer_WDM_Model;
Modified: trunk/reactos/drivers/storage/ide/uniata/id_ata.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/ide/uniata/... ============================================================================== --- trunk/reactos/drivers/storage/ide/uniata/id_ata.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/ide/uniata/id_ata.cpp [iso-8859-1] Sat Apr 15 20:24:43 2017 @@ -1762,7 +1762,7 @@ // ATI/SII chipsets with memory-mapped IO hangs when // I call ReadBuffer(), probably due to PCI burst/prefetch enabled // Unfortunately, I don't know yet how to workaround it except - // specifying manual delay in the way you see below. + // spacifying manual delay in the way you see below. ReadBuffer(chan, (PUSHORT)&deviceExtension->FullIdentifyData, 256, PIO0_TIMING);
// Work around for some IDE and one model Atapi that will present more than @@ -1917,6 +1917,8 @@ // Check for HDDs > 8Gb if ((deviceExtension->FullIdentifyData.NumberOfCylinders == 0x3fff) && /* (deviceExtension->FullIdentifyData.TranslationFieldsValid) &&*/ + deviceExtension->FullIdentifyData.NumberOfHeads && + deviceExtension->FullIdentifyData.SectorsPerTrack && (NumOfSectors < deviceExtension->FullIdentifyData.UserAddressableSectors)) { KdPrint2((PRINT_PREFIX "NumberOfCylinders == 0x3fff\n")); cylinders = @@ -1960,6 +1962,8 @@ if(LunExt->DeviceFlags & DFLAGS_LBA_ENABLED) { if(deviceExtension->FullIdentifyData.FeaturesSupport.Address48 && deviceExtension->FullIdentifyData.FeaturesEnabled.Address48 && + deviceExtension->FullIdentifyData.NumberOfHeads && + deviceExtension->FullIdentifyData.SectorsPerTrack && (deviceExtension->FullIdentifyData.UserAddressableSectors48 > NumOfSectors) ) { KdPrint2((PRINT_PREFIX "LBA48\n")); @@ -2093,8 +2097,21 @@
// fill IdentifyData with bogus geometry KdPrint2((PRINT_PREFIX "requested LunExt->GeomType=%x\n", LunExt->opt_GeomType)); - tmp_cylinders = NumOfSectors / (deviceExtension->FullIdentifyData.CurrentSectorsPerTrack * - deviceExtension->FullIdentifyData.NumberOfCurrentHeads); + if(deviceExtension->FullIdentifyData.CurrentSectorsPerTrack && + deviceExtension->FullIdentifyData.NumberOfCurrentHeads) { + tmp_cylinders = NumOfSectors / (deviceExtension->FullIdentifyData.CurrentSectorsPerTrack * + deviceExtension->FullIdentifyData.NumberOfCurrentHeads); + } else + if(deviceExtension->FullIdentifyData.SectorsPerTrack && + deviceExtension->FullIdentifyData.NumberOfHeads) { + KdPrint2((PRINT_PREFIX "Current C/H = %#I64x/%#I64x\n", + deviceExtension->FullIdentifyData.CurrentSectorsPerTrack, + deviceExtension->FullIdentifyData.NumberOfCurrentHeads)); + tmp_cylinders = NumOfSectors / (deviceExtension->FullIdentifyData.SectorsPerTrack * + deviceExtension->FullIdentifyData.NumberOfHeads); + } else { + tmp_cylinders = 0; + } KdPrint2((PRINT_PREFIX "tmp_cylinders = %#I64x\n", tmp_cylinders)); if((tmp_cylinders < 0xffff) || (LunExt->opt_GeomType == GEOM_ORIG)) { // ok, we can keep original values @@ -2114,6 +2131,11 @@ LunExt->opt_GeomType = GEOM_UNIATA; } } + } + + if(!deviceExtension->FullIdentifyData.SectorsPerTrack || + !deviceExtension->FullIdentifyData.NumberOfHeads) { + KdPrint2((PRINT_PREFIX "Zero S/H -> Force Use GEOM_STD\n")); }
if(LunExt->opt_GeomType == GEOM_STD) { @@ -5845,6 +5867,10 @@
statusByte = WaitOnBusy(chan);
+ if(wordCount&1 && atapiDev && (g_opt_VirtualMachine == VM_BOCHS)) { + KdPrint2((PRINT_PREFIX + "IdeIntr: unaligned ATAPI %#x Words\n", wordCount)); + } else if(LunExt->DeviceFlags & DFLAGS_DWORDIO_ENABLED) { KdPrint2((PRINT_PREFIX "IdeIntr: pre-Read %#x Dwords\n", wordCount/2));
Modified: trunk/reactos/drivers/storage/ide/uniata/id_dma.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/ide/uniata/... ============================================================================== --- trunk/reactos/drivers/storage/ide/uniata/id_dma.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/ide/uniata/id_dma.cpp [iso-8859-1] Sat Apr 15 20:24:43 2017 @@ -107,6 +107,8 @@ PHYSICAL_ADDRESS ph_addr; ULONG addr;
+ *(volatile char*)data; // Touch memory, this will prevent condition of not-ready page table for valid addresses + // See ROS-11894 bug ph_addr = MmGetPhysicalAddress(data); KdPrint3((PRINT_PREFIX "AtapiVirtToPhysAddr_: %x -> %8.8x:%8.8x\n", data, ph_addr.HighPart, ph_addr.LowPart)); if(!ph_addru && ph_addr.HighPart) {
Modified: trunk/reactos/drivers/storage/ide/uniata/uniata_ver.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/ide/uniata/... ============================================================================== --- trunk/reactos/drivers/storage/ide/uniata/uniata_ver.h [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/ide/uniata/uniata_ver.h [iso-8859-1] Sat Apr 15 20:24:43 2017 @@ -1,10 +1,10 @@ -#define UNIATA_VER_STR "46d8" -#define UNIATA_VER_DOT 0.46.4.8 +#define UNIATA_VER_STR "46e3" +#define UNIATA_VER_DOT 0.46.5.3 #define UNIATA_VER_MJ 0 #define UNIATA_VER_MN 46 -#define UNIATA_VER_SUB_MJ 4 -#define UNIATA_VER_SUB_MN 8 -#define UNIATA_VER_DOT_COMMA 0,46,4,8 -#define UNIATA_VER_DOT_STR "0.46.4.8" -#define UNIATA_VER_YEAR 2016 -#define UNIATA_VER_YEAR_STR "2016" +#define UNIATA_VER_SUB_MJ 5 +#define UNIATA_VER_SUB_MN 3 +#define UNIATA_VER_DOT_COMMA 0,46,5,3 +#define UNIATA_VER_DOT_STR "0.46.5.3" +#define UNIATA_VER_YEAR 2017 +#define UNIATA_VER_YEAR_STR "2017"