Changeset 78729 in vbox for trunk/src/VBox/Devices/PC/BIOS
- Timestamp:
- May 24, 2019 1:27:36 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/BIOS/ata.c
r78572 r78729 1 1 /* $Id$ */ 2 2 /** @file 3 * PC BIOS - ???3 * PC BIOS - ATA disk support. 4 4 */ 5 5 … … 177 177 outb(iobase2+ATA_CB_DC, ATA_CB_DC_HD15 | ATA_CB_DC_NIEN); 178 178 179 // 8.2.1 (h) -- wait for not BSY 180 max=0xffff; /* The ATA specification says that the drive may be busy for up to 30 seconds. */ 181 while(--max>0) { 182 uint8_t status = inb(iobase1+ATA_CB_STAT); 183 if ((status & ATA_CB_STAT_BSY) == 0) 184 break; 185 pdelay=0xffff; 186 while (--pdelay>0) { 187 /* nothing */ 188 } 189 } 190 179 191 if (bios_dsk->devices[device].type != DSK_TYPE_NONE) { 180 192 // 8.2.1 (g) -- check for sc==sn==0x01 … … 185 197 186 198 if ( (sc==0x01) && (sn==0x01) ) { 187 // 8.2.1 ( h) -- wait for not BSY188 max =0xffff; /* The ATA specification says that the drive may be busy for up to 30 seconds.*/199 // 8.2.1 (i) -- wait for DRDY 200 max = 0x10; /* Speed up for virtual drives. Disks are immediately ready, CDs never */ 189 201 while(--max>0) { 190 202 uint8_t status = inb(iobase1+ATA_CB_STAT); 191 if ((status & ATA_CB_STAT_ BSY) == 0)203 if ((status & ATA_CB_STAT_RDY) != 0) 192 204 break; 193 pdelay=0xffff; 194 while (--pdelay>0) { 195 /* nothing */ 196 } 197 } 198 } 199 } 200 201 // 8.2.1 (i) -- wait for DRDY 202 max = 0x10; /* Speed up for virtual drives. Disks are immediately ready, CDs never */ 203 while(--max>0) { 204 uint8_t status = inb(iobase1+ATA_CB_STAT); 205 if ((status & ATA_CB_STAT_RDY) != 0) 206 break; 205 } 206 } 207 207 } 208 208
Note:
See TracChangeset
for help on using the changeset viewer.