VirtualBox

Changeset 30592 in vbox


Ignore:
Timestamp:
Jul 4, 2010 10:40:45 AM (15 years ago)
Author:
vboxsync
Message:

BusLogic: Fix NT4 and SCO OpenServer guests. For NT4 the product revision register needs to be modified and the interrupt status register is handled in a different way. Implemented a missing command for OpenServer and modify status flag handling. (Both need a bigger table to make interrupts work correctly)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DevBusLogic.cpp

    r30140 r30592  
    797797    LogFlowFunc(("pBusLogic=%#p\n", pBusLogic));
    798798    pBusLogic->regInterrupt |= BUSLOGIC_REGISTER_INTERRUPT_INTERRUPT_VALID;
    799     PDMDevHlpPCISetIrqNoWait(pBusLogic->CTX_SUFF(pDevIns), 0, 1);
     799    if (pBusLogic->fIRQEnabled)
     800        PDMDevHlpPCISetIrqNoWait(pBusLogic->CTX_SUFF(pDevIns), 0, 1);
    800801}
    801802
     
    881882        pBusLogic->regInterrupt |= BUSLOGIC_REGISTER_INTERRUPT_COMMAND_COMPLETE;
    882883
    883         if (pBusLogic->fIRQEnabled)
    884             buslogicSetInterrupt(pBusLogic);
     884        /*
     885         * SCO OpenServer requires that this flag is set after the ECHO COMMAND
     886         * DATA command. Doesn't look like it breaks other guests
     887         * but we just set it if the command was actually issued just to be sure.
     888         */
     889        if (pBusLogic->uOperationCode == BUSLOGICCOMMAND_ECHO_COMMAND_DATA)
     890            pBusLogic->regStatus |= BUSLOGIC_REGISTER_STATUS_INITIALIZATION_REQUIRED;
     891
     892        buslogicSetInterrupt(pBusLogic);
    885893    }
    886894
     
    943951
    944952    pBusLogic->regInterrupt |= BUSLOGIC_REGISTER_INTERRUPT_INCOMING_MAILBOX_LOADED;
    945     if (pBusLogic->fIRQEnabled)
    946         buslogicSetInterrupt(pBusLogic);
     953    buslogicSetInterrupt(pBusLogic);
    947954
    948955    PDMCritSectLeave(&pBusLogic->CritSectIntr);
     
    12971304        {
    12981305            pBusLogic->aReplyBuffer[0] = '0'; /* @todo figure out what to write here. */
    1299             pBusLogic->aReplyBuffer[1] = '0'; /* @todo figure out what to write here. */
     1306            pBusLogic->aReplyBuffer[1] = '1'; /* @todo figure out what to write here - can't be '0' or 'B'. */
    13001307
    13011308            /* We report version 5.07B. This reply will provide the first two digits. */
     
    14501457            else
    14511458                pBusLogic->fIRQEnabled = true;
     1459            break;
     1460        }
     1461        case BUSLOGICCOMMAND_ECHO_COMMAND_DATA:
     1462        {
     1463            pBusLogic->aReplyBuffer[0] = pBusLogic->aCommandBuffer[0];
     1464            pBusLogic->cbReplyParametersLeft = 1;
    14521465            break;
    14531466        }
     
    15061519            pBusLogic->cbReplyParametersLeft--;
    15071520
     1521            LogFlowFunc(("cbReplyParametersLeft=%u\n", pBusLogic->cbReplyParametersLeft));
    15081522            if (!pBusLogic->cbReplyParametersLeft)
    15091523            {
     
    15571571
    15581572            if (uVal & BUSLOGIC_REGISTER_CONTROL_INTERRUPT_RESET)
     1573            {
    15591574                buslogicClearInterrupt(pBusLogic);
     1575                /*
     1576                 * Clear the flag in case it is set
     1577                 * to avoid confusing other guests.
     1578                 * SCO OpenServer doesn't need it anymore to be set.
     1579                 */
     1580                pBusLogic->regStatus &= ~BUSLOGIC_REGISTER_STATUS_INITIALIZATION_REQUIRED;
     1581            }
    15601582
    15611583            PDMCritSectLeave(&pBusLogic->CritSectIntr);
     
    16201642                    case BUSLOGICCOMMAND_INQUIRE_SYNCHRONOUS_PERIOD:
    16211643                    case BUSLOGICCOMMAND_DISABLE_HOST_ADAPTER_INTERRUPT:
     1644                    case BUSLOGICCOMMAND_ECHO_COMMAND_DATA:
    16221645                        pBusLogic->cbCommandParametersLeft = 1;
    16231646                        break;
     
    17721795
    17731796    if (!pBusLogic->fISAEnabled)
    1774         return VERR_IOM_IOPORT_UNUSED;
     1797        return VINF_SUCCESS;
    17751798
    17761799    rc = vboxscsiReadRegister(&pBusLogic->VBoxSCSI, (Port - BUSLOGIC_ISA_IO_PORT), pu32);
     
    18561879
    18571880    if (!pBusLogic->fISAEnabled)
    1858         return VERR_IOM_IOPORT_UNUSED;
     1881        return VINF_SUCCESS;
    18591882
    18601883    rc = vboxscsiWriteRegister(&pBusLogic->VBoxSCSI, (Port - BUSLOGIC_ISA_IO_PORT), (uint8_t)u32);
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