Commit e0fe67aa7240369b9ba3463df8c12c87955664c9

Authored by bellard
1 parent f6c958c8

enabled DMA


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1128 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 5 additions and 3 deletions
hw/ide.c
... ... @@ -416,10 +416,10 @@ static void ide_identify(IDEState *s)
416 416 put_le16(p + 47, 0x8000 | MAX_MULT_SECTORS);
417 417 #endif
418 418 put_le16(p + 48, 1); /* dword I/O */
419   - put_le16(p + 49, 1 << 9); /* LBA supported, no DMA */
  419 + put_le16(p + 49, 1 << 9 | 1 << 8); /* DMA and LBA supported */
420 420 put_le16(p + 51, 0x200); /* PIO transfer cycle */
421 421 put_le16(p + 52, 0x200); /* DMA transfer cycle */
422   - put_le16(p + 53, 1); /* words 54-58 are valid */
  422 + put_le16(p + 53, 1 | 1 << 2); /* words 54-58,88 are valid */
423 423 put_le16(p + 54, s->cylinders);
424 424 put_le16(p + 55, s->heads);
425 425 put_le16(p + 56, s->sectors);
... ... @@ -437,6 +437,8 @@ static void ide_identify(IDEState *s)
437 437 put_le16(p + 85, (1 << 14));
438 438 put_le16(p + 86, 0);
439 439 put_le16(p + 87, (1 << 14));
  440 + put_le16(p + 88, 0x1f | (1 << 13));
  441 + put_le16(p + 93, 1 | (1 << 14) | 0x2000 | 0x4000);
440 442 }
441 443  
442 444 static void ide_atapi_identify(IDEState *s)
... ... @@ -1560,7 +1562,7 @@ static void ide_ioport_write(void *opaque, uint32_t addr, uint32_t val)
1560 1562 case 0x82: /* write cache disable */
1561 1563 case 0xaa: /* read look-ahead enable */
1562 1564 case 0x55: /* read look-ahead disable */
1563   - s->status = READY_STAT;
  1565 + s->status = READY_STAT | SEEK_STAT;
1564 1566 ide_set_irq(s);
1565 1567 break;
1566 1568 default:
... ...