From 243223ae638e95cb6744f335010595c4de30d13c Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Fri, 19 Aug 2011 15:08:08 -0500 Subject: IDE: Fix issues with new PIIX kernel driver and our model. The driver can read the IDE config register as a 32 bit register since some adapters use bit 18 as a disable channel bit. If the size isn't set in a PRD it should be 64K according to the SPEC (and driver) not 128K. --- src/dev/ide_disk.hh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/dev/ide_disk.hh') diff --git a/src/dev/ide_disk.hh b/src/dev/ide_disk.hh index 0595e18cf..af42bd2c9 100644 --- a/src/dev/ide_disk.hh +++ b/src/dev/ide_disk.hh @@ -46,10 +46,11 @@ class ChunkGenerator; -#define DMA_BACKOFF_PERIOD 200 +#define DMA_BACKOFF_PERIOD 200 -#define MAX_DMA_SIZE (131072) // 128K -#define MAX_MULTSECT (128) +#define MAX_DMA_SIZE 0x20000 // 128K +#define MAX_SINGLE_DMA_SIZE 0x10000 +#define MAX_MULTSECT (128) #define PRD_BASE_MASK 0xfffffffe #define PRD_COUNT_MASK 0xfffe @@ -72,7 +73,7 @@ class PrdTableEntry { uint32_t getByteCount() { - return ((entry.byteCount == 0) ? MAX_DMA_SIZE : + return ((entry.byteCount == 0) ? MAX_SINGLE_DMA_SIZE : (entry.byteCount & PRD_COUNT_MASK)); } -- cgit v1.2.3