Changeset 20687 in vbox
- Timestamp:
- Jun 18, 2009 11:52:23 AM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 48792
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/IOM.cpp
r20087 r20687 1398 1398 * (PGM requires this.) 1399 1399 */ 1400 if (pDevIns->iInstance > 0) 1400 if (pDevIns->iInstance > 0) /** @todo Move to PDMDevHlp.cpp and use a string cache. */ 1401 1401 { 1402 1402 pszDesc = MMR3HeapAPrintf(pVM, MM_TAG_IOM, "%s [%u]", pszDesc, pDevIns->iInstance); -
trunk/src/VBox/VMM/PDMDevHlp.cpp
r20153 r20687 72 72 VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3); 73 73 74 #if 0 /** @todo needs a real string cache for this */ 75 if (pDevIns->iInstance > 0) 76 { 77 char *pszDesc2 = MMR3HeapAPrintf(pVM, MM_TAG_PDM_DEVICE_DESC, "%s [%u]", pszDesc, pDevIns->iInstance); 78 if (pszDesc2) 79 pszDesc = pszDesc2; 80 } 81 #endif 82 74 83 int rc = IOMR3IOPortRegisterR3(pDevIns->Internal.s.pVMR3, pDevIns, Port, cPorts, pvUser, pfnOut, pfnIn, pfnOutStr, pfnInStr, pszDesc); 75 84 … … 122 131 123 132 if (RT_SUCCESS(rc)) 133 { 134 #if 0 /** @todo needs a real string cache for this */ 135 if (pDevIns->iInstance > 0) 136 { 137 char *pszDesc2 = MMR3HeapAPrintf(pVM, MM_TAG_PDM_DEVICE_DESC, "%s [%u]", pszDesc, pDevIns->iInstance); 138 if (pszDesc2) 139 pszDesc = pszDesc2; 140 } 141 #endif 142 124 143 rc = IOMR3IOPortRegisterRC(pDevIns->Internal.s.pVMR3, pDevIns, Port, cPorts, pvUser, RCPtrOut, RCPtrIn, RCPtrOutStr, RCPtrInStr, pszDesc); 144 } 125 145 } 126 146 else … … 178 198 179 199 if (RT_SUCCESS(rc)) 200 { 201 #if 0 /** @todo needs a real string cache for this */ 202 if (pDevIns->iInstance > 0) 203 { 204 char *pszDesc2 = MMR3HeapAPrintf(pVM, MM_TAG_PDM_DEVICE_DESC, "%s [%u]", pszDesc, pDevIns->iInstance); 205 if (pszDesc2) 206 pszDesc = pszDesc2; 207 } 208 #endif 209 180 210 rc = IOMR3IOPortRegisterR0(pDevIns->Internal.s.pVMR3, pDevIns, Port, cPorts, pvUser, pfnR0PtrOut, pfnR0PtrIn, pfnR0PtrOutStr, pfnR0PtrInStr, pszDesc); 211 } 181 212 } 182 213 else … … 216 247 pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, GCPhysStart, cbRange, pvUser, pfnWrite, pfnRead, pfnFill, pszDesc, pszDesc)); 217 248 249 /** @todo IOMR3MMIORegisterR3 mangles the description, move it here. */ 218 250 int rc = IOMR3MMIORegisterR3(pDevIns->Internal.s.pVMR3, pDevIns, GCPhysStart, cbRange, pvUser, pfnWrite, pfnRead, pfnFill, pszDesc); 219 251 … … 232 264 LogFlow(("pdmR3DevHlp_MMIORegisterGC: caller='%s'/%d: GCPhysStart=%RGp cbRange=%#x pvUser=%p pszWrite=%p:{%s} pszRead=%p:{%s} pszFill=%p:{%s}\n", 233 265 pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, GCPhysStart, cbRange, pvUser, pszWrite, pszWrite, pszRead, pszRead, pszFill, pszFill)); 266 267 /** @todo pszDesc is unused here, drop it. */ 234 268 235 269 /* … … 287 321 LogFlow(("pdmR3DevHlp_MMIORegisterHC: caller='%s'/%d: GCPhysStart=%RGp cbRange=%#x pvUser=%p pszWrite=%p:{%s} pszRead=%p:{%s} pszFill=%p:{%s}\n", 288 322 pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, GCPhysStart, cbRange, pvUser, pszWrite, pszWrite, pszRead, pszRead, pszFill, pszFill)); 323 324 /** @todo pszDesc is unused here, remove it. */ 289 325 290 326 /* … … 354 390 pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, GCPhysStart, cbRange, pvBinary, fFlags, pszDesc, pszDesc)); 355 391 392 /** @todo can we mangle pszDesc? */ 356 393 int rc = PGMR3PhysRomRegister(pDevIns->Internal.s.pVMR3, pDevIns, GCPhysStart, cbRange, pvBinary, fFlags, pszDesc); 357 394 … … 384 421 { 385 422 PDMDEV_ASSERT_DEVINS(pDevIns); 386 VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3); 423 PVM pVM = pDevIns->Internal.s.pVMR3; 424 VM_ASSERT_EMT(pVM); 387 425 LogFlow(("pdmR3DevHlp_TMTimerCreate: caller='%s'/%d: enmClock=%d pfnCallback=%p pvUser=%p fFlags=%#x pszDesc=%p:{%s} ppTimer=%p\n", 388 426 pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, enmClock, pfnCallback, pvUser, fFlags, pszDesc, pszDesc, ppTimer)); 389 427 390 391 int rc = TMR3TimerCreateDevice(pDevIns->Internal.s.pVMR3, pDevIns, enmClock, pfnCallback, pvUser, fFlags, pszDesc, ppTimer); 428 if (pDevIns->iInstance > 0) /** @todo use a string cache here later. */ 429 { 430 char *pszDesc2 = MMR3HeapAPrintf(pVM, MM_TAG_PDM_DEVICE_DESC, "%s [%u]", pszDesc, pDevIns->iInstance); 431 if (pszDesc2) 432 pszDesc = pszDesc2; 433 } 434 435 int rc = TMR3TimerCreateDevice(pVM, pDevIns, enmClock, pfnCallback, pvUser, fFlags, pszDesc, ppTimer); 392 436 393 437 LogFlow(("pdmR3DevHlp_TMTimerCreate: caller='%s'/%d: returns %Rrc\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, rc)); … … 2529 2573 pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, iRegion, cb, fFlags, ppv, pszDesc, pszDesc)); 2530 2574 2575 /** @todo PGMR3PhysMMIO2Register mangles the description, move it here and 2576 * use a real string cache. */ 2531 2577 int rc = PGMR3PhysMMIO2Register(pDevIns->Internal.s.pVMR3, pDevIns, iRegion, cb, fFlags, ppv, pszDesc); 2532 2578 … … 2596 2642 { 2597 2643 PDMDEV_ASSERT_DEVINS(pDevIns); 2598 VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3); 2644 PVM pVM = pDevIns->Internal.s.pVMR3; 2645 VM_ASSERT_EMT(pVM); 2599 2646 LogFlow(("pdmR3DevHlp_MMHyperMapMMIO2: caller='%s'/%d: iRegion=#x off=%RGp cb=%RGp pszDesc=%p:{%s} pRCPtr=%p\n", 2600 2647 pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, iRegion, off, cb, pszDesc, pszDesc, pRCPtr)); 2601 2648 2602 int rc = MMR3HyperMapMMIO2(pDevIns->Internal.s.pVMR3, pDevIns, iRegion, off, cb, pszDesc, pRCPtr); 2649 if (pDevIns->iInstance > 0) 2650 { 2651 char *pszDesc2 = MMR3HeapAPrintf(pVM, MM_TAG_PDM_DEVICE_DESC, "%s [%u]", pszDesc, pDevIns->iInstance); 2652 if (pszDesc2) 2653 pszDesc = pszDesc2; 2654 } 2655 2656 int rc = MMR3HyperMapMMIO2(pVM, pDevIns, iRegion, off, cb, pszDesc, pRCPtr); 2603 2657 2604 2658 LogFlow(("pdmR3DevHlp_MMHyperMapMMIO2: caller='%s'/%d: returns %Rrc *pRCPtr=%RRv\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, rc, *pRCPtr)); … … 2614 2668 { 2615 2669 PDMDEV_ASSERT_DEVINS(pDevIns); 2616 VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3); 2670 PVM pVM = pDevIns->Internal.s.pVMR3; 2671 VM_ASSERT_EMT(pVM); 2617 2672 LogFlow(("pdmR3DevHlp_MMIO2MapKernel: caller='%s'/%d: iRegion=#x off=%RGp cb=%RGp pszDesc=%p:{%s} pR0Ptr=%p\n", 2618 2673 pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, iRegion, off, cb, pszDesc, pszDesc, pR0Ptr)); 2619 2674 2620 int rc = PGMR3PhysMMIO2MapKernel(pDevIns->Internal.s.pVMR3, pDevIns, iRegion, off, cb, pszDesc, pR0Ptr); 2675 if (pDevIns->iInstance > 0) 2676 { 2677 char *pszDesc2 = MMR3HeapAPrintf(pVM, MM_TAG_PDM_DEVICE_DESC, "%s [%u]", pszDesc, pDevIns->iInstance); 2678 if (pszDesc2) 2679 pszDesc = pszDesc2; 2680 } 2681 2682 int rc = PGMR3PhysMMIO2MapKernel(pVM, pDevIns, iRegion, off, cb, pszDesc, pR0Ptr); 2621 2683 2622 2684 LogFlow(("pdmR3DevHlp_MMIO2MapKernel: caller='%s'/%d: returns %Rrc *pR0Ptr=%RHv\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, rc, *pR0Ptr)); -
trunk/src/VBox/VMM/PGMPhys.cpp
r20404 r20687 1545 1545 * For the 2nd+ instance, mangle the description string so it's unique. 1546 1546 */ 1547 if (pDevIns->iInstance > 0) 1547 if (pDevIns->iInstance > 0) /** @todo Move to PDMDevHlp.cpp and use a real string cache. */ 1548 1548 { 1549 1549 pszDesc = MMR3HeapAPrintf(pVM, MM_TAG_PGM_PHYS, "%s [%u]", pszDesc, pDevIns->iInstance);
Note:
See TracChangeset
for help on using the changeset viewer.