Changeset 6294 in vbox for trunk/src/VBox/Devices/PC
- Timestamp:
- Jan 9, 2008 12:59:12 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/BIOS/rombios.c
r6291 r6294 2455 2455 lspt = 0; 2456 2456 } 2457 BX_INFO("ata%d-%d: PCHS=%u/%d/%d LCHS=%u/%u/%u\n", channel, slave, cylinders, heads, spt, lcylinders, lheads, lspt); 2457 2458 #endif /* VBOX */ 2458 2459 … … 2469 2470 write_word(ebda_seg,&EbdaData->ata.devices[device].lchs.cylinders, lcylinders); 2470 2471 write_word(ebda_seg,&EbdaData->ata.devices[device].lchs.spt, lspt); 2472 if (device < 2) 2473 { 2474 Bit8u sum, i; 2475 unsigned char *fdpt; 2476 if (device == 0) 2477 fdpt = &EbdaData->fdpt0; 2478 else 2479 fdpt = &EbdaData->fdpt1; 2480 2481 /* Update the DPT for drive 0/1 pointed to by Int41/46. This used 2482 * to be done at POST time with lots of ugly assembler code, which 2483 * isn't worth the effort of converting from AMI to Award CMOS 2484 * format. Just do it here. */ 2485 write_word(ebda_seg, fdpt + 0x00, lcylinders); 2486 write_byte(ebda_seg, fdpt + 0x02, lheads); 2487 write_byte(ebda_seg, fdpt + 0x0e, lspt); 2488 write_word(ebda_seg, fdpt + 0x09, cylinders); 2489 write_byte(ebda_seg, fdpt + 0x0b, heads); 2490 write_byte(ebda_seg, fdpt + 0x04, spt); 2491 write_byte(ebda_seg, fdpt + 0x03, 0xa0); 2492 sum = 0; 2493 for (i = 0; i < 0xf; i++) 2494 sum += read_byte(ebda_seg, fdpt + i); 2495 sum = 1 - sum; 2496 write_byte(ebda_seg, fdpt + 0x0f, sum); 2497 } 2471 2498 #else /* !VBOX */ 2472 2499 BX_INFO("ata%d-%d: PCHS=%u/%d/%d translation=", channel, slave,cylinders, heads, spt); … … 8977 9004 SET_INT_VECTOR(0x46, #EBDA_SEG, #0x004D) 8978 9005 9006 #ifndef VBOX /* This is done later (and the CMOS format is now different). */ 8979 9007 ;; move disk geometry data from CMOS to EBDA disk parameter table(s) 8980 9008 mov al, #0x12 … … 9258 9286 mov [si], al 9259 9287 ;;; Done filling EBDA table for hard disk 1. 9288 #endif /* !VBOX */ 9260 9289 9261 9290 ret
Note:
See TracChangeset
for help on using the changeset viewer.