Changeset 857 in vbox
- Timestamp:
- Feb 13, 2007 10:30:35 AM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 18562
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/recompiler/VBoxRecompiler.c
r856 r857 417 417 pVM->rem.s.fIgnoreInvlPg = false; 418 418 pVM->rem.s.fIgnoreCpuMode = false; 419 420 #ifdef PGM_DYNAMIC_RAM_ALLOC421 pVM->rem.s.cPhysRegistrations = 0;422 #endif423 419 } 424 420 … … 2528 2524 else 2529 2525 { 2526 uint32_t i; 2527 2530 2528 cpu_register_physical_memory(GCPhys, cb, GCPhys | (fFlags & MM_RAM_FLAGS_RESERVED ? IO_MEM_UNASSIGNED : 0)); 2531 2529 2532 2530 AssertRelease(pVM->rem.s.cPhysRegistrations < REM_MAX_PHYS_REGISTRATIONS); 2533 pVM->rem.s.aPhysReg[pVM->rem.s.cPhysRegistrations].GCPhys = GCPhys; 2534 pVM->rem.s.aPhysReg[pVM->rem.s.cPhysRegistrations].HCVirt = (RTHCUINTPTR)pvRam; 2535 pVM->rem.s.aPhysReg[pVM->rem.s.cPhysRegistrations].cb = cb; 2536 pVM->rem.s.cPhysRegistrations++; 2531 for (i=0;i<pVM->rem.s.cPhysRegistrations;i++) 2532 { 2533 if (pVM->rem.s.aPhysReg[i].GCPhys == GCPhys) 2534 { 2535 pVM->rem.s.aPhysReg[i].HCVirt = (RTHCUINTPTR)pvRam; 2536 pVM->rem.s.aPhysReg[i].cb = cb; 2537 break; 2538 } 2539 } 2540 if (i == pVM->rem.s.cPhysRegistrations) 2541 { 2542 pVM->rem.s.aPhysReg[i].GCPhys = GCPhys; 2543 pVM->rem.s.aPhysReg[i].HCVirt = (RTHCUINTPTR)pvRam; 2544 pVM->rem.s.aPhysReg[i].cb = cb; 2545 pVM->rem.s.cPhysRegistrations++; 2546 } 2537 2547 } 2538 2548 #else … … 2721 2731 REMR3DECL(void) REMR3NotifyPhysRomRegister(PVM pVM, RTGCPHYS GCPhys, RTUINT cb, void *pvCopy) 2722 2732 { 2733 #ifdef PGM_DYNAMIC_RAM_ALLOC 2734 uint32_t i; 2735 #endif 2723 2736 Log(("REMR3NotifyPhysRomRegister: GCPhys=%VGp cb=%d pvCopy=%p\n", GCPhys, cb, pvCopy)); 2724 2737 VM_ASSERT_EMT(pVM); … … 2739 2752 cpu_register_physical_memory(GCPhys, cb, GCPhys | IO_MEM_ROM); 2740 2753 AssertRelease(pVM->rem.s.cPhysRegistrations < REM_MAX_PHYS_REGISTRATIONS); 2741 pVM->rem.s.aPhysReg[pVM->rem.s.cPhysRegistrations].GCPhys = GCPhys; 2742 pVM->rem.s.aPhysReg[pVM->rem.s.cPhysRegistrations].HCVirt = (RTHCUINTPTR)pvCopy; 2743 pVM->rem.s.aPhysReg[pVM->rem.s.cPhysRegistrations].cb = cb; 2744 pVM->rem.s.cPhysRegistrations++; 2754 for (i=0;i<pVM->rem.s.cPhysRegistrations;i++) 2755 { 2756 if (pVM->rem.s.aPhysReg[i].GCPhys == GCPhys) 2757 { 2758 pVM->rem.s.aPhysReg[i].HCVirt = (RTHCUINTPTR)pvRam; 2759 pVM->rem.s.aPhysReg[i].cb = cb; 2760 break; 2761 } 2762 } 2763 if (i == pVM->rem.s.cPhysRegistrations) 2764 { 2765 pVM->rem.s.aPhysReg[i].GCPhys = GCPhys; 2766 pVM->rem.s.aPhysReg[i].HCVirt = (RTHCUINTPTR)pvRam; 2767 pVM->rem.s.aPhysReg[i].cb = cb; 2768 pVM->rem.s.cPhysRegistrations++; 2769 } 2745 2770 #else 2746 2771 AssertRelease(phys_ram_base);
Note:
See TracChangeset
for help on using the changeset viewer.