Changeset 18720 in vbox for trunk/src/VBox/Devices/Graphics/DevVGA.cpp
- Timestamp:
- Apr 5, 2009 3:16:56 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA.cpp
r18232 r18720 1198 1198 { 1199 1199 /** @todo only allow read access (doesn't work now) */ 1200 STAM_COUNTER_INC(&s->StatMapPage); 1200 1201 IOMMMIOMapMMIO2Page(PDMDevHlpGetVM(s->CTX_SUFF(pDevIns)), GCPhys, s->GCPhysVRAM + addr, X86_PTE_RW|X86_PTE_P); 1201 1202 /* Set as dirty as write accesses won't be noticed now. */ … … 1330 1331 && !vga_is_dirty(s, addr)) 1331 1332 { 1333 STAM_COUNTER_INC(&s->StatMapPage); 1332 1334 IOMMMIOMapMMIO2Page(PDMDevHlpGetVM(s->CTX_SUFF(pDevIns)), GCPhys, s->GCPhysVRAM + addr, X86_PTE_RW | X86_PTE_P); 1333 1335 s->fRemappedVGA = true; … … 1386 1388 if (((++s->cLatchAccesses) & s->uMaskLatchAccess) == s->uMaskLatchAccess) 1387 1389 { 1388 static uint32_t aMask[5] = {0x3ff, 0x1ff, 0x7f, 0x3f,0x1f};1389 static uint64_t aDelta[5]= {10000000, 5000000, 2500000, 1250000, 625000};1390 static uint32_t const s_aMask[5] = { 0x3ff, 0x1ff, 0x7f, 0x3f, 0x1f}; 1391 static uint64_t const s_aDelta[5] = {10000000, 5000000, 2500000, 1250000, 625000}; 1390 1392 if (PDMDevHlpCanEmulateIoBlock(s->CTX_SUFF(pDevIns))) 1391 1393 { … … 1395 1397 * to the recompiler 1396 1398 */ 1397 if (u64CurTime - s->u64LastLatchedAccess < aDelta[s->iMask])1399 if (u64CurTime - s->u64LastLatchedAccess < s_aDelta[s->iMask]) 1398 1400 { 1399 1401 s->u64LastLatchedAccess = 0; 1400 s->iMask = RT_MIN(s->iMask + 1 , RT_ELEMENTS(aMask) - 1);1401 s->uMaskLatchAccess = aMask[s->iMask];1402 s->iMask = RT_MIN(s->iMask + 1U, RT_ELEMENTS(s_aMask) - 1U); 1403 s->uMaskLatchAccess = s_aMask[s->iMask]; 1402 1404 s->cLatchAccesses = s->uMaskLatchAccess - 1; 1403 1405 return VINF_EM_RAW_EMULATE_IO_BLOCK; … … 1405 1407 if (s->u64LastLatchedAccess) 1406 1408 { 1407 Log2(("Reset mask (was %d) delta %RX64 (limit %x)\n", s->iMask, u64CurTime - s->u64LastLatchedAccess, aDelta[s->iMask]));1409 Log2(("Reset mask (was %d) delta %RX64 (limit %x)\n", s->iMask, u64CurTime - s->u64LastLatchedAccess, s_aDelta[s->iMask])); 1408 1410 if (s->iMask) 1409 1411 s->iMask--; 1410 s->uMaskLatchAccess = aMask[s->iMask];1412 s->uMaskLatchAccess = s_aMask[s->iMask]; 1411 1413 } 1412 1414 s->u64LastLatchedAccess = u64CurTime; … … 1416 1418 s->u64LastLatchedAccess = 0; 1417 1419 s->iMask = 0; 1418 s->uMaskLatchAccess = aMask[s->iMask];1420 s->uMaskLatchAccess = s_aMask[s->iMask]; 1419 1421 s->cLatchAccesses = 0; 1420 1422 } … … 6185 6187 STAM_REG(pVM, &pThis->StatRZMemoryWrite, STAMTYPE_PROFILE, "/Devices/VGA/RZ/MMIO-Write", STAMUNIT_TICKS_PER_CALL, "Profiling of the VGAGCMemoryWrite() body."); 6186 6188 STAM_REG(pVM, &pThis->StatR3MemoryWrite, STAMTYPE_PROFILE, "/Devices/VGA/R3/MMIO-Write", STAMUNIT_TICKS_PER_CALL, "Profiling of the VGAGCMemoryWrite() body."); 6189 STAM_REG(pVM, &pThis->StatMapPage, STAMTYPE_COUNTER, "/Devices/VGA/MapPageCalls", STAMUNIT_OCCURENCES, "Calls to IOMMMIOMapMMIO2Page."); 6187 6190 6188 6191 /* Init latched access mask. */
Note:
See TracChangeset
for help on using the changeset viewer.