VirtualBox

Changeset 13035 in vbox for trunk/src/VBox/VMM/PGMPhys.cpp


Ignore:
Timestamp:
Oct 7, 2008 9:54:32 AM (16 years ago)
Author:
vboxsync
Message:

#1865: More PGM...

File:
1 edited

Legend:

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

    r12989 r13035  
    9898    pNew->pNextR3 = pRam;
    9999    pNew->pNextR0 = pRam ? MMHyperCCToR0(pVM, pRam) : NIL_RTR0PTR;
    100     pNew->pNextGC = pRam ? MMHyperCCToRC(pVM, pRam) : NIL_RTGCPTR;
     100    pNew->pNextRC = pRam ? MMHyperCCToRC(pVM, pRam) : NIL_RTRCPTR;
    101101
    102102    if (pPrev)
     
    104104        pPrev->pNextR3 = pNew;
    105105        pPrev->pNextR0 = MMHyperCCToR0(pVM, pNew);
    106         pPrev->pNextGC = MMHyperCCToRC(pVM, pNew);
     106        pPrev->pNextRC = MMHyperCCToRC(pVM, pNew);
    107107    }
    108108    else
     
    110110        pVM->pgm.s.pRamRangesR3 = pNew;
    111111        pVM->pgm.s.pRamRangesR0 = MMHyperCCToR0(pVM, pNew);
    112         pVM->pgm.s.pRamRangesGC = MMHyperCCToRC(pVM, pNew);
     112        pVM->pgm.s.pRamRangesRC = MMHyperCCToRC(pVM, pNew);
    113113    }
    114114
     
    135135        pPrev->pNextR3 = pNext;
    136136        pPrev->pNextR0 = pNext ? MMHyperCCToR0(pVM, pNext) : NIL_RTR0PTR;
    137         pPrev->pNextGC = pNext ? MMHyperCCToRC(pVM, pNext) : NIL_RTGCPTR;
     137        pPrev->pNextRC = pNext ? MMHyperCCToRC(pVM, pNext) : NIL_RTRCPTR;
    138138    }
    139139    else
     
    142142        pVM->pgm.s.pRamRangesR3 = pNext;
    143143        pVM->pgm.s.pRamRangesR0 = pNext ? MMHyperCCToR0(pVM, pNext) : NIL_RTR0PTR;
    144         pVM->pgm.s.pRamRangesGC = pNext ? MMHyperCCToRC(pVM, pNext) : NIL_RTGCPTR;
     144        pVM->pgm.s.pRamRangesRC = pNext ? MMHyperCCToRC(pVM, pNext) : NIL_RTRCPTR;
    145145    }
    146146
     
    244244    pNew->fFlags        = 0;
    245245
    246     pNew->pvHC          = NULL;
     246    pNew->pvR3          = NULL;
    247247    pNew->pavHCChunkHC  = NULL;
    248248    pNew->pavHCChunkGC  = 0;
     
    343343                        }
    344344                        else
    345                             ASMMemZero32((char *)pRam->pvHC + (iPage << PAGE_SHIFT), PAGE_SIZE);
     345                            ASMMemZero32((char *)pRam->pvR3 + (iPage << PAGE_SHIFT), PAGE_SIZE);
    346346                        break;
    347347#else /* VBOX_WITH_NEW_PHYS_CODE */
     
    489489        pNew->fFlags        = 0; /* Some MMIO flag here? */
    490490
    491         pNew->pvHC          = NULL;
     491        pNew->pvR3          = NULL;
    492492        pNew->pavHCChunkHC  = NULL;
    493493        pNew->pavHCChunkGC  = 0;
     
    701701            //pNew->RamRange.fFlags = 0;
    702702
    703             pNew->RamRange.pvHC = pvPages;      ///@todo remove this
    704             pNew->RamRange.pavHCChunkHC = NULL; ///@todo remove this
    705             pNew->RamRange.pavHCChunkGC = 0;    ///@todo remove this
     703            pNew->RamRange.pvR3 = pvPages;      ///@todo remove this [new phys code]
     704            pNew->RamRange.pavHCChunkHC = NULL; ///@todo remove this [new phys code]
     705            pNew->RamRange.pavHCChunkGC = 0;    ///@todo remove this [new phys code]
    706706
    707707            uint32_t iPage = cPages;
     
    12531253                pRamNew->cb            = cb;
    12541254                pRamNew->fFlags        = 0;
    1255                 pRamNew->pvHC          = NULL;
     1255                pRamNew->pvR3          = NULL;
    12561256
    12571257                PPGMPAGE pPage = &pRamNew->aPages[0];
     
    13441344                    pRomNew->pNextR3 = pRom;
    13451345                    pRomNew->pNextR0 = pRom ? MMHyperCCToR0(pVM, pRom) : NIL_RTR0PTR;
    1346                     pRomNew->pNextGC = pRom ? MMHyperCCToRC(pVM, pRom) : NIL_RTGCPTR;
     1346                    pRomNew->pNextGC = pRom ? MMHyperCCToRC(pVM, pRom) : NIL_RTRCPTR;
    13471347
    13481348                    if (pRomPrev)
     
    17291729    size_t          cbRam = RT_OFFSETOF(PGMRAMRANGE, aPages[cb >> PAGE_SHIFT]);
    17301730    PPGMRAMRANGE    pNew;
    1731     RTGCPTR         GCPtrNew;
     1731    RTRCPTR         RCPtrNew;
    17321732    int             rc = VERR_NO_MEMORY;
    17331733    if (cbRam > PAGE_SIZE / 2)
     
    17371737        if (VBOX_SUCCESS(rc))
    17381738        {
     1739            RTGCPTR GCPtrNew;
    17391740            rc = MMR3HyperMapHCRam(pVM, pNew, cbRam, true,
    17401741                                   MMR3HeapAPrintf(pVM, MM_TAG_PGM_PHYS, "ram range (%s)", pszDesc),
     
    17421743            if (VBOX_SUCCESS(rc))
    17431744            {
    1744                 Assert(MMHyperHC2GC(pVM, pNew) == GCPtrNew);
     1745                RCPtrNew = GCPtrNew;
     1746                Assert(MMHyperR3ToRC(pVM, pNew) == GCPtrNew && RCPtrNew == GCPtrNew);
    17451747                rc = MMR3HyperReserve(pVM, PAGE_SIZE, "fence", NULL);
    17461748            }
     
    17601762        rc = MMHyperAlloc(pVM, cbRam, 16, MM_TAG_PGM, (void **)&pNew);
    17611763        if (VBOX_SUCCESS(rc))
    1762             GCPtrNew = MMHyperHC2GC(pVM, pNew);
     1764            RCPtrNew = MMHyperR3ToRC(pVM, pNew);
    17631765        else
    17641766            AssertMsgFailed(("MMHyperAlloc(,%#x,,,) -> %Vrc\n", cbRam, cb));
     
    17691771         * Initialize the range.
    17701772         */
    1771         pNew->pvHC          = pvRam;
     1773        pNew->pvR3          = pvRam;
    17721774        pNew->GCPhys        = GCPhys;
    17731775        pNew->GCPhysLast    = GCPhysLast;
     
    18211823        pNew->pNextR3 = pCur;
    18221824        pNew->pNextR0 = pCur ? MMHyperCCToR0(pVM, pCur) : NIL_RTR0PTR;
    1823         pNew->pNextGC = pCur ? MMHyperCCToRC(pVM, pCur) : NIL_RTGCPTR;
     1825        pNew->pNextRC = pCur ? MMHyperCCToRC(pVM, pCur) : NIL_RTRCPTR;
    18241826        if (pPrev)
    18251827        {
    18261828            pPrev->pNextR3 = pNew;
    18271829            pPrev->pNextR0 = MMHyperCCToR0(pVM, pNew);
    1828             pPrev->pNextGC = GCPtrNew;
     1830            pPrev->pNextRC = RCPtrNew;
    18291831        }
    18301832        else
     
    18321834            pVM->pgm.s.pRamRangesR3 = pNew;
    18331835            pVM->pgm.s.pRamRangesR0 = MMHyperCCToR0(pVM, pNew);
    1834             pVM->pgm.s.pRamRangesGC = GCPtrNew;
     1836            pVM->pgm.s.pRamRangesRC = RCPtrNew;
    18351837        }
    18361838        pgmUnlock(pVM);
     
    18881890     * Find existing range location.
    18891891     */
    1890     PPGMRAMRANGE pRam = CTXALLSUFF(pVM->pgm.s.pRamRanges);
     1892    PPGMRAMRANGE pRam = pVM->pgm.s.CTX_SUFF(pRamRanges);
    18911893    while (pRam)
    18921894    {
     
    18961898            break;
    18971899
    1898         pRam = CTXALLSUFF(pRam->pNext);
     1900        pRam = pRam->CTX_SUFF(pNext);
    18991901    }
    19001902    AssertReturn(pRam, VERR_PGM_INVALID_GC_PHYSICAL_ADDRESS);
     
    19331935    pgmLock(pVM);
    19341936
    1935     PPGMRAMRANGE pRam = CTXALLSUFF(pVM->pgm.s.pRamRanges);
     1937    PPGMRAMRANGE pRam = pVM->pgm.s.CTX_SUFF(pRamRanges);
    19361938    while (pRam)
    19371939    {
     
    19531955        }
    19541956
    1955         pRam = CTXALLSUFF(pRam->pNext);
     1957        pRam = pRam->CTX_SUFF(pNext);
    19561958    }
    19571959    pgmUnlock(pVM);
     
    20682070     * Lookup the range.
    20692071     */
    2070     PPGMRAMRANGE    pRam = CTXALLSUFF(pVM->pgm.s.pRamRanges);
     2072    PPGMRAMRANGE    pRam = pVM->pgm.s.CTX_SUFF(pRamRanges);
    20712073    while (pRam && GCPhys > pRam->GCPhysLast)
    2072         pRam = CTXALLSUFF(pRam->pNext);
     2074        pRam = pRam->CTX_SUFF(pNext);
    20732075    if (    !pRam
    20742076        ||  GCPhys > pRam->GCPhysLast
Note: See TracChangeset for help on using the changeset viewer.

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