VirtualBox

Changeset 13071 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 8, 2008 12:07:55 PM (16 years ago)
Author:
vboxsync
Message:

PGM: Fixed some raw-mode regressions introduced in r37532.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/PGMAll.cpp

    r13067 r13071  
    17671767VMMDECL(int) PGMDynMapGCPage(PVM pVM, RTGCPHYS GCPhys, void **ppv)
    17681768{
    1769     AssertMsg(!(GCPhys & PAGE_OFFSET_MASK), ("GCPhys=%VGp\n", GCPhys));
     1769    AssertMsg(!(GCPhys & PAGE_OFFSET_MASK), ("GCPhys=%RGp\n", GCPhys));
    17701770
    17711771    /*
     
    17771777    if (!pRam)
    17781778    {
    1779         AssertMsgFailed(("Invalid physical address %VGp!\n", GCPhys));
     1779        AssertMsgFailed(("Invalid physical address %RGp!\n", GCPhys));
    17801780        return VERR_PGM_INVALID_GC_PHYSICAL_ADDRESS;
    17811781    }
     
    18231823     */
    18241824    RTHCPHYS HCPhys = PGM_PAGE_GET_HCPHYS(&pRam->aPages[(GCPhys - pRam->GCPhys) >> PAGE_SHIFT]);
    1825     return PGMDynMapHCPageOff(pVM, HCPhys, ppv);
     1825    int rc = PGMDynMapHCPhys(pVM, HCPhys, ppv);
     1826    if (RT_SUCCESS(rc))
     1827        *ppv = (void *)((uintptr_t)*ppv | (GCPhys & PAGE_OFFSET_MASK));
     1828    return rc;
    18261829}
    18271830
     
    18361839 * @param   pVM         VM handle.
    18371840 * @param   HCPhys      HC Physical address of the page.
    1838  * @param   ppv         Where to store the address of the mapping.
     1841 * @param   ppv         Where to store the address of the mapping. This is the
     1842 *                      address of the PAGE not the exact address corresponding
     1843 *                      to HCPhys. Use PGMDynMapHCPageOff if you care for the
     1844 *                      page offset.
    18391845 */
    18401846VMMDECL(int) PGMDynMapHCPage(PVM pVM, RTHCPHYS HCPhys, void **ppv)
    18411847{
    1842     AssertMsg(!(HCPhys & PAGE_OFFSET_MASK), ("HCPhys=%VHp\n", HCPhys));
     1848    AssertMsg(!(HCPhys & PAGE_OFFSET_MASK), ("HCPhys=%RHp\n", HCPhys));
    18431849# ifdef IN_GC
    18441850
     
    19131919VMMDECL(int) PGMDynMapHCPageOff(PVM pVM, RTHCPHYS HCPhys, void **ppv)
    19141920{
    1915     int rc = PGMDynMapHCPage(pVM, HCPhys, ppv);
     1921    int rc = PGMDynMapHCPage(pVM, HCPhys & ~(RTHCPHYS)PAGE_OFFSET_MASK, ppv);
    19161922    if (RT_SUCCESS(rc))
    19171923        *ppv = (void *)((uintptr_t)*ppv | (HCPhys & PAGE_OFFSET_MASK));
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