VirtualBox

Changeset 52673 in vbox


Ignore:
Timestamp:
Sep 10, 2014 11:32:13 AM (10 years ago)
Author:
vboxsync
Message:

Storage/AHCI: Switch ordering of register updates when completing the port reset. Update the status register last to make sure the BIOS acts on fully updated registers. Fixes a hang in the BIOS when detecting storage devices on startup

File:
1 edited

Legend:

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

    r52434 r52673  
    10771077        pAhciPort->regSIG = AHCI_PORT_SIG_DISK;
    10781078
     1079    /* We received a COMINIT from the device. Tell the guest. */
     1080    ASMAtomicOrU32(&pAhciPort->regIS, AHCI_PORT_IS_PCS);
     1081    pAhciPort->regSERR |= AHCI_PORT_SERR_X;
     1082    pAhciPort->regTFD  |= ATA_STAT_BUSY;
     1083
     1084    if ((pAhciPort->regCMD & AHCI_PORT_CMD_FRE) && (!pAhciPort->fFirstD2HFisSend))
     1085    {
     1086        ahciPostFirstD2HFisIntoMemory(pAhciPort);
     1087        ASMAtomicOrU32(&pAhciPort->regIS, AHCI_PORT_IS_DHRS);
     1088
     1089        if (pAhciPort->regIE & AHCI_PORT_IE_DHRE)
     1090        {
     1091            int rc = ahciHbaSetInterrupt(pAhciPort->CTX_SUFF(pAhci), pAhciPort->iLUN, VERR_IGNORED);
     1092            AssertRC(rc);
     1093        }
     1094    }
     1095
    10791096    pAhciPort->regSSTS = (0x01 << 8)  | /* Interface is active. */
    10801097                         (0x03 << 0);   /* Device detected and communication established. */
     
    10941111            pAhciPort->regSSTS |= (0x02 << 4); /* Generation 2 (3.0GBps) speed. */
    10951112            break;
    1096     }
    1097 
    1098     /* We received a COMINIT from the device. Tell the guest. */
    1099     ASMAtomicOrU32(&pAhciPort->regIS, AHCI_PORT_IS_PCS);
    1100     pAhciPort->regSERR |= AHCI_PORT_SERR_X;
    1101     pAhciPort->regTFD  |= ATA_STAT_BUSY;
    1102 
    1103     if ((pAhciPort->regCMD & AHCI_PORT_CMD_FRE) && (!pAhciPort->fFirstD2HFisSend))
    1104     {
    1105         ahciPostFirstD2HFisIntoMemory(pAhciPort);
    1106         ASMAtomicOrU32(&pAhciPort->regIS, AHCI_PORT_IS_DHRS);
    1107 
    1108         if (pAhciPort->regIE & AHCI_PORT_IE_DHRE)
    1109         {
    1110             int rc = ahciHbaSetInterrupt(pAhciPort->CTX_SUFF(pAhci), pAhciPort->iLUN, VERR_IGNORED);
    1111             AssertRC(rc);
    1112         }
    11131113    }
    11141114
     
    69386938        pHlp->pfnPrintf(pHlp, "PortTasksFinished=%#x\n", pThisPort->u32TasksFinished);
    69396939        pHlp->pfnPrintf(pHlp, "PortQueuedTasksFinished=%#x\n", pThisPort->u32QueuedTasksFinished);
     6940        pHlp->pfnPrintf(pHlp, "PortTasksNew=%#x\n", pThisPort->u32TasksNew);
    69406941        pHlp->pfnPrintf(pHlp, "\n");
    69416942    }
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