Changeset 34966 in vbox for trunk/src/VBox/Devices/PC
- Timestamp:
- Dec 10, 2010 5:47:25 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/BIOS/rombios.c
r34458 r34966 2261 2261 #ifdef VBOX 2262 2262 #define ATA_CMD_READ_SECTORS_EXT 0x24 2263 #define ATA_CMD_READ_MULTIPLE_EXT 0x29 2264 #define ATA_CMD_WRITE_MULTIPLE_EXT 0x39 2263 2265 #endif /* VBOX */ 2264 2266 #define ATA_CMD_READ_VERIFY_SECTORS 0x40 … … 2338 2340 write_byte(ebda_seg,&EbdaData->ata.devices[device].lock,0); 2339 2341 write_byte(ebda_seg,&EbdaData->ata.devices[device].mode,ATA_MODE_NONE); 2340 write_word(ebda_seg,&EbdaData->ata.devices[device].blksize,0 );2342 write_word(ebda_seg,&EbdaData->ata.devices[device].blksize,0x200); 2341 2343 write_byte(ebda_seg,&EbdaData->ata.devices[device].translation,ATA_TRANSLATION_NONE); 2342 2344 write_word(ebda_seg,&EbdaData->ata.devices[device].lchs.heads,0); … … 2864 2866 iobase2 = read_word(ebda_seg, &EbdaData->ata.channels[channel].iobase2); 2865 2867 mode = read_byte(ebda_seg, &EbdaData->ata.devices[device].mode); 2866 blksize = 0x200; // was =read_word(ebda_seg, &EbdaData->ata.devices[device].blksize);2868 blksize = read_word(ebda_seg, &EbdaData->ata.devices[device].blksize); 2867 2869 if (mode == ATA_MODE_PIO32) blksize>>=2; 2868 2870 else blksize>>=1; … … 2919 2921 outb(iobase1 + ATA_CB_DH, (slave ? ATA_CB_DH_DEV1 : ATA_CB_DH_DEV0) | (Bit8u) head ); 2920 2922 outb(iobase1 + ATA_CB_CMD, command); 2923 2924 if (command == ATA_CMD_READ_MULTIPLE) 2925 count = 1; 2921 2926 2922 2927 while (1) { … … 5576 5581 else 5577 5582 #endif 5578 status=ata_cmd_data_in(device, ATA_CMD_READ_SECTORS, count, cylinder, head, sector, lba, segment, offset); 5583 write_word(ebda_seg,&EbdaData->ata.devices[device].blksize,count * 0x200); 5584 status=ata_cmd_data_in(device, ATA_CMD_READ_MULTIPLE, count, cylinder, head, sector, lba, segment, offset); 5585 write_word(ebda_seg,&EbdaData->ata.devices[device].blksize,0x200); 5579 5586 } 5580 5587 else … … 5753 5760 if (count >= 256 || lba + count >= 268435456) 5754 5761 status=ata_cmd_data_in(device, ATA_CMD_READ_SECTORS_EXT, count, 0, 0, 0, lba, segment, offset); 5755 else 5756 status=ata_cmd_data_in(device, ATA_CMD_READ_SECTORS, count, 0, 0, 0, lba, segment, offset); 5762 else { 5763 write_word(ebda_seg,&EbdaData->ata.devices[device].blksize,count * 0x200); 5764 status=ata_cmd_data_in(device, ATA_CMD_READ_MULTIPLE, count, 0, 0, 0, lba, segment, offset); 5765 write_word(ebda_seg,&EbdaData->ata.devices[device].blksize,0x200); 5766 } 5757 5767 } 5758 5768 }
Note:
See TracChangeset
for help on using the changeset viewer.