Changeset 54241 in vbox
- Timestamp:
- Feb 17, 2015 3:47:27 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.cpp
r54229 r54241 283 283 else 284 284 { 285 LogF lowFunc(("IoAttachDeviceToDeviceStack did not give a nextLowerDriver!\n"));285 LogFunc(("IoAttachDeviceToDeviceStack did not give a nextLowerDriver!\n")); 286 286 rc = STATUS_DEVICE_NOT_CONNECTED; 287 287 } … … 291 291 } 292 292 else 293 LogF lowFunc(("IoCreateSymbolicLink failed with rc=%#x!\n", rc));293 LogFunc(("IoCreateSymbolicLink failed with rc=%#x!\n", rc)); 294 294 IoDeleteDevice(pDeviceObject); 295 295 } 296 296 else 297 LogF lowFunc(("IoCreateDevice failed with rc=%#x!\n", rc));298 299 LogF lowFunc(("Returning with rc=0x%x\n", rc));297 LogFunc(("IoCreateDevice failed with rc=%#x!\n", rc)); 298 299 LogFunc(("Returning with rc=0x%x\n", rc)); 300 300 return rc; 301 301 } … … 331 331 }; 332 332 333 LogFlowFunc(("Type=%s", 334 uType < RT_ELEMENTS(s_apszName) ? s_apszName[uType] : "Unknown")); 333 LogFunc(("Type=%s", uType < RT_ELEMENTS(s_apszName) ? s_apszName[uType] : "Unknown")); 335 334 336 335 switch (uType) … … 338 337 case CmResourceTypePort: 339 338 case CmResourceTypeMemory: 340 LogF lowFunc(("Start %8X%8.8lX, length=%X\n",341 342 339 LogFunc(("Start %8X%8.8lX, length=%X\n", 340 pResource->u.Port.Start.HighPart, pResource->u.Port.Start.LowPart, 341 pResource->u.Port.Length)); 343 342 break; 344 343 345 344 case CmResourceTypeInterrupt: 346 LogF lowFunc(("Level=%X, vector=%X, affinity=%X\n",347 348 345 LogFunc(("Level=%X, vector=%X, affinity=%X\n", 346 pResource->u.Interrupt.Level, pResource->u.Interrupt.Vector, 347 pResource->u.Interrupt.Affinity)); 349 348 break; 350 349 351 350 case CmResourceTypeDma: 352 LogF lowFunc(("Channel %d, Port %X\n",353 351 LogFunc(("Channel %d, Port %X\n", 352 pResource->u.Dma.Channel, pResource->u.Dma.Port)); 354 353 break; 355 354 356 355 default: 357 LogF lowFunc(("\n"));356 LogFunc(("\n")); 358 357 break; 359 358 } … … 382 381 LogFlowFuncEnter(); 383 382 384 int rc = STATUS_SUCCESS; 383 int rc = STATUS_SUCCESS; /** @todo r=bird: s/rc/rcNt/ and s/int/NTSTATUS/. gee. */ 385 384 #ifdef TARGET_NT4 386 385 /* … … 424 423 pDevExt->Core.pVMMDevMemory = (VMMDevMemory *)pvMMIOBase; 425 424 426 LogF lowFunc(("pvMMIOBase=0x%p, pDevExt=0x%p, pDevExt->Core.pVMMDevMemory=0x%p\n",427 425 LogFunc(("pvMMIOBase=0x%p, pDevExt=0x%p, pDevExt->Core.pVMMDevMemory=0x%p\n", 426 pvMMIOBase, pDevExt, pDevExt ? pDevExt->Core.pVMMDevMemory : NULL)); 428 427 429 428 int vrc = VBoxGuestInitDevExt(&pDevExt->Core, … … 434 433 if (RT_FAILURE(vrc)) 435 434 { 436 LogF lowFunc(("Could not init device extension, rc=%Rrc\n", vrc));435 LogFunc(("Could not init device extension, rc=%Rrc\n", vrc)); 437 436 rc = STATUS_DEVICE_CONFIGURATION_ERROR; 438 437 } 439 438 } 440 439 else 441 LogF lowFunc(("Could not map physical address of VMMDev, rc=0x%x\n", rc));440 LogFunc(("Could not map physical address of VMMDev, rc=0x%x\n", rc)); 442 441 } 443 442 … … 448 447 if (RT_FAILURE(vrc)) 449 448 { 450 LogF lowFunc(("Alloc for pPowerStateRequest failed, rc=%Rrc\n", vrc));449 LogFunc(("Alloc for pPowerStateRequest failed, rc=%Rrc\n", vrc)); 451 450 rc = STATUS_UNSUCCESSFUL; 452 451 } … … 483 482 } 484 483 else 485 LogF lowFunc(("Device does not provide an interrupt!\n"));484 LogFunc(("Device does not provide an interrupt!\n")); 486 485 #endif 487 486 if (pDevExt->interruptVector) … … 507 506 FALSE); /* Don't save FPU stack. */ 508 507 if (NT_ERROR(rc)) 509 LogF lowFunc(("Could not connect interrupt, rc=0x%x\n", rc));508 LogFunc(("Could not connect interrupt, rc=0x%x\n", rc)); 510 509 } 511 510 else 512 LogF lowFunc(("No interrupt vector found!\n"));511 LogFunc(("No interrupt vector found!\n")); 513 512 } 514 513 … … 519 518 if (RT_FAILURE(vrc)) 520 519 { 521 LogF lowFunc(("Failed to allocated kernel session data, rc=%Rrc\n", rc));520 LogFunc(("Failed to allocated kernel session data, rc=%Rrc\n", rc)); 522 521 rc = STATUS_UNSUCCESSFUL; 523 522 } … … 546 545 * whole bunch of things... */ 547 546 548 LogF lowFunc(("Returned with rc=0x%x\n", rc));547 LogFunc(("Returned with rc=0x%x\n", rc)); 549 548 return rc; 550 549 } … … 647 646 if (pDevExt->devState != WORKING) 648 647 { 649 LogF lowFunc(("Device is not working currently, state=%d\n", pDevExt->devState));648 LogFunc(("Device is not working currently, state=%d\n", pDevExt->devState)); 650 649 rc = STATUS_UNSUCCESSFUL; 651 650 } … … 760 759 if (pSession == NULL) 761 760 { 762 LogFlowFunc(("Using kernel session data ...\n")); 761 LogFunc(("XXX: BUGBUG: FIXME: Using ugly kernel session data hack ...\n")); 762 #ifdef DEBUG_andy 763 RTLogBackdoorPrintf("XXX: BUGBUG: FIXME: Using ugly kernel session data hack ... Please don't forget to fix this one, Andy!\n"); 764 #endif 763 765 pSession = pDevExt->pKernelSession; 764 766 } … … 781 783 || cbDataReturned > pStack->Parameters.DeviceIoControl.OutputBufferLength)) 782 784 { 783 LogF lowFunc(("Too much output data %u - expected %u!\n", cbDataReturned, cbData));785 LogFunc(("Too much output data %u - expected %u!\n", cbDataReturned, cbData)); 784 786 cbDataReturned = cbData; 785 787 Status = STATUS_BUFFER_TOO_SMALL; … … 801 803 else 802 804 { 803 LogFlowFunc(("Not buffered request (%#x) - not supported\n", 804 pStack->Parameters.DeviceIoControl.IoControlCode)); 805 LogFunc(("Not buffered request (%#x) - not supported\n", pStack->Parameters.DeviceIoControl.IoControlCode)); 805 806 Status = STATUS_NOT_SUPPORTED; 806 807 } … … 920 921 int rc = VbglGRPerform(&pReq->header); 921 922 if (RT_FAILURE(rc)) 922 LogF lowFunc(("Error performing request to VMMDev, rc=%Rrc\n", rc));923 LogFunc(("Error performing request to VMMDev, rc=%Rrc\n", rc)); 923 924 } 924 925 … … 957 958 { 958 959 PVBOXGUESTDEVEXTWIN pDevExt = (PVBOXGUESTDEVEXTWIN)pDevObj->DeviceExtension; 959 #ifndef DEBUG_andy 960 LogFlowFunc(("pDevExt=0x%p\n", pDevExt)); 961 #endif 960 Log3Func(("pDevExt=0x%p\n", pDevExt)); 962 961 963 962 /* Test & reset the counter. */ … … 994 993 return FALSE; 995 994 996 /*LogFlowFunc(("pDevExt=0x%p, pVMMDevMemory=0x%p\n", 997 pDevExt, pDevExt ? pDevExt->pVMMDevMemory : NULL));*/ 995 /*Log3Func(("pDevExt=0x%p, pVMMDevMemory=0x%p\n", pDevExt, pDevExt ? pDevExt->pVMMDevMemory : NULL));*/ 998 996 999 997 /* Enter the common ISR routine and do the actual work. */ … … 1004 1002 if (fIRQTaken) 1005 1003 { 1006 #ifndef DEBUG_andy 1007 LogFlowFunc(("IRQ was taken! pInterrupt=0x%p, pDevExt=0x%p\n", 1008 pInterrupt, pDevExt)); 1009 #endif 1004 Log3Func(("IRQ was taken! pInterrupt=0x%p, pDevExt=0x%p\n", pInterrupt, pDevExt)); 1010 1005 if (ASMAtomicUoReadU32( &pDevExt->Core.u32MousePosChangedSeq) 1011 1006 || !RTListIsEmpty(&pDevExt->Core.WakeUpList)) 1012 1007 { 1013 #ifndef DEBUG_andy 1014 LogFlowFunc(("Requesting DPC ...\n")); 1015 #endif 1008 Log3Func(("Requesting DPC ...\n")); 1016 1009 IoRequestDpc(pDevExt->pDeviceObject, pDevExt->pCurrentIrp, NULL); 1017 1010 } … … 1114 1107 pBaseAddress->ResourceMapped = FALSE; 1115 1108 1116 LogF lowFunc(("I/O range for VMMDev found! Base=%08x:%08x, length=%08x\n",1117 1118 1119 1109 LogFunc(("I/O range for VMMDev found! Base=%08x:%08x, length=%08x\n", 1110 pPartialData->u.Port.Start.HighPart, 1111 pPartialData->u.Port.Start.LowPart, 1112 pPartialData->u.Port.Length)); 1120 1113 1121 1114 /* Next item ... */ … … 1127 1120 case CmResourceTypeInterrupt: 1128 1121 { 1129 LogF lowFunc(("Interrupt: Level=%x, vector=%x, mode=%x\n",1130 1131 1132 1122 LogFunc(("Interrupt: Level=%x, vector=%x, mode=%x\n", 1123 pPartialData->u.Interrupt.Level, 1124 pPartialData->u.Interrupt.Vector, 1125 pPartialData->Flags)); 1133 1126 1134 1127 /* Save information. */ … … 1170 1163 pBaseAddress->ResourceMapped = FALSE; 1171 1164 1172 LogF lowFunc(("Memory range for VMMDev found! Base = %08x:%08x, Length = %08x\n",1173 1174 1175 1165 LogFunc(("Memory range for VMMDev found! Base = %08x:%08x, Length = %08x\n", 1166 pPartialData->u.Memory.Start.HighPart, 1167 pPartialData->u.Memory.Start.LowPart, 1168 pPartialData->u.Memory.Length)); 1176 1169 1177 1170 /* Next item ... */ … … 1179 1172 } 1180 1173 else 1181 LogF lowFunc(("Ignoring memory: Flags=%08x\n", pPartialData->Flags));1174 LogFunc(("Ignoring memory: Flags=%08x\n", pPartialData->Flags)); 1182 1175 } 1183 1176 break; … … 1186 1179 default: 1187 1180 { 1188 LogF lowFunc(("Unhandled resource found, type=%d\n", pPartialData->Type));1181 LogFunc(("Unhandled resource found, type=%d\n", pPartialData->Type)); 1189 1182 break; 1190 1183 } … … 1223 1216 if (pVMMDevMemory) 1224 1217 { 1225 LogFlowFunc(("VMMDevMemory: Version = 0x%x, Size = %d\n", 1226 pVMMDevMemory->u32Version, pVMMDevMemory->u32Size)); 1218 LogFunc(("VMMDevMemory: Version = 0x%x, Size = %d\n", pVMMDevMemory->u32Version, pVMMDevMemory->u32Size)); 1227 1219 1228 1220 /* Check version of the structure; do we have the right memory version? */ … … 1234 1226 *pcbMMIO = pVMMDevMemory->u32Size; 1235 1227 1236 LogFlowFunc(("VMMDevMemory found and mapped! pvMMIOBase = 0x%p\n", 1237 *ppvMMIOBase)); 1228 LogFlowFunc(("VMMDevMemory found and mapped! pvMMIOBase = 0x%p\n", *ppvMMIOBase)); 1238 1229 } 1239 1230 else 1240 1231 { 1241 1232 /* Not our version, refuse operation and unmap the memory. */ 1242 LogF lowFunc(("Wrong version (%u), refusing operation!\n", pVMMDevMemory->u32Version));1233 LogFunc(("Wrong version (%u), refusing operation!\n", pVMMDevMemory->u32Version)); 1243 1234 1244 1235 vbgdNtUnmapVMMDevMemory(pDevExt); … … 1548 1539 return VINF_SUCCESS; 1549 1540 } 1541 1550 1542 #endif /* VBOX_WITH_DPC_LATENCY_CHECKER */ 1551 1543
Note:
See TracChangeset
for help on using the changeset viewer.