Changeset 70333 in vbox for trunk/src/VBox/Devices/PC
- Timestamp:
- Dec 23, 2017 1:21:54 PM (7 years ago)
- Location:
- trunk/src/VBox/Devices/PC/BIOS
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/BIOS/ahci.c
r69500 r70333 814 814 removable = *(abBuffer+0) & 0x80 ? 1 : 0; 815 815 816 bios_dsk->ahcidev[devcount_ahci].port = u8Port; 817 bios_dsk->devices[hd_index].type = DSK_TYPE_AHCI; 818 bios_dsk->devices[hd_index].device = DSK_DEVICE_CDROM; 819 bios_dsk->devices[hd_index].removable = removable; 820 bios_dsk->devices[hd_index].blksize = 2048; 816 bios_dsk->ahcidev[devcount_ahci].port = u8Port; 817 bios_dsk->devices[hd_index].type = DSK_TYPE_AHCI; 818 bios_dsk->devices[hd_index].device = DSK_DEVICE_CDROM; 819 bios_dsk->devices[hd_index].removable = removable; 820 bios_dsk->devices[hd_index].blksize = 2048; 821 bios_dsk->devices[hd_index].translation = GEO_TRANSLATION_NONE; 821 822 822 823 /* Store the ID of the device in the BIOS cdidmap. */ -
trunk/src/VBox/Devices/PC/BIOS/ata.h
r69501 r70333 180 180 #define ATA_CMD_WRITE_VERIFY 0x3C 181 181 182 // for access to the int13ext structure183 typedef struct {184 uint8_t size;185 uint8_t reserved;186 uint16_t count;187 uint16_t offset;188 uint16_t segment;189 uint32_t lba1;190 uint32_t lba2;191 } int13ext_t;192 193 #define Int13Ext ((int13ext_t *) 0)194 195 // Disk Physical Table definition196 typedef struct {197 uint16_t size;198 uint16_t infos;199 uint32_t cylinders;200 uint32_t heads;201 uint32_t spt;202 uint32_t sector_count1;203 uint32_t sector_count2;204 uint16_t blksize;205 uint16_t dpte_offset;206 uint16_t dpte_segment;207 uint16_t key;208 uint8_t dpi_length;209 uint8_t reserved1;210 uint16_t reserved2;211 uint8_t host_bus[4];212 uint8_t iface_type[8];213 uint8_t iface_path[8];214 uint8_t device_path[8];215 uint8_t reserved3;216 uint8_t checksum;217 } dpt_t;218 219 #define Int13DPT ((dpt_t *) 0)220 221 182 extern void ata_reset(uint16_t device); -
trunk/src/VBox/Devices/PC/BIOS/disk.c
r69501 r70333 135 135 } 136 136 137 int edd_fill_dpt(dpt_t __far *dpt, bio_dsk_t __far *bios_dsk, uint8_t device) 138 { 139 uint16_t ebda_seg = read_word(0x0040,0x000E); 140 141 /* Check if buffer is large enough. */ 142 if (dpt->size < 0x1a) 143 return -1; 144 145 /* Fill in EDD 1.x table. */ 146 if (dpt->size >= 0x1a) { 147 uint64_t lba; 148 149 dpt->size = 0x1a; 150 dpt->blksize = bios_dsk->devices[device].blksize; 151 152 if (bios_dsk->devices[device].device == DSK_DEVICE_CDROM) { 153 dpt->infos = 0x74; /* Removable, media change, lockable, max values */ 154 dpt->cylinders = 0xffffffff; 155 dpt->heads = 0xffffffff; 156 dpt->spt = 0xffffffff; 157 dpt->sector_count1 = 0xffffffff; 158 dpt->sector_count2 = 0xffffffff; 159 } else { 160 dpt->infos = 0x02; // geometry is valid 161 dpt->cylinders = bios_dsk->devices[device].pchs.cylinders; 162 dpt->heads = bios_dsk->devices[device].pchs.heads; 163 dpt->spt = bios_dsk->devices[device].pchs.spt; 164 lba = bios_dsk->devices[device].sectors; 165 dpt->sector_count1 = lba; 166 dpt->sector_count2 = lba >> 32; 167 } 168 } 169 170 /* Fill in EDD 2.x table. */ 171 if (dpt->size >= 0x1e) { 172 uint8_t channel, irq, mode, checksum, i, xlation; 173 uint16_t iobase1, iobase2, options; 174 175 dpt->size = 0x1e; 176 dpt->dpte_segment = ebda_seg; 177 dpt->dpte_offset = (uint16_t)&EbdaData->bdisk.dpte; 178 179 // Fill in dpte 180 channel = device / 2; 181 iobase1 = bios_dsk->channels[channel].iobase1; 182 iobase2 = bios_dsk->channels[channel].iobase2; 183 irq = bios_dsk->channels[channel].irq; 184 mode = bios_dsk->devices[device].mode; 185 xlation = bios_dsk->devices[device].translation; 186 187 options = (xlation == GEO_TRANSLATION_NONE ? 0 : 1 << 3); /* CHS translation */ 188 options |= (1 << 4); /* LBA translation */ 189 if (bios_dsk->devices[device].device == DSK_DEVICE_CDROM) { 190 options |= (1 << 5); /* Removable device */ 191 options |= (1 << 6); /* ATAPI device */ 192 } 193 #if VBOX_BIOS_CPU >= 80386 194 options |= (mode == ATA_MODE_PIO32 ? 1 : 0 << 7); 195 #endif 196 options |= (xlation == GEO_TRANSLATION_LBA ? 1 : 0 << 9); 197 options |= (xlation == GEO_TRANSLATION_RECHS ? 3 : 0 << 9); 198 199 bios_dsk->dpte.iobase1 = iobase1; 200 bios_dsk->dpte.iobase2 = iobase2; 201 bios_dsk->dpte.prefix = (0xe | (device % 2)) << 4; 202 bios_dsk->dpte.unused = 0xcb; 203 bios_dsk->dpte.irq = irq; 204 bios_dsk->dpte.blkcount = 1; 205 bios_dsk->dpte.dma = 0; 206 bios_dsk->dpte.pio = 0; 207 bios_dsk->dpte.options = options; 208 bios_dsk->dpte.reserved = 0; 209 bios_dsk->dpte.revision = 0x11; 210 211 checksum = 0; 212 for (i = 0; i < 15; ++i) 213 checksum += read_byte(ebda_seg, (uint16_t)&EbdaData->bdisk.dpte + i); 214 checksum = -checksum; 215 bios_dsk->dpte.checksum = checksum; 216 } 217 218 /* Fill in EDD 3.x table. */ 219 if (dpt->size >= 0x42) { 220 uint8_t channel, iface, checksum, i; 221 uint16_t iobase1; 222 223 channel = device / 2; 224 iface = bios_dsk->channels[channel].iface; 225 iobase1 = bios_dsk->channels[channel].iobase1; 226 227 dpt->size = 0x42; 228 dpt->key = 0xbedd; 229 dpt->dpi_length = 0x24; 230 dpt->reserved1 = 0; 231 dpt->reserved2 = 0; 232 233 if (iface == ATA_IFACE_ISA) { 234 dpt->host_bus[0] = 'I'; 235 dpt->host_bus[1] = 'S'; 236 dpt->host_bus[2] = 'A'; 237 dpt->host_bus[3] = ' '; 238 } 239 else { 240 // FIXME PCI 241 } 242 dpt->iface_type[0] = 'A'; 243 dpt->iface_type[1] = 'T'; 244 dpt->iface_type[2] = 'A'; 245 dpt->iface_type[3] = ' '; 246 dpt->iface_type[4] = ' '; 247 dpt->iface_type[5] = ' '; 248 dpt->iface_type[6] = ' '; 249 dpt->iface_type[7] = ' '; 250 251 if (iface == ATA_IFACE_ISA) { 252 ((uint16_t __far *)dpt->iface_path)[0] = iobase1; 253 ((uint16_t __far *)dpt->iface_path)[1] = 0; 254 ((uint32_t __far *)dpt->iface_path)[1] = 0; 255 } 256 else { 257 // FIXME PCI 258 } 259 ((uint16_t __far *)dpt->device_path)[0] = device & 1; // device % 2; @todo: correct? 260 ((uint16_t __far *)dpt->device_path)[1] = 0; 261 ((uint32_t __far *)dpt->device_path)[1] = 0; 262 263 checksum = 0; 264 for (i = 30; i < 64; i++) 265 checksum += ((uint8_t __far *)dpt)[i]; 266 checksum = -checksum; 267 dpt->checksum = checksum; 268 } 269 return 0; 270 } 137 271 138 272 void BIOSCALL int13_harddisk(disk_regs_t r) … … 349 483 { 350 484 uint64_t lba; 351 uint16_t ebda_seg = read_word(0x0040,0x000E);352 485 uint16_t segment, offset; 353 uint16_t npc, nph, npspt;354 uint16_t size, count;355 486 uint8_t device, status; 487 uint16_t count; 356 488 uint8_t type; 357 489 bio_dsk_t __far *bios_dsk; 358 490 int13ext_t __far *i13_ext; 491 #if 0 492 uint16_t ebda_seg = read_word(0x0040,0x000E); 493 uint16_t npc, nph, npspt; 494 uint16_t size; 359 495 dpt_t __far *dpt; 496 #endif 360 497 361 498 bios_dsk = read_word(0x0040,0x000E) :> &EbdaData->bdisk; … … 456 593 457 594 case 0x48: // IBM/MS get drive parameters 458 dpt = DS :> (dpt_t *)SI; 459 size = dpt->size; 460 461 /* Check if buffer is large enough. */ 462 if (size < 0x1a) 595 if (edd_fill_dpt(DS :> (dpt_t *)SI, bios_dsk, device)) 463 596 goto int13x_fail; 464 465 /* Fill in EDD 1.x table. */ 466 if (size >= 0x1a) { 467 uint16_t blksize; 468 469 npc = bios_dsk->devices[device].pchs.cylinders; 470 nph = bios_dsk->devices[device].pchs.heads; 471 npspt = bios_dsk->devices[device].pchs.spt; 472 lba = bios_dsk->devices[device].sectors; 473 blksize = bios_dsk->devices[device].blksize; 474 475 dpt->size = 0x1a; 476 dpt->infos = 0x02; // geometry is valid 477 dpt->cylinders = npc; 478 dpt->heads = nph; 479 dpt->spt = npspt; 480 dpt->blksize = blksize; 481 dpt->sector_count1 = lba; 482 dpt->sector_count2 = lba >> 32; 483 } 484 485 /* Fill in EDD 2.x table. */ 486 if (size >= 0x1e) { 487 uint8_t channel, irq, mode, checksum, i, translation; 488 uint16_t iobase1, iobase2, options; 489 490 dpt->size = 0x1e; 491 dpt->dpte_segment = ebda_seg; 492 dpt->dpte_offset = (uint16_t)&EbdaData->bdisk.dpte; 493 494 // Fill in dpte 495 channel = device / 2; 496 iobase1 = bios_dsk->channels[channel].iobase1; 497 iobase2 = bios_dsk->channels[channel].iobase2; 498 irq = bios_dsk->channels[channel].irq; 499 mode = bios_dsk->devices[device].mode; 500 translation = bios_dsk->devices[device].translation; 501 502 options = (translation == GEO_TRANSLATION_NONE ? 0 : 1 << 3); // chs translation 503 options |= (1 << 4); // lba translation 504 #if VBOX_BIOS_CPU >= 80386 505 options |= (mode == ATA_MODE_PIO32 ? 1 : 0 << 7); 506 #endif 507 options |= (translation == GEO_TRANSLATION_LBA ? 1 : 0 << 9); 508 options |= (translation == GEO_TRANSLATION_RECHS ? 3 : 0 << 9); 509 510 bios_dsk->dpte.iobase1 = iobase1; 511 bios_dsk->dpte.iobase2 = iobase2; 512 bios_dsk->dpte.prefix = (0xe | (device % 2)) << 4; 513 bios_dsk->dpte.unused = 0xcb; 514 bios_dsk->dpte.irq = irq; 515 bios_dsk->dpte.blkcount = 1; 516 bios_dsk->dpte.dma = 0; 517 bios_dsk->dpte.pio = 0; 518 bios_dsk->dpte.options = options; 519 bios_dsk->dpte.reserved = 0; 520 bios_dsk->dpte.revision = 0x11; 521 522 checksum = 0; 523 for (i = 0; i < 15; ++i) 524 checksum += read_byte(ebda_seg, (uint16_t)&EbdaData->bdisk.dpte + i); 525 checksum = -checksum; 526 bios_dsk->dpte.checksum = checksum; 527 } 528 529 /* Fill in EDD 3.x table. */ 530 if(size >= 0x42) { 531 uint8_t channel, iface, checksum, i; 532 uint16_t iobase1; 533 534 channel = device / 2; 535 iface = bios_dsk->channels[channel].iface; 536 iobase1 = bios_dsk->channels[channel].iobase1; 537 538 dpt->size = 0x42; 539 dpt->key = 0xbedd; 540 dpt->dpi_length = 0x24; 541 dpt->reserved1 = 0; 542 dpt->reserved2 = 0; 543 544 if (iface == ATA_IFACE_ISA) { 545 dpt->host_bus[0] = 'I'; 546 dpt->host_bus[1] = 'S'; 547 dpt->host_bus[2] = 'A'; 548 dpt->host_bus[3] = ' '; 549 } 550 else { 551 // FIXME PCI 552 } 553 dpt->iface_type[0] = 'A'; 554 dpt->iface_type[1] = 'T'; 555 dpt->iface_type[2] = 'A'; 556 dpt->iface_type[3] = ' '; 557 dpt->iface_type[4] = ' '; 558 dpt->iface_type[5] = ' '; 559 dpt->iface_type[6] = ' '; 560 dpt->iface_type[7] = ' '; 561 562 if (iface == ATA_IFACE_ISA) { 563 ((uint16_t __far *)dpt->iface_path)[0] = iobase1; 564 ((uint16_t __far *)dpt->iface_path)[1] = 0; 565 ((uint32_t __far *)dpt->iface_path)[1] = 0; 566 } 567 else { 568 // FIXME PCI 569 } 570 ((uint16_t __far *)dpt->device_path)[0] = device & 1; // device % 2; @todo: correct? 571 ((uint16_t __far *)dpt->device_path)[1] = 0; 572 ((uint32_t __far *)dpt->device_path)[1] = 0; 573 574 checksum = 0; 575 for (i = 30; i < 64; i++) 576 checksum += read_byte(DS, SI + i); 577 checksum = -checksum; 578 dpt->checksum = checksum; 579 } 580 581 goto int13x_success; 597 else 598 goto int13x_success; 582 599 break; 583 600 -
trunk/src/VBox/Devices/PC/BIOS/ebda.h
r69501 r70333 322 322 #define EbdaData ((ebda_data_t *) 0) 323 323 324 // for access to the int13ext structure 325 typedef struct { 326 uint8_t size; 327 uint8_t reserved; 328 uint16_t count; 329 uint16_t offset; 330 uint16_t segment; 331 uint32_t lba1; 332 uint32_t lba2; 333 } int13ext_t; 334 335 /* Disk Physical Table structure */ 336 typedef struct { 337 uint16_t size; 338 uint16_t infos; 339 uint32_t cylinders; 340 uint32_t heads; 341 uint32_t spt; 342 uint32_t sector_count1; 343 uint32_t sector_count2; 344 uint16_t blksize; 345 uint16_t dpte_offset; 346 uint16_t dpte_segment; 347 uint16_t key; 348 uint8_t dpi_length; 349 uint8_t reserved1; 350 uint16_t reserved2; 351 uint8_t host_bus[4]; 352 uint8_t iface_type[8]; 353 uint8_t iface_path[8]; 354 uint8_t device_path[8]; 355 uint8_t reserved3; 356 uint8_t checksum; 357 } dpt_t; 358 324 359 /* Note: Using fastcall reduces stack usage a little. */ 325 360 int __fastcall ata_read_sectors(bio_dsk_t __far *bios_dsk); … … 333 368 334 369 extern void set_geom_lba(chs_t __far *lgeo, uint64_t nsectors); 370 extern int edd_fill_dpt(dpt_t __far *dpt, bio_dsk_t __far *bios_dsk, uint8_t device); 335 371 336 372 // @todo: put this elsewhere (and change/eliminate?) -
trunk/src/VBox/Devices/PC/BIOS/eltorito.c
r69501 r70333 153 153 extern int diskette_param_table; 154 154 155 156 155 void BIOSCALL cdemu_init(void) 157 156 { … … 488 487 cdemu_t __far *cdemu; 489 488 bio_dsk_t __far *bios_dsk; 489 int13ext_t __far *i13x; 490 uint32_t lba; 491 uint16_t count; 490 492 491 493 cdemu = ebda_seg :> &EbdaData->cdemu; … … 654 656 break; 655 657 658 case 0x41: // IBM/MS installation check 659 BX = 0xaa55; // install check 660 SET_AH(0x30); // EDD 2.1 661 CX = 0x0007; // ext disk access, removable and edd 662 goto int13_success_noah; 663 break; 664 665 case 0x42: // IBM/MS extended read 666 case 0x44: // IBM/MS verify sectors 667 case 0x47: // IBM/MS extended seek 668 669 /* Load the I13X struct pointer. */ 670 i13x = MK_FP(DS, SI); 671 672 count = i13x->count; 673 segment = i13x->segment; 674 offset = i13x->offset; 675 676 // Can't use 64 bits lba 677 lba = i13x->lba2; 678 if (lba != 0L) { 679 BX_PANIC("%s: function %02x. Can't use 64bits lba\n", __func__, GET_AH()); 680 goto int13_fail; 681 } 682 683 // Get 32 bits lba 684 lba = i13x->lba1; 685 686 // If verify or seek 687 if (( GET_AH() == 0x44 ) || ( GET_AH() == 0x47 )) 688 goto int13_success; 689 690 BX_DEBUG_INT13_ET("%s: read %u sectors @ LBA %lu to %04X:%04X\n", 691 __func__, count, lba, segment, offset); 692 693 nbsectors = count; 694 vlba = lba; 695 ilba = cdemu->ilba; 696 697 // start lba on cd 698 slba = (uint32_t)vlba / 4; 699 before = (uint32_t)vlba % 4; 700 701 // end lba on cd 702 elba = (uint32_t)(vlba + nbsectors - 1) / 4; 703 704 _fmemset(&atapicmd, 0, sizeof(atapicmd)); 705 atapicmd.command = 0x28; // READ 10 command 706 atapicmd.lba = swap_32(ilba + slba); 707 atapicmd.nsect = swap_16(elba - slba + 1); 708 709 bios_dsk->drqp.skip_b = before * 512; 710 bios_dsk->drqp.skip_a = ((4 - nbsectors % 4 - before) * 512) % 2048; 711 712 status = pktacc[bios_dsk->devices[device].type](device, 12, (char __far *)&atapicmd, before*512, nbsectors*512L, ATA_DATA_IN, MK_FP(segment,offset)); 713 714 bios_dsk->drqp.skip_b = 0; 715 bios_dsk->drqp.skip_a = 0; 716 717 count = (uint16_t)(bios_dsk->drqp.trsfbytes >> 9); 718 i13x->count = count; 719 720 if (status != 0) { 721 BX_INFO("%s: function %02x, status %02x !\n", __func__, GET_AH(), status); 722 SET_AH(0x0c); 723 goto int13_fail_noah; 724 } 725 726 goto int13_success; 727 break; 728 729 case 0x48: // IBM/MS get drive parameters 730 if (edd_fill_dpt(DS :> (dpt_t *)SI, bios_dsk, device)) 731 goto int13_fail; 732 else 733 goto int13_success; 734 break; 735 656 736 // all those functions return unimplemented 657 737 case 0x0a: /* read disk sectors with ECC */ 658 738 case 0x0b: /* write disk sectors with ECC */ 659 739 case 0x18: /* set media type for format */ 660 case 0x41: // IBM/MS installation check661 // FIXME ElTorito Harddisk. Darwin would like to use EDD662 case 0x42: // IBM/MS extended read663 740 case 0x43: // IBM/MS extended write 664 case 0x44: // IBM/MS verify sectors665 741 case 0x45: // IBM/MS lock/unlock drive 666 742 case 0x46: // IBM/MS eject media 667 case 0x47: // IBM/MS extended seek668 case 0x48: // IBM/MS get drive parameters669 743 case 0x49: // IBM/MS extended media change 670 744 case 0x4e: // ? - set hardware configuration … … 702 776 cdb_atapi atapicmd; 703 777 uint32_t lba; 704 uint16_t count, segment, offset , size;778 uint16_t count, segment, offset; 705 779 bio_dsk_t __far *bios_dsk; 706 780 int13ext_t __far *i13x; 707 dpt_t __far *dpt;708 781 709 782 bios_dsk = ebda_seg :> &EbdaData->bdisk; … … 890 963 break; 891 964 892 /// @todo Part of this should be merged with analogous code in disk.c893 965 case 0x48: // IBM/MS get drive parameters 894 dpt = DS :> (dpt_t *)SI; 895 size = dpt->size; 896 897 // Buffer is too small 898 if (size < 0x1a) 966 if (edd_fill_dpt(DS :> (dpt_t *)SI, bios_dsk, device)) 899 967 goto int13_fail; 900 901 // EDD 1.x 902 if (size >= 0x1a) { 903 uint16_t blksize; 904 905 blksize = bios_dsk->devices[device].blksize; 906 907 dpt->size = 0x1a; 908 dpt->infos = 0x74; /* Removable, media change, lockable, max values */ 909 dpt->cylinders = 0xffffffff; 910 dpt->heads = 0xffffffff; 911 dpt->spt = 0xffffffff; 912 dpt->blksize = blksize; 913 dpt->sector_count1 = 0xffffffff; // FIXME should be Bit64 914 dpt->sector_count2 = 0xffffffff; 915 } 916 917 // EDD 2.x 918 if(size >= 0x1e) { 919 uint8_t channel, irq, mode, checksum, i; 920 uint16_t iobase1, iobase2, options; 921 922 dpt->size = 0x1e; 923 dpt->dpte_segment = ebda_seg; 924 dpt->dpte_offset = (uint16_t)&EbdaData->bdisk.dpte; 925 926 // Fill in dpte 927 channel = device / 2; 928 iobase1 = bios_dsk->channels[channel].iobase1; 929 iobase2 = bios_dsk->channels[channel].iobase2; 930 irq = bios_dsk->channels[channel].irq; 931 mode = bios_dsk->devices[device].mode; 932 933 // FIXME atapi device 934 options = (1<<4); // lba translation 935 options |= (1<<5); // removable device 936 options |= (1<<6); // atapi device 937 #if VBOX_BIOS_CPU >= 80386 938 options |= (mode==ATA_MODE_PIO32?1:0<<7); 939 #endif 940 941 bios_dsk->dpte.iobase1 = iobase1; 942 bios_dsk->dpte.iobase2 = iobase2; 943 bios_dsk->dpte.prefix = (0xe | (device % 2))<<4; 944 bios_dsk->dpte.unused = 0xcb; 945 bios_dsk->dpte.irq = irq; 946 bios_dsk->dpte.blkcount = 1 ; 947 bios_dsk->dpte.dma = 0; 948 bios_dsk->dpte.pio = 0; 949 bios_dsk->dpte.options = options; 950 bios_dsk->dpte.reserved = 0; 951 bios_dsk->dpte.revision = 0x11; 952 953 checksum = 0; 954 for (i = 0; i < 15; ++i) 955 checksum += read_byte(ebda_seg, (uint16_t)&EbdaData->bdisk.dpte + i); 956 checksum = -checksum; 957 bios_dsk->dpte.checksum = checksum; 958 } 959 960 // EDD 3.x 961 if(size >= 0x42) { 962 uint8_t channel, iface, checksum, i; 963 uint16_t iobase1; 964 965 channel = device / 2; 966 iface = bios_dsk->channels[channel].iface; 967 iobase1 = bios_dsk->channels[channel].iobase1; 968 969 dpt->size = 0x42; 970 dpt->key = 0xbedd; 971 dpt->dpi_length = 0x24; 972 dpt->reserved1 = 0; 973 dpt->reserved2 = 0; 974 975 if (iface == ATA_IFACE_ISA) { 976 dpt->host_bus[0] = 'I'; 977 dpt->host_bus[1] = 'S'; 978 dpt->host_bus[2] = 'A'; 979 dpt->host_bus[3] = ' '; 980 } 981 else { 982 // FIXME PCI 983 } 984 dpt->iface_type[0] = 'A'; 985 dpt->iface_type[1] = 'T'; 986 dpt->iface_type[2] = 'A'; 987 dpt->iface_type[3] = ' '; 988 dpt->iface_type[4] = ' '; 989 dpt->iface_type[5] = ' '; 990 dpt->iface_type[6] = ' '; 991 dpt->iface_type[7] = ' '; 992 993 if (iface == ATA_IFACE_ISA) { 994 ((uint16_t __far *)dpt->iface_path)[0] = iobase1; 995 ((uint16_t __far *)dpt->iface_path)[1] = 0; 996 ((uint32_t __far *)dpt->iface_path)[1] = 0; 997 } 998 else { 999 // FIXME PCI 1000 } 1001 ((uint16_t __far *)dpt->device_path)[0] = device & 1; 1002 ((uint16_t __far *)dpt->device_path)[1] = 0; 1003 ((uint32_t __far *)dpt->device_path)[1] = 0; 1004 1005 checksum = 0; 1006 for (i = 30; i < 64; ++i) 1007 checksum += ((uint8_t __far *)dpt)[i]; 1008 checksum = -checksum; 1009 dpt->checksum = checksum; 1010 } 1011 1012 goto int13_success; 968 else 969 goto int13_success; 1013 970 break; 1014 971 -
trunk/src/VBox/Devices/PC/BIOS/notes.txt
r69703 r70333 105 105 appears to be valid despite the oddity. 106 106 107 - Darwin 6.0.2 also uses an El Torito emulated hard disk. In addition, if 108 INT 13h/41h succeeds, Darwin uses INT13X to read from the emulated drive. 109 110 - Symantec Ghost 11.5 bootable CD also uses El Torito hard disk emulation, 111 uses INT13X without checking for support, and crashes if INT13X is not 112 supported on the emulated drive. 113 114 107 115 286 BIOS 108 116 -------- -
trunk/src/VBox/Devices/PC/BIOS/scsi.c
r69500 r70333 598 598 bios_dsk->scsidev[devcount_scsi].io_base = io_base; 599 599 bios_dsk->scsidev[devcount_scsi].target_id = i; 600 bios_dsk->devices[hd_index].type = DSK_TYPE_SCSI; 601 bios_dsk->devices[hd_index].device = DSK_DEVICE_CDROM; 602 bios_dsk->devices[hd_index].removable = removable; 603 bios_dsk->devices[hd_index].blksize = 2048; 600 bios_dsk->devices[hd_index].type = DSK_TYPE_SCSI; 601 bios_dsk->devices[hd_index].device = DSK_DEVICE_CDROM; 602 bios_dsk->devices[hd_index].removable = removable; 603 bios_dsk->devices[hd_index].blksize = 2048; 604 bios_dsk->devices[hd_index].translation = GEO_TRANSLATION_NONE; 604 605 605 606 /* Store the ID of the device in the BIOS cdidmap. */
Note:
See TracChangeset
for help on using the changeset viewer.