Changeset 40640 in vbox for trunk/src/VBox/Devices/PC
- Timestamp:
- Mar 26, 2012 12:55:17 PM (13 years ago)
- Location:
- trunk/src/VBox/Devices/PC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/BIOS-new/scsi.c
r39651 r40640 34 34 35 35 /* The I/O port of the BusLogic SCSI adapter. */ 36 #define BUSLOGIC_ ISA_IO_PORT0x33036 #define BUSLOGIC_BIOS_IO_PORT 0x330 37 37 /* The I/O port of the LsiLogic SCSI adapter. */ 38 #define LSILOGIC_ ISA_IO_PORT0x34038 #define LSILOGIC_BIOS_IO_PORT 0x340 39 39 /* The I/O port of the LsiLogic SAS adapter. */ 40 #define LSILOGIC_SAS_ ISA_IO_PORT0x35040 #define LSILOGIC_SAS_BIOS_IO_PORT 0x350 41 41 42 42 #define VBSCSI_REGISTER_STATUS 0 … … 399 399 400 400 /* Detect BusLogic adapter. */ 401 outb(BUSLOGIC_ ISA_IO_PORT+VBSCSI_REGISTER_IDENTIFY, 0x55);402 identifier = inb(BUSLOGIC_ ISA_IO_PORT+VBSCSI_REGISTER_IDENTIFY);401 outb(BUSLOGIC_BIOS_IO_PORT+VBSCSI_REGISTER_IDENTIFY, 0x55); 402 identifier = inb(BUSLOGIC_BIOS_IO_PORT+VBSCSI_REGISTER_IDENTIFY); 403 403 404 404 if (identifier == 0x55) … … 406 406 /* Detected - Enumerate attached devices. */ 407 407 VBSCSI_DEBUG("scsi_init: BusLogic SCSI adapter detected\n"); 408 outb(BUSLOGIC_ ISA_IO_PORT+VBSCSI_REGISTER_RESET, 0);409 scsi_enumerate_attached_devices(BUSLOGIC_ ISA_IO_PORT);408 outb(BUSLOGIC_BIOS_IO_PORT+VBSCSI_REGISTER_RESET, 0); 409 scsi_enumerate_attached_devices(BUSLOGIC_BIOS_IO_PORT); 410 410 } 411 411 else … … 415 415 416 416 /* Detect LsiLogic adapter. */ 417 outb(LSILOGIC_ ISA_IO_PORT+VBSCSI_REGISTER_IDENTIFY, 0x55);418 identifier = inb(LSILOGIC_ ISA_IO_PORT+VBSCSI_REGISTER_IDENTIFY);417 outb(LSILOGIC_BIOS_IO_PORT+VBSCSI_REGISTER_IDENTIFY, 0x55); 418 identifier = inb(LSILOGIC_BIOS_IO_PORT+VBSCSI_REGISTER_IDENTIFY); 419 419 420 420 if (identifier == 0x55) … … 422 422 /* Detected - Enumerate attached devices. */ 423 423 VBSCSI_DEBUG("scsi_init: LSI Logic SCSI adapter detected\n"); 424 outb(LSILOGIC_ ISA_IO_PORT+VBSCSI_REGISTER_RESET, 0);425 scsi_enumerate_attached_devices(LSILOGIC_ ISA_IO_PORT);424 outb(LSILOGIC_BIOS_IO_PORT+VBSCSI_REGISTER_RESET, 0); 425 scsi_enumerate_attached_devices(LSILOGIC_BIOS_IO_PORT); 426 426 } 427 427 else … … 431 431 432 432 /* Detect LsiLogic SAS adapter. */ 433 outb(LSILOGIC_SAS_ ISA_IO_PORT+VBSCSI_REGISTER_IDENTIFY, 0x55);434 identifier = inb(LSILOGIC_SAS_ ISA_IO_PORT+VBSCSI_REGISTER_IDENTIFY);433 outb(LSILOGIC_SAS_BIOS_IO_PORT+VBSCSI_REGISTER_IDENTIFY, 0x55); 434 identifier = inb(LSILOGIC_SAS_BIOS_IO_PORT+VBSCSI_REGISTER_IDENTIFY); 435 435 436 436 if (identifier == 0x55) … … 438 438 /* Detected - Enumerate attached devices. */ 439 439 VBSCSI_DEBUG("scsi_init: LSI Logic SAS adapter detected\n"); 440 outb(LSILOGIC_SAS_ ISA_IO_PORT+VBSCSI_REGISTER_RESET, 0);441 scsi_enumerate_attached_devices(LSILOGIC_SAS_ ISA_IO_PORT);440 outb(LSILOGIC_SAS_BIOS_IO_PORT+VBSCSI_REGISTER_RESET, 0); 441 scsi_enumerate_attached_devices(LSILOGIC_SAS_BIOS_IO_PORT); 442 442 } 443 443 else -
trunk/src/VBox/Devices/PC/BIOS/scsi.c
r37427 r40640 17 17 18 18 /* The I/O port of the BusLogic SCSI adapter. */ 19 #define BUSLOGIC_ ISA_IO_PORT0x33019 #define BUSLOGIC_BIOS_IO_PORT 0x330 20 20 /* The I/O port of the LsiLogic SCSI adapter. */ 21 #define LSILOGIC_ ISA_IO_PORT0x34021 #define LSILOGIC_BIOS_IO_PORT 0x340 22 22 /* The I/O port of the LsiLogic SAS adapter. */ 23 #define LSILOGIC_SAS_ ISA_IO_PORT0x35023 #define LSILOGIC_SAS_BIOS_IO_PORT 0x350 24 24 25 25 #define VBOXSCSI_REGISTER_STATUS 0 … … 367 367 368 368 /* 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) 370 370 { 371 371 /* This is from the BusLogic driver in the Linux kernel. */ … … 387 387 cylinders = (uint32_t)(sectors / (heads * sectors_per_track)); 388 388 } 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) 390 390 { 391 391 /* This is from the BusLogic driver in the Linux kernel. */ … … 477 477 478 478 /* 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); 481 481 482 482 if (identifier == 0x55) … … 484 484 /* Detected - Enumerate attached devices. */ 485 485 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); 488 488 } 489 489 else … … 493 493 494 494 /* 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); 497 497 498 498 if (identifier == 0x55) … … 500 500 /* Detected - Enumerate attached devices. */ 501 501 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); 504 504 } 505 505 else … … 509 509 510 510 /* 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); 513 513 514 514 if (identifier == 0x55) … … 516 516 /* Detected - Enumerate attached devices. */ 517 517 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); 520 520 } 521 521 else
Note:
See TracChangeset
for help on using the changeset viewer.