VirtualBox

Changeset 40640 in vbox for trunk/src/VBox/Devices/PC/BIOS


Ignore:
Timestamp:
Mar 26, 2012 12:55:17 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
77069
Message:

Renamed SCSI BIOS constants to elucidate their purpose.

File:
1 edited

Legend:

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

    r37427 r40640  
    1717
    1818/* The I/O port of the BusLogic SCSI adapter. */
    19 #define BUSLOGIC_ISA_IO_PORT 0x330
     19#define BUSLOGIC_BIOS_IO_PORT      0x330
    2020/* The I/O port of the LsiLogic SCSI adapter. */
    21 #define LSILOGIC_ISA_IO_PORT 0x340
     21#define LSILOGIC_BIOS_IO_PORT      0x340
    2222/* The I/O port of the LsiLogic SAS adapter. */
    23 #define LSILOGIC_SAS_ISA_IO_PORT 0x350
     23#define LSILOGIC_SAS_BIOS_IO_PORT  0x350
    2424
    2525#define VBOXSCSI_REGISTER_STATUS   0
     
    367367
    368368                /* We need to calculate the geometry for the disk. */
    369                 if (io_base == BUSLOGIC_ISA_IO_PORT)
     369                if (io_base == BUSLOGIC_BIOS_IO_PORT)
    370370                {
    371371                    /* This is from the BusLogic driver in the Linux kernel. */
     
    387387                    cylinders = (uint32_t)(sectors / (heads * sectors_per_track));
    388388                }
    389                 else if (io_base == LSILOGIC_ISA_IO_PORT || io_base == LSILOGIC_SAS_ISA_IO_PORT)
     389                else if (io_base == LSILOGIC_BIOS_IO_PORT || io_base == LSILOGIC_SAS_BIOS_IO_PORT)
    390390                {
    391391                    /* This is from the BusLogic driver in the Linux kernel. */
     
    477477
    478478    /* Detect BusLogic adapter. */
    479     outb(BUSLOGIC_ISA_IO_PORT+VBOXSCSI_REGISTER_IDENTIFY, 0x55);
    480     identifier = inb(BUSLOGIC_ISA_IO_PORT+VBOXSCSI_REGISTER_IDENTIFY);
     479    outb(BUSLOGIC_BIOS_IO_PORT+VBOXSCSI_REGISTER_IDENTIFY, 0x55);
     480    identifier = inb(BUSLOGIC_BIOS_IO_PORT+VBOXSCSI_REGISTER_IDENTIFY);
    481481
    482482    if (identifier == 0x55)
     
    484484        /* Detected - Enumerate attached devices. */
    485485        VBOXSCSI_DEBUG("scsi_init: BusLogic SCSI adapter detected\n");
    486         outb(BUSLOGIC_ISA_IO_PORT+VBOXSCSI_REGISTER_RESET, 0);
    487         scsi_enumerate_attached_devices(BUSLOGIC_ISA_IO_PORT);
     486        outb(BUSLOGIC_BIOS_IO_PORT+VBOXSCSI_REGISTER_RESET, 0);
     487        scsi_enumerate_attached_devices(BUSLOGIC_BIOS_IO_PORT);
    488488    }
    489489    else
     
    493493
    494494    /* Detect LsiLogic adapter. */
    495     outb(LSILOGIC_ISA_IO_PORT+VBOXSCSI_REGISTER_IDENTIFY, 0x55);
    496     identifier = inb(LSILOGIC_ISA_IO_PORT+VBOXSCSI_REGISTER_IDENTIFY);
     495    outb(LSILOGIC_BIOS_IO_PORT+VBOXSCSI_REGISTER_IDENTIFY, 0x55);
     496    identifier = inb(LSILOGIC_BIOS_IO_PORT+VBOXSCSI_REGISTER_IDENTIFY);
    497497
    498498    if (identifier == 0x55)
     
    500500        /* Detected - Enumerate attached devices. */
    501501        VBOXSCSI_DEBUG("scsi_init: LsiLogic SCSI adapter detected\n");
    502         outb(LSILOGIC_ISA_IO_PORT+VBOXSCSI_REGISTER_RESET, 0);
    503         scsi_enumerate_attached_devices(LSILOGIC_ISA_IO_PORT);
     502        outb(LSILOGIC_BIOS_IO_PORT+VBOXSCSI_REGISTER_RESET, 0);
     503        scsi_enumerate_attached_devices(LSILOGIC_BIOS_IO_PORT);
    504504    }
    505505    else
     
    509509
    510510    /* Detect LsiLogic SAS adapter. */
    511     outb(LSILOGIC_SAS_ISA_IO_PORT+VBOXSCSI_REGISTER_IDENTIFY, 0x55);
    512     identifier = inb(LSILOGIC_SAS_ISA_IO_PORT+VBOXSCSI_REGISTER_IDENTIFY);
     511    outb(LSILOGIC_SAS_BIOS_IO_PORT+VBOXSCSI_REGISTER_IDENTIFY, 0x55);
     512    identifier = inb(LSILOGIC_SAS_BIOS_IO_PORT+VBOXSCSI_REGISTER_IDENTIFY);
    513513
    514514    if (identifier == 0x55)
     
    516516        /* Detected - Enumerate attached devices. */
    517517        VBOXSCSI_DEBUG("scsi_init: LsiLogic SAS adapter detected\n");
    518         outb(LSILOGIC_SAS_ISA_IO_PORT+VBOXSCSI_REGISTER_RESET, 0);
    519         scsi_enumerate_attached_devices(LSILOGIC_SAS_ISA_IO_PORT);
     518        outb(LSILOGIC_SAS_BIOS_IO_PORT+VBOXSCSI_REGISTER_RESET, 0);
     519        scsi_enumerate_attached_devices(LSILOGIC_SAS_BIOS_IO_PORT);
    520520    }
    521521    else
Note: See TracChangeset for help on using the changeset viewer.

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