Changeset 4193 in vbox for trunk/src/VBox
- Timestamp:
- Aug 16, 2007 10:53:34 PM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 23685
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/DevPCI.cpp
r4071 r4193 1054 1054 return rc; 1055 1055 if (u32 != (uint32_t)~0) 1056 { 1057 AssertMsgFailed(("u32=%#x\n", u32)); 1058 return rc; 1059 } 1056 AssertMsgFailedReturn(("u32=%#x\n", u32), rc); 1060 1057 1061 1058 /* … … 1085 1082 if (pData->devices[i]) 1086 1083 { 1087 LogRel(("New device in slot %#x, %s\n", i, pData->devices[i]->name)); 1088 AssertFailed(); 1089 return VERR_SSM_LOAD_CONFIG_MISMATCH; 1084 LogRel(("New device in slot %#x, %s (vendor=%#06x device=%#06x)\n", i, pData->devices[i]->name, 1085 PCIDevGetVendorId(pData->devices[i]), PCIDevGetDeviceId(pData->devices[i]))); 1086 if (SSMR3HandleGetAfter(pSSMHandle) != SSMAFTER_DEBUG_IT) 1087 AssertFailedReturn(VERR_SSM_LOAD_CONFIG_MISMATCH); 1090 1088 } 1091 1089 } 1090 1091 /* get the data */ 1092 SSMR3GetMem(pSSMHandle, DevTmp.config, sizeof(DevTmp.config)); 1093 rc = SSMR3GetS32(pSSMHandle, &DevTmp.Int.s.iIrq); 1094 if (VBOX_FAILURE(rc)) 1095 return rc; 1092 1096 1093 1097 /* check that it's still around. */ … … 1095 1099 if (!pDev) 1096 1100 { 1097 LogRel(("Device in slot %#x has been removed!\n", i, pDev->name)); 1098 AssertFailed(); 1099 return VERR_SSM_LOAD_CONFIG_MISMATCH; 1100 } 1101 1102 /* restore it */ 1103 SSMR3GetMem(pSSMHandle, DevTmp.config, sizeof(DevTmp.config)); 1104 rc = SSMR3GetS32(pSSMHandle, &DevTmp.Int.s.iIrq); 1105 if (VBOX_FAILURE(rc)) 1106 return rc; 1101 LogRel(("Device in slot %#x has been removed! vendor=%#06x device=%#06x\n", i, 1102 PCIDevGetVendorId(&DevTmp), PCIDevGetDeviceId(&DevTmp))); 1103 if (SSMR3HandleGetAfter(pSSMHandle) != SSMAFTER_DEBUG_IT) 1104 AssertFailedReturn(VERR_SSM_LOAD_CONFIG_MISMATCH); 1105 continue; 1106 } 1107 1107 1108 1108 /* match the vendor id assuming that this will never be changed. */ … … 1112 1112 LogRel(("Device in slot %#x (%s) vendor id mismatch! saved=%.4Vhxs current=%.4Vhxs\n", 1113 1113 i, pDev->name, DevTmp.config, pDev->config)); 1114 AssertFailed(); 1115 return VERR_SSM_LOAD_CONFIG_MISMATCH; 1114 AssertFailedReturn(VERR_SSM_LOAD_CONFIG_MISMATCH); 1116 1115 } 1117 1116 1118 1117 /* commit the loaded device config. */ 1119 1118 memcpy(pDev->config, DevTmp.config, sizeof(pDev->config)); 1120 if (DevTmp.Int.s.iIrq >= PCI_DEVICES_MAX) {1121 AssertMsgFailed (("Device %s: Too many devices %d (max=%d)\n",1122 1123 return VERR_TOO_MUCH_DATA;1119 if (DevTmp.Int.s.iIrq >= PCI_DEVICES_MAX) 1120 { 1121 LogRel(("Device %s: Too many devices %d (max=%d)\n", pDev->name, DevTmp.Int.s.iIrq, PCI_DEVICES_MAX)); 1122 AssertFailedReturn(VERR_TOO_MUCH_DATA); 1124 1123 } 1125 1124
Note:
See TracChangeset
for help on using the changeset viewer.