VirtualBox

Changeset 25062 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Nov 27, 2009 7:24:14 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
55413
Message:

HGSMI,DevVGA: Use the offset based heap for the hostHeap (resides in VRAM). New staved state version for DevVGA for indicating this change.

Location:
trunk/src/VBox/Devices/Graphics
Files:
1 added
4 edited

Legend:

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

    r24714 r25062  
    54535453
    54545454    if (    uVersion != VGA_SAVEDSTATE_VERSION
     5455        &&  uVersion != VGA_SAVEDSTATE_VERSION_HOST_HEAP
    54555456        &&  uVersion != VGA_SAVEDSTATE_VERSION_WITH_CONFIG
    54565457        &&  uVersion != VGA_SAVEDSTATE_VERSION_HGSMI
  • trunk/src/VBox/Devices/Graphics/DevVGA.h

    r24926 r25062  
    4646
    4747#ifdef VBOX_WITH_HGSMI
    48 #include "HGSMI/HGSMIHost.h"
     48# include "HGSMI/HGSMIHost.h"
    4949#endif /* VBOX_WITH_HGSMI */
    50 
    51 #define VGA_SAVEDSTATE_VERSION              5
    52 #define VGA_SAVEDSTATE_VERSION_WITH_CONFIG  4
    53 #define VGA_SAVEDSTATE_VERSION_HGSMI        3
    54 #define VGA_SAVEDSTATE_VERSION_PRE_HGSMI    2
    55 #define VGA_SAVEDSTATE_VERSION_ANCIENT      1
     50#include "DevVGASavedState.h"
    5651
    5752#define MSR_COLOR_EMULATION 0x01
  • trunk/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.cpp

    r25050 r25062  
    7474
    7575#include "HGSMIHost.h"
    76 #include "VBox/HGSMI/HGSMIChannels.h"
    77 #include "VBox/HGSMI/HGSMIChSetup.h"
     76#include <VBox/HGSMI/HGSMIChannels.h>
     77#include <VBox/HGSMI/HGSMIChSetup.h>
    7878
    7979#include "HGSMIHostHlp.h"
     80#include "../DevVGASavedState.h"
    8081
    8182#ifdef DEBUG_sunlover
     
    371372            /* guest usually completes commands in the order it receives it
    372373             * if we're here this would typically means there is some cmd loss */
    373             Assert(0);
     374            AssertFailed();
    374375#endif
    375376
     
    10631064            if (pIns->hostHeap.cRefs)
    10641065            {
    1065                 Assert(0);
     1066                AssertFailed();
    10661067                /* It is possible to change the heap only if there is no pending allocations. */
    10671068                rc = VERR_ACCESS_DENIED;
     
    10701071            {
    10711072                rc = HGSMIHeapSetup (&pIns->hostHeap,
    1072                                         pIns->area.pu8Base+offHeap,
    1073                                         cbHeap,
    1074                                         offHeap);
     1073                                     pIns->area.pu8Base+offHeap,
     1074                                     cbHeap,
     1075                                     offHeap,
     1076                                     true /*fOffsetBased*/);
    10751077            }
    10761078
     
    11891191int HGSMIHostLoadStateExec (PHGSMIINSTANCE pIns, PSSMHANDLE pSSM, uint32_t u32Version)
    11901192{
    1191     if(u32Version < 3)
     1193    if(u32Version < VGA_SAVEDSTATE_VERSION_HGSMI)
    11921194        return VINF_SUCCESS;
    11931195
     
    12181220            Assert(!pIns->hostHeap.cRefs);
    12191221            pIns->hostHeap.cRefs = 0;
     1222
    12201223            rc = HGSMIHeapRelocate(&pIns->hostHeap,
    1221                                     pIns->area.pu8Base+offHeap,
    1222                                     off,
    1223                                     uintptr_t(pIns->area.pu8Base) - uintptr_t(oldMem),
    1224                                     cbHeap,
    1225                                     offHeap);
     1224                                   pIns->area.pu8Base+offHeap,
     1225                                   off,
     1226                                   uintptr_t(pIns->area.pu8Base) - uintptr_t(oldMem),
     1227                                   cbHeap,
     1228                                   offHeap,
     1229                                   u32Version > VGA_SAVEDSTATE_VERSION_HOST_HEAP);
    12261230
    12271231            hgsmiHostHeapUnlock (pIns);
     
    15261530
    15271531    rc = HGSMIHostChannelRegister (pIns,
    1528                                                                    HGSMI_CH_HGSMI,
    1529                                                                    hgsmiChannelHandler,
    1530                                                                    pIns,
    1531                                                                    &sOldChannelHandler);
     1532                                   HGSMI_CH_HGSMI,
     1533                                   hgsmiChannelHandler,
     1534                                   pIns,
     1535                                   &sOldChannelHandler);
    15321536
    15331537    if (RT_SUCCESS (rc))
  • trunk/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.h

    r22652 r25062  
    2222
    2323
    24 #ifndef __HGSMIHost_h__
    25 #define __HGSMIHost_h__
     24#ifndef ___HGSMIHost_h
     25#define ___HGSMIHost_h
    2626
    2727#include <VBox/vm.h>
     
    143143#endif
    144144
    145 #endif /* __HGSMIHost_h__*/
     145#endif /* !___HGSMIHost_h*/
     146
Note: See TracChangeset for help on using the changeset viewer.

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