VirtualBox

Changeset 17251 in vbox for trunk


Ignore:
Timestamp:
Mar 2, 2009 1:55:31 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
43584
Message:

VMM,REM,DevPcArch: VBOX_WITH_NEW_PHYS_CODE changes.

Location:
trunk
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/mm.h

    r14597 r17251  
    4444 */
    4545
     46#ifndef VBOX_WITH_NEW_PHYS_CODE
    4647/** @name RAM Page Flags
    4748 * Since internal ranges have a byte granularity it's possible for a
     
    5354 * @{
    5455 */
    55 #if 1
    5656/** Reserved - Not RAM, ROM nor MMIO2.
    5757 * If this bit is cleared the memory is assumed to be some kind of RAM.
     
    8282 */
    8383#define MM_RAM_FLAGS_MMIO2              RT_BIT(3)
    84 #endif
    85 
    86 #ifndef VBOX_WITH_NEW_PHYS_CODE
     84
    8785/** Physical backing memory is allocated dynamically. Not set implies a one time static allocation. */
    8886#define MM_RAM_FLAGS_DYNAMIC_ALLOC      RT_BIT(11)
    89 #endif /* !VBOX_WITH_NEW_PHYS_CODE */
    9087
    9188/** The shift used to get the reference count. */
     
    107104/** @} */
    108105
    109 #ifndef VBOX_WITH_NEW_PHYS_CODE
    110106/** @name MMR3PhysRegisterEx registration type
    111107 * @{
     
    121117} MMPHYSREG;
    122118/** @} */
    123 #endif
     119#endif /* !VBOX_WITH_NEW_PHYS_CODE */
    124120
    125121/**
     
    353349 * @ingroup grp_mm_r3
    354350 * @{ */
     351#ifndef VBOX_WITH_NEW_PHYS_CODE
    355352VMMR3DECL(int)      MMR3PhysRegister(PVM pVM, void *pvRam, RTGCPHYS GCPhys, unsigned cb, unsigned fFlags, const char *pszDesc);
    356 #ifndef VBOX_WITH_NEW_PHYS_CODE
    357353VMMR3DECL(int)      MMR3PhysRegisterEx(PVM pVM, void *pvRam, RTGCPHYS GCPhys, unsigned cb, unsigned fFlags, MMPHYSREG enmType, const char *pszDesc);
    358 #endif
    359354VMMR3DECL(int)      MMR3PhysRomRegister(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTUINT cbRange, const void *pvBinary, bool fShadow, const char *pszDesc);
    360355VMMR3DECL(int)      MMR3PhysRomProtect(PVM pVM, RTGCPHYS GCPhys, RTUINT cbRange);
    361356VMMR3DECL(int)      MMR3PhysReserve(PVM pVM, RTGCPHYS GCPhys, RTUINT cbRange, const char *pszDesc);
     357#endif
    362358VMMR3DECL(uint64_t) MMR3PhysGetRamSize(PVM pVM);
    363359/** @} */
  • trunk/include/VBox/pdmdev.h

    r16021 r17251  
    4141#include <VBox/cfgm.h>
    4242#include <VBox/dbgf.h>
    43 #include <VBox/mm.h>
     43#ifndef VBOX_WITH_NEW_PHYS_CODE
     44# include <VBox/mm.h>
     45#endif
    4446#include <VBox/err.h>
    4547#include <VBox/pci.h>
     
    26602662
    26612663    /**
    2662      * Write protects a shadow ROM mapping.
    2663      *
    2664      * This is intented for use by the system BIOS or by the device that
    2665      * employs a shadow ROM BIOS, so that the shadow ROM mapping can be
    2666      * write protected once the POST is over.
     2664     * Changes the protection of shadowed ROM mapping.
     2665     *
     2666     * This is intented for use by the system BIOS, chipset or device in question to
     2667     * change the protection of shadowed ROM code after init and on reset.
    26672668     *
    26682669     * @param   pDevIns     Device instance.
    2669      * @param   GCPhysStart Where the shadow ROM mapping starts.
    2670      * @param   cbRange     The size of the shadow ROM mapping.
    2671      */
    2672     DECLR3CALLBACKMEMBER(int, pfnROMProtectShadow,(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINT cbRange));
     2670     * @param   GCPhysStart Where the mapping starts.
     2671     * @param   cbRange     The size of the mapping.
     2672     * @param   enmProt     The new protection type.
     2673     */
     2674    DECLR3CALLBACKMEMBER(int, pfnROMProtectShadow,(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINT cbRange, PGMROMPROT enmProt));
    26732675
    26742676    /**
     
    32943296 * @copydoc PDMDEVHLPR3::pfnROMProtectShadow
    32953297 */
    3296 DECLINLINE(int) PDMDevHlpROMProtectShadow(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINT cbRange)
    3297 {
    3298     return pDevIns->pDevHlpR3->pfnROMProtectShadow(pDevIns, GCPhysStart, cbRange);
     3298DECLINLINE(int) PDMDevHlpROMProtectShadow(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINT cbRange, PGMROMPROT enmProt)
     3299{
     3300    return pDevIns->pDevHlpR3->pfnROMProtectShadow(pDevIns, GCPhysStart, cbRange, enmProt);
    32993301}
    33003302
     
    35113513}
    35123514
     3515#ifndef VBOX_WITH_NEW_PHYS_CODE
    35133516/**
    35143517 * @copydoc PDMDEVHLPR3::pfnPhysReserve
     
    35183521    return pDevIns->pDevHlpR3->pfnPhysReserve(pDevIns, GCPhys, cbRange, pszDesc);
    35193522}
     3523#endif
    35203524
    35213525/**
  • trunk/include/VBox/pgm.h

    r17134 r17251  
    273273 */
    274274#define PGMMODE_IS_LONG_MODE(enmMode) ((enmMode) == PGMMODE_AMD64_NX || (enmMode) == PGMMODE_AMD64)
    275 
    276 /**
    277  * The current ROM page protection.
    278  */
    279 typedef enum PGMROMPROT
    280 {
    281     /** The customary invalid value. */
    282     PGMROMPROT_INVALID = 0,
    283     /** Read from the virgin ROM page, ignore writes.
    284      * Map the virgin page, use write access handler to ignore writes. */
    285     PGMROMPROT_READ_ROM_WRITE_IGNORE,
    286     /** Read from the virgin ROM page, write to the shadow RAM.
    287      * Map the virgin page, use write access handler change the RAM. */
    288     PGMROMPROT_READ_ROM_WRITE_RAM,
    289     /** Read from the shadow ROM page, ignore writes.
    290      * Map the shadow page read-only, use write access handler to ignore writes. */
    291     PGMROMPROT_READ_RAM_WRITE_IGNORE,
    292     /** Read from the shadow ROM page, ignore writes.
    293      * Map the shadow page read-write, disabled write access handler. */
    294     PGMROMPROT_READ_RAM_WRITE_RAM,
    295     /** The end of valid values. */
    296     PGMROMPROT_END,
    297     /** The usual 32-bit type size hack. */
    298     PGMROMPROT_32BIT_HACK = 0x7fffffff
    299 } PGMROMPROT;
    300275
    301276/**
  • trunk/include/VBox/rem.h

    r13832 r17251  
    8282#endif
    8383REMR3DECL(void) REMR3NotifyPhysRomRegister(PVM pVM, RTGCPHYS GCPhys, RTUINT cb, void *pvCopy, bool fShadow);
    84 REMR3DECL(void) REMR3NotifyPhysReserve(PVM pVM, RTGCPHYS GCPhys, RTUINT cb);
     84REMR3DECL(void) REMR3NotifyPhysRamDeregister(PVM pVM, RTGCPHYS GCPhys, RTUINT cb);
    8585REMR3DECL(void) REMR3NotifyHandlerPhysicalRegister(PVM pVM, PGMPHYSHANDLERTYPE enmType, RTGCPHYS GCPhys, RTGCPHYS cb, bool fHasHCHandler);
    8686REMR3DECL(void) REMR3NotifyHandlerPhysicalDeregister(PVM pVM, PGMPHYSHANDLERTYPE enmType, RTGCPHYS GCPhys, RTGCPHYS cb, bool fHasHCHandler, bool fRestoreAsRAM);
  • trunk/include/VBox/types.h

    r17136 r17251  
    543543typedef PDMDATASEG const *PCPDMDATASEG;
    544544
     545
     546/**
     547 * The current ROM page protection.
     548 */
     549typedef enum PGMROMPROT
     550{
     551    /** The customary invalid value. */
     552    PGMROMPROT_INVALID = 0,
     553    /** Read from the virgin ROM page, ignore writes.
     554     * Map the virgin page, use write access handler to ignore writes. */
     555    PGMROMPROT_READ_ROM_WRITE_IGNORE,
     556    /** Read from the virgin ROM page, write to the shadow RAM.
     557     * Map the virgin page, use write access handler change the RAM. */
     558    PGMROMPROT_READ_ROM_WRITE_RAM,
     559    /** Read from the shadow ROM page, ignore writes.
     560     * Map the shadow page read-only, use write access handler to ignore writes. */
     561    PGMROMPROT_READ_RAM_WRITE_IGNORE,
     562    /** Read from the shadow ROM page, ignore writes.
     563     * Map the shadow page read-write, disabled write access handler. */
     564    PGMROMPROT_READ_RAM_WRITE_RAM,
     565    /** The end of valid values. */
     566    PGMROMPROT_END,
     567    /** The usual 32-bit type size hack. */
     568    PGMROMPROT_32BIT_HACK = 0x7fffffff
     569} PGMROMPROT;
     570
     571
    545572/** @} */
    546573
  • trunk/src/VBox/Devices/PC/DevPcArch.c

    r12977 r17251  
    252252        return rc;
    253253
     254#ifndef VBOX_WITH_NEW_PHYS_CODE
    254255    /*
    255256     * Reserve ROM/MMIO areas:
     
    264265    if (RT_FAILURE(rc))
    265266        return rc;
     267#endif
    266268
    267269    return VINF_SUCCESS;
  • trunk/src/VBox/VMM/MM.cpp

    r14299 r17251  
    500500VMMR3DECL(void) MMR3Reset(PVM pVM)
    501501{
     502#ifndef VBOX_WITH_NEW_PHYS_CODE
    502503    mmR3PhysRomReset(pVM);
     504#endif
    503505}
    504506
  • trunk/src/VBox/VMM/MMInternal.h

    r14597 r17251  
    565565
    566566
     567#ifndef VBOX_WITH_NEW_PHYS_CODE
    567568/**
    568569 * A registered Rom range.
     
    594595/** Pointer to a ROM range. */
    595596typedef MMROMRANGE *PMMROMRANGE;
     597#endif /* !VBOX_WITH_NEW_PHYS_CODE */
    596598
    597599
     
    765767    uint32_t                    cFixedPages;
    766768
     769#ifndef VBOX_WITH_NEW_PHYS_CODE
    767770    /** The head of the ROM ranges. */
    768771    R3PTRTYPE(PMMROMRANGE)      pRomHead;
     772#endif
    769773} MM;
    770774/** Pointer to MM Data (part of VM). */
     
    803807const char *mmR3GetTagName(MMTAG enmTag);
    804808
     809#ifndef VBOX_WITH_NEW_PHYS_CODE
    805810void mmR3PhysRomReset(PVM pVM);
     811#endif
    806812
    807813/**
  • trunk/src/VBox/VMM/MMPhys.cpp

    r13841 r17251  
    4141#include <iprt/string.h>
    4242
     43
     44/**
     45 * Get the size of the base RAM.
     46 * This usually means the size of the first contigous block of physical memory.
     47 *
     48 * @returns The guest base RAM size.
     49 * @param   pVM         The VM handle.
     50 * @thread  Any.
     51 */
     52VMMR3DECL(uint64_t) MMR3PhysGetRamSize(PVM pVM)
     53{
     54    return pVM->mm.s.cbRamBase;
     55}
     56
     57#ifndef VBOX_WITH_NEW_PHYS_CODE
    4358
    4459/**
     
    221236 */
    222237VMMR3DECL(int) MMR3PhysRomRegister(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTUINT cbRange, const void *pvBinary,
    223                                   bool fShadow, const char *pszDesc)
     238                                   bool fShadow, const char *pszDesc)
    224239{
    225240    /*
     
    401416    AssertRC(rc);
    402417
    403     REMR3NotifyPhysReserve(pVM, GCPhys, cbRange);
     418    REMR3NotifyPhysRamDeregister(pVM, GCPhys, cbRange);
    404419    return rc;
    405 }
    406 
    407 
    408 /**
    409  * Get the size of the base RAM.
    410  * This usually means the size of the first contigous block of physical memory.
    411  *
    412  * @returns The guest base RAM size.
    413  * @param   pVM         The VM handle.
    414  * @thread  Any.
    415  */
    416 VMMR3DECL(uint64_t) MMR3PhysGetRamSize(PVM pVM)
    417 {
    418     return pVM->mm.s.cbRamBase;
    419420}
    420421
     
    490491}
    491492
     493#endif /* !VBOX_WITH_NEW_PHYS_CODE */
  • trunk/src/VBox/VMM/PDMDevHlp.cpp

    r15129 r17251  
    349349             pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, GCPhysStart, cbRange, pvBinary, fShadow, pszDesc, pszDesc));
    350350
     351#ifdef VBOX_WITH_NEW_PHYS_CODE
     352    uint32_t fFlags = 0;
     353    if (fShadow)
     354        fFlags |= PGMPHYS_ROM_FLAG_SHADOWED;
     355    /** @todo PGMPHYS_ROM_FLAG_PERMANENT_BINARY */
     356    int rc = PGMR3PhysRomRegister(pDevIns->Internal.s.pVMR3, pDevIns, GCPhysStart, cbRange, pvBinary, fFlags, pszDesc);
     357#else
    351358    int rc = MMR3PhysRomRegister(pDevIns->Internal.s.pVMR3, pDevIns, GCPhysStart, cbRange, pvBinary, fShadow, pszDesc);
     359#endif
    352360
    353361    LogFlow(("pdmR3DevHlp_ROMRegister: caller='%s'/%d: returns %Rrc\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, rc));
     
    21302138static DECLCALLBACK(int) pdmR3DevHlp_PhysReserve(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTUINT cbRange, const char *pszDesc)
    21312139{
     2140#ifndef VBOX_WITH_NEW_PHYS_CODE
    21322141    PDMDEV_ASSERT_DEVINS(pDevIns);
    21332142    VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3);
     
    21402149
    21412150    return rc;
     2151#else
     2152    AssertFailed();
     2153    return VERR_ACCESS_DENIED;
     2154#endif
    21422155}
    21432156
     
    25052518
    25062519/** @copydoc PDMDEVHLPR3::pfnROMProtectShadow */
    2507 static DECLCALLBACK(int) pdmR3DevHlp_ROMProtectShadow(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINT cbRange)
    2508 {
    2509     PDMDEV_ASSERT_DEVINS(pDevIns);
    2510     LogFlow(("pdmR3DevHlp_ROMProtectShadow: caller='%s'/%d: GCPhysStart=%RGp cbRange=%#x\n",
    2511              pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, GCPhysStart, cbRange));
    2512 
     2520static DECLCALLBACK(int) pdmR3DevHlp_ROMProtectShadow(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINT cbRange, PGMROMPROT enmProt)
     2521{
     2522    PDMDEV_ASSERT_DEVINS(pDevIns);
     2523    LogFlow(("pdmR3DevHlp_ROMProtectShadow: caller='%s'/%d: GCPhysStart=%RGp cbRange=%#x enmProt=%d\n",
     2524             pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, GCPhysStart, cbRange, enmProt));
     2525
     2526#ifdef VBOX_WITH_NEW_PHYS_CODE
     2527    int rc = PGMR3PhysRomProtect(pDevIns->Internal.s.pVMR3, GCPhysStart, cbRange, enmProt);
     2528#else
    25132529    int rc = MMR3PhysRomProtect(pDevIns->Internal.s.pVMR3, GCPhysStart, cbRange);
     2530#endif
    25142531
    25152532    LogFlow(("pdmR3DevHlp_ROMProtectShadow: caller='%s'/%d: returns %Rrc\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, rc));
     
    30503067
    30513068/** @copydoc PDMDEVHLPR3::pfnROMProtectShadow */
    3052 static DECLCALLBACK(int) pdmR3DevHlp_Untrusted_ROMProtectShadow(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINT cbRange)
     3069static DECLCALLBACK(int) pdmR3DevHlp_Untrusted_ROMProtectShadow(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINT cbRange, PGMROMPROT enmProt)
    30533070{
    30543071    PDMDEV_ASSERT_DEVINS(pDevIns);
  • trunk/src/VBox/VMM/PGMPhys.cpp

    r16045 r17251  
    171171
    172172
    173 
    174173/**
    175174 * Sets up a range RAM.
     
    245244
    246245    pNew->pvR3          = NULL;
     246#ifndef VBOX_WITH_NEW_PHYS_CODE
    247247    pNew->paChunkR3Ptrs = NULL;
    248248
    249 #ifndef VBOX_WITH_NEW_PHYS_CODE
    250249    /* Allocate memory for chunk to HC ptr lookup array. */
    251250    rc = MMHyperAlloc(pVM, (cb >> PGM_DYNAMIC_CHUNK_SHIFT) * sizeof(void *), 16, MM_TAG_PGM, (void **)&pNew->paChunkR3Ptrs);
     
    303302                    case PGMPAGETYPE_RAM:
    304303                        if (!PGM_PAGE_IS_ZERO(pPage))
    305                             pgmPhysFreePage(pVM, pPage, pRam->GCPhys + ((RTGCPHYS)i << PAGE_SHIFT));
     304                            pgmPhysFreePage(pVM, pPage, pRam->GCPhys + ((RTGCPHYS)iPage << PAGE_SHIFT));
    306305                        break;
    307306
     
    351350                            case PGM_PAGE_STATE_SHARED:
    352351                            case PGM_PAGE_STATE_WRITE_MONITORED:
    353                                 rc = pgmPhysPageMakeWritable(pVM, pPage, pRam->GCPhys + ((RTGCPHYS)i << PAGE_SHIFT));
     352                                rc = pgmPhysPageMakeWritable(pVM, pPage, pRam->GCPhys + ((RTGCPHYS)iPage << PAGE_SHIFT));
    354353                                AssertLogRelRCReturn(rc, rc);
    355354                            case PGM_PAGE_STATE_ALLOCATED:
     
    357356                                void *pvPage;
    358357                                PPGMPAGEMAP pMapIgnored;
    359                                 rc = pgmPhysPageMap(pVM, pPage, pRam->GCPhys + ((RTGCPHYS)i << PAGE_SHIFT), &pMapIgnored, &pvPage);
     358                                rc = pgmPhysPageMap(pVM, pPage, pRam->GCPhys + ((RTGCPHYS)iPage << PAGE_SHIFT), &pMapIgnored, &pvPage);
    360359                                AssertLogRelRCReturn(rc, rc);
    361360                                ASMMemZeroPage(pvPage);
     
    488487
    489488        pNew->pvR3          = NULL;
     489#ifndef VBOX_WITH_NEW_PHYS_CODE
    490490        pNew->paChunkR3Ptrs = NULL;
     491#endif
    491492
    492493        uint32_t iPage = cPages;
     
    701702
    702703            pNew->RamRange.pvR3 = pvPages;       ///@todo remove this [new phys code]
     704#ifndef VBOX_WITH_NEW_PHYS_CODE
    703705            pNew->RamRange.paChunkR3Ptrs = NULL; ///@todo remove this [new phys code]
     706#endif
    704707
    705708            uint32_t iPage = cPages;
     
    995998    else
    996999    {
    997         REMR3NotifyPhysReserve(pVM, pCur->RamRange.GCPhys, pCur->RamRange.cb);
     1000        REMR3NotifyPhysRamDeregister(pVM, pCur->RamRange.GCPhys, pCur->RamRange.cb);
    9981001        pgmR3PhysUnlinkRamRange(pVM, &pCur->RamRange);
    9991002    }
     
    15041507
    15051508
    1506 
    15071509/**
    15081510 * Called by PGMR3Reset to reset the shadow, switch to the virgin,
     
    16991701}
    17001702
     1703#ifndef VBOX_WITH_NEW_PHYS_CODE
    17011704
    17021705/**
     
    18511854}
    18521855
    1853 #ifndef VBOX_WITH_NEW_PHYS_CODE
    18541856
    18551857/**
     
    20502052
    20512053#endif /* !VBOX_WITH_NEW_PHYS_CODE */
    2052 
    20532054
    20542055/**
  • trunk/src/recompiler/VBoxREM.def

    r8155 r17251  
    11; $Id$
    22;; @file
     3; VBoxREM Definition File.
    34;
    4 ; VBoxREM Definition File.
     5
    56;
    67; Copyright (C) 2006-2007 Sun Microsystems, Inc.
     
    3940    REMR3NotifyPhysRamRegister
    4041    REMR3NotifyPhysRamChunkRegister
    41     REMR3NotifyPhysReserve
     42    REMR3NotifyPhysRamDeregister
    4243    REMR3NotifyPhysRomRegister
    4344    REMR3NotifyHandlerPhysicalModify
  • trunk/src/recompiler/VBoxREMWrapper.cpp

    r16933 r17251  
    348348static DECLCALLBACKPTR(void, pfnREMR3NotifyPhysRamRegister)(PVM, RTGCPHYS, RTUINT, unsigned);
    349349static DECLCALLBACKPTR(void, pfnREMR3NotifyPhysRamChunkRegister)(PVM, RTGCPHYS, RTUINT, RTHCUINTPTR, unsigned);
    350 static DECLCALLBACKPTR(void, pfnREMR3NotifyPhysReserve)(PVM, RTGCPHYS, RTUINT);
     350static DECLCALLBACKPTR(void, pfnREMR3NotifyPhysRamDeregister)(PVM, RTGCPHYS, RTUINT);
    351351static DECLCALLBACKPTR(void, pfnREMR3NotifyPhysRomRegister)(PVM, RTGCPHYS, RTUINT, void *, bool);
    352352static DECLCALLBACKPTR(void, pfnREMR3NotifyHandlerPhysicalModify)(PVM, PGMPHYSHANDLERTYPE, RTGCPHYS, RTGCPHYS, RTGCPHYS, bool, bool);
     
    10301030    { "REMR3NotifyPhysRamRegister",             (void *)&pfnREMR3NotifyPhysRamRegister,             &g_aArgsNotifyPhysRamRegister[0],           RT_ELEMENTS(g_aArgsNotifyPhysRamRegister),             REMFNDESC_FLAGS_RET_VOID,   0,              NULL },
    10311031    { "REMR3NotifyPhysRamChunkRegister",        (void *)&pfnREMR3NotifyPhysRamChunkRegister,        &g_aArgsNotifyPhysRamChunkRegister[0],      RT_ELEMENTS(g_aArgsNotifyPhysRamChunkRegister),        REMFNDESC_FLAGS_RET_VOID,   0,              NULL },
    1032     { "REMR3NotifyPhysReserve",                 (void *)&pfnREMR3NotifyPhysReserve,                 &g_aArgsNotifyPhysReserve[0],               RT_ELEMENTS(g_aArgsNotifyPhysReserve),                 REMFNDESC_FLAGS_RET_VOID,   0,              NULL },
     1032    { "REMR3NotifyPhysRamDeregister",           (void *)&pfnREMR3NotifyPhysRamDeregister,           &g_aArgsNotifyPhysRamDeregister[0],         RT_ELEMENTS(g_aArgsNotifyPhysRamDeregister),           REMFNDESC_FLAGS_RET_VOID,   0,              NULL },
    10331033    { "REMR3NotifyPhysRomRegister",             (void *)&pfnREMR3NotifyPhysRomRegister,             &g_aArgsNotifyPhysRomRegister[0],           RT_ELEMENTS(g_aArgsNotifyPhysRomRegister),             REMFNDESC_FLAGS_RET_VOID,   0,              NULL },
    10341034    { "REMR3NotifyHandlerPhysicalModify",       (void *)&pfnREMR3NotifyHandlerPhysicalModify,       &g_aArgsNotifyHandlerPhysicalModify[0],     RT_ELEMENTS(g_aArgsNotifyHandlerPhysicalModify),       REMFNDESC_FLAGS_RET_VOID,   0,              NULL },
     
    21722172}
    21732173
    2174 REMR3DECL(void) REMR3NotifyPhysReserve(PVM pVM, RTGCPHYS GCPhys, RTUINT cb)
     2174REMR3DECL(void) REMR3NotifyPhysRamDeregister(PVM pVM, RTGCPHYS GCPhys, RTUINT cb)
    21752175{
    21762176#ifndef USE_REM_STUBS
    2177     Assert(VALID_PTR(pfnREMR3NotifyPhysReserve));
    2178     pfnREMR3NotifyPhysReserve(pVM, GCPhys, cb);
     2177    Assert(VALID_PTR(pfnREMR3NotifyPhysRamDeregister));
     2178    pfnREMR3NotifyPhysRamDeregister(pVM, GCPhys, cb);
    21792179#endif
    21802180}
  • trunk/src/recompiler/VBoxRecompiler.c

    r17106 r17251  
    28612861 * @param   GCPhys      Start physical address.
    28622862 * @param   cb          The size of the range.
    2863  * @todo    Rename to REMR3NotifyPhysRamDeregister (for MMIO2) as we won't
    2864  *          reserve any memory soon.
    2865  */
    2866 REMR3DECL(void) REMR3NotifyPhysReserve(PVM pVM, RTGCPHYS GCPhys, RTUINT cb)
    2867 {
    2868     Log(("REMR3NotifyPhysReserve: GCPhys=%RGp cb=%d\n", GCPhys, cb));
     2863 */
     2864REMR3DECL(void) REMR3NotifyPhysRamDeregister(PVM pVM, RTGCPHYS GCPhys, RTUINT cb)
     2865{
     2866    Log(("REMR3NotifyPhysRamDeregister: GCPhys=%RGp cb=%d\n", GCPhys, cb));
    28692867    VM_ASSERT_EMT(pVM);
    28702868
  • trunk/src/recompiler_new/VBoxREM.def

    r8155 r17251  
    11; $Id$
    22;; @file
     3; VBoxREM Definition File.
    34;
    4 ; VBoxREM Definition File.
     5
    56;
    67; Copyright (C) 2006-2007 Sun Microsystems, Inc.
     
    3940    REMR3NotifyPhysRamRegister
    4041    REMR3NotifyPhysRamChunkRegister
    41     REMR3NotifyPhysReserve
     42    REMR3NotifyPhysRamDeregister
    4243    REMR3NotifyPhysRomRegister
    4344    REMR3NotifyHandlerPhysicalModify
  • trunk/src/recompiler_new/VBoxREMWrapper.cpp

    r17040 r17251  
    348348static DECLCALLBACKPTR(void, pfnREMR3NotifyPhysRamRegister)(PVM, RTGCPHYS, RTUINT, unsigned);
    349349static DECLCALLBACKPTR(void, pfnREMR3NotifyPhysRamChunkRegister)(PVM, RTGCPHYS, RTUINT, RTHCUINTPTR, unsigned);
    350 static DECLCALLBACKPTR(void, pfnREMR3NotifyPhysReserve)(PVM, RTGCPHYS, RTUINT);
     350static DECLCALLBACKPTR(void, pfnREMR3NotifyPhysRamDeregister)(PVM, RTGCPHYS, RTUINT);
    351351static DECLCALLBACKPTR(void, pfnREMR3NotifyPhysRomRegister)(PVM, RTGCPHYS, RTUINT, void *, bool);
    352352static DECLCALLBACKPTR(void, pfnREMR3NotifyHandlerPhysicalModify)(PVM, PGMPHYSHANDLERTYPE, RTGCPHYS, RTGCPHYS, RTGCPHYS, bool, bool);
     
    410410    { REMPARMDESC_FLAGS_INT,        sizeof(unsigned), NULL }
    411411};
    412 static const REMPARMDESC g_aArgsNotifyPhysReserve[] =
     412static const REMPARMDESC g_aArgsNotifyPhysRamDeregister[] =
    413413{
    414414    { REMPARMDESC_FLAGS_INT,        sizeof(PVM), NULL },
     
    10481048    { "REMR3NotifyPhysRamRegister",             (void *)&pfnREMR3NotifyPhysRamRegister,             &g_aArgsNotifyPhysRamRegister[0],           RT_ELEMENTS(g_aArgsNotifyPhysRamRegister),             REMFNDESC_FLAGS_RET_VOID,   0,              NULL },
    10491049    { "REMR3NotifyPhysRamChunkRegister",        (void *)&pfnREMR3NotifyPhysRamChunkRegister,        &g_aArgsNotifyPhysRamChunkRegister[0],      RT_ELEMENTS(g_aArgsNotifyPhysRamChunkRegister),        REMFNDESC_FLAGS_RET_VOID,   0,              NULL },
    1050     { "REMR3NotifyPhysReserve",                 (void *)&pfnREMR3NotifyPhysReserve,                 &g_aArgsNotifyPhysReserve[0],               RT_ELEMENTS(g_aArgsNotifyPhysReserve),                 REMFNDESC_FLAGS_RET_VOID,   0,              NULL },
     1050    { "REMR3NotifyPhysRamDeregister",           (void *)&pfnREMR3NotifyPhysRamDeregister,           &g_aArgsNotifyPhysRamDeregister[0],         RT_ELEMENTS(g_aArgsNotifyPhysRamDeregister),           REMFNDESC_FLAGS_RET_VOID,   0,              NULL },
    10511051    { "REMR3NotifyPhysRomRegister",             (void *)&pfnREMR3NotifyPhysRomRegister,             &g_aArgsNotifyPhysRomRegister[0],           RT_ELEMENTS(g_aArgsNotifyPhysRomRegister),             REMFNDESC_FLAGS_RET_VOID,   0,              NULL },
    10521052    { "REMR3NotifyHandlerPhysicalModify",       (void *)&pfnREMR3NotifyHandlerPhysicalModify,       &g_aArgsNotifyHandlerPhysicalModify[0],     RT_ELEMENTS(g_aArgsNotifyHandlerPhysicalModify),       REMFNDESC_FLAGS_RET_VOID,   0,              NULL },
     
    21982198}
    21992199
    2200 REMR3DECL(void) REMR3NotifyPhysReserve(PVM pVM, RTGCPHYS GCPhys, RTUINT cb)
     2200REMR3DECL(void) REMR3NotifyPhysRamDeregister(PVM pVM, RTGCPHYS GCPhys, RTUINT cb)
    22012201{
    22022202#ifndef USE_REM_STUBS
    2203     Assert(VALID_PTR(pfnREMR3NotifyPhysReserve));
    2204     pfnREMR3NotifyPhysReserve(pVM, GCPhys, cb);
     2203    Assert(VALID_PTR(pfnREMR3NotifyPhysRamDeregister));
     2204    pfnREMR3NotifyPhysRamDeregister(pVM, GCPhys, cb);
    22052205#endif
    22062206}
  • trunk/src/recompiler_new/VBoxRecompiler.c

    r17106 r17251  
    26892689
    26902690#ifdef VBOX_WITH_NEW_PHYS_CODE
    2691     if (fFlags & MM_RAM_FLAGS_RESERVED)
    2692         cpu_register_physical_memory(GCPhys, cb, IO_MEM_UNASSIGNED);
    2693     else
    2694         cpu_register_physical_memory(GCPhys, cb, GCPhys);
     2691    cpu_register_physical_memory(GCPhys, cb, GCPhys);
    26952692#else
    26962693    if (!GCPhys)
     
    28102807 * @param   GCPhys      Start physical address.
    28112808 * @param   cb          The size of the range.
    2812  * @todo    Rename to REMR3NotifyPhysRamDeregister (for MMIO2) as we won't
    2813  *          reserve any memory soon.
    2814  */
    2815 REMR3DECL(void) REMR3NotifyPhysReserve(PVM pVM, RTGCPHYS GCPhys, RTUINT cb)
    2816 {
    2817     Log(("REMR3NotifyPhysReserve: GCPhys=%RGp cb=%d\n", GCPhys, cb));
     2809 */
     2810REMR3DECL(void) REMR3NotifyPhysRamDeregister(PVM pVM, RTGCPHYS GCPhys, RTUINT cb)
     2811{
     2812    Log(("REMR3NotifyPhysRamDeregister: GCPhys=%RGp cb=%d\n", GCPhys, cb));
    28182813    VM_ASSERT_EMT(pVM);
    28192814
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