VirtualBox

Changeset 38320 in vbox for trunk


Ignore:
Timestamp:
Aug 4, 2011 7:16:53 PM (13 years ago)
Author:
vboxsync
Message:

Redid the A20 gate assertion fix - the recompiler needs to be told.

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/rem.h

    r38300 r38320  
    7171REMR3DECL(int)  REMR3StateBack(PVM pVM, PVMCPU pVCpu);
    7272REMR3DECL(void) REMR3StateUpdate(PVM pVM, PVMCPU pVCpu);
     73REMR3DECL(void) REMR3A20Set(PVM pVM, PVMCPU pVCpu, bool fEnable);
    7374REMR3DECL(int)  REMR3DisasEnableStepping(PVM pVM, bool fEnable);
    7475REMR3DECL(void) REMR3ReplayHandlerNotifications(PVM pVM);
  • trunk/src/VBox/VMM/VMMR3/PGMPhys.cpp

    r38300 r38320  
    36813681        pVCpu->pgm.s.fA20Enabled = fEnable;
    36823682        pVCpu->pgm.s.GCPhysA20Mask = ~(RTGCPHYS)(!fEnable << 20);
     3683        REMR3A20Set(pVCpu->pVMR3, pVCpu, fEnable);
    36833684        /** @todo we're not handling this correctly for VT-x / AMD-V. See #2911 */
    36843685    }
  • trunk/src/recompiler/VBoxREM.def

    r38300 r38320  
    55
    66;
    7 ; Copyright (C) 2006-2011 Oracle Corporation
     7; Copyright (C) 2006-2007 Oracle Corporation
    88;
    99; This file is part of VirtualBox Open Source Edition (OSE), as
     
    3131    REMR3StateBack
    3232    REMR3StateUpdate
     33    REMR3A20Set
    3334    REMR3DisasEnableStepping
    3435    REMR3ReplayHandlerNotifications
  • trunk/src/recompiler/VBoxREMWrapper.cpp

    r38300 r38320  
    361361static DECLCALLBACKPTR(int, pfnREMR3StateBack)(PVM, PVMCPU);
    362362static DECLCALLBACKPTR(void, pfnREMR3StateUpdate)(PVM, PVMCPU);
     363static DECLCALLBACKPTR(void, pfnREMR3A20Set)(PVM, PVMCPU, bool);
    363364static DECLCALLBACKPTR(void, pfnREMR3ReplayHandlerNotifications)(PVM pVM);
    364365static DECLCALLBACKPTR(void, pfnREMR3NotifyPhysRamRegister)(PVM, RTGCPHYS, RTGCPHYS, unsigned);
     
    11471148    { "REMR3StateBack",                         (void *)&pfnREMR3StateBack,                         &g_aArgsVMandVMCPU[0],                      RT_ELEMENTS(g_aArgsVMandVMCPU),                        REMFNDESC_FLAGS_RET_INT,    sizeof(int),    NULL },
    11481149    { "REMR3StateUpdate",                       (void *)&pfnREMR3StateUpdate,                       &g_aArgsVMandVMCPU[0],                      RT_ELEMENTS(g_aArgsVMandVMCPU),                        REMFNDESC_FLAGS_RET_VOID,   0,              NULL },
     1150    { "REMR3A20Set",                            (void *)&pfnREMR3A20Set,                            &g_aArgsA20Set[0],                          RT_ELEMENTS(g_aArgsA20Set),                            REMFNDESC_FLAGS_RET_VOID,   0,              NULL },
    11491151    { "REMR3ReplayHandlerNotifications",        (void *)&pfnREMR3ReplayHandlerNotifications,        &g_aArgsVM[0],                              RT_ELEMENTS(g_aArgsVM),                                REMFNDESC_FLAGS_RET_VOID,   0,              NULL },
    11501152    { "REMR3NotifyPhysRamRegister",             (void *)&pfnREMR3NotifyPhysRamRegister,             &g_aArgsNotifyPhysRamRegister[0],           RT_ELEMENTS(g_aArgsNotifyPhysRamRegister),             REMFNDESC_FLAGS_RET_VOID,   0,              NULL },
     
    23072309}
    23082310
     2311REMR3DECL(void) REMR3A20Set(PVM pVM, PVMCPU pVCpu, bool fEnable)
     2312{
     2313#ifndef USE_REM_STUBS
     2314    Assert(VALID_PTR(pfnREMR3A20Set));
     2315    pfnREMR3A20Set(pVM, pVCpu, fEnable);
     2316#endif
     2317}
     2318
    23092319REMR3DECL(void) REMR3ReplayHandlerNotifications(PVM pVM)
    23102320{
  • trunk/src/recompiler/VBoxRecompiler.c

    r38300 r38320  
    29522952#undef LOG_GROUP
    29532953#define LOG_GROUP LOG_GROUP_REM
     2954
     2955
     2956/**
     2957 * Notify the recompiler about Address Gate 20 state change.
     2958 *
     2959 * This notification is required since A20 gate changes are
     2960 * initialized from a device driver and the VM might just as
     2961 * well be in REM mode as in RAW mode.
     2962 *
     2963 * @param   pVM         VM handle.
     2964 * @param   pVCpu       VMCPU handle.
     2965 * @param   fEnable     True if the gate should be enabled.
     2966 *                      False if the gate should be disabled.
     2967 */
     2968REMR3DECL(void) REMR3A20Set(PVM pVM, PVMCPU pVCpu, bool fEnable)
     2969{
     2970    LogFlow(("REMR3A20Set: fEnable=%d\n", fEnable));
     2971    VM_ASSERT_EMT(pVM);
     2972
     2973    /** @todo SMP and the A20 gate... */
     2974    if (pVM->rem.s.Env.pVCpu == pVCpu)
     2975    {
     2976        ASMAtomicIncU32(&pVM->rem.s.cIgnoreAll);
     2977        cpu_x86_set_a20(&pVM->rem.s.Env, fEnable);
     2978        ASMAtomicDecU32(&pVM->rem.s.cIgnoreAll);
     2979    }
     2980}
    29542981
    29552982
  • trunk/src/recompiler/softmmu_header.h

    r38300 r38320  
    8787    RES_TYPE res;
    8888    target_ulong addr;
    89 #ifdef VBOX
    90     uintptr_t physaddr;
    91 #else
    9289    unsigned long physaddr;
    93 #endif
    9490    int mmu_idx;
    9591
     
    112108    int res, page_index;
    113109    target_ulong addr;
    114 #ifdef VBOX
    115     uintptr_t physaddr;
    116 #else
    117110    unsigned long physaddr;
    118 #endif
    119111    int mmu_idx;
    120112
     
    141133    int page_index;
    142134    target_ulong addr;
    143 #ifdef VBOX
    144     uintptr_t physaddr;
    145 #else
    146135    unsigned long physaddr;
    147 #endif
    148136    int mmu_idx;
    149137
     
    219207#undef MMUSUFFIX
    220208#undef ADDR_READ
    221 
    222 #include <iprt/assert.h>
    223 AssertCompileSize(uint64_t,8);
    224 AssertCompileSize(uint32_t,4);
    225 AssertCompileSize(uint16_t,2);
    226 AssertCompileSize(uint8_t,1);
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