Changeset 4615 in vbox
- Timestamp:
- Sep 7, 2007 7:25:16 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/rem.h
r4388 r4615 79 79 * @param cb Size of the handler range. 80 80 * @param fHasHCHandler Set if the handler have a HC callback function. 81 * @param pvHCPtr The HC virtual address corresponding to GCPhys if available.82 */ 83 REMDECL(void) REMNotifyHandlerPhysicalModify(PVM pVM, PGMPHYSHANDLERTYPE enmType, RTGCPHYS GCPhysOld, RTGCPHYS GCPhysNew, RTGCPHYS cb, bool fHasHCHandler, RTHCPTR pvHCPtr);81 * @param fRestoreAsRAM Whether the to restore it as normal RAM or as unassigned memory. 82 */ 83 REMDECL(void) REMNotifyHandlerPhysicalModify(PVM pVM, PGMPHYSHANDLERTYPE enmType, RTGCPHYS GCPhysOld, RTGCPHYS GCPhysNew, RTGCPHYS cb, bool fHasHCHandler, bool fRestoreAsRAM); 84 84 85 85 #endif /* IN_RING0 || IN_GC */ … … 344 344 * @param cb Size of the handler range. 345 345 * @param fHasHCHandler Set if the handler have a HC callback function. 346 * @param pvHCPtr The HC virtual address corresponding to GCPhys if available.347 */ 348 REMR3DECL(void) REMR3NotifyHandlerPhysicalModify(PVM pVM, PGMPHYSHANDLERTYPE enmType, RTGCPHYS GCPhysOld, RTGCPHYS GCPhysNew, RTGCPHYS cb, bool fHasHCHandler, void *pvHCPtr);346 * @param fRestoreAsRAM Whether the to restore it as normal RAM or as unassigned memory. 347 */ 348 REMR3DECL(void) REMR3NotifyHandlerPhysicalModify(PVM pVM, PGMPHYSHANDLERTYPE enmType, RTGCPHYS GCPhysOld, RTGCPHYS GCPhysNew, RTGCPHYS cb, bool fHasHCHandler, bool fRestoreAsRAM); 349 349 350 350 /** -
trunk/src/VBox/VMM/REMInternal.h
r4071 r4615 92 92 struct 93 93 { 94 RTHCPTR pvHCPtr;95 94 RTGCPHYS GCPhysOld; 96 95 RTGCPHYS GCPhysNew; … … 98 97 PGMPHYSHANDLERTYPE enmType; 99 98 bool fHasHCHandler; 99 bool fRestoreAsRAM; 100 100 } PhysicalModify; 101 101 uint64_t padding[3 + (HC_ARCH_BITS == 64)]; -
trunk/src/VBox/VMM/VMMAll/PGMAllHandler.cpp
r4071 r4615 495 495 */ 496 496 pgmHandlerPhysicalResetRamFlags(pVM, pCur); 497 RTHCPTR pvRange = 0; 498 if (pCur->pfnHandlerR3 && pCur->enmType != PGMPHYSHANDLERTYPE_MMIO) 499 PGMRamGCPhys2HCPtr(&pVM->pgm.s, GCPhysCurrent, &pvRange); /* ASSUMES it doesn't change pvRange on failure. */ 497 const bool fRestoreAsRAM = pCur->pfnHandlerR3 498 && pCur->enmType != PGMPHYSHANDLERTYPE_MMIO; /** @todo this isn't entirely correct. */ 500 499 501 500 /* … … 534 533 #ifndef IN_RING3 535 534 REMNotifyHandlerPhysicalModify(pVM, pCur->enmType, GCPhysCurrent, GCPhys, 536 pCur->Core.KeyLast - GCPhys + 1, !!pCur->pfnHandlerR3, pvRange);535 pCur->Core.KeyLast - GCPhys + 1, !!pCur->pfnHandlerR3, fRestoreAsRAM); 537 536 #else 538 537 REMR3NotifyHandlerPhysicalModify(pVM, pCur->enmType, GCPhysCurrent, GCPhys, 539 pCur->Core.KeyLast - GCPhys + 1, !!pCur->pfnHandlerR3, pvRange);538 pCur->Core.KeyLast - GCPhys + 1, !!pCur->pfnHandlerR3, fRestoreAsRAM); 540 539 #endif 541 540 pgmUnlock(pVM); … … 544 543 return VINF_SUCCESS; 545 544 } 545 546 546 AssertMsgFailed(("Conflict! GCPhys=%VGp GCPhysLast=%VGp\n", GCPhys, GCPhysLast)); 547 547 rc = VERR_PGM_HANDLER_PHYSICAL_CONFLICT; -
trunk/src/VBox/VMM/VMMAll/REMAll.cpp
r4268 r4615 129 129 * @param cb Size of the handler range. 130 130 * @param fHasHCHandler Set if the handler have a HC callback function. 131 * @param pvHCPtr The HC virtual address corresponding to GCPhys if available.131 * @param fRestoreAsRAM Whether the to restore it as normal RAM or as unassigned memory. 132 132 */ 133 REMDECL(void) REMNotifyHandlerPhysicalModify(PVM pVM, PGMPHYSHANDLERTYPE enmType, RTGCPHYS GCPhysOld, RTGCPHYS GCPhysNew, RTGCPHYS cb, bool fHasHCHandler, RTHCPTR pvHCPtr)133 REMDECL(void) REMNotifyHandlerPhysicalModify(PVM pVM, PGMPHYSHANDLERTYPE enmType, RTGCPHYS GCPhysOld, RTGCPHYS GCPhysNew, RTGCPHYS cb, bool fHasHCHandler, bool fRestoreAsRAM) 134 134 { 135 135 if (pVM->rem.s.cHandlerNotifications >= ELEMENTS(pVM->rem.s.aHandlerNotifications)) … … 142 142 pRec->u.PhysicalModify.cb = cb; 143 143 pRec->u.PhysicalModify.fHasHCHandler = fHasHCHandler; 144 pRec->u.PhysicalModify. pvHCPtr = pvHCPtr;144 pRec->u.PhysicalModify.fRestoreAsRAM = fRestoreAsRAM; 145 145 } 146 146 -
trunk/src/recompiler/VBoxREMWrapper.cpp
r4407 r4615 339 339 static DECLCALLBACKPTR(void, pfnREMR3NotifyPhysReserve)(PVM, RTGCPHYS, RTUINT); 340 340 static DECLCALLBACKPTR(void, pfnREMR3NotifyPhysRomRegister)(PVM, RTGCPHYS, RTUINT, void *, bool); 341 static DECLCALLBACKPTR(void, pfnREMR3NotifyHandlerPhysicalModify)(PVM, PGMPHYSHANDLERTYPE, RTGCPHYS, RTGCPHYS, RTGCPHYS, bool, void *);341 static DECLCALLBACKPTR(void, pfnREMR3NotifyHandlerPhysicalModify)(PVM, PGMPHYSHANDLERTYPE, RTGCPHYS, RTGCPHYS, RTGCPHYS, bool, bool); 342 342 static DECLCALLBACKPTR(void, pfnREMR3NotifyHandlerPhysicalRegister)(PVM, PGMPHYSHANDLERTYPE, RTGCPHYS, RTGCPHYS, bool); 343 343 static DECLCALLBACKPTR(void, pfnREMR3NotifyHandlerPhysicalDeregister)(PVM, PGMPHYSHANDLERTYPE, RTGCPHYS, RTGCPHYS, bool, void *); … … 421 421 { REMPARMDESC_FLAGS_GCPHYS, sizeof(RTGCPHYS), NULL }, 422 422 { REMPARMDESC_FLAGS_INT, sizeof(bool), NULL }, 423 { REMPARMDESC_FLAGS_INT, sizeof( void *), NULL }423 { REMPARMDESC_FLAGS_INT, sizeof(bool), NULL } 424 424 }; 425 425 static const REMPARMDESC g_aArgsNotifyHandlerPhysicalRegister[] = … … 2016 2016 } 2017 2017 2018 REMR3DECL(void) REMR3NotifyHandlerPhysicalModify(PVM pVM, PGMPHYSHANDLERTYPE enmType, RTGCPHYS GCPhysOld, RTGCPHYS GCPhysNew, RTGCPHYS cb, bool fHasHCHandler, void *pvHCPtr)2018 REMR3DECL(void) REMR3NotifyHandlerPhysicalModify(PVM pVM, PGMPHYSHANDLERTYPE enmType, RTGCPHYS GCPhysOld, RTGCPHYS GCPhysNew, RTGCPHYS cb, bool fHasHCHandler, bool fRestoreAsRAM) 2019 2019 { 2020 2020 #ifndef USE_REM_STUBS 2021 2021 Assert(VALID_PTR(pfnREMR3NotifyHandlerPhysicalModify)); 2022 pfnREMR3NotifyHandlerPhysicalModify(pVM, enmType, GCPhysOld, GCPhysNew, cb, fHasHCHandler, pvHCPtr);2022 pfnREMR3NotifyHandlerPhysicalModify(pVM, enmType, GCPhysOld, GCPhysNew, cb, fHasHCHandler, fRestoreAsRAM); 2023 2023 #endif 2024 2024 } -
trunk/src/recompiler/VBoxRecompiler.c
r4535 r4615 2378 2378 pRec->u.PhysicalModify.cb, 2379 2379 pRec->u.PhysicalModify.fHasHCHandler, 2380 pRec->u.PhysicalModify. pvHCPtr);2380 pRec->u.PhysicalModify.fRestoreAsRAM); 2381 2381 break; 2382 2382 … … 2705 2705 * @param cb Size of the handler range. 2706 2706 * @param fHasHCHandler Set if the handler has a HC callback function. 2707 * @param pvHCPtr The HC virtual address corresponding to GCPhys if available.2708 */ 2709 REMR3DECL(void) REMR3NotifyHandlerPhysicalModify(PVM pVM, PGMPHYSHANDLERTYPE enmType, RTGCPHYS GCPhysOld, RTGCPHYS GCPhysNew, RTGCPHYS cb, bool fHasHCHandler, void *pvHCPtr)2710 { 2711 Log(("REMR3NotifyHandlerPhysicalModify: enmType=%d GCPhysOld=%VGp GCPhysNew=%VGp cb=%d fHasHCHandler=% d pvHCPtr=%p\n",2712 enmType, GCPhysOld, GCPhysNew, cb, fHasHCHandler, pvHCPtr));2707 * @param fRestoreAsRAM Whether the to restore it as normal RAM or as unassigned memory. 2708 */ 2709 REMR3DECL(void) REMR3NotifyHandlerPhysicalModify(PVM pVM, PGMPHYSHANDLERTYPE enmType, RTGCPHYS GCPhysOld, RTGCPHYS GCPhysNew, RTGCPHYS cb, bool fHasHCHandler, bool fRestoreAsRAM) 2710 { 2711 Log(("REMR3NotifyHandlerPhysicalModify: enmType=%d GCPhysOld=%VGp GCPhysNew=%VGp cb=%d fHasHCHandler=%RTbool fRestoreAsRAM=%RTbool\n", 2712 enmType, GCPhysOld, GCPhysNew, cb, fHasHCHandler, fRestoreAsRAM)); 2713 2713 VM_ASSERT_EMT(pVM); 2714 2714 AssertReleaseMsg(enmType != PGMPHYSHANDLERTYPE_MMIO, ("enmType=%d\n", enmType)); … … 2725 2725 * Reset the old page. 2726 2726 */ 2727 if (! pvHCPtr)2727 if (!fRestoreAsRAM) 2728 2728 cpu_register_physical_memory(GCPhysOld, cb, IO_MEM_UNASSIGNED); 2729 2729 else
Note:
See TracChangeset
for help on using the changeset viewer.