Changeset 2559 in vbox for trunk/src/VBox
- Timestamp:
- May 9, 2007 2:00:38 PM (18 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGM.cpp
r2290 r2559 1205 1205 PPGMPHYSHANDLER pHandler = (PPGMPHYSHANDLER)pNode; 1206 1206 RTGCINTPTR offDelta = *(PRTGCINTPTR)pvUser; 1207 Assert(pHandler->pfnHandlerGC);1208 pHandler->pfnHandlerGC+= offDelta;1209 if ( pHandler->pvUserGC)1210 pHandler->pvUserGC 1207 if (pHandler->pfnHandlerGC) 1208 pHandler->pfnHandlerGC += offDelta; 1209 if ((RTGCUINTPTR)pHandler->pvUserGC >= 0x10000) 1210 pHandler->pvUserGC += offDelta; 1211 1211 return 0; 1212 1212 } 1213 1213 1214 1214 1215 /** -
trunk/src/VBox/VMM/PGMHandler.cpp
r2297 r2559 101 101 pszModR0 = VMMR0_MAIN_MODULE_NAME; 102 102 103 if ( !pszModGC || !*pszModGC || !pszHandlerGC || !*pszHandlerGC104 || !pszModR0 || !*pszModR0 || !pszHandlerR0 || !*pszHandlerR0)105 {106 AssertMsgFailed(("pfnHandlerGC or/and pszModGC is missing\n"));107 return VERR_INVALID_PARAMETER;108 }109 110 103 /* 111 104 * Resolve the R0 handler. … … 113 106 R0PTRTYPE(PFNPGMR0PHYSHANDLER) pfnHandlerR0 = NIL_RTR0PTR; 114 107 int rc = VINF_SUCCESS; 115 if ( HWACCMR3IsAllowed(pVM))108 if (pszHandlerR0 && HWACCMR3IsAllowed(pVM)) 116 109 rc = PDMR3GetSymbolR0Lazy(pVM, pszModR0, pszHandlerR0, &pfnHandlerR0); 117 110 if (VBOX_SUCCESS(rc)) … … 120 113 * Resolve the GC handler. 121 114 */ 122 RTGCPTR pfnHandlerGC; 123 rc = PDMR3GetSymbolGCLazy(pVM, pszModGC, pszHandlerGC, &pfnHandlerGC); 115 RTGCPTR pfnHandlerGC = NIL_RTGCPTR; 116 if (pszHandlerGC) 117 rc = PDMR3GetSymbolGCLazy(pVM, pszModGC, pszHandlerGC, &pfnHandlerGC); 124 118 125 119 if (VBOX_SUCCESS(rc)) -
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r2276 r2559 351 351 ("Unexpected trap for physical handler: %08X (phys=%08x) HCPhys=%X uErr=%X, enum=%d\n", pvFault, GCPhys, HCPhys, uErr, pCur->enmType)); 352 352 353 #ifdef IN_GC 354 Assert(CTXSUFF(pCur->pfnHandler)); 355 STAM_PROFILE_START(&pCur->Stat, h); 356 rc = pCur->CTXSUFF(pfnHandler)(pVM, uErr, pRegFrame, pvFault, GCPhysFault, CTXSUFF(pCur->pvUser)); 357 STAM_PROFILE_STOP(&pCur->Stat, h); 358 #elif IN_RING0 353 #if defined(IN_GC) || defined(ING_RING0) 359 354 if (CTXALLSUFF(pCur->pfnHandler)) 360 355 { … … 364 359 } 365 360 else 361 #endif 366 362 rc = VINF_EM_RAW_EMULATE_INSTR; 367 #else368 rc = VINF_EM_RAW_EMULATE_INSTR;369 #endif370 363 STAM_COUNTER_INC(&pVM->pgm.s.StatHandlersPhysical); 371 364 STAM_PROFILE_STOP(&pVM->pgm.s.StatHandlers, b); -
trunk/src/VBox/VMM/VMMAll/PGMAllHandler.cpp
r2297 r2559 108 108 return VERR_INVALID_PARAMETER; 109 109 } 110 if (!pfnHandlerGC)111 {112 AssertMsgFailed(("!pfnHandlerGC\n"));113 return VERR_INVALID_PARAMETER;114 }115 110 if ( (RTGCUINTPTR)pvUserGC >= 0x10000 116 111 && MMHyperHC2GC(pVM, MMHyperGC2HC(pVM, pvUserGC)) != pvUserGC) … … 119 114 return VERR_INVALID_PARAMETER; 120 115 } 116 AssertReturn(pfnHandlerR3 || pfnHandlerR0 || pfnHandlerGC, VERR_INVALID_PARAMETER); 121 117 122 118 /*
Note:
See TracChangeset
for help on using the changeset viewer.