- Timestamp:
- Mar 2, 2009 1:55:31 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 43584
- Location:
- trunk
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/mm.h
r14597 r17251 44 44 */ 45 45 46 #ifndef VBOX_WITH_NEW_PHYS_CODE 46 47 /** @name RAM Page Flags 47 48 * Since internal ranges have a byte granularity it's possible for a … … 53 54 * @{ 54 55 */ 55 #if 156 56 /** Reserved - Not RAM, ROM nor MMIO2. 57 57 * If this bit is cleared the memory is assumed to be some kind of RAM. … … 82 82 */ 83 83 #define MM_RAM_FLAGS_MMIO2 RT_BIT(3) 84 #endif 85 86 #ifndef VBOX_WITH_NEW_PHYS_CODE 84 87 85 /** Physical backing memory is allocated dynamically. Not set implies a one time static allocation. */ 88 86 #define MM_RAM_FLAGS_DYNAMIC_ALLOC RT_BIT(11) 89 #endif /* !VBOX_WITH_NEW_PHYS_CODE */90 87 91 88 /** The shift used to get the reference count. */ … … 107 104 /** @} */ 108 105 109 #ifndef VBOX_WITH_NEW_PHYS_CODE110 106 /** @name MMR3PhysRegisterEx registration type 111 107 * @{ … … 121 117 } MMPHYSREG; 122 118 /** @} */ 123 #endif 119 #endif /* !VBOX_WITH_NEW_PHYS_CODE */ 124 120 125 121 /** … … 353 349 * @ingroup grp_mm_r3 354 350 * @{ */ 351 #ifndef VBOX_WITH_NEW_PHYS_CODE 355 352 VMMR3DECL(int) MMR3PhysRegister(PVM pVM, void *pvRam, RTGCPHYS GCPhys, unsigned cb, unsigned fFlags, const char *pszDesc); 356 #ifndef VBOX_WITH_NEW_PHYS_CODE357 353 VMMR3DECL(int) MMR3PhysRegisterEx(PVM pVM, void *pvRam, RTGCPHYS GCPhys, unsigned cb, unsigned fFlags, MMPHYSREG enmType, const char *pszDesc); 358 #endif359 354 VMMR3DECL(int) MMR3PhysRomRegister(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTUINT cbRange, const void *pvBinary, bool fShadow, const char *pszDesc); 360 355 VMMR3DECL(int) MMR3PhysRomProtect(PVM pVM, RTGCPHYS GCPhys, RTUINT cbRange); 361 356 VMMR3DECL(int) MMR3PhysReserve(PVM pVM, RTGCPHYS GCPhys, RTUINT cbRange, const char *pszDesc); 357 #endif 362 358 VMMR3DECL(uint64_t) MMR3PhysGetRamSize(PVM pVM); 363 359 /** @} */ -
trunk/include/VBox/pdmdev.h
r16021 r17251 41 41 #include <VBox/cfgm.h> 42 42 #include <VBox/dbgf.h> 43 #include <VBox/mm.h> 43 #ifndef VBOX_WITH_NEW_PHYS_CODE 44 # include <VBox/mm.h> 45 #endif 44 46 #include <VBox/err.h> 45 47 #include <VBox/pci.h> … … 2660 2662 2661 2663 /** 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. 2667 2668 * 2668 2669 * @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)); 2673 2675 2674 2676 /** … … 3294 3296 * @copydoc PDMDEVHLPR3::pfnROMProtectShadow 3295 3297 */ 3296 DECLINLINE(int) PDMDevHlpROMProtectShadow(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINT cbRange )3297 { 3298 return pDevIns->pDevHlpR3->pfnROMProtectShadow(pDevIns, GCPhysStart, cbRange );3298 DECLINLINE(int) PDMDevHlpROMProtectShadow(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINT cbRange, PGMROMPROT enmProt) 3299 { 3300 return pDevIns->pDevHlpR3->pfnROMProtectShadow(pDevIns, GCPhysStart, cbRange, enmProt); 3299 3301 } 3300 3302 … … 3511 3513 } 3512 3514 3515 #ifndef VBOX_WITH_NEW_PHYS_CODE 3513 3516 /** 3514 3517 * @copydoc PDMDEVHLPR3::pfnPhysReserve … … 3518 3521 return pDevIns->pDevHlpR3->pfnPhysReserve(pDevIns, GCPhys, cbRange, pszDesc); 3519 3522 } 3523 #endif 3520 3524 3521 3525 /** -
trunk/include/VBox/pgm.h
r17134 r17251 273 273 */ 274 274 #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 PGMROMPROT280 {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 = 0x7fffffff299 } PGMROMPROT;300 275 301 276 /** -
trunk/include/VBox/rem.h
r13832 r17251 82 82 #endif 83 83 REMR3DECL(void) REMR3NotifyPhysRomRegister(PVM pVM, RTGCPHYS GCPhys, RTUINT cb, void *pvCopy, bool fShadow); 84 REMR3DECL(void) REMR3NotifyPhysR eserve(PVM pVM, RTGCPHYS GCPhys, RTUINT cb);84 REMR3DECL(void) REMR3NotifyPhysRamDeregister(PVM pVM, RTGCPHYS GCPhys, RTUINT cb); 85 85 REMR3DECL(void) REMR3NotifyHandlerPhysicalRegister(PVM pVM, PGMPHYSHANDLERTYPE enmType, RTGCPHYS GCPhys, RTGCPHYS cb, bool fHasHCHandler); 86 86 REMR3DECL(void) REMR3NotifyHandlerPhysicalDeregister(PVM pVM, PGMPHYSHANDLERTYPE enmType, RTGCPHYS GCPhys, RTGCPHYS cb, bool fHasHCHandler, bool fRestoreAsRAM); -
trunk/include/VBox/types.h
r17136 r17251 543 543 typedef PDMDATASEG const *PCPDMDATASEG; 544 544 545 546 /** 547 * The current ROM page protection. 548 */ 549 typedef 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 545 572 /** @} */ 546 573 -
trunk/src/VBox/Devices/PC/DevPcArch.c
r12977 r17251 252 252 return rc; 253 253 254 #ifndef VBOX_WITH_NEW_PHYS_CODE 254 255 /* 255 256 * Reserve ROM/MMIO areas: … … 264 265 if (RT_FAILURE(rc)) 265 266 return rc; 267 #endif 266 268 267 269 return VINF_SUCCESS; -
trunk/src/VBox/VMM/MM.cpp
r14299 r17251 500 500 VMMR3DECL(void) MMR3Reset(PVM pVM) 501 501 { 502 #ifndef VBOX_WITH_NEW_PHYS_CODE 502 503 mmR3PhysRomReset(pVM); 504 #endif 503 505 } 504 506 -
trunk/src/VBox/VMM/MMInternal.h
r14597 r17251 565 565 566 566 567 #ifndef VBOX_WITH_NEW_PHYS_CODE 567 568 /** 568 569 * A registered Rom range. … … 594 595 /** Pointer to a ROM range. */ 595 596 typedef MMROMRANGE *PMMROMRANGE; 597 #endif /* !VBOX_WITH_NEW_PHYS_CODE */ 596 598 597 599 … … 765 767 uint32_t cFixedPages; 766 768 769 #ifndef VBOX_WITH_NEW_PHYS_CODE 767 770 /** The head of the ROM ranges. */ 768 771 R3PTRTYPE(PMMROMRANGE) pRomHead; 772 #endif 769 773 } MM; 770 774 /** Pointer to MM Data (part of VM). */ … … 803 807 const char *mmR3GetTagName(MMTAG enmTag); 804 808 809 #ifndef VBOX_WITH_NEW_PHYS_CODE 805 810 void mmR3PhysRomReset(PVM pVM); 811 #endif 806 812 807 813 /** -
trunk/src/VBox/VMM/MMPhys.cpp
r13841 r17251 41 41 #include <iprt/string.h> 42 42 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 */ 52 VMMR3DECL(uint64_t) MMR3PhysGetRamSize(PVM pVM) 53 { 54 return pVM->mm.s.cbRamBase; 55 } 56 57 #ifndef VBOX_WITH_NEW_PHYS_CODE 43 58 44 59 /** … … 221 236 */ 222 237 VMMR3DECL(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) 224 239 { 225 240 /* … … 401 416 AssertRC(rc); 402 417 403 REMR3NotifyPhysR eserve(pVM, GCPhys, cbRange);418 REMR3NotifyPhysRamDeregister(pVM, GCPhys, cbRange); 404 419 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;419 420 } 420 421 … … 490 491 } 491 492 493 #endif /* !VBOX_WITH_NEW_PHYS_CODE */ -
trunk/src/VBox/VMM/PDMDevHlp.cpp
r15129 r17251 349 349 pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, GCPhysStart, cbRange, pvBinary, fShadow, pszDesc, pszDesc)); 350 350 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 351 358 int rc = MMR3PhysRomRegister(pDevIns->Internal.s.pVMR3, pDevIns, GCPhysStart, cbRange, pvBinary, fShadow, pszDesc); 359 #endif 352 360 353 361 LogFlow(("pdmR3DevHlp_ROMRegister: caller='%s'/%d: returns %Rrc\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, rc)); … … 2130 2138 static DECLCALLBACK(int) pdmR3DevHlp_PhysReserve(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTUINT cbRange, const char *pszDesc) 2131 2139 { 2140 #ifndef VBOX_WITH_NEW_PHYS_CODE 2132 2141 PDMDEV_ASSERT_DEVINS(pDevIns); 2133 2142 VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3); … … 2140 2149 2141 2150 return rc; 2151 #else 2152 AssertFailed(); 2153 return VERR_ACCESS_DENIED; 2154 #endif 2142 2155 } 2143 2156 … … 2505 2518 2506 2519 /** @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 2520 static 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 2513 2529 int rc = MMR3PhysRomProtect(pDevIns->Internal.s.pVMR3, GCPhysStart, cbRange); 2530 #endif 2514 2531 2515 2532 LogFlow(("pdmR3DevHlp_ROMProtectShadow: caller='%s'/%d: returns %Rrc\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, rc)); … … 3050 3067 3051 3068 /** @copydoc PDMDEVHLPR3::pfnROMProtectShadow */ 3052 static DECLCALLBACK(int) pdmR3DevHlp_Untrusted_ROMProtectShadow(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINT cbRange )3069 static DECLCALLBACK(int) pdmR3DevHlp_Untrusted_ROMProtectShadow(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINT cbRange, PGMROMPROT enmProt) 3053 3070 { 3054 3071 PDMDEV_ASSERT_DEVINS(pDevIns); -
trunk/src/VBox/VMM/PGMPhys.cpp
r16045 r17251 171 171 172 172 173 174 173 /** 175 174 * Sets up a range RAM. … … 245 244 246 245 pNew->pvR3 = NULL; 246 #ifndef VBOX_WITH_NEW_PHYS_CODE 247 247 pNew->paChunkR3Ptrs = NULL; 248 248 249 #ifndef VBOX_WITH_NEW_PHYS_CODE250 249 /* Allocate memory for chunk to HC ptr lookup array. */ 251 250 rc = MMHyperAlloc(pVM, (cb >> PGM_DYNAMIC_CHUNK_SHIFT) * sizeof(void *), 16, MM_TAG_PGM, (void **)&pNew->paChunkR3Ptrs); … … 303 302 case PGMPAGETYPE_RAM: 304 303 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)); 306 305 break; 307 306 … … 351 350 case PGM_PAGE_STATE_SHARED: 352 351 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)); 354 353 AssertLogRelRCReturn(rc, rc); 355 354 case PGM_PAGE_STATE_ALLOCATED: … … 357 356 void *pvPage; 358 357 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); 360 359 AssertLogRelRCReturn(rc, rc); 361 360 ASMMemZeroPage(pvPage); … … 488 487 489 488 pNew->pvR3 = NULL; 489 #ifndef VBOX_WITH_NEW_PHYS_CODE 490 490 pNew->paChunkR3Ptrs = NULL; 491 #endif 491 492 492 493 uint32_t iPage = cPages; … … 701 702 702 703 pNew->RamRange.pvR3 = pvPages; ///@todo remove this [new phys code] 704 #ifndef VBOX_WITH_NEW_PHYS_CODE 703 705 pNew->RamRange.paChunkR3Ptrs = NULL; ///@todo remove this [new phys code] 706 #endif 704 707 705 708 uint32_t iPage = cPages; … … 995 998 else 996 999 { 997 REMR3NotifyPhysR eserve(pVM, pCur->RamRange.GCPhys, pCur->RamRange.cb);1000 REMR3NotifyPhysRamDeregister(pVM, pCur->RamRange.GCPhys, pCur->RamRange.cb); 998 1001 pgmR3PhysUnlinkRamRange(pVM, &pCur->RamRange); 999 1002 } … … 1504 1507 1505 1508 1506 1507 1509 /** 1508 1510 * Called by PGMR3Reset to reset the shadow, switch to the virgin, … … 1699 1701 } 1700 1702 1703 #ifndef VBOX_WITH_NEW_PHYS_CODE 1701 1704 1702 1705 /** … … 1851 1854 } 1852 1855 1853 #ifndef VBOX_WITH_NEW_PHYS_CODE1854 1856 1855 1857 /** … … 2050 2052 2051 2053 #endif /* !VBOX_WITH_NEW_PHYS_CODE */ 2052 2053 2054 2054 2055 /** -
trunk/src/recompiler/VBoxREM.def
r8155 r17251 1 1 ; $Id$ 2 2 ;; @file 3 ; VBoxREM Definition File. 3 4 ; 4 ; VBoxREM Definition File. 5 5 6 ; 6 7 ; Copyright (C) 2006-2007 Sun Microsystems, Inc. … … 39 40 REMR3NotifyPhysRamRegister 40 41 REMR3NotifyPhysRamChunkRegister 41 REMR3NotifyPhysR eserve42 REMR3NotifyPhysRamDeregister 42 43 REMR3NotifyPhysRomRegister 43 44 REMR3NotifyHandlerPhysicalModify -
trunk/src/recompiler/VBoxREMWrapper.cpp
r16933 r17251 348 348 static DECLCALLBACKPTR(void, pfnREMR3NotifyPhysRamRegister)(PVM, RTGCPHYS, RTUINT, unsigned); 349 349 static DECLCALLBACKPTR(void, pfnREMR3NotifyPhysRamChunkRegister)(PVM, RTGCPHYS, RTUINT, RTHCUINTPTR, unsigned); 350 static DECLCALLBACKPTR(void, pfnREMR3NotifyPhysR eserve)(PVM, RTGCPHYS, RTUINT);350 static DECLCALLBACKPTR(void, pfnREMR3NotifyPhysRamDeregister)(PVM, RTGCPHYS, RTUINT); 351 351 static DECLCALLBACKPTR(void, pfnREMR3NotifyPhysRomRegister)(PVM, RTGCPHYS, RTUINT, void *, bool); 352 352 static DECLCALLBACKPTR(void, pfnREMR3NotifyHandlerPhysicalModify)(PVM, PGMPHYSHANDLERTYPE, RTGCPHYS, RTGCPHYS, RTGCPHYS, bool, bool); … … 1030 1030 { "REMR3NotifyPhysRamRegister", (void *)&pfnREMR3NotifyPhysRamRegister, &g_aArgsNotifyPhysRamRegister[0], RT_ELEMENTS(g_aArgsNotifyPhysRamRegister), REMFNDESC_FLAGS_RET_VOID, 0, NULL }, 1031 1031 { "REMR3NotifyPhysRamChunkRegister", (void *)&pfnREMR3NotifyPhysRamChunkRegister, &g_aArgsNotifyPhysRamChunkRegister[0], RT_ELEMENTS(g_aArgsNotifyPhysRamChunkRegister), REMFNDESC_FLAGS_RET_VOID, 0, NULL }, 1032 { "REMR3NotifyPhysR eserve", (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 }, 1033 1033 { "REMR3NotifyPhysRomRegister", (void *)&pfnREMR3NotifyPhysRomRegister, &g_aArgsNotifyPhysRomRegister[0], RT_ELEMENTS(g_aArgsNotifyPhysRomRegister), REMFNDESC_FLAGS_RET_VOID, 0, NULL }, 1034 1034 { "REMR3NotifyHandlerPhysicalModify", (void *)&pfnREMR3NotifyHandlerPhysicalModify, &g_aArgsNotifyHandlerPhysicalModify[0], RT_ELEMENTS(g_aArgsNotifyHandlerPhysicalModify), REMFNDESC_FLAGS_RET_VOID, 0, NULL }, … … 2172 2172 } 2173 2173 2174 REMR3DECL(void) REMR3NotifyPhysR eserve(PVM pVM, RTGCPHYS GCPhys, RTUINT cb)2174 REMR3DECL(void) REMR3NotifyPhysRamDeregister(PVM pVM, RTGCPHYS GCPhys, RTUINT cb) 2175 2175 { 2176 2176 #ifndef USE_REM_STUBS 2177 Assert(VALID_PTR(pfnREMR3NotifyPhysR eserve));2178 pfnREMR3NotifyPhysR eserve(pVM, GCPhys, cb);2177 Assert(VALID_PTR(pfnREMR3NotifyPhysRamDeregister)); 2178 pfnREMR3NotifyPhysRamDeregister(pVM, GCPhys, cb); 2179 2179 #endif 2180 2180 } -
trunk/src/recompiler/VBoxRecompiler.c
r17106 r17251 2861 2861 * @param GCPhys Start physical address. 2862 2862 * @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 */ 2864 REMR3DECL(void) REMR3NotifyPhysRamDeregister(PVM pVM, RTGCPHYS GCPhys, RTUINT cb) 2865 { 2866 Log(("REMR3NotifyPhysRamDeregister: GCPhys=%RGp cb=%d\n", GCPhys, cb)); 2869 2867 VM_ASSERT_EMT(pVM); 2870 2868 -
trunk/src/recompiler_new/VBoxREM.def
r8155 r17251 1 1 ; $Id$ 2 2 ;; @file 3 ; VBoxREM Definition File. 3 4 ; 4 ; VBoxREM Definition File. 5 5 6 ; 6 7 ; Copyright (C) 2006-2007 Sun Microsystems, Inc. … … 39 40 REMR3NotifyPhysRamRegister 40 41 REMR3NotifyPhysRamChunkRegister 41 REMR3NotifyPhysR eserve42 REMR3NotifyPhysRamDeregister 42 43 REMR3NotifyPhysRomRegister 43 44 REMR3NotifyHandlerPhysicalModify -
trunk/src/recompiler_new/VBoxREMWrapper.cpp
r17040 r17251 348 348 static DECLCALLBACKPTR(void, pfnREMR3NotifyPhysRamRegister)(PVM, RTGCPHYS, RTUINT, unsigned); 349 349 static DECLCALLBACKPTR(void, pfnREMR3NotifyPhysRamChunkRegister)(PVM, RTGCPHYS, RTUINT, RTHCUINTPTR, unsigned); 350 static DECLCALLBACKPTR(void, pfnREMR3NotifyPhysR eserve)(PVM, RTGCPHYS, RTUINT);350 static DECLCALLBACKPTR(void, pfnREMR3NotifyPhysRamDeregister)(PVM, RTGCPHYS, RTUINT); 351 351 static DECLCALLBACKPTR(void, pfnREMR3NotifyPhysRomRegister)(PVM, RTGCPHYS, RTUINT, void *, bool); 352 352 static DECLCALLBACKPTR(void, pfnREMR3NotifyHandlerPhysicalModify)(PVM, PGMPHYSHANDLERTYPE, RTGCPHYS, RTGCPHYS, RTGCPHYS, bool, bool); … … 410 410 { REMPARMDESC_FLAGS_INT, sizeof(unsigned), NULL } 411 411 }; 412 static const REMPARMDESC g_aArgsNotifyPhysR eserve[] =412 static const REMPARMDESC g_aArgsNotifyPhysRamDeregister[] = 413 413 { 414 414 { REMPARMDESC_FLAGS_INT, sizeof(PVM), NULL }, … … 1048 1048 { "REMR3NotifyPhysRamRegister", (void *)&pfnREMR3NotifyPhysRamRegister, &g_aArgsNotifyPhysRamRegister[0], RT_ELEMENTS(g_aArgsNotifyPhysRamRegister), REMFNDESC_FLAGS_RET_VOID, 0, NULL }, 1049 1049 { "REMR3NotifyPhysRamChunkRegister", (void *)&pfnREMR3NotifyPhysRamChunkRegister, &g_aArgsNotifyPhysRamChunkRegister[0], RT_ELEMENTS(g_aArgsNotifyPhysRamChunkRegister), REMFNDESC_FLAGS_RET_VOID, 0, NULL }, 1050 { "REMR3NotifyPhysR eserve", (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 }, 1051 1051 { "REMR3NotifyPhysRomRegister", (void *)&pfnREMR3NotifyPhysRomRegister, &g_aArgsNotifyPhysRomRegister[0], RT_ELEMENTS(g_aArgsNotifyPhysRomRegister), REMFNDESC_FLAGS_RET_VOID, 0, NULL }, 1052 1052 { "REMR3NotifyHandlerPhysicalModify", (void *)&pfnREMR3NotifyHandlerPhysicalModify, &g_aArgsNotifyHandlerPhysicalModify[0], RT_ELEMENTS(g_aArgsNotifyHandlerPhysicalModify), REMFNDESC_FLAGS_RET_VOID, 0, NULL }, … … 2198 2198 } 2199 2199 2200 REMR3DECL(void) REMR3NotifyPhysR eserve(PVM pVM, RTGCPHYS GCPhys, RTUINT cb)2200 REMR3DECL(void) REMR3NotifyPhysRamDeregister(PVM pVM, RTGCPHYS GCPhys, RTUINT cb) 2201 2201 { 2202 2202 #ifndef USE_REM_STUBS 2203 Assert(VALID_PTR(pfnREMR3NotifyPhysR eserve));2204 pfnREMR3NotifyPhysR eserve(pVM, GCPhys, cb);2203 Assert(VALID_PTR(pfnREMR3NotifyPhysRamDeregister)); 2204 pfnREMR3NotifyPhysRamDeregister(pVM, GCPhys, cb); 2205 2205 #endif 2206 2206 } -
trunk/src/recompiler_new/VBoxRecompiler.c
r17106 r17251 2689 2689 2690 2690 #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); 2695 2692 #else 2696 2693 if (!GCPhys) … … 2810 2807 * @param GCPhys Start physical address. 2811 2808 * @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 */ 2810 REMR3DECL(void) REMR3NotifyPhysRamDeregister(PVM pVM, RTGCPHYS GCPhys, RTUINT cb) 2811 { 2812 Log(("REMR3NotifyPhysRamDeregister: GCPhys=%RGp cb=%d\n", GCPhys, cb)); 2818 2813 VM_ASSERT_EMT(pVM); 2819 2814
Note:
See TracChangeset
for help on using the changeset viewer.