Changeset 40640 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Mar 26, 2012 12:55:17 PM (13 years ago)
- Location:
- trunk/src/VBox/Devices
- Files:
-
- 4 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 -
trunk/src/VBox/Devices/Storage/DevBusLogic.cpp
r40282 r40640 55 55 #define BUSLOGIC_REPLY_SIZE_MAX 64 56 56 57 /* I/O port registered in the ISA compatible range to let the BIOS access 58 * the controller. 59 */ 60 #define BUSLOGIC_ISA_IO_PORT 0x330 57 /* 58 * Custom fixed I/O ports for BIOS controller access. Note that these should 59 * not be in the ISA range (below 400h) to avoid conflicts with ISA device 60 * probing. Addresses in the 300h-340h range should be especially avoided. 61 */ 62 63 #define BUSLOGIC_BIOS_IO_PORT 0x330 61 64 62 65 /** State saved version. */ … … 1870 1873 return VINF_SUCCESS; 1871 1874 1872 rc = vboxscsiReadRegister(&pBusLogic->VBoxSCSI, (Port - BUSLOGIC_ ISA_IO_PORT), pu32);1875 rc = vboxscsiReadRegister(&pBusLogic->VBoxSCSI, (Port - BUSLOGIC_BIOS_IO_PORT), pu32); 1873 1876 1874 1877 //Log2(("%s: pu32=%p:{%.*Rhxs} iRegister=%d rc=%Rrc\n", 1875 // __FUNCTION__, pu32, 1, pu32, (Port - BUSLOGIC_ ISA_IO_PORT), rc));1878 // __FUNCTION__, pu32, 1, pu32, (Port - BUSLOGIC_BIOS_IO_PORT), rc)); 1876 1879 1877 1880 return rc; … … 2007 2010 return VINF_SUCCESS; 2008 2011 2009 rc = vboxscsiWriteRegister(&pBusLogic->VBoxSCSI, (Port - BUSLOGIC_ ISA_IO_PORT), (uint8_t)u32);2012 rc = vboxscsiWriteRegister(&pBusLogic->VBoxSCSI, (Port - BUSLOGIC_BIOS_IO_PORT), (uint8_t)u32); 2010 2013 if (rc == VERR_MORE_DATA) 2011 2014 { … … 2031 2034 pDevIns->iInstance, __FUNCTION__, pvUser, cb, Port)); 2032 2035 2033 rc = vboxscsiWriteString(pDevIns, &pBusLogic->VBoxSCSI, (Port - BUSLOGIC_ ISA_IO_PORT),2036 rc = vboxscsiWriteString(pDevIns, &pBusLogic->VBoxSCSI, (Port - BUSLOGIC_BIOS_IO_PORT), 2034 2037 pGCPtrSrc, pcTransfer, cb); 2035 2038 if (rc == VERR_MORE_DATA) … … 2055 2058 pDevIns->iInstance, __FUNCTION__, pvUser, cb, Port)); 2056 2059 2057 return vboxscsiReadString(pDevIns, &pBusLogic->VBoxSCSI, (Port - BUSLOGIC_ ISA_IO_PORT),2060 return vboxscsiReadString(pDevIns, &pBusLogic->VBoxSCSI, (Port - BUSLOGIC_BIOS_IO_PORT), 2058 2061 pGCPtrDst, pcTransfer, cb); 2059 2062 } … … 3112 3115 { 3113 3116 /* Register I/O port space in ISA region for BIOS access. */ 3114 rc = PDMDevHlpIOPortRegister(pDevIns, BUSLOGIC_ ISA_IO_PORT, 3, NULL,3117 rc = PDMDevHlpIOPortRegister(pDevIns, BUSLOGIC_BIOS_IO_PORT, 3, NULL, 3115 3118 buslogicIsaIOPortWrite, buslogicIsaIOPortRead, 3116 3119 buslogicIsaIOPortWriteStr, buslogicIsaIOPortReadStr, -
trunk/src/VBox/Devices/Storage/DevLsiLogicSCSI.h
r33540 r40640 21 21 22 22 /* 23 * I/O port registered in the ISA compatible range to let the BIOS access 24 * the controller. 25 */ 26 #define LSILOGIC_ISA_IO_PORT 0x340 27 #define LSILOGIC_SAS_ISA_IO_PORT 0x350 23 * Custom fixed I/O ports for BIOS controller access. Note that these should 24 * not be in the ISA range (below 400h) to avoid conflicts with ISA device 25 * probing. Addresses in the 300h-340h range should be especially avoided. 26 */ 27 #define LSILOGIC_BIOS_IO_PORT 0x340 28 #define LSILOGIC_SAS_BIOS_IO_PORT 0x350 28 29 29 30 #define LSILOGICSCSI_REQUEST_QUEUE_DEPTH_DEFAULT 256
Note:
See TracChangeset
for help on using the changeset viewer.