Changeset 55493 in vbox for trunk/src/recompiler
- Timestamp:
- Apr 28, 2015 4:51:35 PM (10 years ago)
- Location:
- trunk/src/recompiler
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/recompiler/VBoxREMWrapper.cpp
r54737 r55493 366 366 static DECLCALLBACKPTR(void, pfnREMR3NotifyPhysRamDeregister)(PVM, RTGCPHYS, RTUINT); 367 367 static DECLCALLBACKPTR(void, pfnREMR3NotifyPhysRomRegister)(PVM, RTGCPHYS, RTUINT, void *, bool); 368 static DECLCALLBACKPTR(void, pfnREMR3NotifyHandlerPhysicalModify)(PVM, PGMPHYSHANDLER TYPE, RTGCPHYS, RTGCPHYS, RTGCPHYS, bool, bool);369 static DECLCALLBACKPTR(void, pfnREMR3NotifyHandlerPhysicalRegister)(PVM, PGMPHYSHANDLER TYPE, RTGCPHYS, RTGCPHYS, bool);370 static DECLCALLBACKPTR(void, pfnREMR3NotifyHandlerPhysicalDeregister)(PVM, PGMPHYSHANDLER TYPE, RTGCPHYS, RTGCPHYS, bool, bool);368 static DECLCALLBACKPTR(void, pfnREMR3NotifyHandlerPhysicalModify)(PVM, PGMPHYSHANDLERKIND, RTGCPHYS, RTGCPHYS, RTGCPHYS, bool, bool); 369 static DECLCALLBACKPTR(void, pfnREMR3NotifyHandlerPhysicalRegister)(PVM, PGMPHYSHANDLERKIND, RTGCPHYS, RTGCPHYS, bool); 370 static DECLCALLBACKPTR(void, pfnREMR3NotifyHandlerPhysicalDeregister)(PVM, PGMPHYSHANDLERKIND, RTGCPHYS, RTGCPHYS, bool, bool); 371 371 static DECLCALLBACKPTR(void, pfnREMR3NotifyInterruptSet)(PVM, PVMCPU); 372 372 static DECLCALLBACKPTR(void, pfnREMR3NotifyInterruptClear)(PVM, PVMCPU); … … 484 484 { 485 485 { REMPARMDESC_FLAGS_INT, sizeof(PVM), NULL }, 486 { REMPARMDESC_FLAGS_INT, sizeof(PGMPHYSHANDLER TYPE), NULL },486 { REMPARMDESC_FLAGS_INT, sizeof(PGMPHYSHANDLERKIND), NULL }, 487 487 { REMPARMDESC_FLAGS_GCPHYS, sizeof(RTGCPHYS), NULL }, 488 488 { REMPARMDESC_FLAGS_GCPHYS, sizeof(RTGCPHYS), NULL }, … … 494 494 { 495 495 { REMPARMDESC_FLAGS_INT, sizeof(PVM), NULL }, 496 { REMPARMDESC_FLAGS_INT, sizeof(PGMPHYSHANDLER TYPE), NULL },496 { REMPARMDESC_FLAGS_INT, sizeof(PGMPHYSHANDLERKIND), NULL }, 497 497 { REMPARMDESC_FLAGS_GCPHYS, sizeof(RTGCPHYS), NULL }, 498 498 { REMPARMDESC_FLAGS_GCPHYS, sizeof(RTGCPHYS), NULL }, … … 502 502 { 503 503 { REMPARMDESC_FLAGS_INT, sizeof(PVM), NULL }, 504 { REMPARMDESC_FLAGS_INT, sizeof(PGMPHYSHANDLER TYPE), NULL },504 { REMPARMDESC_FLAGS_INT, sizeof(PGMPHYSHANDLERKIND), NULL }, 505 505 { REMPARMDESC_FLAGS_GCPHYS, sizeof(RTGCPHYS), NULL }, 506 506 { REMPARMDESC_FLAGS_GCPHYS, sizeof(RTGCPHYS), NULL }, … … 2382 2382 } 2383 2383 2384 REMR3DECL(void) REMR3NotifyHandlerPhysicalRegister(PVM pVM, PGMPHYSHANDLER TYPE enmType, RTGCPHYS GCPhys, RTGCPHYS cb, bool fHasHCHandler)2384 REMR3DECL(void) REMR3NotifyHandlerPhysicalRegister(PVM pVM, PGMPHYSHANDLERKIND enmKind, RTGCPHYS GCPhys, RTGCPHYS cb, bool fHasHCHandler) 2385 2385 { 2386 2386 #ifndef USE_REM_STUBS 2387 2387 Assert(VALID_PTR(pfnREMR3NotifyHandlerPhysicalRegister)); 2388 pfnREMR3NotifyHandlerPhysicalRegister(pVM, enm Type, GCPhys, cb, fHasHCHandler);2389 #endif 2390 } 2391 2392 REMR3DECL(void) REMR3NotifyHandlerPhysicalDeregister(PVM pVM, PGMPHYSHANDLER TYPE enmType, RTGCPHYS GCPhys, RTGCPHYS cb, bool fHasHCHandler, bool fRestoreAsRAM)2388 pfnREMR3NotifyHandlerPhysicalRegister(pVM, enmKind, GCPhys, cb, fHasHCHandler); 2389 #endif 2390 } 2391 2392 REMR3DECL(void) REMR3NotifyHandlerPhysicalDeregister(PVM pVM, PGMPHYSHANDLERKIND enmKind, RTGCPHYS GCPhys, RTGCPHYS cb, bool fHasHCHandler, bool fRestoreAsRAM) 2393 2393 { 2394 2394 #ifndef USE_REM_STUBS 2395 2395 Assert(VALID_PTR(pfnREMR3NotifyHandlerPhysicalDeregister)); 2396 pfnREMR3NotifyHandlerPhysicalDeregister(pVM, enm Type, GCPhys, cb, fHasHCHandler, fRestoreAsRAM);2397 #endif 2398 } 2399 2400 REMR3DECL(void) REMR3NotifyHandlerPhysicalModify(PVM pVM, PGMPHYSHANDLER TYPE enmType, RTGCPHYS GCPhysOld, RTGCPHYS GCPhysNew, RTGCPHYS cb, bool fHasHCHandler, bool fRestoreAsRAM)2396 pfnREMR3NotifyHandlerPhysicalDeregister(pVM, enmKind, GCPhys, cb, fHasHCHandler, fRestoreAsRAM); 2397 #endif 2398 } 2399 2400 REMR3DECL(void) REMR3NotifyHandlerPhysicalModify(PVM pVM, PGMPHYSHANDLERKIND enmKind, RTGCPHYS GCPhysOld, RTGCPHYS GCPhysNew, RTGCPHYS cb, bool fHasHCHandler, bool fRestoreAsRAM) 2401 2401 { 2402 2402 #ifndef USE_REM_STUBS 2403 2403 Assert(VALID_PTR(pfnREMR3NotifyHandlerPhysicalModify)); 2404 pfnREMR3NotifyHandlerPhysicalModify(pVM, enm Type, GCPhysOld, GCPhysNew, cb, fHasHCHandler, fRestoreAsRAM);2404 pfnREMR3NotifyHandlerPhysicalModify(pVM, enmKind, GCPhysOld, GCPhysNew, cb, fHasHCHandler, fRestoreAsRAM); 2405 2405 #endif 2406 2406 } -
trunk/src/recompiler/VBoxRecompiler.c
r55048 r55493 116 116 static void remR3HandlerWriteU32(void *pvVM, target_phys_addr_t GCPhys, uint32_t u32); 117 117 118 static void remR3NotifyHandlerPhysicalDeregister(PVM pVM, PGMPHYSHANDLERTYPE enmType, RTGCPHYS GCPhys, RTGCPHYS cb, bool fHasHCHandler, bool fRestoreAsRAM); 119 static void remR3NotifyHandlerPhysicalRegister(PVM pVM, PGMPHYSHANDLERTYPE enmType, RTGCPHYS GCPhys, RTGCPHYS cb, bool fHasHCHandler); 120 static void remR3NotifyHandlerPhysicalModify(PVM pVM, PGMPHYSHANDLERTYPE enmType, RTGCPHYS GCPhysOld, RTGCPHYS GCPhysNew, RTGCPHYS cb, bool fHasHCHandler, bool fRestoreAsRAM); 118 static void remR3NotifyHandlerPhysicalDeregister(PVM pVM, PGMPHYSHANDLERKIND enmKind, RTGCPHYS GCPhys, RTGCPHYS cb, bool fHasHCHandler, bool fRestoreAsRAM); 119 static void remR3NotifyHandlerPhysicalRegister(PVM pVM, PGMPHYSHANDLERKIND enmKind, RTGCPHYS GCPhys, RTGCPHYS cb, bool fHasHCHandler); 120 static void remR3NotifyHandlerPhysicalModify(PVM pVM, PGMPHYSHANDLERKIND enmKind, RTGCPHYS GCPhysOld, RTGCPHYS GCPhysNew, RTGCPHYS cb, bool fHasHCHandler, bool fRestoreAsRAM); 121 121 122 122 123 /******************************************************************************* … … 3090 3091 case REMHANDLERNOTIFICATIONKIND_PHYSICAL_REGISTER: 3091 3092 remR3NotifyHandlerPhysicalRegister(pVM, 3092 pCur->u.PhysicalRegister.enm Type,3093 pCur->u.PhysicalRegister.enmKind, 3093 3094 pCur->u.PhysicalRegister.GCPhys, 3094 3095 pCur->u.PhysicalRegister.cb, … … 3098 3099 case REMHANDLERNOTIFICATIONKIND_PHYSICAL_DEREGISTER: 3099 3100 remR3NotifyHandlerPhysicalDeregister(pVM, 3100 pCur->u.PhysicalDeregister.enm Type,3101 pCur->u.PhysicalDeregister.enmKind, 3101 3102 pCur->u.PhysicalDeregister.GCPhys, 3102 3103 pCur->u.PhysicalDeregister.cb, … … 3107 3108 case REMHANDLERNOTIFICATIONKIND_PHYSICAL_MODIFY: 3108 3109 remR3NotifyHandlerPhysicalModify(pVM, 3109 pCur->u.PhysicalModify.enm Type,3110 pCur->u.PhysicalModify.enmKind, 3110 3111 pCur->u.PhysicalModify.GCPhysOld, 3111 3112 pCur->u.PhysicalModify.GCPhysNew, … … 3311 3312 * 3312 3313 * @param pVM VM Handle. 3313 * @param enm Type Handler type.3314 * @param enmKind Kind of access handler. 3314 3315 * @param GCPhys Handler range address. 3315 3316 * @param cb Size of the handler range. … … 3319 3320 * Handler memory type to memory which has no HC handler. 3320 3321 */ 3321 static void remR3NotifyHandlerPhysicalRegister(PVM pVM, PGMPHYSHANDLERTYPE enmType, RTGCPHYS GCPhys, RTGCPHYS cb, bool fHasHCHandler) 3322 { 3323 Log(("REMR3NotifyHandlerPhysicalRegister: enmType=%d GCPhys=%RGp cb=%RGp fHasHCHandler=%d\n", 3324 enmType, GCPhys, cb, fHasHCHandler)); 3322 static void remR3NotifyHandlerPhysicalRegister(PVM pVM, PGMPHYSHANDLERKIND enmKind, RTGCPHYS GCPhys, RTGCPHYS cb, 3323 bool fHasHCHandler) 3324 { 3325 Log(("REMR3NotifyHandlerPhysicalRegister: enmKind=%d GCPhys=%RGp cb=%RGp fHasHCHandler=%d\n", 3326 enmKind, GCPhys, cb, fHasHCHandler)); 3325 3327 3326 3328 VM_ASSERT_EMT(pVM); … … 3332 3334 3333 3335 PDMCritSectEnter(&pVM->rem.s.CritSectRegister, VERR_SEM_BUSY); 3334 if (enm Type == PGMPHYSHANDLERTYPE_MMIO)3336 if (enmKind == PGMPHYSHANDLERKIND_MMIO) 3335 3337 cpu_register_physical_memory_offset(GCPhys, cb, pVM->rem.s.iMMIOMemType, GCPhys); 3336 3338 else if (fHasHCHandler) … … 3345 3347 * 3346 3348 * @param pVM VM Handle. 3347 * @param enm Type Handler type.3349 * @param enmKind Kind of access handler. 3348 3350 * @param GCPhys Handler range address. 3349 3351 * @param cb Size of the handler range. … … 3353 3355 * Handler memory type to memory which has no HC handler. 3354 3356 */ 3355 REMR3DECL(void) REMR3NotifyHandlerPhysicalRegister(PVM pVM, PGMPHYSHANDLERTYPE enmType, RTGCPHYS GCPhys, RTGCPHYS cb, bool fHasHCHandler) 3357 REMR3DECL(void) REMR3NotifyHandlerPhysicalRegister(PVM pVM, PGMPHYSHANDLERKIND enmKind, RTGCPHYS GCPhys, RTGCPHYS cb, 3358 bool fHasHCHandler) 3356 3359 { 3357 3360 REMR3ReplayHandlerNotifications(pVM); 3358 3361 3359 remR3NotifyHandlerPhysicalRegister(pVM, enm Type, GCPhys, cb, fHasHCHandler);3362 remR3NotifyHandlerPhysicalRegister(pVM, enmKind, GCPhys, cb, fHasHCHandler); 3360 3363 } 3361 3364 … … 3364 3367 * 3365 3368 * @param pVM VM Handle. 3366 * @param enm Type Handler type.3369 * @param enmKind Kind of access handler. 3367 3370 * @param GCPhys Handler range address. 3368 3371 * @param cb Size of the handler range. … … 3370 3373 * @param fRestoreAsRAM Whether the to restore it as normal RAM or as unassigned memory. 3371 3374 */ 3372 static void remR3NotifyHandlerPhysicalDeregister(PVM pVM, PGMPHYSHANDLERTYPE enmType, RTGCPHYS GCPhys, RTGCPHYS cb, bool fHasHCHandler, bool fRestoreAsRAM) 3373 { 3374 Log(("REMR3NotifyHandlerPhysicalDeregister: enmType=%d GCPhys=%RGp cb=%RGp fHasHCHandler=%RTbool fRestoreAsRAM=%RTbool RAM=%08x\n", 3375 enmType, GCPhys, cb, fHasHCHandler, fRestoreAsRAM, MMR3PhysGetRamSize(pVM))); 3375 static void remR3NotifyHandlerPhysicalDeregister(PVM pVM, PGMPHYSHANDLERKIND enmKind, RTGCPHYS GCPhys, RTGCPHYS cb, 3376 bool fHasHCHandler, bool fRestoreAsRAM) 3377 { 3378 Log(("REMR3NotifyHandlerPhysicalDeregister: enmKind=%d GCPhys=%RGp cb=%RGp fHasHCHandler=%RTbool fRestoreAsRAM=%RTbool RAM=%08x\n", 3379 enmKind, GCPhys, cb, fHasHCHandler, fRestoreAsRAM, MMR3PhysGetRamSize(pVM))); 3376 3380 VM_ASSERT_EMT(pVM); 3377 3381 … … 3381 3385 PDMCritSectEnter(&pVM->rem.s.CritSectRegister, VERR_SEM_BUSY); 3382 3386 /** @todo this isn't right, MMIO can (in theory) be restored as RAM. */ 3383 if (enm Type == PGMPHYSHANDLERTYPE_MMIO)3387 if (enmKind == PGMPHYSHANDLERKIND_MMIO) 3384 3388 cpu_register_physical_memory_offset(GCPhys, cb, IO_MEM_UNASSIGNED, GCPhys); 3385 3389 else if (fHasHCHandler) … … 3406 3410 * 3407 3411 * @param pVM VM Handle. 3408 * @param enm Type Handler type.3412 * @param enmKind Kind of access handler. 3409 3413 * @param GCPhys Handler range address. 3410 3414 * @param cb Size of the handler range. … … 3412 3416 * @param fRestoreAsRAM Whether the to restore it as normal RAM or as unassigned memory. 3413 3417 */ 3414 REMR3DECL(void) REMR3NotifyHandlerPhysicalDeregister(PVM pVM, PGMPHYSHANDLER TYPE enmType, RTGCPHYS GCPhys, RTGCPHYS cb, bool fHasHCHandler, bool fRestoreAsRAM)3418 REMR3DECL(void) REMR3NotifyHandlerPhysicalDeregister(PVM pVM, PGMPHYSHANDLERKIND enmKind, RTGCPHYS GCPhys, RTGCPHYS cb, bool fHasHCHandler, bool fRestoreAsRAM) 3415 3419 { 3416 3420 REMR3ReplayHandlerNotifications(pVM); 3417 remR3NotifyHandlerPhysicalDeregister(pVM, enm Type, GCPhys, cb, fHasHCHandler, fRestoreAsRAM);3421 remR3NotifyHandlerPhysicalDeregister(pVM, enmKind, GCPhys, cb, fHasHCHandler, fRestoreAsRAM); 3418 3422 } 3419 3423 … … 3423 3427 * 3424 3428 * @param pVM VM Handle. 3425 * @param enm Type Handler type.3429 * @param enmKind Kind of access handler. 3426 3430 * @param GCPhysOld Old handler range address. 3427 3431 * @param GCPhysNew New handler range address. … … 3430 3434 * @param fRestoreAsRAM Whether the to restore it as normal RAM or as unassigned memory. 3431 3435 */ 3432 static void remR3NotifyHandlerPhysicalModify(PVM pVM, PGMPHYSHANDLER TYPE enmType, RTGCPHYS GCPhysOld, RTGCPHYS GCPhysNew, RTGCPHYS cb, bool fHasHCHandler, bool fRestoreAsRAM)3433 { 3434 Log(("REMR3NotifyHandlerPhysicalModify: enm Type=%d GCPhysOld=%RGp GCPhysNew=%RGp cb=%RGp fHasHCHandler=%RTbool fRestoreAsRAM=%RTbool\n",3435 enmType, GCPhysOld, GCPhysNew, cb, fHasHCHandler, fRestoreAsRAM));3436 static void remR3NotifyHandlerPhysicalModify(PVM pVM, PGMPHYSHANDLERKIND enmKind, RTGCPHYS GCPhysOld, RTGCPHYS GCPhysNew, RTGCPHYS cb, bool fHasHCHandler, bool fRestoreAsRAM) 3437 { 3438 Log(("REMR3NotifyHandlerPhysicalModify: enmKind=%d GCPhysOld=%RGp GCPhysNew=%RGp cb=%RGp fHasHCHandler=%RTbool fRestoreAsRAM=%RTbool\n", 3439 enmKind, GCPhysOld, GCPhysNew, cb, fHasHCHandler, fRestoreAsRAM)); 3436 3440 VM_ASSERT_EMT(pVM); 3437 AssertReleaseMsg(enm Type != PGMPHYSHANDLERTYPE_MMIO, ("enmType=%d\n", enmType));3441 AssertReleaseMsg(enmKind != PGMPHYSHANDLERKIND_MMIO, ("enmKind=%d\n", enmKind)); 3438 3442 3439 3443 if (fHasHCHandler) … … 3471 3475 * 3472 3476 * @param pVM VM Handle. 3473 * @param enm Type Handler type.3477 * @param enmKind Kind of access handler. 3474 3478 * @param GCPhysOld Old handler range address. 3475 3479 * @param GCPhysNew New handler range address. … … 3478 3482 * @param fRestoreAsRAM Whether the to restore it as normal RAM or as unassigned memory. 3479 3483 */ 3480 REMR3DECL(void) REMR3NotifyHandlerPhysicalModify(PVM pVM, PGMPHYSHANDLER TYPE enmType, RTGCPHYS GCPhysOld, RTGCPHYS GCPhysNew, RTGCPHYS cb, bool fHasHCHandler, bool fRestoreAsRAM)3484 REMR3DECL(void) REMR3NotifyHandlerPhysicalModify(PVM pVM, PGMPHYSHANDLERKIND enmKind, RTGCPHYS GCPhysOld, RTGCPHYS GCPhysNew, RTGCPHYS cb, bool fHasHCHandler, bool fRestoreAsRAM) 3481 3485 { 3482 3486 REMR3ReplayHandlerNotifications(pVM); 3483 3487 3484 remR3NotifyHandlerPhysicalModify(pVM, enm Type, GCPhysOld, GCPhysNew, cb, fHasHCHandler, fRestoreAsRAM);3488 remR3NotifyHandlerPhysicalModify(pVM, enmKind, GCPhysOld, GCPhysNew, cb, fHasHCHandler, fRestoreAsRAM); 3485 3489 } 3486 3490
Note:
See TracChangeset
for help on using the changeset viewer.