Changeset 6514 in vbox for trunk/src/VBox/HostDrivers
- Timestamp:
- Jan 25, 2008 12:49:05 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 27524
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/SUPDRVShared.c
r6176 r6514 356 356 pSession->Bundle.cUsed = 0 */ 357 357 358 dprintf(("Created session %p initial cookie=%#x\n", pSession, pSession->u32Cookie));358 LogFlow(("Created session %p initial cookie=%#x\n", pSession, pSession->u32Cookie)); 359 359 return VINF_SUCCESS; 360 360 } … … 362 362 RTMemFree(pSession); 363 363 *ppSession = NULL; 364 }365 366 dprintf(("Failed to create spinlock, rc=%d!\n", rc)); 364 Log(("Failed to create spinlock, rc=%d!\n", rc)); 365 } 366 367 367 return rc; 368 368 } … … 390 390 pSession->pDevExt = NULL; 391 391 RTMemFree(pSession); 392 dprintf2(("supdrvCloseSession: returns\n"));392 LogFlow(("supdrvCloseSession: returns\n")); 393 393 } 394 394 … … 407 407 { 408 408 PSUPDRVBUNDLE pBundle; 409 dprintf(("supdrvCleanupSession: pSession=%p\n", pSession));409 LogFlow(("supdrvCleanupSession: pSession=%p\n", pSession)); 410 410 411 411 /* 412 412 * Remove logger instances related to this session. 413 * (This assumes the dprintf and dprintf2 macros doesn't use the normal logging.)414 413 */ 415 414 RTLogSetDefaultInstanceThread(NULL, (uintptr_t)pSession); … … 426 425 * In theory there should be noone racing us in this session. 427 426 */ 428 dprintf2(("release objects - start\n"));427 Log2(("release objects - start\n")); 429 428 if (pSession->pUsage) 430 429 { … … 476 475 AssertMsg(!pSession->pUsage, ("Some buster reregistered an object during desturction!\n")); 477 476 } 478 dprintf2(("release objects - done\n"));477 Log2(("release objects - done\n")); 479 478 480 479 /* … … 484 483 * not allocated memory while closing the file handle object. 485 484 */ 486 dprintf2(("freeing memory:\n"));485 Log2(("freeing memory:\n")); 487 486 pBundle = &pSession->Bundle; 488 487 while (pBundle) … … 499 498 { 500 499 int rc; 501 dprintf2(("eType=%d pvR0=%p pvR3=%p cb=%ld\n", pBundle->aMem[i].eType, RTR0MemObjAddress(pBundle->aMem[i].MemObj),502 500 Log2(("eType=%d pvR0=%p pvR3=%p cb=%ld\n", pBundle->aMem[i].eType, RTR0MemObjAddress(pBundle->aMem[i].MemObj), 501 (void *)RTR0MemObjAddressR3(pBundle->aMem[i].MapObjR3), (long)RTR0MemObjSize(pBundle->aMem[i].MemObj))); 503 502 if (pBundle->aMem[i].MapObjR3 != NIL_RTR0MEMOBJ) 504 503 { … … 525 524 RTMemFree(pToFree); 526 525 } 527 dprintf2(("freeing memory - done\n"));526 Log2(("freeing memory - done\n")); 528 527 529 528 /* … … 531 530 */ 532 531 RTSemFastMutexRequest(pDevExt->mtxLdr); 533 dprintf2(("freeing images:\n"));532 Log2(("freeing images:\n")); 534 533 if (pSession->pLdrUsage) 535 534 { … … 550 549 } 551 550 RTSemFastMutexRelease(pDevExt->mtxLdr); 552 dprintf2(("freeing images - done\n"));551 Log2(("freeing images - done\n")); 553 552 554 553 /* 555 554 * Unmap the GIP. 556 555 */ 557 dprintf2(("umapping GIP:\n"));556 Log2(("umapping GIP:\n")); 558 557 #ifdef USE_NEW_OS_INTERFACE_FOR_GIP 559 558 if (pSession->GipMapObjR3 != NIL_RTR0MEMOBJ) … … 568 567 pSession->fGipReferenced = 0; 569 568 } 570 dprintf2(("umapping GIP - done\n"));569 Log2(("umapping GIP - done\n")); 571 570 } 572 571 … … 1081 1080 1082 1081 default: 1083 dprintf(("Unknown IOCTL %#lx\n", (long)uIOCtl));1082 Log(("Unknown IOCTL %#lx\n", (long)uIOCtl)); 1084 1083 break; 1085 1084 } … … 1163 1162 pUsage->pObj = pObj; 1164 1163 pUsage->pNext = pSession->pUsage; 1165 dprintf(("SUPR0ObjRegister: pUsage=%p:{.pObj=%p, .pNext=%p}\n", pUsage, pUsage->pObj, pUsage->pNext));1164 Log2(("SUPR0ObjRegister: pUsage=%p:{.pObj=%p, .pNext=%p}\n", pUsage, pUsage->pObj, pUsage->pNext)); 1166 1165 pSession->pUsage = pUsage; 1167 1166 1168 1167 RTSpinlockRelease(pDevExt->Spinlock, &SpinlockTmp); 1169 1168 1170 dprintf(("SUPR0ObjRegister: returns %p (pvUser1=%p, pvUser=%p)\n", pObj, pvUser1, pvUser2));1169 Log(("SUPR0ObjRegister: returns %p (pvUser1=%p, pvUser=%p)\n", pObj, pvUser1, pvUser2)); 1171 1170 return pObj; 1172 1171 } … … 1224 1223 for (pUsage = pSession->pUsage; pUsage; pUsage = pUsage->pNext) 1225 1224 { 1226 dprintf(("SUPR0AddRef: pUsage=%p:{.pObj=%p, .pNext=%p}\n", pUsage, pUsage->pObj, pUsage->pNext));1225 Log(("SUPR0AddRef: pUsage=%p:{.pObj=%p, .pNext=%p}\n", pUsage, pUsage->pObj, pUsage->pNext)); 1227 1226 if (pUsage->pObj == pObj) 1228 1227 break; … … 1237 1236 pUsagePre->pNext = pSession->pUsage; 1238 1237 pSession->pUsage = pUsagePre; 1239 dprintf(("SUPR0AddRef: pUsagePre=%p:{.pObj=%p, .pNext=%p}\n", pUsagePre, pUsagePre->pObj, pUsagePre->pNext));1238 Log(("SUPR0AddRef: pUsagePre=%p:{.pObj=%p, .pNext=%p}\n", pUsagePre, pUsagePre->pObj, pUsagePre->pNext)); 1240 1239 1241 1240 pUsagePre = NULL; … … 1292 1291 pUsagePrev = pUsage, pUsage = pUsage->pNext) 1293 1292 { 1294 dprintf(("SUPR0ObjRelease: pUsage=%p:{.pObj=%p, .pNext=%p}\n", pUsage, pUsage->pObj, pUsage->pNext));1293 Log2(("SUPR0ObjRelease: pUsage=%p:{.pObj=%p, .pNext=%p}\n", pUsage, pUsage->pObj, pUsage->pNext)); 1295 1294 if (pUsage->pObj == pObj) 1296 1295 { … … 1418 1417 SUPDRVMEMREF Mem = {0}; 1419 1418 const size_t cb = (size_t)cPages << PAGE_SHIFT; 1420 dprintf(("SUPR0LockMem: pSession=%p pvR3=%p cPages=%d paPages=%p\n", pSession, (void *)pvR3, cPages, paPages));1419 LogFlow(("SUPR0LockMem: pSession=%p pvR3=%p cPages=%d paPages=%p\n", pSession, (void *)pvR3, cPages, paPages)); 1421 1420 1422 1421 /* … … 1428 1427 || !pvR3) 1429 1428 { 1430 dprintf(("pvR3 (%p) must be page aligned and not NULL!\n", (void *)pvR3));1429 Log(("pvR3 (%p) must be page aligned and not NULL!\n", (void *)pvR3)); 1431 1430 return VERR_INVALID_PARAMETER; 1432 1431 } … … 1482 1481 SUPR0DECL(int) SUPR0UnlockMem(PSUPDRVSESSION pSession, RTR3PTR pvR3) 1483 1482 { 1484 dprintf(("SUPR0UnlockMem: pSession=%p pvR3=%p\n", pSession, (void *)pvR3));1483 LogFlow(("SUPR0UnlockMem: pSession=%p pvR3=%p\n", pSession, (void *)pvR3)); 1485 1484 AssertReturn(SUP_IS_SESSION_VALID(pSession), VERR_INVALID_PARAMETER); 1486 1485 #ifdef RT_OS_WINDOWS … … 1491 1490 if (supdrvPageWasLockedByPageAlloc(pSession, pvR3)) 1492 1491 { 1493 dprintf(("Page will be unlocked in SUPR0PageFree -> ignore\n"));1492 Log(("Page will be unlocked in SUPR0PageFree -> ignore\n")); 1494 1493 return VINF_SUCCESS; 1495 1494 } … … 1514 1513 int rc; 1515 1514 SUPDRVMEMREF Mem = {0}; 1516 dprintf(("SUPR0ContAlloc: pSession=%p cPages=%d ppvR0=%p ppvR3=%p pHCPhys=%p\n", pSession, cPages, ppvR0, ppvR3, pHCPhys));1515 LogFlow(("SUPR0ContAlloc: pSession=%p cPages=%d ppvR0=%p ppvR3=%p pHCPhys=%p\n", pSession, cPages, ppvR0, ppvR3, pHCPhys)); 1517 1516 1518 1517 /* … … 1522 1521 if (!ppvR3 || !ppvR0 || !pHCPhys) 1523 1522 { 1524 dprintf(("Null pointer. All of these should be set: pSession=%p ppvR0=%p ppvR3=%p pHCPhys=%p\n",1525 1523 Log(("Null pointer. All of these should be set: pSession=%p ppvR0=%p ppvR3=%p pHCPhys=%p\n", 1524 pSession, ppvR0, ppvR3, pHCPhys)); 1526 1525 return VERR_INVALID_PARAMETER; 1527 1526 … … 1529 1528 if (cPages < 1 || cPages >= 256) 1530 1529 { 1531 dprintf(("Illegal request cPages=%d, must be greater than 0 and smaller than 256\n", cPages));1530 Log(("Illegal request cPages=%d, must be greater than 0 and smaller than 256\n", cPages)); 1532 1531 return VERR_INVALID_PARAMETER; 1533 1532 } … … 1574 1573 SUPR0DECL(int) SUPR0ContFree(PSUPDRVSESSION pSession, RTHCUINTPTR uPtr) 1575 1574 { 1576 dprintf(("SUPR0ContFree: pSession=%p uPtr=%p\n", pSession, (void *)uPtr));1575 LogFlow(("SUPR0ContFree: pSession=%p uPtr=%p\n", pSession, (void *)uPtr)); 1577 1576 AssertReturn(SUP_IS_SESSION_VALID(pSession), VERR_INVALID_PARAMETER); 1578 1577 return supdrvMemRelease(pSession, uPtr, MEMREF_TYPE_CONT); … … 1595 1594 int rc; 1596 1595 SUPDRVMEMREF Mem = {0}; 1597 dprintf(("SUPR0LowAlloc: pSession=%p cPages=%d ppvR3=%p ppvR0=%p paPages=%p\n", pSession, cPages, ppvR3, ppvR0, paPages));1596 LogFlow(("SUPR0LowAlloc: pSession=%p cPages=%d ppvR3=%p ppvR0=%p paPages=%p\n", pSession, cPages, ppvR3, ppvR0, paPages)); 1598 1597 1599 1598 /* … … 1603 1602 if (!ppvR3 || !ppvR0 || !paPages) 1604 1603 { 1605 dprintf(("Null pointer. All of these should be set: pSession=%p ppvR3=%p ppvR0=%p paPages=%p\n",1606 1604 Log(("Null pointer. All of these should be set: pSession=%p ppvR3=%p ppvR0=%p paPages=%p\n", 1605 pSession, ppvR3, ppvR0, paPages)); 1607 1606 return VERR_INVALID_PARAMETER; 1608 1607 … … 1610 1609 if (cPages < 1 || cPages > 256) 1611 1610 { 1612 dprintf(("Illegal request cPages=%d, must be greater than 0 and smaller than 256.\n", cPages));1611 Log(("Illegal request cPages=%d, must be greater than 0 and smaller than 256.\n", cPages)); 1613 1612 return VERR_INVALID_PARAMETER; 1614 1613 } … … 1660 1659 SUPR0DECL(int) SUPR0LowFree(PSUPDRVSESSION pSession, RTHCUINTPTR uPtr) 1661 1660 { 1662 dprintf(("SUPR0LowFree: pSession=%p uPtr=%p\n", pSession, (void *)uPtr));1661 LogFlow(("SUPR0LowFree: pSession=%p uPtr=%p\n", pSession, (void *)uPtr)); 1663 1662 AssertReturn(SUP_IS_SESSION_VALID(pSession), VERR_INVALID_PARAMETER); 1664 1663 return supdrvMemRelease(pSession, uPtr, MEMREF_TYPE_LOW); … … 1681 1680 int rc; 1682 1681 SUPDRVMEMREF Mem = {0}; 1683 dprintf(("SUPR0MemAlloc: pSession=%p cb=%d ppvR0=%p ppvR3=%p\n", pSession, cb, ppvR0, ppvR3));1682 LogFlow(("SUPR0MemAlloc: pSession=%p cb=%d ppvR0=%p ppvR3=%p\n", pSession, cb, ppvR0, ppvR3)); 1684 1683 1685 1684 /* … … 1691 1690 if (cb < 1 || cb >= _4M) 1692 1691 { 1693 dprintf(("Illegal request cb=%u; must be greater than 0 and smaller than 4MB.\n", cb));1692 Log(("Illegal request cb=%u; must be greater than 0 and smaller than 4MB.\n", cb)); 1694 1693 return VERR_INVALID_PARAMETER; 1695 1694 } … … 1738 1737 PSUPDRVBUNDLE pBundle; 1739 1738 RTSPINLOCKTMP SpinlockTmp = RTSPINLOCKTMP_INITIALIZER; 1740 dprintf(("SUPR0MemGetPhys: pSession=%p uPtr=%p paPages=%p\n", pSession, (void *)uPtr, paPages));1739 LogFlow(("SUPR0MemGetPhys: pSession=%p uPtr=%p paPages=%p\n", pSession, (void *)uPtr, paPages)); 1741 1740 1742 1741 /* … … 1780 1779 } 1781 1780 RTSpinlockRelease(pSession->Spinlock, &SpinlockTmp); 1782 dprintf(("Failed to find %p!!!\n", (void *)uPtr));1781 Log(("Failed to find %p!!!\n", (void *)uPtr)); 1783 1782 return VERR_INVALID_PARAMETER; 1784 1783 } … … 1794 1793 SUPR0DECL(int) SUPR0MemFree(PSUPDRVSESSION pSession, RTHCUINTPTR uPtr) 1795 1794 { 1796 dprintf(("SUPR0MemFree: pSession=%p uPtr=%p\n", pSession, (void *)uPtr));1795 LogFlow(("SUPR0MemFree: pSession=%p uPtr=%p\n", pSession, (void *)uPtr)); 1797 1796 AssertReturn(SUP_IS_SESSION_VALID(pSession), VERR_INVALID_PARAMETER); 1798 1797 return supdrvMemRelease(pSession, uPtr, MEMREF_TYPE_MEM); … … 1814 1813 int rc; 1815 1814 SUPDRVMEMREF Mem = {0}; 1816 dprintf(("SUPR0PageAlloc: pSession=%p cb=%d ppvR3=%p\n", pSession, cPages, ppvR3));1815 LogFlow(("SUPR0PageAlloc: pSession=%p cb=%d ppvR3=%p\n", pSession, cPages, ppvR3)); 1817 1816 1818 1817 /* … … 1823 1822 if (cPages < 1 || cPages > (128 * _1M)/PAGE_SIZE) 1824 1823 { 1825 dprintf(("SUPR0PageAlloc: Illegal request cb=%u; must be greater than 0 and smaller than 128MB.\n", cPages));1824 Log(("SUPR0PageAlloc: Illegal request cb=%u; must be greater than 0 and smaller than 128MB.\n", cPages)); 1826 1825 return VERR_INVALID_PARAMETER; 1827 1826 } … … 1880 1879 PSUPDRVBUNDLE pBundle; 1881 1880 RTSPINLOCKTMP SpinlockTmp = RTSPINLOCKTMP_INITIALIZER; 1882 dprintf(("SUPR0PageIsLockedByPageAlloc: pSession=%p pvR3=%p\n", pSession, (void *)pvR3));1881 LogFlow(("SUPR0PageIsLockedByPageAlloc: pSession=%p pvR3=%p\n", pSession, (void *)pvR3)); 1883 1882 1884 1883 /* … … 1925 1924 PSUPDRVBUNDLE pBundle; 1926 1925 RTSPINLOCKTMP SpinlockTmp = RTSPINLOCKTMP_INITIALIZER; 1927 dprintf(("supdrvPageGetPhys: pSession=%p pvR3=%p cPages=%#lx paPages=%p\n", pSession, (void *)pvR3, (long)cPages, paPages));1926 LogFlow(("supdrvPageGetPhys: pSession=%p pvR3=%p cPages=%#lx paPages=%p\n", pSession, (void *)pvR3, (long)cPages, paPages)); 1928 1927 1929 1928 /* … … 1968 1967 SUPR0DECL(int) SUPR0PageFree(PSUPDRVSESSION pSession, RTR3PTR pvR3) 1969 1968 { 1970 dprintf(("SUPR0PageFree: pSession=%p pvR3=%p\n", pSession, (void *)pvR3));1969 LogFlow(("SUPR0PageFree: pSession=%p pvR3=%p\n", pSession, (void *)pvR3)); 1971 1970 AssertReturn(SUP_IS_SESSION_VALID(pSession), VERR_INVALID_PARAMETER); 1972 1971 return supdrvMemRelease(pSession, (RTHCUINTPTR)pvR3, MEMREF_TYPE_LOCKED_SUP); … … 1992 1991 RTR3PTR pGip = NIL_RTR3PTR; 1993 1992 RTHCPHYS HCPhys = NIL_RTHCPHYS; 1994 dprintf(("SUPR0GipMap: pSession=%p ppGipR3=%p pHCPhysGip=%p\n", pSession, ppGipR3, pHCPhysGip));1993 LogFlow(("SUPR0GipMap: pSession=%p ppGipR3=%p pHCPhysGip=%p\n", pSession, ppGipR3, pHCPhysGip)); 1995 1994 1996 1995 /* … … 2044 2043 unsigned i; 2045 2044 2046 dprintf(("SUPR0GipMap: Resumes GIP updating\n"));2045 LogFlow(("SUPR0GipMap: Resumes GIP updating\n")); 2047 2046 2048 2047 for (i = 0; i < RT_ELEMENTS(pGip->aCPUs); i++) … … 2062 2061 { 2063 2062 rc = SUPDRV_ERR_GENERAL_FAILURE; 2064 dprintf(("SUPR0GipMap: GIP is not available!\n"));2063 Log(("SUPR0GipMap: GIP is not available!\n")); 2065 2064 } 2066 2065 RTSemFastMutexRelease(pDevExt->mtxGip); … … 2077 2076 OSDBGPRINT(("SUPR0GipMap: returns %d *pHCPhysGip=%lx *ppGip=%p GipMapObjR3\n", rc, (unsigned long)HCPhys, pGip, pSession->GipMapObjR3)); 2078 2077 #else 2079 dprintf(("SUPR0GipMap: returns %d *pHCPhysGip=%lx *ppGipR3=%p\n", rc, (unsigned long)HCPhys, (void *)(uintptr_t)pGip));2078 LogFlow(("SUPR0GipMap: returns %d *pHCPhysGip=%lx *ppGipR3=%p\n", rc, (unsigned long)HCPhys, (void *)(uintptr_t)pGip)); 2080 2079 #endif 2081 2080 return rc; … … 2100 2099 pSession->GipMapObjR3)); 2101 2100 #else 2102 dprintf(("SUPR0GipUnmap: pSession=%p\n", pSession));2101 LogFlow(("SUPR0GipUnmap: pSession=%p\n", pSession)); 2103 2102 #endif 2104 2103 AssertReturn(SUP_IS_SESSION_VALID(pSession), VERR_INVALID_PARAMETER); … … 2135 2134 && !--pDevExt->cGipUsers) 2136 2135 { 2137 dprintf(("SUPR0GipUnmap: Suspends GIP updating\n"));2136 LogFlow(("SUPR0GipUnmap: Suspends GIP updating\n")); 2138 2137 #ifdef USE_NEW_OS_INTERFACE_FOR_GIP 2139 2138 rc = RTTimerStop(pDevExt->pGipTimer); AssertRC(rc); rc = 0; … … 2227 2226 if (!uPtr) 2228 2227 { 2229 dprintf(("Illegal address %p\n", (void *)uPtr));2228 Log(("Illegal address %p\n", (void *)uPtr)); 2230 2229 return VERR_INVALID_PARAMETER; 2231 2230 } … … 2272 2271 } 2273 2272 RTSpinlockRelease(pSession->Spinlock, &SpinlockTmp); 2274 dprintf(("Failed to find %p!!! (eType=%d)\n", (void *)uPtr, eType));2273 Log(("Failed to find %p!!! (eType=%d)\n", (void *)uPtr, eType)); 2275 2274 return VERR_INVALID_PARAMETER; 2276 2275 } … … 2296 2295 PSUPDRVPATCH pPatch; 2297 2296 RTSPINLOCKTMP SpinlockTmp = RTSPINLOCKTMP_INITIALIZER; 2298 dprintf(("supdrvIOCtl_IdtInstall\n"));2297 LogFlow(("supdrvIOCtl_IdtInstall\n")); 2299 2298 2300 2299 /* … … 2421 2420 RTIDTR Idtr; 2422 2421 PSUPDRVIDTE paIdt; 2423 dprintf(("supdrvIOCtl_IdtPatchOne: pPatch=%p\n", pPatch));2422 LogFlow(("supdrvIOCtl_IdtPatchOne: pPatch=%p\n", pPatch)); 2424 2423 2425 2424 /* … … 2464 2463 static int s_iWobble = 0; 2465 2464 unsigned iMax = !(s_iWobble++ % 2) ? 0x80 : 0x100; 2466 dprintf(("IDT: Idtr=%p:%#x\n", (void *)Idtr.pIdt, (unsigned)Idtr.cbIdt));2465 Log2(("IDT: Idtr=%p:%#x\n", (void *)Idtr.pIdt, (unsigned)Idtr.cbIdt)); 2467 2466 for (i = iMax - 0x80; i*16+15 < Idtr.cbIdt && i < iMax; i++) 2468 2467 { 2469 dprintf(("%#x: %04x:%08x%04x%04x P=%d DPL=%d IST=%d Type1=%#x u32Reserved=%#x u5Reserved=%#x\n",2470 2471 2472 2468 Log2(("%#x: %04x:%08x%04x%04x P=%d DPL=%d IST=%d Type1=%#x u32Reserved=%#x u5Reserved=%#x\n", 2469 i, paIdt[i].u16SegSel, paIdt[i].u32OffsetTop, paIdt[i].u16OffsetHigh, paIdt[i].u16OffsetLow, 2470 paIdt[i].u1Present, paIdt[i].u2DPL, paIdt[i].u3IST, paIdt[i].u5Type2, 2471 paIdt[i].u32Reserved, paIdt[i].u5Reserved)); 2473 2472 } 2474 2473 #endif … … 2498 2497 if (!u8Idt) 2499 2498 { 2500 dprintf(("Failed to find appropirate IDT entry!!\n"));2499 Log(("Failed to find appropirate IDT entry!!\n")); 2501 2500 return NULL; 2502 2501 } 2503 2502 } 2504 2503 pDevExt->u8Idt = u8Idt; 2505 dprintf(("supdrvIOCtl_IdtPatchOne: u8Idt=%x\n", u8Idt));2504 LogFlow(("supdrvIOCtl_IdtPatchOne: u8Idt=%x\n", u8Idt)); 2506 2505 } 2507 2506 … … 2750 2749 #if 0 2751 2750 /* dump the patch code */ 2752 dprintf(("patch code: %p\n", &pPatch->auCode[0]));2751 Log2(("patch code: %p\n", &pPatch->auCode[0])); 2753 2752 for (uFixCall.pb = &pPatch->auCode[0]; uFixCall.pb < u.pb; uFixCall.pb++) 2754 dprintf(("0x%02x,\n", *uFixCall.pb));2753 Log2(("0x%02x,\n", *uFixCall.pb)); 2755 2754 #endif 2756 2755 } … … 2784 2783 PSUPDRVPATCHUSAGE pUsage; 2785 2784 RTSPINLOCKTMP SpinlockTmp = RTSPINLOCKTMP_INITIALIZER; 2786 dprintf(("supdrvIOCtl_IdtRemoveAll: pSession=%p\n", pSession));2785 LogFlow(("supdrvIOCtl_IdtRemoveAll: pSession=%p\n", pSession)); 2787 2786 2788 2787 /* … … 2841 2840 static void supdrvIdtRemoveOne(PSUPDRVDEVEXT pDevExt, PSUPDRVPATCH pPatch) 2842 2841 { 2843 dprintf(("supdrvIdtRemoveOne: pPatch=%p\n", pPatch));2842 LogFlow(("supdrvIdtRemoveOne: pPatch=%p\n", pPatch)); 2844 2843 2845 2844 pPatch->cUsage = 0; … … 2955 2954 unsigned cb; 2956 2955 void *pv; 2957 dprintf(("supdrvIOCtl_LdrOpen: szName=%s cbImage=%d\n", pReq->u.In.szName, pReq->u.In.cbImage));2956 LogFlow(("supdrvIOCtl_LdrOpen: szName=%s cbImage=%d\n", pReq->u.In.szName, pReq->u.In.cbImage)); 2958 2957 2959 2958 /* … … 2983 2982 { 2984 2983 RTSemFastMutexRelease(pDevExt->mtxLdr); 2984 Log(("supdrvIOCtl_LdrOpen: RTMemExecAlloc(%u) failed\n", cb)); 2985 2985 return VERR_NO_MEMORY; 2986 2986 } … … 3025 3025 PSUPDRVLDRIMAGE pImage; 3026 3026 int rc; 3027 dprintf(("supdrvIOCtl_LdrLoad: pvImageBase=%p cbImage=%d\n", pReq->u.In.pvImageBase, pReq->u.In.cbImage));3027 LogFlow(("supdrvIOCtl_LdrLoad: pvImageBase=%p cbImage=%d\n", pReq->u.In.pvImageBase, pReq->u.In.cbImage)); 3028 3028 3029 3029 /* … … 3037 3037 { 3038 3038 RTSemFastMutexRelease(pDevExt->mtxLdr); 3039 dprintf(("SUP_IOCTL_LDR_LOAD: couldn't find image!\n"));3039 Log(("SUP_IOCTL_LDR_LOAD: couldn't find image!\n")); 3040 3040 return VERR_INVALID_HANDLE; 3041 3041 } … … 3044 3044 { 3045 3045 RTSemFastMutexRelease(pDevExt->mtxLdr); 3046 dprintf(("SUP_IOCTL_LDR_LOAD: image size mismatch!! %d(prep) != %d(load)\n", pImage->cbImage, pReq->u.In.cbImage));3046 Log(("SUP_IOCTL_LDR_LOAD: image size mismatch!! %d(prep) != %d(load)\n", pImage->cbImage, pReq->u.In.cbImage)); 3047 3047 return VERR_INVALID_HANDLE; 3048 3048 } … … 3066 3066 { 3067 3067 RTSemFastMutexRelease(pDevExt->mtxLdr); 3068 dprintf(("NULL pointer: pvVMMR0=%p pvVMMR0EntryInt=%p pvVMMR0EntryFast=%p pvVMMR0EntryEx=%p!\n",3069 3070 3068 Log(("NULL pointer: pvVMMR0=%p pvVMMR0EntryInt=%p pvVMMR0EntryFast=%p pvVMMR0EntryEx=%p!\n", 3069 pReq->u.In.EP.VMMR0.pvVMMR0, pReq->u.In.EP.VMMR0.pvVMMR0EntryInt, 3070 pReq->u.In.EP.VMMR0.pvVMMR0EntryFast, pReq->u.In.EP.VMMR0.pvVMMR0EntryEx)); 3071 3071 return VERR_INVALID_PARAMETER; 3072 3072 } … … 3076 3076 { 3077 3077 RTSemFastMutexRelease(pDevExt->mtxLdr); 3078 dprintf(("Out of range (%p LB %#x): pvVMMR0EntryInt=%p, pvVMMR0EntryFast=%p or pvVMMR0EntryEx=%p is NULL!\n",3079 3080 3078 Log(("Out of range (%p LB %#x): pvVMMR0EntryInt=%p, pvVMMR0EntryFast=%p or pvVMMR0EntryEx=%p is NULL!\n", 3079 pImage->pvImage, pReq->u.In.cbImage, pReq->u.In.EP.VMMR0.pvVMMR0EntryInt, 3080 pReq->u.In.EP.VMMR0.pvVMMR0EntryFast, pReq->u.In.EP.VMMR0.pvVMMR0EntryEx)); 3081 3081 return VERR_INVALID_PARAMETER; 3082 3082 } … … 3084 3084 default: 3085 3085 RTSemFastMutexRelease(pDevExt->mtxLdr); 3086 dprintf(("Invalid eEPType=%d\n", pReq->u.In.eEPType));3086 Log(("Invalid eEPType=%d\n", pReq->u.In.eEPType)); 3087 3087 return VERR_INVALID_PARAMETER; 3088 3088 } … … 3091 3091 { 3092 3092 RTSemFastMutexRelease(pDevExt->mtxLdr); 3093 dprintf(("SUP_IOCTL_LDR_LOAD: pfnModuleInit=%p is outside the image (%p %d bytes)\n",3094 3093 Log(("SUP_IOCTL_LDR_LOAD: pfnModuleInit=%p is outside the image (%p %d bytes)\n", 3094 pReq->u.In.pfnModuleInit, pImage->pvImage, pReq->u.In.cbImage)); 3095 3095 return VERR_INVALID_PARAMETER; 3096 3096 } … … 3099 3099 { 3100 3100 RTSemFastMutexRelease(pDevExt->mtxLdr); 3101 dprintf(("SUP_IOCTL_LDR_LOAD: pfnModuleTerm=%p is outside the image (%p %d bytes)\n",3102 3101 Log(("SUP_IOCTL_LDR_LOAD: pfnModuleTerm=%p is outside the image (%p %d bytes)\n", 3102 pReq->u.In.pfnModuleTerm, pImage->pvImage, pReq->u.In.cbImage)); 3103 3103 return VERR_INVALID_PARAMETER; 3104 3104 } … … 3135 3135 * On success call the module initialization. 3136 3136 */ 3137 dprintf(("supdrvIOCtl_LdrLoad: pfnModuleInit=%p\n", pImage->pfnModuleInit));3137 LogFlow(("supdrvIOCtl_LdrLoad: pfnModuleInit=%p\n", pImage->pfnModuleInit)); 3138 3138 if (RT_SUCCESS(rc) && pImage->pfnModuleInit) 3139 3139 { 3140 dprintf(("supdrvIOCtl_LdrLoad: calling pfnModuleInit=%p\n", pImage->pfnModuleInit));3140 Log(("supdrvIOCtl_LdrLoad: calling pfnModuleInit=%p\n", pImage->pfnModuleInit)); 3141 3141 rc = pImage->pfnModuleInit(); 3142 3142 if (rc && pDevExt->pvVMMR0 == pImage->pvImage) … … 3166 3166 PSUPDRVLDRUSAGE pUsage; 3167 3167 PSUPDRVLDRIMAGE pImage; 3168 dprintf(("supdrvIOCtl_LdrFree: pvImageBase=%p\n", pReq->u.In.pvImageBase));3168 LogFlow(("supdrvIOCtl_LdrFree: pvImageBase=%p\n", pReq->u.In.pvImageBase)); 3169 3169 3170 3170 /* … … 3182 3182 { 3183 3183 RTSemFastMutexRelease(pDevExt->mtxLdr); 3184 dprintf(("SUP_IOCTL_LDR_FREE: couldn't find image!\n"));3184 Log(("SUP_IOCTL_LDR_FREE: couldn't find image!\n")); 3185 3185 return VERR_INVALID_HANDLE; 3186 3186 } … … 3276 3276 void *pvSymbol = NULL; 3277 3277 int rc = VERR_GENERAL_FAILURE; 3278 dprintf2(("supdrvIOCtl_LdrGetSymbol: pvImageBase=%p szSymbol=\"%s\"\n", pReq->u.In.pvImageBase, pReq->u.In.szSymbol));3278 Log3(("supdrvIOCtl_LdrGetSymbol: pvImageBase=%p szSymbol=\"%s\"\n", pReq->u.In.pvImageBase, pReq->u.In.szSymbol)); 3279 3279 3280 3280 /* … … 3288 3288 { 3289 3289 RTSemFastMutexRelease(pDevExt->mtxLdr); 3290 dprintf(("SUP_IOCTL_LDR_GET_SYMBOL: couldn't find image!\n"));3290 Log(("SUP_IOCTL_LDR_GET_SYMBOL: couldn't find image!\n")); 3291 3291 return VERR_INVALID_HANDLE; 3292 3292 } … … 3296 3296 unsigned uState = pImage->uState; 3297 3297 RTSemFastMutexRelease(pDevExt->mtxLdr); 3298 dprintf(("SUP_IOCTL_LDR_GET_SYMBOL: invalid image state %d (%#x)!\n", uState, uState)); NOREF(uState);3298 Log(("SUP_IOCTL_LDR_GET_SYMBOL: invalid image state %d (%#x)!\n", uState, uState)); NOREF(uState); 3299 3299 return VERR_ALREADY_LOADED; 3300 3300 } … … 3338 3338 { 3339 3339 int rc = VINF_SUCCESS; 3340 dprintf(("supdrvLdrSetR0EP pvVMMR0=%p pvVMMR0EntryInt=%p\n", pvVMMR0, pvVMMR0EntryInt));3340 LogFlow(("supdrvLdrSetR0EP pvVMMR0=%p pvVMMR0EntryInt=%p\n", pvVMMR0, pvVMMR0EntryInt)); 3341 3341 3342 3342 … … 3427 3427 { 3428 3428 PSUPDRVLDRUSAGE pUsage; 3429 dprintf(("supdrvLdrAddUsage: pImage=%p\n", pImage));3429 LogFlow(("supdrvLdrAddUsage: pImage=%p\n", pImage)); 3430 3430 3431 3431 /* … … 3470 3470 { 3471 3471 PSUPDRVLDRIMAGE pImagePrev; 3472 dprintf(("supdrvLdrFree: pImage=%p\n", pImage));3472 LogFlow(("supdrvLdrFree: pImage=%p\n", pImage)); 3473 3473 3474 3474 /* find it - arg. should've used doubly linked list. */ … … 3515 3515 && pImage->uState == SUP_IOCTL_LDR_LOAD) 3516 3516 { 3517 dprintf(("supdrvIOCtl_LdrLoad: calling pfnModuleTerm=%p\n", pImage->pfnModuleTerm));3517 LogFlow(("supdrvIOCtl_LdrLoad: calling pfnModuleTerm=%p\n", pImage->pfnModuleTerm)); 3518 3518 pImage->pfnModuleTerm(); 3519 3519 } … … 3621 3621 int rc; 3622 3622 3623 dprintf(("supdrvGipCreate:\n"));3623 LogFlow(("supdrvGipCreate:\n")); 3624 3624 3625 3625 /* assert order */ … … 3761 3761 OSDBGPRINT(("supdrvGipInit: pGip=%p HCPhys=%lx u64NanoTS=%llu uUpdateHz=%d\n", pGip, (long)HCPhys, u64NanoTS, uUpdateHz)); 3762 3762 #else 3763 dprintf(("supdrvGipInit: pGip=%p HCPhys=%lx u64NanoTS=%llu uUpdateHz=%d\n", pGip, (long)HCPhys, u64NanoTS, uUpdateHz));3763 LogFlow(("supdrvGipInit: pGip=%p HCPhys=%lx u64NanoTS=%llu uUpdateHz=%d\n", pGip, (long)HCPhys, u64NanoTS, uUpdateHz)); 3764 3764 #endif 3765 3765
Note:
See TracChangeset
for help on using the changeset viewer.