VirtualBox

Ignore:
Timestamp:
Sep 30, 2012 9:30:51 PM (12 years ago)
Author:
vboxsync
Message:

BIOS: Support for SCSI CD-ROMs, larger than 64K SCSI transfers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/BIOS/eltorito.c

    r41653 r43475  
    268268    {
    269269        //@todo: Use indirect calls instead?
    270         if (device > BX_MAX_ATA_DEVICES)
     270        if (VBOX_IS_AHCI_DEVICE(device))
    271271            error = ahci_cmd_packet(device, 12, (char __far *)&atapicmd, 0, 2048L, ATA_DATA_IN, &buffer);
     272        else if (VBOX_IS_SCSI_DEVICE(device))
     273            error = scsi_cmd_packet(device, 12, (char __far *)&atapicmd, 0, 2048L, ATA_DATA_IN, &buffer);
    272274        else
    273275            error = ata_cmd_packet(device, 12, (char __far *)&atapicmd, 0, 2048L, ATA_DATA_IN, &buffer);
     
    304306#endif
    305307
    306     if (device > BX_MAX_ATA_DEVICES)
     308    if (VBOX_IS_AHCI_DEVICE(device))
    307309        error = ahci_cmd_packet(device, 12, (char __far *)&atapicmd, 0, 2048L, ATA_DATA_IN, &buffer);
     310    else if (VBOX_IS_SCSI_DEVICE(device))
     311        error = scsi_cmd_packet(device, 12, (char __far *)&atapicmd, 0, 2048L, ATA_DATA_IN, &buffer);
    308312    else
    309313        error = ata_cmd_packet(device, 12, (char __far *)&atapicmd, 0, 2048L, ATA_DATA_IN, &buffer);
     
    368372    bios_dsk->drqp.skip_a = 2048 - nbsectors * 512UL % 2048;
    369373
    370     if (device > BX_MAX_ATA_DEVICES)
     374    if (VBOX_IS_AHCI_DEVICE(device))
    371375        error = ahci_cmd_packet(device, 12, (char __far *)&atapicmd, 0, nbsectors*512L, ATA_DATA_IN, MK_FP(boot_segment,0));
     376    else if (VBOX_IS_SCSI_DEVICE(device))
     377        error = scsi_cmd_packet(device, 12, (char __far *)&atapicmd, 0, nbsectors*512L, ATA_DATA_IN, MK_FP(boot_segment,0));
    372378    else
    373379        error = ata_cmd_packet(device, 12, (char __far *)&atapicmd, 0, nbsectors*512L, ATA_DATA_IN, MK_FP(boot_segment,0));
     
    554560        bios_dsk->drqp.skip_a = 2048 - nbsectors * 512UL % 2048 - bios_dsk->drqp.skip_b;
    555561
    556         if (device > BX_MAX_ATA_DEVICES)
     562        if (VBOX_IS_AHCI_DEVICE(device))
    557563            status = ahci_cmd_packet(device, 12, (char __far *)&atapicmd, before*512, nbsectors*512L, ATA_DATA_IN, MK_FP(segment,offset));
     564        else if (VBOX_IS_SCSI_DEVICE(device))
     565            status = scsi_cmd_packet(device, 12, (char __far *)&atapicmd, before*512, nbsectors*512L, ATA_DATA_IN, MK_FP(segment,offset));
    558566        else
    559567            status = ata_cmd_packet(device, 12, (char __far *)&atapicmd, before*512, nbsectors*512L, ATA_DATA_IN, MK_FP(segment,offset));
     
    758766        bios_dsk->drqp.sect_sz = 2048;
    759767
    760         if (device > BX_MAX_ATA_DEVICES)
     768        if (VBOX_IS_AHCI_DEVICE(device))
    761769            status = ahci_cmd_packet(device, 12, (char __far *)&atapicmd, 0, count*2048L, ATA_DATA_IN, MK_FP(segment,offset));
     770        else if (VBOX_IS_SCSI_DEVICE(device))
     771            status = scsi_cmd_packet(device, 12, (char __far *)&atapicmd, 0, count*2048L, ATA_DATA_IN, MK_FP(segment,offset));
    762772        else
    763773            status = ata_cmd_packet(device, 12, (char __far *)&atapicmd, 0, count*2048L, ATA_DATA_IN, MK_FP(segment,offset));
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette