VirtualBox

Changeset 13402 in vbox


Ignore:
Timestamp:
Oct 20, 2008 3:47:38 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
38153
Message:

Accidental commit

Location:
trunk/src/VBox/Devices/Graphics
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA.cpp

    r13401 r13402  
    349349    AssertMsg(offVRAM < pThis->vram_size, ("offVRAM = %p, pThis->vram_size = %p\n", offVRAM, pThis->vram_size));
    350350    ASMBitSet(&pThis->au32DirtyBitmap[0], offVRAM >> PAGE_SHIFT);
    351     pThis->fHasDirtyBits = true;
     351    pThis->fHaveDirtyBits = true;
    352352}
    353353
     
    684684#endif
    685685        s->sr[s->sr_index] = val & sr_mask[s->sr_index];
    686 
    687 #ifndef IN_GC
    688         /* The VGA region is (could be) affected by this change; reset all aliases we've created. */
    689         if (    s->sr_index == 4 /* mode */
    690             ||  s->sr_index == 2 /* plane mask */)
    691         {
    692             if (s->fRemappedVGA)
    693             {
    694                 IOMMMIOResetRegion(PDMDevHlpGetVM(s->CTX_SUFF(pDevIns)), 0x000a0000);
    695                 s->fRemappedVGA = false;
    696             }
    697         }
    698 #endif
    699686        break;
    700687    case 0x3c7:
     
    724711#endif
    725712        s->gr[s->gr_index] = val & gr_mask[s->gr_index];
    726 
    727 #ifndef IN_GC
    728         /* The VGA region is (could be) affected by this change; reset all aliases we've created. */
    729         if (s->gr_index == 6 /* memory map mode */)
    730         {
    731             if (s->fRemappedVGA)
    732             {
    733                 IOMMMIOResetRegion(PDMDevHlpGetVM(s->CTX_SUFF(pDevIns)), 0x000a0000);
    734                 s->fRemappedVGA = false;
    735             }
    736         }
    737 #endif
    738713        break;
    739 
    740714    case 0x3b4:
    741715    case 0x3d4:
     
    906880            s->vbe_regs[s->vbe_index] = val;
    907881            s->bank_offset = (val << 16);
    908 
    909 #ifndef IN_GC
    910             /* The VGA region is (could be) affected by this change; reset all aliases we've created. */
    911             if (s->fRemappedVGA)
    912             {
    913                 IOMMMIOResetRegion(PDMDevHlpGetVM(s->CTX_SUFF(pDevIns)), 0x000a0000);
    914                 s->fRemappedVGA = false;
    915             }
    916 #endif
    917             break;
    918 
     882            break;
    919883        case VBE_DISPI_INDEX_ENABLE:
    920884#ifndef IN_RING3
     
    10371001             */
    10381002            s->pDrv->pfnLFBModeChange(s->pDrv, (val & VBE_DISPI_ENABLED) != 0);
    1039 
    1040             /* The VGA region is (could be) affected by this change; reset all aliases we've created. */
    1041             if (s->fRemappedVGA)
    1042             {
    1043                 IOMMMIOResetRegion(PDMDevHlpGetVM(s->CTX_SUFF(pDevIns)), 0x000a0000);
    1044                 s->fRemappedVGA = false;
    1045             }
    10461003            break;
    10471004#endif /* IN_RING3 */
     
    11241081    /* convert to VGA memory offset */
    11251082    memory_map_mode = (s->gr[6] >> 2) & 3;
    1126 #ifdef VBOX
    1127     RTGCPHYS GCPhys = addr; /* save original address */
    1128 #endif
    11291083    addr &= 0x1ffff;
    11301084    switch(memory_map_mode) {
     
    11601114#else /* VBOX */
    11611115        ret = s->CTX_SUFF(vram_ptr)[addr];
    1162 # ifdef IN_RING0
    1163         /* If all planes are accessible, then map the page to the frame buffer and make it writable. */
    1164         if ((s->sr[2] & 3) == 3)
    1165         {
    1166             IOMMMIOModifyPage(PDMDevHlpGetVM(s->CTX_SUFF(pDevIns)), GCPhys, s->GCPhysVRAM + addr, X86_PTE_RW | X86_PTE_P);
    1167             s->fRemappedVGA = true;
    1168         }
    1169 # endif /* IN_RING0 */
    11701116#endif /* VBOX */
    11711117    } else if (!(s->sr[4] & 0x04)) {    /* Host access is controlled by SR4, not GR5! */
     
    12511197    /* convert to VGA memory offset */
    12521198    memory_map_mode = (s->gr[6] >> 2) & 3;
    1253 #ifdef VBOX
    1254     RTGCPHYS GCPhys = addr; /* save original address */
    1255 #endif
    12561199    addr &= 0x1ffff;
    12571200    switch(memory_map_mode) {
     
    12841227            s->vram_ptr[addr] = val;
    12851228#else /* VBOX */
    1286 # ifdef IN_GC
     1229#ifdef IN_GC
    12871230            if (addr >= VGA_MAPPING_SIZE)
    12881231                return VINF_IOM_HC_MMIO_WRITE;
    1289 # else
     1232#else
    12901233            if (addr >= s->vram_size)
    12911234            {
     
    12941237                return VINF_SUCCESS;
    12951238            }
    1296 # endif
     1239#endif
    12971240            s->CTX_SUFF(vram_ptr)[addr] = val;
    1298 
    1299 # ifdef IN_RING0
    1300             /* If all planes are accessible, then map the page to the frame buffer and make it writable. */
    1301             if ((s->sr[2] & 3) == 3)
    1302             {
    1303                 IOMMMIOModifyPage(PDMDevHlpGetVM(s->CTX_SUFF(pDevIns)), GCPhys, s->GCPhysVRAM + addr, X86_PTE_RW | X86_PTE_P);
    1304                 s->fRemappedVGA = true;
    1305             }
    1306 # endif /* IN_RING0 */
    1307 
    13081241#endif /* VBOX */
    13091242#ifdef DEBUG_VGA_MEM
     
    43934326    PVGASTATE pThis = IDISPLAYPORT_2_VGASTATE(pInterface);
    43944327    PDMDEV_ASSERT_EMT(VGASTATE2DEVINS(pThis));
    4395     PPDMDEVINS pDevIns = pThis->CTX_SUFF(pDevIns);
    43964328
    43974329#ifdef DEBUG_sunlover
     
    44054337        return rc;
    44064338
    4407     if (    pThis->fHasDirtyBits
    4408         &&  pThis->GCPhysVRAM
    4409         &&  pThis->GCPhysVRAM != NIL_RTGCPHYS32)
    4410     {
     4339    if (pThis->fHaveDirtyBits && pThis->GCPhysVRAM && pThis->GCPhysVRAM != NIL_RTGCPHYS32)
     4340    {
     4341        PPDMDEVINS pDevIns = pThis->CTX_SUFF(pDevIns);
    44114342        PGMHandlerPhysicalReset(PDMDevHlpGetVM(pDevIns), pThis->GCPhysVRAM);
    4412         pThis->fHasDirtyBits = false;
    4413     }
    4414     if (pThis->fRemappedVGA)
    4415     {
    4416         IOMMMIOResetRegion(PDMDevHlpGetVM(pDevIns), 0x000a0000);
    4417         pThis->fRemappedVGA = false;
     4343        pThis->fHaveDirtyBits = false;
    44184344    }
    44194345
     
    44324358    PVGASTATE pThis = IDISPLAYPORT_2_VGASTATE(pInterface);
    44334359    PDMDEV_ASSERT_EMT(VGASTATE2DEVINS(pThis));
    4434     PPDMDEVINS pDevIns = pThis->CTX_SUFF(pDevIns);
    44354360
    44364361    /* This is called both in VBVA mode and normal modes. */
     
    44454370
    44464371    /* The dirty bits array has been just cleared, reset handlers as well. */
    4447     if (    pThis->GCPhysVRAM
    4448         &&  pThis->GCPhysVRAM != NIL_RTGCPHYS32)
    4449     {
     4372    if (pThis->GCPhysVRAM && pThis->GCPhysVRAM != NIL_RTGCPHYS32)
     4373    {
     4374        PPDMDEVINS pDevIns = pThis->CTX_SUFF(pDevIns);
    44504375        PGMHandlerPhysicalReset(PDMDevHlpGetVM(pDevIns), pThis->GCPhysVRAM);
    4451     }
    4452     if (pThis->fRemappedVGA)
    4453     {
    4454         IOMMMIOResetRegion(PDMDevHlpGetVM(pDevIns), 0x000a0000);
    4455         pThis->fRemappedVGA = false;
    44564376    }
    44574377
     
    50654985        int rc = PGMHandlerPhysicalReset(PDMDevHlpGetVM(pDevIns), pThis->GCPhysVRAM);
    50664986        AssertRC(rc);
    5067     }
    5068     if (pThis->fRemappedVGA)
    5069     {
    5070         IOMMMIOResetRegion(PDMDevHlpGetVM(pDevIns), 0x000a0000);
    5071         pThis->fRemappedVGA = false;
    50724987    }
    50734988
  • trunk/src/VBox/Devices/Graphics/DevVGA.h

    r13401 r13402  
    261261    bool                        fR0Enabled;
    262262    /** Flag indicating that there are dirty bits. This is used to optimize the handler resetting. */
    263     bool                        fHasDirtyBits;
    264     /** Flag indicating that the VGA memory in the 0xa0000-0xbffff region has been remapped to allow direct access. */
    265     bool                        fRemappedVGA;
    266     bool                        padding9[3];
    267 
     263    bool                        fHaveDirtyBits;
    268264    /** Pointer to vgaGCLFBAccessHandler(). */
    269265    RTRCPTR                     RCPtrLFBHandler;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette