Changeset 51340 in vbox
- Timestamp:
- May 22, 2014 9:17:55 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DevAHCI.cpp
r51232 r51340 82 82 83 83 /** The current saved state version. */ 84 #define AHCI_SAVED_STATE_VERSION 7 84 #define AHCI_SAVED_STATE_VERSION 8 85 /** The saved state version before changing the port reset logic in an incomptible way. */ 86 #define AHCI_SAVED_STATE_VERSION_PRE_PORT_RESET_CHANGES 7 85 87 /** Saved state version before the per port hotplug port was added. */ 86 #define AHCI_SAVED_STATE_VERSION_PRE_HOTPLUG_FLAG 688 #define AHCI_SAVED_STATE_VERSION_PRE_HOTPLUG_FLAG 6 87 89 /** Saved state version before legacy ATA emulation was dropped. */ 88 #define AHCI_SAVED_STATE_VERSION_IDE_EMULATION 590 #define AHCI_SAVED_STATE_VERSION_IDE_EMULATION 5 89 91 /** Saved state version before ATAPI support was added. */ 90 #define AHCI_SAVED_STATE_VERSION_PRE_ATAPI 392 #define AHCI_SAVED_STATE_VERSION_PRE_ATAPI 3 91 93 /** The saved state version use in VirtualBox 3.0 and earlier. 92 94 * This was before the config was added and ahciIOTasks was dropped. */ 93 #define AHCI_SAVED_STATE_VERSION_VBOX_30 295 #define AHCI_SAVED_STATE_VERSION_VBOX_30 2 94 96 /* for Older ATA state Read handling */ 95 97 #define ATA_CTL_SAVED_STATE_VERSION 3 … … 692 694 /** Flag whether the controller has BIOS access enabled. */ 693 695 bool fBootable; 696 /** Flag whether the legacy port reset method should be used to make it work with saved states. */ 697 bool fLegacyPortResetMethod; 694 698 695 699 /** Number of usable ports on this controller. */ … … 1259 1263 && pAhciPort->pDrvBase) 1260 1264 { 1261 pAhciPort->regSCTL = u32Value; /* Update before kicking the I/O thread. */ 1262 pAhciPort->regSSTS = 0x1; /* Indicate device presence detected but communication not established. */ 1263 1264 /* Kick the thread to finish the reset. */ 1265 ahciIoThreadKick(ahci, pAhciPort); 1265 /* Do the port reset here, so the guest sees the new status immediately. */ 1266 if (ahci->fLegacyPortResetMethod) 1267 { 1268 ahciPortResetFinish(pAhciPort); 1269 pAhciPort->regSCTL = u32Value; /* Update after finishing the reset, so the I/O thread doesn't get a chance to do the reset. */ 1270 } 1271 else 1272 { 1273 pAhciPort->regSSTS = 0x1; /* Indicate device presence detected but communication not established. */ 1274 pAhciPort->regSCTL = u32Value; /* Update before kicking the I/O thread. */ 1275 1276 /* Kick the thread to finish the reset. */ 1277 ahciIoThreadKick(ahci, pAhciPort); 1278 } 1266 1279 } 1267 1280 … … 6977 6990 SSMR3PutBool(pSSM, pThis->fR0Enabled); 6978 6991 SSMR3PutBool(pSSM, pThis->fGCEnabled); 6992 SSMR3PutBool(pSSM, pThis->fLegacyPortResetMethod); 6979 6993 6980 6994 /* Now every port. */ … … 7108 7122 uVersion++; 7109 7123 7124 /* 7125 * Check whether we have to resort to the legacy port reset method to 7126 * prevent older BIOS versions from failing after a reset. 7127 */ 7128 if (uVersion < AHCI_SAVED_STATE_VERSION_PRE_PORT_RESET_CHANGES) 7129 pThis->fLegacyPortResetMethod = true; 7130 7110 7131 /* Verify config. */ 7111 7132 if (uVersion > AHCI_SAVED_STATE_VERSION_VBOX_30) … … 7206 7227 SSMR3GetBool(pSSM, &pThis->fR0Enabled); 7207 7228 SSMR3GetBool(pSSM, &pThis->fGCEnabled); 7229 if (uVersion > AHCI_SAVED_STATE_VERSION_PRE_PORT_RESET_CHANGES) 7230 SSMR3GetBool(pSSM, &pThis->fLegacyPortResetMethod); 7208 7231 7209 7232 /* Now every port. */
Note:
See TracChangeset
for help on using the changeset viewer.