VirtualBox

Ignore:
Timestamp:
Aug 3, 2011 11:58:41 AM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
73308
Message:

REM,PGM: Fix A20 syncing between the VMM and the recompiler.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/recompiler/VBoxRecompiler.c

    r37852 r38300  
    21602160
    21612161    /*
     2162     * Sync the A20 gate.
     2163     */
     2164    bool fA20State = PGMPhysIsA20Enabled(pVCpu);
     2165    if (fA20State != RT_BOOL(pVM->rem.s.Env.a20_mask & RT_BIT(20)))
     2166    {
     2167        ASMAtomicIncU32(&pVM->rem.s.cIgnoreAll);
     2168        cpu_x86_set_a20(&pVM->rem.s.Env, fA20State);
     2169        ASMAtomicDecU32(&pVM->rem.s.cIgnoreAll);
     2170    }
     2171
     2172    /*
    21622173     * Registers which are rarely changed and require special handling / order when changed.
    21632174     */
     
    29412952#undef LOG_GROUP
    29422953#define LOG_GROUP LOG_GROUP_REM
    2943 
    2944 
    2945 /**
    2946  * Notify the recompiler about Address Gate 20 state change.
    2947  *
    2948  * This notification is required since A20 gate changes are
    2949  * initialized from a device driver and the VM might just as
    2950  * well be in REM mode as in RAW mode.
    2951  *
    2952  * @param   pVM         VM handle.
    2953  * @param   pVCpu       VMCPU handle.
    2954  * @param   fEnable     True if the gate should be enabled.
    2955  *                      False if the gate should be disabled.
    2956  */
    2957 REMR3DECL(void) REMR3A20Set(PVM pVM, PVMCPU pVCpu, bool fEnable)
    2958 {
    2959     LogFlow(("REMR3A20Set: fEnable=%d\n", fEnable));
    2960     VM_ASSERT_EMT(pVM);
    2961 
    2962     ASMAtomicIncU32(&pVM->rem.s.cIgnoreAll);
    2963     cpu_x86_set_a20(&pVM->rem.s.Env, fEnable);
    2964     ASMAtomicDecU32(&pVM->rem.s.cIgnoreAll);
    2965 }
    29662954
    29672955
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