VirtualBox

Changeset 20687 in vbox


Ignore:
Timestamp:
Jun 18, 2009 11:52:23 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
48792
Message:

VMM: some description string mangling and todos.

Location:
trunk/src/VBox/VMM
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/IOM.cpp

    r20087 r20687  
    13981398     * (PGM requires this.)
    13991399     */
    1400     if (pDevIns->iInstance > 0)
     1400    if (pDevIns->iInstance > 0) /** @todo Move to PDMDevHlp.cpp and use a string cache. */
    14011401    {
    14021402        pszDesc = MMR3HeapAPrintf(pVM, MM_TAG_IOM, "%s [%u]", pszDesc, pDevIns->iInstance);
  • trunk/src/VBox/VMM/PDMDevHlp.cpp

    r20153 r20687  
    7272    VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3);
    7373
     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
    7483    int rc = IOMR3IOPortRegisterR3(pDevIns->Internal.s.pVMR3, pDevIns, Port, cPorts, pvUser, pfnOut, pfnIn, pfnOutStr, pfnInStr, pszDesc);
    7584
     
    122131
    123132        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
    124143            rc = IOMR3IOPortRegisterRC(pDevIns->Internal.s.pVMR3, pDevIns, Port, cPorts, pvUser, RCPtrOut, RCPtrIn, RCPtrOutStr, RCPtrInStr, pszDesc);
     144        }
    125145    }
    126146    else
     
    178198
    179199        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
    180210            rc = IOMR3IOPortRegisterR0(pDevIns->Internal.s.pVMR3, pDevIns, Port, cPorts, pvUser, pfnR0PtrOut, pfnR0PtrIn, pfnR0PtrOutStr, pfnR0PtrInStr, pszDesc);
     211        }
    181212    }
    182213    else
     
    216247             pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, GCPhysStart, cbRange, pvUser, pfnWrite, pfnRead, pfnFill, pszDesc, pszDesc));
    217248
     249/** @todo IOMR3MMIORegisterR3 mangles the description, move it here. */
    218250    int rc = IOMR3MMIORegisterR3(pDevIns->Internal.s.pVMR3, pDevIns, GCPhysStart, cbRange, pvUser, pfnWrite, pfnRead, pfnFill, pszDesc);
    219251
     
    232264    LogFlow(("pdmR3DevHlp_MMIORegisterGC: caller='%s'/%d: GCPhysStart=%RGp cbRange=%#x pvUser=%p pszWrite=%p:{%s} pszRead=%p:{%s} pszFill=%p:{%s}\n",
    233265             pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, GCPhysStart, cbRange, pvUser, pszWrite, pszWrite, pszRead, pszRead, pszFill, pszFill));
     266
     267/** @todo pszDesc is unused here, drop it.  */
    234268
    235269    /*
     
    287321    LogFlow(("pdmR3DevHlp_MMIORegisterHC: caller='%s'/%d: GCPhysStart=%RGp cbRange=%#x pvUser=%p pszWrite=%p:{%s} pszRead=%p:{%s} pszFill=%p:{%s}\n",
    288322             pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, GCPhysStart, cbRange, pvUser, pszWrite, pszWrite, pszRead, pszRead, pszFill, pszFill));
     323
     324/** @todo pszDesc is unused here, remove it.  */
    289325
    290326    /*
     
    354390             pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, GCPhysStart, cbRange, pvBinary, fFlags, pszDesc, pszDesc));
    355391
     392/** @todo can we mangle pszDesc? */
    356393    int rc = PGMR3PhysRomRegister(pDevIns->Internal.s.pVMR3, pDevIns, GCPhysStart, cbRange, pvBinary, fFlags, pszDesc);
    357394
     
    384421{
    385422    PDMDEV_ASSERT_DEVINS(pDevIns);
    386     VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3);
     423    PVM pVM = pDevIns->Internal.s.pVMR3;
     424    VM_ASSERT_EMT(pVM);
    387425    LogFlow(("pdmR3DevHlp_TMTimerCreate: caller='%s'/%d: enmClock=%d pfnCallback=%p pvUser=%p fFlags=%#x pszDesc=%p:{%s} ppTimer=%p\n",
    388426             pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, enmClock, pfnCallback, pvUser, fFlags, pszDesc, pszDesc, ppTimer));
    389427
    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);
    392436
    393437    LogFlow(("pdmR3DevHlp_TMTimerCreate: caller='%s'/%d: returns %Rrc\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, rc));
     
    25292573             pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, iRegion, cb, fFlags, ppv, pszDesc, pszDesc));
    25302574
     2575/** @todo PGMR3PhysMMIO2Register mangles the description, move it here and
     2576 *        use a real string cache. */
    25312577    int rc = PGMR3PhysMMIO2Register(pDevIns->Internal.s.pVMR3, pDevIns, iRegion, cb, fFlags, ppv, pszDesc);
    25322578
     
    25962642{
    25972643    PDMDEV_ASSERT_DEVINS(pDevIns);
    2598     VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3);
     2644    PVM pVM = pDevIns->Internal.s.pVMR3;
     2645    VM_ASSERT_EMT(pVM);
    25992646    LogFlow(("pdmR3DevHlp_MMHyperMapMMIO2: caller='%s'/%d: iRegion=#x off=%RGp cb=%RGp pszDesc=%p:{%s} pRCPtr=%p\n",
    26002647             pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, iRegion, off, cb, pszDesc, pszDesc, pRCPtr));
    26012648
    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);
    26032657
    26042658    LogFlow(("pdmR3DevHlp_MMHyperMapMMIO2: caller='%s'/%d: returns %Rrc *pRCPtr=%RRv\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, rc, *pRCPtr));
     
    26142668{
    26152669    PDMDEV_ASSERT_DEVINS(pDevIns);
    2616     VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3);
     2670    PVM pVM = pDevIns->Internal.s.pVMR3;
     2671    VM_ASSERT_EMT(pVM);
    26172672    LogFlow(("pdmR3DevHlp_MMIO2MapKernel: caller='%s'/%d: iRegion=#x off=%RGp cb=%RGp pszDesc=%p:{%s} pR0Ptr=%p\n",
    26182673             pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, iRegion, off, cb, pszDesc, pszDesc, pR0Ptr));
    26192674
    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);
    26212683
    26222684    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  
    15451545     * For the 2nd+ instance, mangle the description string so it's unique.
    15461546     */
    1547     if (pDevIns->iInstance > 0)
     1547    if (pDevIns->iInstance > 0) /** @todo Move to PDMDevHlp.cpp and use a real string cache. */
    15481548    {
    15491549        pszDesc = MMR3HeapAPrintf(pVM, MM_TAG_PGM_PHYS, "%s [%u]", pszDesc, pDevIns->iInstance);
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette