VirtualBox

Changeset 42206 in vbox


Ignore:
Timestamp:
Jul 18, 2012 12:42:22 PM (13 years ago)
Author:
vboxsync
Message:

Storage/DevAHCI: Remvove complete dependency on ATAController.

Location:
trunk/src/VBox/Devices
Files:
3 edited

Legend:

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

    r42204 r42206  
    5454# include <iprt/time.h>
    5555#endif
    56 
     56#include "PIIX3ATABmDma.h"
    5757#include "ide.h"
    58 #include "ATAController.h"
    5958#include "VBoxDD.h"
    6059
     
    8281#define ATA_CTL_SAVED_STATE_VERSION_WITHOUT_FULL_SENSE 1
    8382#define ATA_CTL_SAVED_STATE_VERSION_WITHOUT_EVENT_STATUS 2
     83#define MAX_LOG_REL_ERRORS 1024
    8484/**
    8585 * Maximum number of sectors to transfer in a READ/WRITE MULTIPLE request.
     
    650650    /** Register structure per port */
    651651    AHCIPort                        ahciPort[AHCI_MAX_NR_PORTS_IMPL];
    652 
    653     /** Needed values for the emulated ide channels. */
    654     AHCIATACONTROLLER               aCts[2];
    655652
    656653    /** The critical section. */
     
    69606957        if (uVersion <= AHCI_SAVED_STATE_VERSION_IDE_EMULATION)
    69616958        {
    6962             for (uint32_t i = 0; i < RT_ELEMENTS(pThis->aCts); i++)
     6959            for (uint32_t i = 0; i < 2; i++)
    69636960            {
    69646961                rc = ahciR3LoadLegacyEmulationState(pSSM);
     
    74687465            AssertMsgFailed(("%s: Failed to destroy the event semaphore rc=%Rrc.\n", __FUNCTION__, rc));
    74697466    }
    7470 
    7471     /* Check if the changed port uses IDE emulation. */
    7472     bool fMaster = false;
    7473     PAHCIATACONTROLLER pCtl = NULL;
    7474 
    7475     for (unsigned i = 0; i < RT_ELEMENTS(pAhci->aCts); i++)
    7476         for (unsigned j = 0; j < RT_ELEMENTS(pAhci->aCts[0].aIfs); j++)
    7477         {
    7478             PAHCIATACONTROLLER pTmp = &pAhci->aCts[i];
    7479             if (pTmp->aIfs[j].iLUN == iLUN)
    7480             {
    7481                 pCtl = pTmp;
    7482                 fMaster = j == 0 ? true : false;
    7483             }
    7484         }
    74857467
    74867468    if (pAhciPort->fATAPI)
     
    75587540    else
    75597541    {
    7560         /* Check if the changed port uses IDE emulation. */
    7561         bool fMaster = false;
    7562         PAHCIATACONTROLLER pCtl = NULL;
    7563 
    7564         for (unsigned i = 0; i < RT_ELEMENTS(pAhci->aCts); i++)
    7565             for (unsigned j = 0; j < RT_ELEMENTS(pAhci->aCts[0].aIfs); j++)
    7566             {
    7567                 PAHCIATACONTROLLER pTmp = &pAhci->aCts[i];
    7568                 if (pTmp->aIfs[j].iLUN == iLUN)
    7569                 {
    7570                     pCtl = pTmp;
    7571                     fMaster = j == 0 ? true : false;
    7572                 }
    7573             }
    75747542        char szName[24];
    75757543        RTStrPrintf(szName, sizeof(szName), "Port%d", iLUN);
  • trunk/src/VBox/Devices/testcase/tstDeviceStructSize.cpp

    r39972 r42206  
    262262    CHECK_MEMBER_ALIGNMENT(AHCI, lock, 8);
    263263    CHECK_MEMBER_ALIGNMENT(AHCIPort, StatDMA, 8);
    264     CHECK_MEMBER_ALIGNMENT(AHCIATACONTROLLER, lock, 8);
    265     CHECK_MEMBER_ALIGNMENT(AHCIATACONTROLLER, StatAsyncOps, 8);
    266264#ifdef VBOX_WITH_STATISTICS
    267265    CHECK_MEMBER_ALIGNMENT(APICDeviceInfo, StatMMIOReadGC, 8);
  • trunk/src/VBox/Devices/testcase/tstDeviceStructSizeRC.cpp

    r41539 r42206  
    11161116#ifdef VBOX_WITH_AHCI
    11171117    /* Storage/ATAController.h */
    1118     GEN_CHECK_SIZE(AHCIATADevState);
    1119     GEN_CHECK_OFF(AHCIATADevState, fLBA48);
    1120     GEN_CHECK_OFF(AHCIATADevState, fATAPI);
    1121     GEN_CHECK_OFF(AHCIATADevState, fIrqPending);
    1122     GEN_CHECK_OFF(AHCIATADevState, cMultSectors);
    1123     GEN_CHECK_OFF(AHCIATADevState, PCHSGeometry.cCylinders);
    1124     GEN_CHECK_OFF(AHCIATADevState, PCHSGeometry.cHeads);
    1125     GEN_CHECK_OFF(AHCIATADevState, PCHSGeometry.cSectors);
    1126     GEN_CHECK_OFF(AHCIATADevState, cSectorsPerIRQ);
    1127     GEN_CHECK_OFF(AHCIATADevState, cTotalSectors);
    1128     GEN_CHECK_OFF(AHCIATADevState, uATARegFeature);
    1129     GEN_CHECK_OFF(AHCIATADevState, uATARegFeatureHOB);
    1130     GEN_CHECK_OFF(AHCIATADevState, uATARegError);
    1131     GEN_CHECK_OFF(AHCIATADevState, uATARegNSector);
    1132     GEN_CHECK_OFF(AHCIATADevState, uATARegNSectorHOB);
    1133     GEN_CHECK_OFF(AHCIATADevState, uATARegSector);
    1134     GEN_CHECK_OFF(AHCIATADevState, uATARegSectorHOB);
    1135     GEN_CHECK_OFF(AHCIATADevState, uATARegLCyl);
    1136     GEN_CHECK_OFF(AHCIATADevState, uATARegLCylHOB);
    1137     GEN_CHECK_OFF(AHCIATADevState, uATARegHCyl);
    1138     GEN_CHECK_OFF(AHCIATADevState, uATARegHCylHOB);
    1139     GEN_CHECK_OFF(AHCIATADevState, uATARegSelect);
    1140     GEN_CHECK_OFF(AHCIATADevState, uATARegStatus);
    1141     GEN_CHECK_OFF(AHCIATADevState, uATARegCommand);
    1142     GEN_CHECK_OFF(AHCIATADevState, uATARegDevCtl);
    1143     GEN_CHECK_OFF(AHCIATADevState, uATATransferMode);
    1144     GEN_CHECK_OFF(AHCIATADevState, uTxDir);
    1145     GEN_CHECK_OFF(AHCIATADevState, iBeginTransfer);
    1146     GEN_CHECK_OFF(AHCIATADevState, iSourceSink);
    1147     GEN_CHECK_OFF(AHCIATADevState, fDMA);
    1148     GEN_CHECK_OFF(AHCIATADevState, fATAPITransfer);
    1149     GEN_CHECK_OFF(AHCIATADevState, cbTotalTransfer);
    1150     GEN_CHECK_OFF(AHCIATADevState, cbElementaryTransfer);
    1151     GEN_CHECK_OFF(AHCIATADevState, iIOBufferCur);
    1152     GEN_CHECK_OFF(AHCIATADevState, iIOBufferEnd);
    1153     GEN_CHECK_OFF(AHCIATADevState, iIOBufferPIODataStart);
    1154     GEN_CHECK_OFF(AHCIATADevState, iIOBufferPIODataEnd);
    1155     GEN_CHECK_OFF(AHCIATADevState, iATAPILBA);
    1156     GEN_CHECK_OFF(AHCIATADevState, cbATAPISector);
    1157     GEN_CHECK_OFF(AHCIATADevState, aATAPICmd);
    1158     GEN_CHECK_OFF(AHCIATADevState, aATAPICmd[ATAPI_PACKET_SIZE - 1]);
    1159     GEN_CHECK_OFF(AHCIATADevState, abATAPISense);
    1160     GEN_CHECK_OFF(AHCIATADevState, abATAPISense[ATAPI_SENSE_SIZE - 1]);
    1161     GEN_CHECK_OFF(AHCIATADevState, cNotifiedMediaChange);
    1162     GEN_CHECK_OFF(AHCIATADevState, MediaEventStatus);
    1163     GEN_CHECK_OFF(AHCIATADevState, pLed);
    1164     GEN_CHECK_OFF(AHCIATADevState, cbIOBuffer);
    1165     GEN_CHECK_OFF(AHCIATADevState, pbIOBufferR3);
    1166     GEN_CHECK_OFF(AHCIATADevState, pbIOBufferR0);
    1167     GEN_CHECK_OFF(AHCIATADevState, pbIOBufferRC);
    1168     GEN_CHECK_OFF(AHCIATADevState, StatATADMA);
    1169     GEN_CHECK_OFF(AHCIATADevState, StatATAPIO);
    1170     GEN_CHECK_OFF(AHCIATADevState, StatATAPIDMA);
    1171     GEN_CHECK_OFF(AHCIATADevState, StatATAPIPIO);
    1172     GEN_CHECK_OFF(AHCIATADevState, StatReads);
    1173     GEN_CHECK_OFF(AHCIATADevState, pStatBytesRead);
    1174     GEN_CHECK_OFF(AHCIATADevState, StatWrites);
    1175     GEN_CHECK_OFF(AHCIATADevState, pStatBytesWritten);
    1176     GEN_CHECK_OFF(AHCIATADevState, StatFlushes);
    1177     GEN_CHECK_OFF(AHCIATADevState, fATAPIPassthrough);
    1178     GEN_CHECK_OFF(AHCIATADevState, cErrors);
    1179     GEN_CHECK_OFF(AHCIATADevState, pDrvBase);
    1180     GEN_CHECK_OFF(AHCIATADevState, pDrvBlock);
    1181     GEN_CHECK_OFF(AHCIATADevState, pDrvBlockBios);
    1182     GEN_CHECK_OFF(AHCIATADevState, pDrvMount);
    1183     GEN_CHECK_OFF(AHCIATADevState, IBase);
    1184     GEN_CHECK_OFF(AHCIATADevState, IPort);
    1185     GEN_CHECK_OFF(AHCIATADevState, IMountNotify);
    1186     GEN_CHECK_OFF(AHCIATADevState, iLUN);
    1187     GEN_CHECK_OFF(AHCIATADevState, pDevInsR3);
    1188     GEN_CHECK_OFF(AHCIATADevState, pDevInsR0);
    1189     GEN_CHECK_OFF(AHCIATADevState, pDevInsRC);
    1190     GEN_CHECK_OFF(AHCIATADevState, pControllerR3);
    1191     GEN_CHECK_OFF(AHCIATADevState, pControllerR0);
    1192     GEN_CHECK_OFF(AHCIATADevState, pControllerRC);
    1193     GEN_CHECK_SIZE(AHCIATATransferRequest);
    1194     GEN_CHECK_OFF(AHCIATATransferRequest, iIf);
    1195     GEN_CHECK_OFF(AHCIATATransferRequest, iBeginTransfer);
    1196     GEN_CHECK_OFF(AHCIATATransferRequest, iSourceSink);
    1197     GEN_CHECK_OFF(AHCIATATransferRequest, cbTotalTransfer);
    1198     GEN_CHECK_OFF(AHCIATATransferRequest, uTxDir);
    1199     GEN_CHECK_SIZE(AHCIATAAbortRequest);
    1200     GEN_CHECK_OFF(AHCIATAAbortRequest, iIf);
    1201     GEN_CHECK_OFF(AHCIATAAbortRequest, fResetDrive);
    1202     GEN_CHECK_SIZE(AHCIATARequest);
    1203     GEN_CHECK_OFF(AHCIATARequest, ReqType);
    1204     GEN_CHECK_OFF(AHCIATARequest, u);
    1205     GEN_CHECK_OFF(AHCIATARequest, u.t);
    1206     GEN_CHECK_OFF(AHCIATARequest, u.a);
    1207     GEN_CHECK_SIZE(AHCIATACONTROLLER);
    1208     GEN_CHECK_OFF(AHCIATACONTROLLER, IOPortBase1);
    1209     GEN_CHECK_OFF(AHCIATACONTROLLER, IOPortBase2);
    1210     GEN_CHECK_OFF(AHCIATACONTROLLER, irq);
    1211     GEN_CHECK_OFF(AHCIATACONTROLLER, lock);
    1212     GEN_CHECK_OFF(AHCIATACONTROLLER, iSelectedIf);
    1213     GEN_CHECK_OFF(AHCIATACONTROLLER, iAIOIf);
    1214     GEN_CHECK_OFF(AHCIATACONTROLLER, uAsyncIOState);
    1215     GEN_CHECK_OFF(AHCIATACONTROLLER, fChainedTransfer);
    1216     GEN_CHECK_OFF(AHCIATACONTROLLER, fReset);
    1217     GEN_CHECK_OFF(AHCIATACONTROLLER, fRedo);
    1218     GEN_CHECK_OFF(AHCIATACONTROLLER, fRedoIdle);
    1219     GEN_CHECK_OFF(AHCIATACONTROLLER, fRedoDMALastDesc);
    1220     GEN_CHECK_OFF(AHCIATACONTROLLER, BmDma);
    1221     GEN_CHECK_OFF(AHCIATACONTROLLER, pFirstDMADesc);
    1222     GEN_CHECK_OFF(AHCIATACONTROLLER, pLastDMADesc);
    1223     GEN_CHECK_OFF(AHCIATACONTROLLER, pRedoDMABuffer);
    1224     GEN_CHECK_OFF(AHCIATACONTROLLER, cbRedoDMABuffer);
    1225     GEN_CHECK_OFF(AHCIATACONTROLLER, aIfs);
    1226     GEN_CHECK_OFF(AHCIATACONTROLLER, aIfs[1]);
    1227     GEN_CHECK_OFF(AHCIATACONTROLLER, pDevInsR3);
    1228     GEN_CHECK_OFF(AHCIATACONTROLLER, pDevInsR0);
    1229     GEN_CHECK_OFF(AHCIATACONTROLLER, pDevInsRC);
    1230     GEN_CHECK_OFF(AHCIATACONTROLLER, fShutdown);
    1231     GEN_CHECK_OFF(AHCIATACONTROLLER, AsyncIOThread);
    1232     GEN_CHECK_OFF(AHCIATACONTROLLER, AsyncIOSem);
    1233     GEN_CHECK_OFF(AHCIATACONTROLLER, aAsyncIORequests[4]);
    1234     GEN_CHECK_OFF(AHCIATACONTROLLER, AsyncIOReqHead);
    1235     GEN_CHECK_OFF(AHCIATACONTROLLER, AsyncIOReqTail);
    1236     GEN_CHECK_OFF(AHCIATACONTROLLER, AsyncIORequestMutex);
    1237     GEN_CHECK_OFF(AHCIATACONTROLLER, SuspendIOSem);
    1238     GEN_CHECK_OFF(AHCIATACONTROLLER, DelayIRQMillies);
    1239     GEN_CHECK_OFF(AHCIATACONTROLLER, fSignalIdle);
    1240     GEN_CHECK_OFF(AHCIATACONTROLLER, StatAsyncOps);
    1241     GEN_CHECK_OFF(AHCIATACONTROLLER, StatAsyncMinWait);
    1242     GEN_CHECK_OFF(AHCIATACONTROLLER, StatAsyncMaxWait);
    1243     GEN_CHECK_OFF(AHCIATACONTROLLER, StatAsyncTimeUS);
    1244     GEN_CHECK_OFF(AHCIATACONTROLLER, StatAsyncTime);
    1245     GEN_CHECK_OFF(AHCIATACONTROLLER, StatLockWait);
    12461118
    12471119    /* Storage/DevAHCI.cpp */
     
    13631235    GEN_CHECK_OFF(AHCI, ahciPort);
    13641236    GEN_CHECK_OFF(AHCI, ahciPort[AHCI_MAX_NR_PORTS_IMPL-1]);
    1365     GEN_CHECK_OFF(AHCI, aCts);
    1366     GEN_CHECK_OFF(AHCI, aCts[1]);
    13671237    GEN_CHECK_OFF(AHCI, lock);
    13681238    GEN_CHECK_OFF(AHCI, u32PortsInterrupted);
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