aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-11-09 22:04:05 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-11-09 22:04:05 +0000
commite0fe67aa7240369b9ba3463df8c12c87955664c9 (patch)
tree6ba2b83b5f7b08c849b52806f846bf59733f5cc3
parentf6c958c8652ad63f772f738a8b7776d975bcd787 (diff)
enabled DMA
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1128 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--hw/ide.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/hw/ide.c b/hw/ide.c
index a7de3cd6d8..bc7ebd3205 100644
--- a/hw/ide.c
+++ b/hw/ide.c
@@ -416,10 +416,10 @@ static void ide_identify(IDEState *s)
put_le16(p + 47, 0x8000 | MAX_MULT_SECTORS);
#endif
put_le16(p + 48, 1); /* dword I/O */
- put_le16(p + 49, 1 << 9); /* LBA supported, no DMA */
+ put_le16(p + 49, 1 << 9 | 1 << 8); /* DMA and LBA supported */
put_le16(p + 51, 0x200); /* PIO transfer cycle */
put_le16(p + 52, 0x200); /* DMA transfer cycle */
- put_le16(p + 53, 1); /* words 54-58 are valid */
+ put_le16(p + 53, 1 | 1 << 2); /* words 54-58,88 are valid */
put_le16(p + 54, s->cylinders);
put_le16(p + 55, s->heads);
put_le16(p + 56, s->sectors);
@@ -437,6 +437,8 @@ static void ide_identify(IDEState *s)
put_le16(p + 85, (1 << 14));
put_le16(p + 86, 0);
put_le16(p + 87, (1 << 14));
+ put_le16(p + 88, 0x1f | (1 << 13));
+ put_le16(p + 93, 1 | (1 << 14) | 0x2000 | 0x4000);
}
static void ide_atapi_identify(IDEState *s)
@@ -1560,7 +1562,7 @@ static void ide_ioport_write(void *opaque, uint32_t addr, uint32_t val)
case 0x82: /* write cache disable */
case 0xaa: /* read look-ahead enable */
case 0x55: /* read look-ahead disable */
- s->status = READY_STAT;
+ s->status = READY_STAT | SEEK_STAT;
ide_set_irq(s);
break;
default: